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# Copyright (c) 2012 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\"\"\"Entry point for the dartium buildbots.\n... | python | edit | 2 | 4 | bsd-3-clause | 57bda16a1e948d81884277f35b77c16e50d4870e | eunchong/build,eunchong/build,eunchong/build,eunchong/build | scripts/slave/chromium/dart_buildbot_run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nimport pickle\nimport cloudpickle\n\nimport io\n\n\n@pytest.mark.models\ndef test_pickle(EN):\n file_ = io.BytesIO()\n cloudpickle.dump(EN.parser, file_)\n\n file_.seek(0)\n\n loaded = pickle.load(file_)\n\n\n``... | python | edit | 6 | 0 | mit | cd71b6b0a94c98966a7750f067eaa2dd044f5fec | banglakit/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,raphael0202/spaCy,raphael0202/spaCy,recognai/spaCy,explosion/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,banglakit/spaCy,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,banglakit/spaCy,aikrame... | spacy/tests/parser/test_parser_pickle.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom markdown import markdown\nimport bleach\nimport re\nfrom werkzeug.exceptions import NotFound\nfrom . import consts as c\n\n\ndef md2html(md: str):\n allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li',... | python | edit | 1 | 2 | mit | f48651eb780aa10d2cbe115126a0783c72b76e7e | Einbert-Xeride/tsscp,Einbert-Xeride/tsscp | tsscp/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.blueprints.authorization.decorators\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom functo... | python | edit | 1 | 2 | bsd-3-clause | ab3cb8fb539d65cb3549d52ec34c7b533a98b2d4 | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps | byceps/blueprints/authorization/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n_ORGANIZATION = 'mesonbuild'\n_RESTRICTED_PROJECTS = [\n 'meson',\n 'meson-ci',\n 'mesonwrap',\n 'wrapdevtools',\n 'wrapweb',\n]\n_RESTRICTED_ORG_PROJECTS = [\n _ORGANIZATION + '/' + proj for proj in _RESTRICTED_PROJECTS\n... | python | edit | 1 | 1 | apache-2.0 | f3dcb7105049b9dcc8d6a1a97fbfe8968092a533 | mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb | mesonwrap/inventory.py | rejected_duplicate | Near-duplicate of sample 20260 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ADS7830\n\nclass FEZHAT:\n \n def __init__(self):\n self._ads = ADS7830.ADS7830(1, 0x48)\n \n def get_light():\n return self._ads.read(5) / 255.0\n \n # http://ww1.microchip.com/downloads/en/Device... | python | edit | 3 | 1 | apache-2.0 | 644912b4e4ef533db23b732a36e4dfc373f47540 | bechynsky/FEZHATPY | FEZHAT.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport moderngl\nfrom demosys.conf import settings\nfrom demosys.utils.module_loading import import_string\n\n# Window instance shortcut\nWINDOW = None # noqa\n\n\ndef window(raise_on_error=True) -> 'demosys.context.base.Window':\n \"\"... | python | edit | 1 | 3 | isc | 67e16e13b6a4cc505758b3af26e287914ac8f335 | Contraz/demosys-py | demosys/context/__init__.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\nsetup(\n name='celery-queued-once',\n version='0.1',\n description='Celery base task de-duplicating tasks',\n author='Corey Farwell',\n author_email='<EMAIL>',\n p... | python | edit | 1 | 0 | mit | 6b32e3a379920557183effdddf977f21e2603159 | educreations/celery-queued-once | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport re\nVERSIONFILE = \"openomni/_version.py\"\nverstrline = open(VERSIONFILE, \"rt\").read()\nVSRE = r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\"\nmo = re.search(VSRE, verstrline, re.M)\ni... | python | edit | 1 | 0 | mit | 6740467a15a54d4ca0bf0a7e358e2e5c92e04344 | openaps/openomni,openaps/openomni,openaps/openomni | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='ok',\n version='1.0.6',\n description=('ok.py supports programming projects by running tests, '\n 'tracking progress, and assisting in debugging.'),\n ... | python | edit | 1 | 0 | apache-2.0 | ed948b9206efb8329d9b0eac1814a9ae4945871a | jordonwii/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,jackzhao-mj/ok,jackzhao-mj/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jackzhao-mj/ok,jackzhao-mj/ok | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\nimport os.path\nfrom setuptools import setup, find_packages\n\n\ndef get_version():\n \"\"\"\n Loads the current module version from version.py and returns\n it.\n\n :returns: modul... | python | edit | 1 | 1 | mit | b74be667803abed58c08a298d5a806692d2fab74 | TkTech/pytextql | 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 | 168aac03b6d526836ec9768a505e732b41f1eefc | uw-it-aca/mdot,uw-it-aca/mdot,uw-it-aca/mdot,charlon/mdot,charlon/mdot,uw-it-aca/mdot,charlon/mdot | setup.py | rejected_duplicate | Near-duplicate of sample 22308 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\n\ndef readfile(fname):\n with open(fname) as f:\n content = f.read()\n return content\n\n\nsetup(name='sockjs-cyclone',\n version='1.0.2',\n author='Flavio ... | python | edit | 1 | 1 | mit | 1303d1c14f7c3127b8fc87178f268d8b052ef503 | flaviogrossi/sockjs-cyclone | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport sys\nimport os\nimport re\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nif sys.argv[-1] in ('submit', 'publish'):\n os.system('python setup.py sdi... | python | edit | 1 | 0 | mit | 0751e67d5d7700e7280618ff2249e1573bc72144 | Lukasa/collectr,Lukasa/collectr | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nREQUIREMENTS = [\n 'beautifulsoup4<=4.3.2']\n\n\nPACKAGES = [\n 'pha']\n\n\nCLASSIFIERS = [\n 'Development Status :: 3 - Alpha',\n 'Intended Audience :: Developers',\n 'License... | python | edit | 1 | 0 | mit | d71a39e8721ff3764ac10dd368c9f00501290ea4 | robjohncox/python-html-assert | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\npackages = ['magento']\nrequires = []\n\nsetup(\n name='python-magento',\n version='0.2.1',\n author='Vikram Oberoi',\n author_... | python | edit | 1 | 0 | mit | 6461a9205fa7bdafadba6e23129f3989a07c7683 | Floship/python-magento,DanielOaks/python-magento,voberoi/python-magento,bernieke/python-magento | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom os import path\n\n\ncurrent_dir = path.abspath(path.dirname(__file__))\n\nwith open(path.join(current_dir, 'README.md'), 'r') as f:\n long_description = f.read()\n\nwith open(path.join(current_dir, 'req... | python | edit | 1 | 0 | mit | 0d0201bc4f6c5164effd755300b98b8f86f1c541 | befelix/SafeOpt,befelix/SafeOpt | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n TestCommand.finalize_options(self)\n self.test_args = []\n ... | python | edit | 1 | 1 | mit | 41c5040795c036bdc64a796f97e2618edda2c534 | bitly/pynsq,goller/pynsq,nsqio/pynsq,jonmorehouse/pynsq,protoss-player/pynsq,jehiah/pynsq,mreiferson/pynsq,protoss-player/pynsq,virtuald/pynsq,mreiferson/pynsq,bitly/pynsq,jonmorehouse/pynsq,virtuald/pynsq | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nlong_description = open('README.rst').read()\n\nsetup(\n name = 'lcboapi',\n packages = ['lcboapi'],\n version = '0.1.3',\n description = 'Python wrapper for the unofficial LCBO API',\n long_descript... | python | edit | 1 | 0 | mit | 3dc525e109d5de1aacaf21c8ea1cdc1b627e206d | shamrt/LCBOAPI | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-password-policies',\n version=__import__('password_policies').__version__,\n description='A Django application to implent password policies.',\n long_descripti... | python | edit | 1 | 0 | bsd-3-clause | ba4fe093399aa94ccfbf6d4b287f3230851df3fd | mjschultz/django-password-policies,tarak/django-password-policies,mjschultz/django-password-policies,tarak/django-password-policies | 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\nsetup(name='webracer',\n version='0.2.0',\n description='Comprehensive web application testing library',\n author='Oleg Pudeyev',\n author_email='<EMAIL>',\n url='h... | python | edit | 1 | 0 | bsd-2-clause | 59a08fff34f095f601ced76cd7b2e27665824146 | p/webracer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# © 2014 Ian Eure\n# Author: Ian Eure\n#\n\nfrom setuptools import setup, find_packages\n\nsetup(name=\"yar\",\n version=\"0.0.2\",\n packages=find_packages(),\n tests_require=['nose'],\n inst... | python | edit | 3 | 0 | bsd-3-clause | 8da4e9015df3e0e8ca03c0261c05970294451421 | ieure/yar | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='anymarkup-core',\n version='0.6.2',\n description='Core library for anymarkup',\n long_description=''.join(open('RE... | python | edit | 3 | 0 | bsd-3-clause | f823467e4ead01c774c0c8c177d23b0b89b2d5b0 | bkabrda/anymarkup-core | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n \n \nsetup(\n name = \"django-templatetag-sugar\",\n version = __import__(\"templatetag_sugar\").__version__,\n author = \"Alex Gaynor\",\n author_email = \"<EMAIL>\",\n description = \"A li... | python | edit | 1 | 0 | bsd-3-clause | 5fa6b78a9f0ac668d0ad8a0544bbe9f0784a5a19 | alex/django-templatetag-sugar,IRI-Research/django-templatetag-sugar | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptescli',\n version='1.0.2',\n url='https://github.com/zooniverse/panoptes-cli',\n author='Adam McMaster',\n author_email='<EMAIL>',\n description=(\n ... | python | edit | 1 | 0 | apache-2.0 | 2dd974791de682fe80d7da98e81add9addd1033b | zooniverse/panoptes-cli | setup.py | rejected_duplicate | Near-duplicate of sample 18340 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = '0.3.2'\n\nsetup(\n name='django-tagging-ext',\n version=version,\n description=\"Adds in new features to supplement django-tagging\",\n long_description=open(\"README.rst... | python | edit | 1 | 0 | mit | 85ccd327d085bc7822b53e9eec952cdbbf9caa12 | pydanny/django-tagging-ext | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nDESCRIPTION = \"FFXI Linkshell Community Scraper\"\n\nwith open('README.md') as f:\n LONG_DESCRIPTION = f.read()\n\nwith open('requirements.txt') as f:\n required = f.read().splitlines()\... | python | edit | 1 | 0 | mit | 0d5beefe5a03754d540abb7710ccb4415b9abedf | scragg0x/FFXI-Scraper | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\ntry:\n from pypandoc import convert\n read_md = lambda f: convert(f, 'rst')\nexcept ImportError:\n print(\"warning: pypandoc module not found, could not convert Markdown to RST\")\n read_md = lambda... | python | edit | 1 | 0 | apache-2.0 | 0370554fccdd5a2f6d6fefe86e82ba3a4857ecbb | o19s/elyzer | 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\nfrom sentry_youtrack import VERSION\nimport os\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings')\n\ninstall_requires = [\n 'sentry>=6.1.0',\n 'reque... | python | edit | 1 | 0 | bsd-2-clause | fdb4a9acdc6f3df9912f76fa170508a71b35a2db | bogdal/sentry-youtrack,bogdal/sentry-youtrack,bogdal/sentry-youtrack,bogdal/sentry-youtrack | 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:\n from distutils.core import setup\n\nlong_description = \"\"\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(\n ... | python | edit | 1 | 0 | bsd-2-clause | 1ca70dee87fbcbbbd6c267013c7be5f39999a6d9 | JohannesBuchner/imagehash,JohannesBuchner/imagehash | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport codecs\nfrom setuptools import setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n # intentionally *not* adding an encoding option to open\n return codecs.open(os.path.join(here, *part... | python | edit | 1 | 1 | apache-2.0 | d19472be5e3a920c41c33b52a4a43078cedcc26b | cloudify-cosmo/repex | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\nfrom setuptools import setup, find_packages\n\n_here = os.path.dirname(__file__)\n_init = os.path.join(_here, 'van', 'contactology', '__init__.py')\n_init = open(_init, 'r').read()\n\nVERSION = re.search(r'^__version__... | python | edit | 1 | 0 | bsd-3-clause | fbb675f33933c2dd06f9853b042aea9613a0d602 | jinty/van.contactology | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\n\nfrom setuptools import setup, find_packages\n\n\ndef readme():\n path = os.path.join(os.path.dirname(__file__), 'README.rst')\n return open(path, 'r').read()\n\n\nsetup(\n name=\"txTwitter\",\n version=\"0.1.1a... | python | edit | 1 | 1 | mit | 7fbaf4f8b6a2a034f3fcac3e70c19712ecc77de4 | jerith/txTwitter | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport click\nimport requests\nimport requests_cache\n\n# Cache the API calls and expire after 12 hours\nrequests_cache.install_cache(expire_after=43200)\n\nurl = 'http://ben-major.co.uk/labs... | python | edit | 1 | 2 | mit | d8d18b50c88e5099942cdb1545863585a8f141a6 | kevgathuku/top40,andela-kndungu/top40 | top40.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n########## INSTALLED APPS\nFANCYPAGES_REQUIRED_APPS = (\n 'rest_framework',\n 'model_utils',\n 'south',\n 'compressor',\n 'twitter_tag',\n 'sorl.thumbnail',\n)\nFANCYPAGES_APPS = (\n 'fancypages',\n 'fancypages.api',... | python | edit | 1 | 0 | bsd-3-clause | b8906e596193bcdc22d5cdd6b4ce57347e262621 | socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages | fancypages/defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport unittest\nfrom pyunio import pyunio\nimport urllib \n\npyunio.use('httpbin')\n\nparams_get = {\n 'params': {\n 'name': 'James Bond'\n }\n }\n\nparams_body = {\n... | python | edit | 1 | 1 | mit | 3d09d6e5a8717c4dee9422b9d84a66319a9bdc01 | citruspi/PyUnio | tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\n\nfrom social_auth.backends.exceptions import AuthException\n\n\nclass SocialAuthExceptionMiddleware(... | python | edit | 2 | 2 | bsd-3-clause | d2b0aba3e13246193f37758e23f4d26b90552508 | omab/django-social-auth,duoduo369/django-social-auth,MjAbuz/django-social-auth,beswarm/django-social-auth,getsentry/django-social-auth,omab/django-social-auth,lovehhf/django-social-auth,sk7/django-social-auth,WW-Digital/django-social-auth,qas612820704/django-social-auth,caktus/django-social-auth,gustavoam/django-social... | social_auth/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nversion = (0, 1, 26)\n\n__title__ = \"python-simple-workflow\"\n__author__ = \"Oleiade\"\n__license__ = \"MIT\"\n\n__version__ = '.'.join(map(str, version))\n\n```\n\nApply this change: Upda... | python | edit | 1 | 0 | mit | e608f1caad945e45a815d8ff37aa12bee41219ca | botify-labs/python-simple-workflow,botify-labs/python-simple-workflow | swf/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom thumbs import ImageWithThumbsField\nfrom apps.projects.models import Project\n\n\nclass News(models.Model):\n title = models.CharField(max_length=200)\n s... | python | edit | 2 | 1 | mit | 3afee3ae9bc791b0b3ae084f4e53950ec1e32f48 | nsi-iff/nsi_site,nsi-iff/nsi_site,nsi-iff/nsi_site | apps/news/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.core.management.base import NoArgsCommand\n\nfrom guardian.utils import clean_orphan_obj_perms\n\n\nclass Command(NoArgsCommand):\n \"\"\"\n clean_orphan_obj_perms command is a tiny... | python | edit | 1 | 2 | bsd-2-clause | ce7e9b95a9faef242b66e9c551861986f311cdee | rmgorman/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian | guardian/management/commands/clean_orphan_obj_perms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef mock_api(path, file_path):\n from httmock import urlmatch, response\n @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path)\n def webpay_api_mock(url, request):\n from os import path\n import ... | python | edit | 1 | 7 | mit | e6af345239f2778a2245d9f8be54bf754224aafd | yamaneko1212/webpay-python | tests/helper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2019 Zadara Storage, Inc.\n# Originally authored by Jeremy Brown - https://github.com/jwbrown77\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the L... | python | edit | 1 | 1 | apache-2.0 | e40f3cfe77b09d63bce504dcce957bee7788028a | zadarastorage/zadarapy | zadarapy/vpsa/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"AMQP Specifications and Classes\"\"\"\n\n__author__ = 'Gavin M. Roy'\n__email__ = '<EMAIL>'\n__since__ = '2011-09-23'\n__version__ '1.0.1'\n\nfrom header import ProtocolHeader\nfrom header import ContentHeader\n\nimport body\nimport c... | python | edit | 8 | 0 | bsd-3-clause | 8f9615ebd7ae4802b1e44d6b8243aafb785a7fa3 | gmr/pamqp | pamqp/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"build_ext tests\n\"\"\"\nimport unittest\nimport distutils.command.build_ext as orig\n\nfrom setuptools.command.build_ext import build_ext\nfrom setuptools.dist import Distribution\n\nclass TestBuildExtTest(unittest.TestCase):\n\n ... | python | edit | 1 | 1 | mit | 359a80897decd64a0d997005dc7cb731fc294133 | pypa/setuptools,pypa/setuptools,pypa/setuptools | setuptools/tests/test_build_ext.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\nfrom functools import wraps\n\nfrom django.conf import settings\nfrom django.http import HttpResponseForbidden\nfrom django.views.decorators.csrf import csrf_exempt\n\n\ndef token_required(view_func):\n @csrf_exem... | python | edit | 1 | 3 | mit | 59366a538564d8b1a756054b4c24c5d5a5fc2ae3 | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | frigg/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport nose.tools as nt\nfrom asyncio import Future, gather, get_event_loop, sleep\n\nfrom pyee import EventEmitter\n\n\ndef test_async_emit():\n \"\"\"Test that event_emitters can handle wrapping coroutines\n ... | python | edit | 1 | 2 | mit | 481571daf8e89fb98424e1a068c64c7c1a6209fb | jfhbrook/pyee | py3-test/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens... | python | edit | 1 | 2 | apache-2.0 | 244da6a4ffa5ff8de80d18baceedcf947ef6b68e | freedomtan/tensorflow,kevin-coder/tensorflow-fork,aldian/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,hfp/tensorflow-xsmm,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,theflofly... | tensorflow/python/tf2.py | rejected_duplicate | Near-duplicate of sample 19711 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport socket\nimport os\n\n\ndef getHostname():\n \"\"\"\n Returns the current host hostname\n \"\"\"\n return socket.gethostname()\n\n\ndef fail2banStatus():\n \"\"\"\n Returns the status of fail2ban for init and systemd... | python | edit | 1 | 5 | mit | 363184f27bfb6c181448486f0c3e9d6d5d6a21dc | nocternology/fail2dash,nocternology/fail2dash | core/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport math\n\ndef update_image_rect(image, rect):\n image_rect = image.get_rect()\n image_rect.x = rect.x\n image_rect.y = rect.y\n\ndef distance_between_rects(rect1, rect2):\n (r1_center_x, r1_center_y) = rect1.center\n (r2... | python | edit | 1 | 1 | mit | 28fe6a0a1e5e5d8781854aad4f22d368d3d73b12 | Daihiro/ldjam37,maximx1/ldjam37 | ld37/common/utils/libutils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport hackarena.constants\nfrom hackarena.constants import Classes\nfrom hackarena.constants import Spell\nfrom hackarena.game_objects import BaseGameObject\n\n\nAVAILABLE_SPELLS = {\n Classes.TANK: [Spell.TANK_... | python | edit | 1 | 3 | mit | 07ab8c8bebdb712131cb0ccc4893f81b33d261cd | verekia/hackarena,verekia/hackarena,verekia/hackarena,verekia/hackarena | hackarena/player.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nimport typer\nfrom typer.testing import CliRunner\n\nfrom first_steps import tutorial001 as mod\n\nrunner = CliRunner()\napp = typer.Typer()\napp.command()(mod.main)\n\n\... | python | edit | 1 | 2 | mit | f9d7f69d7e8ae1dceaba09ac4412438076261744 | tiangolo/typer,tiangolo/typer | tests/test_completion.py | rejected_duplicate | Near-duplicate of sample 3456 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.project import ProjectEndpoint\nfrom sentry.api.serializers import serialize\nfrom sentry.models import Release\n\n\nclass ProjectReleas... | python | edit | 1 | 1 | bsd-3-clause | 95421d1b71d2f5847bcea439cde79af2a984eda6 | zenefits/sentry,ewdurbin/sentry,fotinakis/sentry,wong2/sentry,alexm92/sentry,gencer/sentry,Natim/sentry,1tush/sentry,hongliang5623/sentry,daevaorn/sentry,BuildingLink/sentry,daevaorn/sentry,ngonzalvez/sentry,zenefits/sentry,JamesMura/sentry,ngonzalvez/sentry,pauloschilling/sentry,argonemyth/sentry,wong2/sentry,JamesMur... | src/sentry/api/endpoints/project_releases.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport shutil\nimport tempfile\nfrom os import path\nimport unittest\nfrom libs.qpanel.upgrader import __first_line as firstline, get_current_version\n\n\nclass UpgradeTestClass(unittest.TestCase):\n\n def setUp(self):\n # Create ... | python | edit | 1 | 1 | mit | e7149a488eaa85baecacfdf78a5d190b51dc46d7 | roramirez/qpanel,skazancev/qpanel,roramirez/qpanel,skazancev/qpanel,roramirez/qpanel,skazancev/qpanel,skazancev/qpanel,roramirez/qpanel | tests/test_upgrade.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom django.conf import settings\nfrom django.http import Http404\nfrom django.shortcuts import render\nfrom pytz import timezone\n\nfrom dojo.filters import LogEntryFilter\nfrom dojo.utils import get_page_items, add_bread... | python | edit | 1 | 2 | bsd-3-clause | 2deb924aaa78329d11c40d487788dc027dbb07a0 | grendel513/django-DefectDojo,OWASP/django-DefectDojo,OWASP/django-DefectDojo,grendel513/django-DefectDojo,OWASP/django-DefectDojo,OWASP/django-DefectDojo,rackerlabs/django-DefectDojo,yan99uic/django-DefectDojo,grendel513/django-DefectDojo,yan99uic/django-DefectDojo,rackerlabs/django-DefectDojo,yan99uic/django-DefectDoj... | dojo/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nservice_room = \"FIXME.lobby\"\naccesslog_room = \"FIXME.accesslog\"\ncombined_room = \"FIXME.combined\"\npath = \"\"\nxmpp_jid = \"\"\nxmpp_password = \"FIXME\"\nxmpp_ignore_cert = True\nxmpp_extra_ca_certs = None\nxmpp_rate_limit = 10\n\n... | python | edit | 1 | 0 | mit | ad2ad7df04f9b6824a1e37505253fc513b851a06 | abusesa/abusehelper | abusehelper/contrib/accesslogbot/configuration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport glob\n\nfrom lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config\n\n\nSOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))\nSYMBOLS_DIR = 'dist\\\\symbols'\nPDB_LIST =... | python | edit | 1 | 3 | mit | 6d663d1d0172b716e0dccc1f617b5a09b2905b67 | wolfflow/electron,shockone/electron,ianscrivener/electron,oiledCode/electron,christian-bromann/electron,fffej/electron,darwin/electron,digideskio/electron,jannishuebl/electron,darwin/electron,lrlna/electron,faizalpribadi/electron,lzpfmh/electron,rsvip/electron,mubassirhayat/electron,bwiggs/electron,jiaz/electron,gstack... | script/upload-windows-pdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport decimal\nimport logging\n\nimport elasticsearch\n\nfrom nefertari.renderers import _JSONEncoder\n\n\nlog = logging.getLogger(__name__)\n\n\nclass JSONEncoder(_JSONEncoder):\n def default(self, obj):\n if is... | python | edit | 1 | 5 | apache-2.0 | 46be6053526da38ad9f8fdf40ebb870cd64ae88e | ramses-tech/nefertari-sqla,geniusproject/nefertari-sqla,brandicted/nefertari-sqla,oleduc/nefertari-sqla | nefertari_sqla/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\nfrom wagtail.wagtailcore.models import Page\nfrom wagtail.wagtailsearch.models import Query\n\ntry:\n # Wagtail >= 1.1\n ... | python | edit | 1 | 4 | bsd-3-clause | 0aa7830b3d841d9851521c14b8754f9101bc9a96 | torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo | demo/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sockjs.tornado import SockJSConnection\nfrom ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider\nfrom .. import route_handler\nimport json\n\n\npub_sub = RedisPubSubProvider()\n\nclass ConnectionMixin(object):\n def... | python | edit | 1 | 3 | bsd-3-clause | bcca20cecbc664422f72359ba4fba7d55e833b32 | sahlinet/swampdragon,denizs/swampdragon,michael-k/swampdragon,seclinch/swampdragon,Manuel4131/swampdragon,aexeagmbh/swampdragon,Manuel4131/swampdragon,d9pouces/swampdragon,aexeagmbh/swampdragon,michael-k/swampdragon,d9pouces/swampdragon,boris-savic/swampdragon,boris-savic/swampdragon,jonashagstedt/swampdragon,jonashags... | swampdragon/connections/sockjs_connection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nimport unittest\nfrom socket import *\n\nfrom common import *\nfrom testdc import *\n\nfrom test_dbserver import DatabaseBaseTests\n\nCONFIG = \"\"\"\\\nmessagedirector:\n bind: 127.0.0.1:57123\n\ngeneral:\n dc... | python | edit | 10 | 1 | bsd-3-clause | cd90cf68f0f98f569bc8c2e1739e866eb0630893 | blindsighttf2/Astron,ketoo/Astron,pizcogirl/Astron,blindsighttf2/Astron,blindsighttf2/Astron,pizcogirl/Astron,pizcogirl/Astron,blindsighttf2/Astron,ketoo/Astron,ketoo/Astron,ketoo/Astron,pizcogirl/Astron | test/test_dbserver_bdb.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 20.08.2017 15:42\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"\n\nfrom grammpy import Grammar\n\n\ndef find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list:\... | python | edit | 1 | 8 | mit | 946212f26ff72ea89cb549dfd759572975a6b8ad | PatrikValkovic/grammpy | grammpy_transforms/EpsilonRulesRemove/findTerminalsRewritedToEps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\n\n\ndef speak(say_wa):\n echo_string = \"'{0}'\".format(say_wa.replace(\"'\", \"'\\''\"))\n\n echo = subprocess.Popen(['echo', echo_string], stdout=subprocess.PIPE)\n espeak = subprocess.Popen([\"espeak\", \"-v\"... | python | edit | 1 | 2 | mit | e9aef2b63b1a6036703aa73bc0a6c30bb9425eb6 | jessstringham/raspberrypi | io_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Import libnacl libs\nimport libnacl.secret\n# Import python libs\nimport unittest\n\nclass TestSecret(unittest.TestCase):\n '''\n '''\n def test_secret(self):\n msg = b'But then of course African swallows are not migratory... | python | edit | 1 | 1 | apache-2.0 | ff3a7ad122af4cc1cdfa0b882b2d1d7366d640f2 | coinkite/libnacl | tests/unit/test_secret.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Disable history manager, we don't really use it\n# and by default it puts an sqlite file on NFS, which is not something we wanna do\nc.Historymanager.enabled = False\n\n# Use memory for notebook notary file to workaround corrupted files o... | python | edit | 2 | 0 | bsd-3-clause | e981369f61cec6582b3b9b583639f519ab5f0106 | berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub | deployments/prob140/image/ipython_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nA Sphinx extension adding a 'css' role creating links to\nthe spec’s railroad diagrams.\n\n\"\"\"\n\nfrom docutils import nodes\n\n\ndef role_fn(_name, rawtext, text, lineno, inliner, options={}, content=()):\n ref = 'http://dev.... | python | edit | 1 | 2 | bsd-3-clause | 089e4f59fdf73d1a4e8d03ac07f475b2ffe62e30 | SimonSapin/tinycss2 | docs/css_diagram_role.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom .utils.version import get_version\n\n#: This may not be the exact version as it's subject to modification with\n#... | python | edit | 1 | 0 | mit | 78c4e61684baaae3487641a2c1813bbd664822a1 | lyw07/kolibri,jonboiser/kolibri,indirectlylit/kolibri,learningequality/kolibri,DXCanas/kolibri,benjaoming/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri,benjaoming/kolibri,indirectlylit/kolibri,DXCanas/kolibri,mrpau/kolibri,mrpau/kolibri,mrpau/kolibri,benjaoming/kolibri,benjaoming/kolibri,lyw07... | kolibri/__init__.py | rejected_duplicate | Near-duplicate of sample 11032 | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix local dist to see if that fixes things"
},
{
"role": "assistant",
"content": "RAW_PROCESSING = ['postgres']\nNORMALIZED_PROCESSING = ['elasticsearch', 'postgres']\nRESPONSE_PROCESSOR = 'postgres'\n"
}
] | python | new_file | 1 | 0 | apache-2.0 | 7e4fc8857284c539ce91dd53f11b460a6c9b1633 | erinspace/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi | scrapi/settings/local-dist.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Default settings\nimport ConfigParser\nimport os\nimport pyaudio\n\nPROG = 'soundmeter'\nUSER_DIR = os.path.join(os.path.expanduser('~'), '.' + PROG)\nUSER_LOGFILE = os.path.join(USER_DIR, 'log')\nUSER_CONFIG = os.path.join(USER_DIR, 'con... | python | edit | 1 | 0 | bsd-2-clause | c827ba1ec1846847e44416c6ec5a74418558657c | shichao-an/soundmeter | soundmeter/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests related to the remotes.tasks functions.\"\"\"\n\nfrom django_celery_beat.models import IntervalSchedule, PeriodicTask\n\nfrom jobs.models import Post\nfrom ..models import Source\nfrom ..tasks import setup_periodic_tasks, harves... | python | edit | 1 | 1 | bsd-3-clause | 0656b4c1be9820f3cd096359cd8817153f2e0b81 | ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder | freelancefinder/remotes/tests/test_tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the LICENSE.txt file for details.\nfrom __future... | python | edit | 1 | 1 | bsd-3-clause | 1c40e03b487ae3dcef9a683de960f9895936d370 | itziakos/haas,itziakos/haas,sjagoe/haas,scalative/haas,sjagoe/haas,scalative/haas | haas/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A simple Python client implementation of WebFinger (RFC 7033).\n\nWebFinger is a discovery protocol that allows you to find information about\npeople or things in a standardized way.\n\"\"\"\n\n\n__version__ = \"3.0.0.dev0\"\n\n\n# Ba... | python | edit | 6 | 1 | bsd-3-clause | 0337d51dc2c65c376f30046a0869c6fabf012cd0 | Elizafox/python-webfinger | webfinger/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport sys\nsys.path.insert(1,\"../../\")\nimport h2o\nfrom tests import pyunit_utils\n\n\n\n\ndef space_headers():\n \n \n\n f = h2o.import_file(path=pyunit_utils.locate(\"smalldata/jira/citi... | python | edit | 1 | 1 | apache-2.0 | 5303e99508a5c64d3a40cbfd6b6e4c29c74c647f | h2oai/h2o-dev,jangorecki/h2o-3,h2oai/h2o-3,spennihana/h2o-3,mathemage/h2o-3,jangorecki/h2o-3,michalkurka/h2o-3,mathemage/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,jangorecki/h2o-3,spennihana/h2o-3,jangorecki/h2o-3,jangorecki/h2o-3,h2oai/h2o-3,mathemage/h2o-3,spennihana/h2o-3,mathemage/h2o-3,mathemage/h2o-3,h2oai/h2o-dev,spenniha... | h2o-py/tests/testdir_misc/pyunit_space_headers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Command-line interface to pycat.\"\"\"\n\nimport argparse\nimport sys\nimport socket\nfrom .talk import talk\n\n\ndef argument_parser():\n \"\"\"Generate an `argparse` argument parser for pycat's arguments.\"\"\"\n parser = argp... | python | edit | 1 | 3 | mit | d293aedf296f4b63cb11ece1c00778981afef20c | prophile/pycat | pycat/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\n\nfrom django.conf import settings\nfrom django.utils.translation import get_language\nfrom django.utils.translation import to_locale\n\n_JSON_MESSAGES_FILE_CACHE = {}\n\n\ndef locale_data_file(locale):\n path = g... | python | edit | 1 | 5 | mit | becc9ff7e1d260f9a4f47a36a0e6403e71f9f0b0 | DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation | contentcuration/contentcuration/utils/messages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nModule provides a simple cubic_rectification function.\n\"\"\"\n\nimport numpy as np\n\n\ndef cubic_rectification(x):\n \"\"\"\n Rectified cube of an array.\n\n Parameters\n ----------\n x : numpy.ndarray\n Inp... | python | edit | 1 | 1 | mit | 01385f012f984d8a04d3cd9c71ca3cf582a9bf5d | scottclowe/python-ci,scottclowe/python-continuous-integration,scottclowe/python-ci,scottclowe/python-continuous-integration | package_name/module.py | rejected_duplicate | Near-duplicate of sample 22719 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mfr.ext.md import Handler, render\nfrom mock import MagicMock\n\ndef test_render_html():\n fakefile = MagicMock(spec=file)\n fakefile.read.return_value = '# foo'\n assert render.render_html(fakefile) == '<h1>foo</h1>'\n fak... | python | edit | 2 | 1 | apache-2.0 | 5b43264321e4649312050264524a6df7682a6641 | CenterForOpenScience/modular-file-renderer,mfraezz/modular-file-renderer,Johnetordoff/modular-file-renderer,AddisonSchiller/modular-file-renderer,mfraezz/modular-file-renderer,rdhyee/modular-file-renderer,icereval/modular-file-renderer,TomBaxter/modular-file-renderer,Johnetordoff/modular-file-renderer,rdhyee/modular-fi... | mfr/ext/md/tests/test_md.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2015 Spanish National Research Council\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 co... | python | edit | 1 | 1 | apache-2.0 | 02fbf47a49cb66391dcb22b1a7ba7a38be210ffe | openstack/ooi,alvarolopez/ooi,stackforge/ooi,orviz/ooi | ooi/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright 2010 Jonathan Kinred\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy\n# of the License at:\n# \... | python | edit | 1 | 4 | apache-2.0 | 76e5d94e12717db685b0c0c66e893d7e4365a57b | graphite-server/psphere,jkinred/psphere | examples/connect.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nimport logging\n\nfrom raven.contrib.flask import Sentry\n\nfrom framework.sessions import get_session\n\nfrom website import settings\n\nlogger = logging.getLogger(__name__)\n\nsentry = Sentry(ds... | python | edit | 1 | 3 | apache-2.0 | 57f72a0f64ccc7713a38a03d016e05ec8c528b1d | crcresearch/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,caneruguz/osf.io,TomBaxter/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,aaxelb/osf.io,mfraezz/osf.io,icereval/osf.io,binoculars/osf.io,leb2dg/osf.io,baylee-d/osf.io,mfraezz/osf.io,laurenrevere/osf.io,chennan47/osf.io,caneruguz/osf.io,felliott/osf.io,mattclark/osf.io,ad... | framework/sentry/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAn example client. Run simpleserv.py first before running this.\n\"\"\"\n\nimport json\n\nfrom twisted.internet import reactor, protocol\n\n\n# a client protocol\n\nclass NethackClient(protocol.Protocol):\n \"\"\"Once connected, ... | python | edit | 6 | 1 | mit | d80a21abcc56192d57c987cf4b8e2057e1d4ffcd | ryansb/netHUD | nethud/nh_client.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nfrom ggrc import db\nfrom sql... | python | edit | 1 | 3 | apache-2.0 | c66a2933cca12fa27b688f60b3eb70b07bcce4e5 | prasannav7/ggrc-core,jmakov/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,plamut/ggrc-core,jmakov/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,prasannav7/ggrc-co... | src/ggrc/migrations/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import generics\n\nfrom .models import PartCategory, Part, PartParameter\nfrom .serializers import PartSerializer\nfrom .serializers import PartCategoryBriefSerializer, PartCategoryDetailSerializer\nfrom .serializers imp... | python | edit | 3 | 1 | mit | 5853a5767c2b73d14fd1cd0b8843bda38de5b4c2 | SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree | InvenTree/part/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\n\nclass DuplicateLinesCommand(sublime_plugin.TextCommand):\n def run(self, edit):\n for region in self.view.sel():\n if region.empty():\n line = self.view.line(region)\n ... | python | edit | 3 | 3 | mit | a9bdfe489e79aec7f3b422854c58d4fe893f2b95 | shagabutdinov/sublime-duplicate-lines-enhanced | duplicate_lines.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport requests\nfrom allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,\n OAuth2LoginView,\n ... | python | edit | 7 | 1 | mit | 5daef3041ced3e8a3fc8e9d7d64ab43607bb24ae | wli/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,spool/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,bittner/django-allauth,AltSchool/django-allauth,joshowen/django-allauth,lukeburden/django-allauth,bittner/django-allauth,jwhitlock/django-allauth,jwhitlock/... | allauth/socialaccount/providers/feedly/views.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix test data after syncing with typeshed"
},
{
"role": "assistant",
"content": "map<warning descr=\"Unexpected type(s):(str, (c: Any) -> int)Possible types:((Any) -> Any, Iterable)(None, Iterable)\">('foo', lambda c: 42)</warnin... | python | new_file | null | null | apache-2.0 | c1cd227e564ff1caf868068a182bf258aac47728 | allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/int... | python/testData/inspections/PyTypeCheckerInspection/MapArgumentsInOppositeOrderPy2.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add NullHandler to logger to quiet Python 2.7"
},
{
"role": "assistant",
"content": "\"\"\"__init__.py\"\"\"\n\nimport logging\nlogging.getLogger('jsonrpcclient').addHandler(logging.NullHandler())\n\nfrom jsonrpcclient.request im... | python | new_file | 3 | 0 | mit | 1633fe8e8e3d97273256fd64cac0447737ef1594 | bcb/jsonrpcclient | jsonrpcclient/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport mdct.windows\n\n\ndef test_kbd():\n mdct.windows.kaiser_derived(50)\n\n```\n\nApply this change: Test that asserts odd numbered windows dont work"
},
{
"role": "assistant",
"content": "import pytest\nimp... | python | edit | 1 | 1 | mit | a6c06c61e9fa11c6b441fdf2a5075ca35015d7e0 | audiolabs/mdct | tests/test_windows.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport urllib.parse\n\nfrom gamecraft.settings_heroku_base import *\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\nINSTALLED_APPS = INSTALLED_APPS + (\n 'raven.contrib.django.raven_compat',\n)\n\nredis_parse_result = urllib.parse... | python | edit | 3 | 0 | mit | 0431011632b9852f644f33803cffbd4f7ace0887 | micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii,micktwomey/gamecraft-mk-iii | gamecraft/settings_heroku.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport sys\n\n# supported gunicorn workers.\nSUPPORTED_WORKERS = {\n \"sync\": \"gunicorn.workers.sync.S... | python | edit | 1 | 0 | mit | 342512a12868bc7dadbaf3c85b5aedd86bb990e7 | GitHublong/gunicorn,elelianghh/gunicorn,ephes/gunicorn,malept/gunicorn,malept/gunicorn,tempbottle/gunicorn,malept/gunicorn,ccl0326/gunicorn,keakon/gunicorn,mvaled/gunicorn,tejasmanohar/gunicorn,mvaled/gunicorn,WSDC-NITWarangal/gunicorn,gtrdotmcs/gunicorn,mvaled/gunicorn,z-fork/gunicorn,prezi/gunicorn,zhoucen/gunicorn,p... | gunicorn/workers/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport time\nfrom crawl import crawl\n\nimport tweepy\n\nclass TwitterAPI:\n \"\"\"\n Class for accessing the Twitter API.\n\n Requires API credentials to be available in environment\n variables. These will be set app... | python | edit | 1 | 1 | mit | 3b539cedd12948fde71cad29a4eee517d4adff1e | gregsabo/only_keep_one,gregsabo/only_keep_one | bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport unittest\nfrom xml.etree import ElementTree\n\nfrom openfilerooms import openFileRooms\nfrom savefilerooms import saveFileRooms\n\nclass Test(unittest.TestCase):\n\n def test1(self):\n source = \"wo... | python | edit | 1 | 5 | mit | f2afbc2d7b47e6e28f6924b9761390c34b04ea49 | develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms,develersrl/rooms | trunk/editor/test_opensave.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flask_debugtoolbar import DebugToolbarExtension\n\nfrom app import app\nfrom app.models import connect_to_db\n\n\nif __name__ == '__main__':\n\n # debug = True as DebugToolbarExtension is invoked\n\n app.... | python | edit | 4 | 0 | bsd-3-clause | 633e3672c3f6f0200e45167ad5dc7608ef7f9e93 | vanesa/kid-o,vanesa/kid-o,vanesa/kid-o,vanesa/kid-o | run.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\nimport os.path\nimport time\nfrom time import strftime\nimport os\nimport sys\nimport shutil\n\nFILE = 'todo.md'\n\ndef date_to_append():\n return strftime(\"%m-%d-%Y\", time.gmtime(os.path.getctime(FILE)))\n\ndef... | python | edit | 3 | 3 | mit | 91b1ac2aee1a6d98b45aba26d4ab80feae505705 | thefotes/DoItDoneIt | new.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport sys\nfrom src.main import run\nimport logging\n\nif __name__ == '__main__':\n # Parse filename.\n parser = argparse.ArgumentParser(description=\"TODO write description.\")\n parser.add_argument('-... | python | edit | 1 | 0 | mit | 6cf782dc1b0d0cee2d234b36791be0deb64cd1de | Wisheri/Nordea-to-YNAB | run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Course, Meal, MealOption, Weekday, Timetable, Dish\n\n\nadmin.site.register(Weekday)\nadmin.site.register(Meal)\nadmin.site.register(MealOption)\nadmin.site.register(Course)\nadmin.sit... | python | edit | 9 | 0 | mit | 9b02a09be67c8ec3d3b4b652d98f2cd5c3fdc863 | teamtaverna/core | app/timetables/admin.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sklearn.datasets import load_files\nfrom sklearn.feature_extraction.text import CountVectorizer\n\n\ncategories = ['neg', 'pos']\n\ntwitter_train = load_files('./twitter_data/twitter_data-train', categories=categories, load_content=Tru... | python | edit | 1 | 0 | apache-2.0 | 6de7d5059d6d5fd2569f108e83fff0ae979aad89 | ngrudzinski/sentiment_analysis_437 | train_twitter_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Download the helper library from https://www.twilio.com/docs/python/install\nfrom twilio.rest import Client\n\n# Your Account Sid and Auth Token from twilio.com/console\naccount_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'\nauth_token = 'yo... | python | edit | 1 | 0 | mit | 67b2729c1c2a7027be7ad7a9d641609e94769671 | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets | quickstart/python/autopilot/create-hello-world-samples/create_hello_world_samples.6.x.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nPart of the pyosf package\nhttps://github.com/psychopy/pyosf/\n\nReleased under MIT license\n\n@author: Jon Peirce\n\"\"\"\n\n\ndef find_by_key(in_list, key, val):\n \"\"\"Returns the first item with key ... | python | edit | 1 | 3 | mit | 40fd8c680f335ebd1bc217f35a47f169c336530c | psychopy/pyosf | pyosf/tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from collections import OrderedDict\nexcept ImportError:\n try:\n from ucollections import OrderedDict\n except ImportError:\n print(\"SKIP\")\n import sys\n sys.exit()\n\nd = OrderedDict([(10, 20... | python | edit | 1 | 0 | mit | 3d91c12d3382226263ea3d660b48f1ef1125d099 | pfalcon/micropython,kerneltask/micropython,torwag/micropython,selste/micropython,torwag/micropython,TDAbboud/micropython,blazewicz/micropython,bvernoux/micropython,TDAbboud/micropython,lowRISC/micropython,cwyark/micropython,oopy/micropython,infinnovation/micropython,dmazzella/micropython,MrSurly/micropython-esp32,MrSur... | tests/basics/ordereddict1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint\n\npublic = Blueprint('public', __name__, template_folder='templates')\n\n\n@public.route('/')\ndef index():\n return 'Hello World'\n\n```\n\nApply this change: Remove blueprint specific template directories."... | python | edit | 1 | 1 | mit | 494e7ff2e249a8202c8a71172be7f1870f56f9c3 | joealcorn/MCAvatar | mcavatar/views/public/__init__.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.