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\nfrom __future__ import division, absolute_import, print_function\n\nfrom ._version import __version__, __version_info__\n\nversion = __version__\n\nfrom .configuration import Configuration\nfrom .runcat import RunCatalog\nfrom .solver_nfw i... | python | edit | 35 | 0 | apache-2.0 | 890190f40b9061f7bfa15bbd7e56abc0f1b7d44a | erykoff/redmapper,erykoff/redmapper | redmapper/__init__.py | rejected_lint | Too many lint violations: 35 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import call_command\nfrom django.core.management.commands.syncdb import Command as SyncDBCommand\n\n\nclass Command(SyncDBCommand):\n def handle_noargs(self, **options):\n # Run migrations first\n ... | python | edit | 1 | 2 | mit | d68bdfe0b89137efc6b0c167663a0edf7decb4cd | dcramer/nashvegas,iivvoo/nashvegas,paltman/nashvegas,paltman-archive/nashvegas,jonathanchu/nashvegas | nashvegas/management/commands/syncdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom bs4 import BeautifulSoup\n\nfrom isserviceup.services.models.service import Service, Status\n\n\nclass StatusPagePlugin(Service):\n\n def get_status(self):\n r = requests.get(self.status_url)\n if r.st... | python | edit | 1 | 11 | apache-2.0 | 33c03c8d50524dca3b9c5990958a0b44e9fe399e | marcopaz/is-service-up,marcopaz/is-service-up,marcopaz/is-service-up | isserviceup/services/models/statuspage.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom onnx_coreml import convert\n\n# Step 0 - (a) Define ML Model\nclass small_model(nn.Module):\n def __init__(self):\n super(small_model, self).__init__()\n ... | python | edit | 1 | 1 | bsd-3-clause | 166e0980fc20b507763395297e8a67c7dcb3a3da | apple/coremltools,apple/coremltools,apple/coremltools,apple/coremltools | examples/neural_network_inference/onnx_converter/small_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\npytestmark = pytest.mark.slow\n\nversion_file_content = \"\"\"\nmajor = 0\nminor = 2\npatch = 0\n\"\"\"\n\nconfig_file_content = \"\"\"\n__config_version__ = 1\n\nGLOBALS = {\n 'serializer': '{{major}}.{{minor}}.{{patch}... | python | edit | 1 | 1 | isc | a9be23f6e3b45b766b770b60e3a2a318e6fd7e71 | lgiordani/punch | tests/script/test_no_silent_add_and_commit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nLONG_DESCRIPTION = \"\"\"Django-Prometheus\n\nThis library contains code to expose some monitoring metrics relevant\nto Django internals so they can be monitored by Prometheus.io.\n\... | python | edit | 3 | 0 | apache-2.0 | 15437c33fd25a1f10c3203037be3bfef17716fbb | korfuri/django-prometheus,obytes/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom wordgraph.points import Point\nimport wordgraph\n\nEPOCH_START = 1407109280\n\ndef time_values(values, start=EPOCH_START, increment=1):\n datapoints = []\n for index, value in enumerate(values):\n datapoints.append(Point(x... | python | edit | 1 | 3 | apache-2.0 | 80c3d7693b17f38c80b2e1a06716969a8ef11adf | tleeuwenburg/wordgraph,tleeuwenburg/wordgraph | tests/test_simple_features.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Diamond Light Source Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http... | python | edit | 5 | 0 | apache-2.0 | 5bb84d5eac353cd4bbe1843fccaca64161830591 | mjn19172/Savu,swtp1v07/Savu,swtp1v07/Savu,swtp1v07/Savu,mjn19172/Savu,swtp1v07/Savu,mjn19172/Savu,mjn19172/Savu,mjn19172/Savu | savu/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport hashlib\n\nfrom fnmatch import fnmatchcase\n\n\ndef get_files(index):\n paths = []\n\n for dirpath, dirnames, filenames in os.walk(index.headers['root_path']):\n # Remove ignored directories\n dirnames ... | python | edit | 1 | 7 | mit | 7cb68f6a749a38fef9820004a857e301c12a3044 | mcgid/morenines,mcgid/morenines | morenines/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import template\nfrom django.core import urlresolvers\n\nfrom ..utils import get_app_instance\n\n\nregister = template.Library()\n\n\n@register.simple_tag(takes_context=True)\ndef namespace_url(context... | python | edit | 1 | 2 | bsd-3-clause | d0e7c8ec73e36d6391ec57802e6186608196901a | aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config | aldryn_apphooks_config/templatetags/namespace_extras.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import base\n\nimport os\n\nimport mmstats\n\n\nclass TestMmap(base.MmstatsTestCase):\n\n def test_pagesize(self):\n \"\"\"PAGESIZE > 0\"\"\"\n self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)\n\n def test_... | python | edit | 1 | 1 | bsd-3-clause | 30f1156140a4a246a2090aa3e8d5183ceea0beed | schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats | tests/test_mmap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pprint import pprint\nfrom netaddr import *\n\ndef merge(dbag, ip):\n added = False\n for dev in dbag:\n if dev == \"id\":\n continue\n for address in dbag[dev]:\n if address['public_ip'] == ip[... | python | edit | 6 | 8 | apache-2.0 | a789e8bf574973259c0461b99fb9a486abed6e23 | jcshen007/cloudstack,resmo/cloudstack,resmo/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,Gab... | systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom skeletor import config\nfrom skeletor.config import Config\n\nfrom .base import BaseTestCase\nfrom .helpers import nostdout\n\n\nclass OptsTests(BaseTestCase):\n\n def test_something(self):\n assert True\n\n```\... | python | edit | 1 | 2 | bsd-3-clause | 268718b9ad28c8bad26a7fede52a88d51ac5a8da | krak3n/Facio,krak3n/Facio,krak3n/Facio,krak3n/Facio,krak3n/Facio | tests/test_opts.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\nversion = __import__('stale').__version__\n\nsetup(\n name=\"stale\",\n version=version,\n description=\"Identifies (and optionally removes) stale Delicious links\",\n ... | python | edit | 1 | 0 | mit | 83c0cb83a5eeaff693765c7d297b470adfdcec9e | jparise/stale | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from BaseHTTPServer import BaseHTTPRequestHandler\nexcept ImportError:\n from http.server import BaseHTTPRequestHandler\n\n\nclass HTTPError(Exception):\n\n default_status = 500\n\n def __init__(self, status=None, message... | python | edit | 1 | 3 | apache-2.0 | 59544c531a4cd52e363bf0714ff51bac779c2018 | racker/fleece,racker/fleece | fleece/httperror.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='mittn',\n use_scm_version=True,\n description='Mittn',\n long_description=open('README.rst').read(),\n classifiers=[\n \"Programming Language :: Python ... | python | edit | 1 | 0 | apache-2.0 | e1200dfc7a882340037448ff64241786e828c8c3 | F-Secure/mittn,F-Secure/mittn | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pandas as pd\nimport logging, os\nimport IPy as IP\n\n\nlog = logging.getLogger(__name__)\n\n\ndf3 = pd.read_csv('nmap.tsv', delimiter='\\t')\ndf3.columns = ['host_and_fingerprint', 'port']\ndf3['host_and_fingerprint'] = df3['host_an... | python | edit | 4 | 0 | apache-2.0 | 8b6d285f60caa77677aaf3076642a47c525a3b24 | jzadeh/chiron-elk | parsers/nmapingest.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\nfrom django.db import ProgrammingError\nfrom django.db.models import Q\n\nfrom projects.models import Project\nfrom runner.schedulers import notebook_scheduler, tensorboard_scheduler\n\n\nclas... | python | edit | 1 | 4 | apache-2.0 | 55c7681304d66ad076372be7aa8f319baef153eb | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon/runner/management/commands/clean_project_jobs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case\nfrom custom.uth.models import SonositeUpload, VscanUpload\nfrom celery.task import task\nimport io\n\n\ndef get_files_from_doc(doc):\n files ... | python | edit | 1 | 5 | bsd-3-clause | 2a950c91416d3b92a91f4f245a37a95b418b4bab | puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL... | custom/uth/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\nfrom pip.req import parse_requirements\nfrom pip.download import PipSession\nfrom pip._vendor import pkg_resources\nfrom pip._vendor.six import print_\n\nrequirements = [pkg_resources.Requirement(str(re... | python | edit | 1 | 0 | mit | 3fe86c259e6015ca535510bd692cc26d5d4e64cc | bspeck/LicenseFinder,sschuberth/LicenseFinder,bdshroyer/LicenseFinder,bdshroyer/LicenseFinder,bspeck/LicenseFinder,bdshroyer/LicenseFinder,tinfoil/LicenseFinder,tinfoil/LicenseFinder,bspeck/LicenseFinder,pivotal/LicenseFinder,bdshroyer/LicenseFinder,bspeck/LicenseFinder,sschuberth/LicenseFinder,bspeck/LicenseFinder,piv... | bin/license_finder_pip.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom rest_framework import viewsets\nfrom rest_framework.permissions import IsAuthenticated\nfrom models import *\nfrom serializers import *\n\n# Create your views here.\ncla... | python | edit | 5 | 1 | apache-2.0 | de228621deb5637ab0698ca23cf63ece46c5ddee | toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile,toladata/TolaProfile | task/views.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Light LEDs at 'random' and make them fade over time\n#\n# Usage:\n#\n# led_dance(speed)\n#\n# 'speed' is the time between each new LED being turned on. Note that the\n# random number is actually based on time and so the speed will dete... | python | edit | 1 | 4 | mit | 77a5ecc7c406e4a6acf814a2f0381dc605e0d14c | jrmhaig/microbit_playground | leds/led_dance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Global configuration information used across all the\n# translations of documentation.\n#\n# Import the base theme configuration\nfrom cakephpsphinx.config.all import *\n\n# The version info for the project you're documenting, acts as rep... | python | edit | 2 | 0 | mit | 5b94ce3796eb37301f2ac6928bfe0a0426bcf31e | cakephp/chronos | docs/config/all.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\ntry:\n import spotpy\nexcept ImportError:\n import sys\n sys.path.append(\".\")\n import spotpy\n\n\nfrom spotpy.examples.spot_setup_hymod_python import spot_setup\n\n\n\nclass TestFast(unittest.TestCase):\n ... | python | edit | 1 | 1 | mit | a8a0dd55a5289825aae34aa45765ea328811523e | bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy,thouska/spotpy,bees4ever/spotpy,thouska/spotpy | spotpy/unittests/test_fast.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport time\nimport requests\nimport support.helpers as helpers\nimport sys\nimport re\nimport os\n\n\nclass ImportBooster(object):\n def importGithubRepo(self, gitRepo):\n\n ########################################... | python | edit | 5 | 2 | apache-2.0 | 00a5d82c99ce6fb7096d432f12959ab4d8218f4f | ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test | booster_bdd/features/src/importBooster.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"setup.py -- setup file for antimarkdown\n\"\"\"\nimport os\nfrom setuptools import setup\n\nREADME = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst')\n\n\nsetup(\n name = \"antimarkdow... | python | edit | 1 | 0 | mit | 8f2c6cb5da0c456cefe958db305292a0abda8607 | Crossway/antimarkdown,Crossway/antimarkdown | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport backdropsend\nfrom setuptools import setup, find_packages\n\nsetup(\n name='backdropsend',\n version=backdropsend.__VERSION__,\n packages=find_packages(exclude=['test*']),\n scripts=['backdrop-send'],\n\n # metadata fo... | python | edit | 1 | 0 | mit | 4cae30c31369ee840dd79fb30fa3023711415012 | alphagov/backdropsend,alphagov/backdropsend | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom statusdb.db import connections as statusdb\n\nif len(sys.argv) == 1:\n sys.exit('Please provide a project name')\nprj = sys.argv[1]\n\npcon = statusdb.ProjectSummaryConnection()\nprj_obj = pcon.g... | python | edit | 1 | 0 | mit | 1fdb305233916d766a82a3d92818f2d2fd593752 | SciLifeLab/standalone_scripts,SciLifeLab/standalone_scripts | get_sample_names.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport multiprocessing\nfrom multiprocessing.reduction import reduce_connection\nimport pickle\nimport sys\n\nfrom mopidy import SettingsError\n\nlogger = logging.getLogger('mopidy.utils.process')\n\ndef pickle_connection(co... | python | edit | null | null | apache-2.0 | f8555e70610df47b726e20f312be5beba67f8435 | jmarsik/mopidy,hkariti/mopidy,glogiotatidis/mopidy,dbrgn/mopidy,diandiankan/mopidy,mopidy/mopidy,abarisain/mopidy,dbrgn/mopidy,rawdlite/mopidy,tkem/mopidy,mokieyue/mopidy,priestd09/mopidy,ZenithDK/mopidy,ZenithDK/mopidy,adamcik/mopidy,quartz55/mopidy,rawdlite/mopidy,rawdlite/mopidy,woutervanwijk/mopidy,diandiankan/mopi... | mopidy/utils/process.py | rejected_code_smell | Internal duplication: ~144% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom common import *\n\n\ndef test_dtype(ds_local):\n ds = ds_local\n for name in ds.column_names:\n assert ds[name].values.dtype == ds.dtype(ds[name])\n\n\ndef test_dtypes(ds_local):\n ds = ds_local\n all_dtypes = [np.float64, np.... | python | edit | 2 | 2 | mit | da91f170c106c46a0d858e887220bc691066cdaa | maartenbreddels/vaex,maartenbreddels/vaex,maartenbreddels/vaex,maartenbreddels/vaex,maartenbreddels/vaex,maartenbreddels/vaex | tests/dtypes_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scrapi.processing.osf import crud\nfrom scrapi.processing.osf import collision\nfrom scrapi.processing.base import BaseProcessor\n\n\nclass OSFProcessor(BaseProcessor):\n NAME = 'osf'\n\n def process_normalized(self, raw_doc, nor... | python | edit | 1 | 5 | apache-2.0 | 7591189527ad05be62a561afadf70b217d725b1f | alexgarciac/scrapi,erinspace/scrapi,icereval/scrapi,mehanig/scrapi,felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,ostwald/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,jeffreyliu3230/scrapi | scrapi/processing/osf/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core import urlresolvers\nfrom django.utils import translation\nfrom localeurl import utils\n\ndef reverse(*args, **kwargs):\n reverse_kwargs = kwargs.get('kwargs', {})\n locale = utils.su... | python | edit | 1 | 2 | mit | ed326fba4f44552eeb206f3c5af9ad6f5e89ca44 | eugena/django-localeurl | localeurl/models.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, find_packages\nexcept ImportError:\n import ez_setup\n ez_setup.use_setuptools()\n from setuptools import setup, find_packages\n\nimport os\n... | python | edit | null | null | bsd-2-clause | 3dac61f518a0913faa5bb3350d0161f09b63f0e0 | zefciu/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,allegro/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,zefciu/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,zefciu/django-powerdns-dnssec,allegro/django-powerdns-dnssec,dominikkowal... | setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom django.views.generic.detail import DetailView\nfrom django.views.generic.list import ListView\n\nfrom opps.article.models import Post\n\n\nclass OppsList(ListView):\n\n context_objec... | python | edit | 1 | 2 | mit | a4d2782ad902bde5229def1b3de35107a3918800 | YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,opps/opps | opps/article/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py\"\"\"\n#pylint:disable=line-too-long\n\nfrom codecs import open as codecs_open\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup #pylint:disable=import-error,no-name-in-modul... | python | edit | 1 | 0 | mit | de7f7dd544f41ccb38d4e132fe0c994728ec8efe | bcb/jsonrpcclient | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPython exporter which exports Notebook code into a PY file.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the ter... | python | edit | 1 | 0 | bsd-3-clause | 25a2aeda1b041afbfbd1de09f784e0b7a3732215 | SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidg... | IPython/nbconvert/exporters/python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# OpenMV Unit Tests.\n#\nimport os, sensor, gc\n\nTEST_DIR = \"unittest\"\nTEMP_DIR = \"unittest/temp\"\nDATA_DIR = \"unittest/data\"\nSCRIPT_DIR = \"unittest/script\"\n\nif not (TEST_DIR in os.listdir(\"\")):\n raise Exception... | python | edit | 4 | 1 | mit | 25e7b4a2e297e9944b5065851c6e65eb40b11bcd | kwagyeman/openmv,kwagyeman/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,openmv/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv | scripts/examples/OpenMV/99-Tests/unittests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom mangacork import utils\n\n@pytest.fixture\ndef sample_page_bad_format():\n sample_page = {'chapter': \"chapter1\", 'page': 3}\n return sample_page\n\n@pytest.fixture\ndef sample_page_good_format():\n sample_pa... | python | edit | 1 | 1 | mit | 9c5a088af964a70453617b9925f9a027890497bb | ma3lstrom/manga-cork,ma3lstrom/manga-cork,ma3lstrom/manga-cork | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='pygraphc',\n version='0.0.1',\n description='Event log clustering in Python',\n long_description='This package contains event log clustering method including non-graph and '\n ... | python | edit | 1 | 0 | mit | e0388a4be8b15964ce87dafcf69805619f273805 | studiawan/pygraphc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(\n name = 'mustache',\n packages = ['mustache'],\n version = '0.1.3',\n description = 'Mustache templating in Python',\n author = 'Peter Downs',\n author_email = '<EMAIL>',\n url ... | python | edit | 1 | 0 | mit | 32508c310075d779e368d09f8642db6ba9029a44 | peterldowns/python-mustache,peterldowns/python-mustache | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for GitHub Paste reaction."
},
{
"role": "assistant",
"content": "#This is a test to see how GitHub will react when I change things from this webpage instead of as usual.\nprint \"Hello, world!\"\nprint \"Test\"\n"
}
] | python | new_file | 3 | 0 | mit | 881875537cf1fcb27c89cf5ba8bfeba625239ef5 | ieguinoa/tools-iuc,loraine-gueguen/tools-iuc,lparsons/tools-iuc,nekrut/tools-iuc,nsoranzo/tools-iuc,Delphine-L/tools-iuc,Delphine-L/tools-iuc,nekrut/tools-iuc,galaxyproject/tools-iuc,davebx/tools-iuc,loraine-gueguen/tools-iuc,natefoo/tools-iuc,gvlproject/tools-iuc,mvdbeek/tools-iuc,Delphine-L/tools-iuc,nekrut/tools-iuc... | GitHub_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.http import HttpResponse\nfrom django.utils import simplejson\n\ndef JSONResponse(data):\n return HttpResponse(simplejson.dumps(data), mimetype='application/json')\n\n\n```\n\nApply this change: Fix... | python | edit | 1 | 1 | mit | 2c572024bf4e5070c999a3653fbc3f5de679e126 | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | common/responses.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nHorizontal boxplot with observations\n====================================\n\n_thumb: .7, .37\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set(style=\"ticks\")\n\n# Initialize the figure\n... | python | edit | 1 | 0 | bsd-3-clause | 7d52ee6030b2e59a6b6cb6dce78686e8d551281b | mwaskom/seaborn,phobson/seaborn,arokem/seaborn,lukauskas/seaborn,anntzer/seaborn,arokem/seaborn,sauliusl/seaborn,mwaskom/seaborn,phobson/seaborn,petebachant/seaborn,anntzer/seaborn,lukauskas/seaborn | examples/horizontal_boxplot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test the functions in the tools file.\"\"\"\n\nimport bibpy.tools\n\n\ndef test_version_format():\n assert bibpy.tools.version_format().format('0.1.0') == '%(prog)s v0.1.0'\n\n program_name = dict(prog='tool_name')\n assert (... | python | edit | 1 | 1 | mit | 83bb9f15ae8ceed3352232b26176b74607a08efb | MisanthropicBit/bibpy,MisanthropicBit/bibpy | tests/test_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import request\nfrom modularodm.storedobject import StoredObject as GenericStoredObject\nfrom modularodm.ext.concurrency import with_proxies, proxied_members\n\nfrom bson import ObjectId\nfrom .handlers... | python | edit | 1 | 3 | apache-2.0 | 385f190d782c7d2edbba8b425db2418e6891ea86 | kch8qx/osf.io,aaxelb/osf.io,chrisseto/osf.io,baylee-d/osf.io,billyhunt/osf.io,acshi/osf.io,SSJohns/osf.io,kwierman/osf.io,emetsger/osf.io,icereval/osf.io,DanielSBrown/osf.io,mattclark/osf.io,njantrania/osf.io,jmcarp/osf.io,HalcyonChimera/osf.io,emetsger/osf.io,Nesiehr/osf.io,bdyetton/prettychart,doublebits/osf.io,lynds... | framework/mongo/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the README file\nwith open(path.join(here, 'flask_swagger_ui/README.md'), encoding=... | python | edit | 1 | 0 | mit | 32f7b04861c53cf6367ffcb40b4955334742dbad | sveint/flask-swagger-ui,sveint/flask-swagger-ui,sveint/flask-swagger-ui | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport mr_streams as ms\nimport unittest\nfrom operator import add\n\n# :::: auxilary functions ::::\ndef add_one(x):\n return x + 1\ndef repeat_n_times(x, n = 1):\n return [x] * n\ndef double(x):\n return [x,x]\n\nclass TestMisc(u... | python | edit | 1 | 1 | mit | 57ef9c9166d5bc573589cb58313056a2ef515ad8 | caffeine-potent/Streamer-Datastructure | tests/test_misc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pkg_resources import get_distribution\nimport codecs\nimport json\n\n__version__ = get_distribution('rasa_nlu').version\n\n\nclass Interpreter(object):\n def parse(self, text):\n raise NotImplementedError()\n\n @staticmeth... | python | edit | 1 | 3 | apache-2.0 | 17db9de51b816210728db7f58685b7d8e5545c65 | RasaHQ/rasa_nlu,beeva-fernandocerezal/rasa_nlu,beeva-fernandocerezal/rasa_nlu,verloop/rasa_nlu,PHLF/rasa_nlu,verloop/rasa_nlu,PHLF/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | src/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 's7a'\n\n# All imports\nfrom extras import KuceraFrancis\nfrom resource import Resource\nfrom os import path\n\n\n# The Kucera Francis enrichment class\nclass KuceraFrancisEnricher:\n\n # Constructor for the Kucera Francis E... | python | edit | 1 | 2 | mit | dcb8add6685dfb7dff626742b17ce03e013e72a1 | Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify | src/enrich/kucera_francis_enricher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport bill_info\nimport fixtures\n\nimport datetime\n\nclass BillHistory(unittest.TestCase):\n\n def test_normal_enacted_bill(self):\n history = fixtures.bill(\"hr3590-111\")['history']\n\n self.assertEqual(history[... | python | edit | 3 | 2 | cc0-1.0 | da5479f4db905ea632009728864793812d56be81 | boblannon/congress,Nolawee/congress,Nolawee/congress,chriscondon/billtext,sunlightlabs/congress-opencongress,boblannon/congress,chriscondon/billtext,unitedstates/congress,sunlightlabs/congress-opencongress,unitedstates/congress | test/test_bill_history.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.attendance.transfer.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom attr import attrib, attrs\n\nfrom... | python | edit | 1 | 0 | bsd-3-clause | 824c46b7d3953e1933a72def4edf058a577487ea | m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | byceps/services/attendance/transfer/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport django\nfrom fitbit.slack import post_message\n\nIDS_TO_POST = os.environ['AUTOPOST'].split(',')\n\nif __name__ == '__main__':\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fitbitslackb... | python | edit | 1 | 0 | apache-2.0 | f22a217e86602b138451801afd3cd3c1c6314655 | Bachmann1234/fitbitSlackBot,Bachmann1234/fitbitSlackBot | bin/post_reports.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='tw2.wysihtml5',\n version='0.2',\n description='WYSIHTML5 widget for ToscaWidgets2',\n author='Moritz Schlarb',\n author_email='<EMAIL>',\n url='https://github.... | python | edit | 1 | 0 | bsd-2-clause | 274d882fbfb97d6d4cbf013fcdf9d8644e22099e | toscawidgets/tw2.wysihtml5,toscawidgets/tw2.wysihtml5 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\n\nsetup(\n name='flake8-coding',\n version='0.1.0',\n description='Adds coding magic comment checks to flake8',\n long_description=open(\"README.rst\").read(),\n clas... | python | edit | 1 | 0 | apache-2.0 | c64f9ebe17d9076958db502401567add4116b431 | tk0miya/flake8-coding | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport pickle\nfrom indra import reach\nfrom indra.assemblers import GraphAssembler\n\nif len(sys.argv) < 2:\n process_type = 'text'\nelse:\n process_type = sys.argv[1]\n\nif process_type == 'text':\n txt = open('ras_pa... | python | edit | 4 | 3 | bsd-2-clause | a50edf34659acb63f1fa6dda5494812fa1c4ff7d | sorgerlab/belpy,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra | models/ras_pathway/run_ras_pathway.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport sys\nimport os\nimport re\n\nPACKAGENAME = 'OpSimSummary'\npackageDir = os.path.join(os.path.dirname(os.path.abspath(__file__)),\n 'opsimsummary')\nversionFile = os.path.join... | python | edit | 3 | 0 | mit | 4b35247fe384d4b2b206fa7650398511a493253c | rbiswas4/simlib | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Check minimum required version of ecCodes engine"
},
{
"role": "assistant",
"content": "from .gribapi import * # noqa\nfrom .gribapi import __version__\nfrom .gribapi import bindings_version\n\n# The minimum requir... | python | new_file | 4 | 0 | apache-2.0 | e53c572af6f9ee2808ef682cfcfc842fe650ab4b | ecmwf/eccodes-python,ecmwf/eccodes-python | gribapi/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDjango Forms for interacting with Company app\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom InvenTree.forms import HelperForm\n\nfrom .models import Company\nfrom .models import SupplierPart\nfr... | python | edit | 1 | 0 | mit | af8a96e08029e2dc746cfa1ecbd7a6d02be1c374 | SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree | InvenTree/company/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '1.7.2'\n__copyright__ = 'Copyright (c) 2020, Skioo SA'\n__licence__ = 'MIT'\n__URL__ = 'https://github.com/skioo/django-customer-billing'\n\n```\n\nApply this change: Update project version to 1.7.3"
},
{
"role": "ass... | python | edit | 1 | 0 | mit | 23bce5ac6a73473f6f166c674988e68af18d2b51 | skioo/django-customer-billing,skioo/django-customer-billing | billing/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom random import random\n\nclass Die:\n \"\"\"\n Abstracts the random dice throw. Roll will produce the result.\n The die can be further parametrized by a multiplicator and/or\n a modifier, like 2 * Die(8) +4.\n \"\"\"\n ... | python | edit | 1 | 3 | mit | d7001ccab0879e17308bf2dc945b5fd3b726be27 | bkittelmann/statblock | statblock/dice.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom falafel.mappers.current_clocksource import CurrentClockSource\nfrom falafel.tests import context_wrap\n\nCLKSRC = \"\"\"\ntsc\n\"\"\"\n\n\ndef test_get_current_clksr():\n clksrc = CurrentClockSource(context_wrap(CLKSRC))\n assert... | python | edit | 1 | 1 | apache-2.0 | 597a2ec7a6ff0bae0b43a67e8be675017fd1d7f1 | RedHatInsights/insights-core,RedHatInsights/insights-core | falafel/mappers/tests/test_current_clocksource.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nfrom flatdict import __version__\n\nsetuptools.setup(\n name='flatdict',\n version=__version__,\n description=('Python module for interacting with nested dicts as a '\n 'single level dict with d... | python | edit | 1 | 0 | bsd-3-clause | 922a0a321ee82ad2f23205f8c1ee55bf2c5a35ab | gmr/flatdict,gmr/flatdict | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pip\nimport <weak_warning descr=\"Package 'opster' is not listed in project requirements\">opster</weak_warning>\nfrom <weak_warning descr=\"Package 'clevercss' is not listed in project requirements\">clevercss</weak_warning> import ... | python | edit | null | null | apache-2.0 | 67ebe8da58384529c49673e2314d4fc228aebe9e | apixandru/intellij-community,da1z/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,ibinti/intellij-community,suncycheng/intellij-community,apixandru/intellij-community,da1z/intellij-community,ibinti/intellij-community,vvv1559/intellij-community,ibinti/intellij-community,ThiagoGarciaAlves/inte... | python/testData/inspections/PyPackageRequirementsInspection/ImportsNotInRequirementsTxt/test1.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding: utf-8\n\nfrom distribute_setup import use_setuptools\nuse_setuptools()\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\nimport sys\n\nextra = {}\nif sys.versi... | python | edit | 1 | 0 | mit | b0d54c11ea76c6485982e274e8226dfc6da25ceb | zhilts/pymockito,zhilts/pymockito | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from django.conf.urls import patterns # Django>=1.6\nexcept ImportError:\n from django.conf.urls.defaults import patterns # Django<1.6\n\nimport os\n\napp_dir = os.path.dirname(__file__)\n\nurlpatterns = patterns(\n '',\n ... | python | edit | 1 | 0 | mit | a03eb91088943a4b3ed0ae5fc87b104562a4a645 | Mixser/django-location-field,recklessromeo/django-location-field,Mixser/django-location-field,voodmania/django-location-field,recklessromeo/django-location-field,undernewmanagement/django-location-field,voodmania/django-location-field,caioariede/django-location-field,caioariede/django-location-field,undernewmanagement/... | location_field/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Run the _testcapi module tests (tests for the Python/C API): by defn,\n# these are all functions _test exports whose name begins with 'test_'.\n\nimport sys\nimport test_support\nimport _testcapi\n\nfor name in dir(_testcapi):\n if na... | python | edit | 3 | 0 | mit | 06c8c91b05e0bf5f15271560df4101d90adfeb39 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_capi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pandas\n\n\ndef main():\n train_all = pandas.DataFrame.from_csv('train.csv')\n train = train_all[['Survived', 'Sex', 'Fare']]\n print(train)\n\n\nif __name__ == '__main__':\n main()\n\n```\n\nApply this change: Make predi... | python | edit | 1 | 1 | mit | 7ab9f281bf891e00d97278e3dba73eaeffe3799a | noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit | kaggle/titanic/categorical_and_scaler_prediction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport unittest\n\nfrom normalize import (\n JsonCollectionProperty,\n JsonProperty,\n JsonRecord,\n Record,\n RecordList,\n)\n\n\nclass MockChildRecord(JsonRecord):\n name = JsonProperty()\n... | python | edit | 4 | 0 | mit | 435d5d21c2bd2b14998fd206035cc93fd897f6c8 | samv/normalize,tomo-otsuka/normalize,hearsaycorp/normalize | tests/testclasses.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\nraise ImportError(\"For future use.\")\n\nfrom __future__ import unicode_literals\n\nfrom ..compat import unicode\nfrom .base import Concern, Transform, Attribute\n\n\nclass Primitive(Transform):\n\tpass\n\n\n\n\n\"\"\"... | python | edit | 5 | 0 | mit | 9f925f0da6d3a06d085ee71b8bee0fcdecaed5a0 | marrow/schema,marrow/schema | marrow/schema/transform/primitive.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrighted by participating institutions in DataONE. For\n# more information on DataONE, see our web site at http://dataone.org.\n... | python | edit | 1 | 1 | apache-2.0 | 4b245b9a859552adb9c19fafc4bdfab5780782f2 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | d1_common_python/src/d1_common/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='django-kewl',\n version=\".\".join(map(str, __import__('short_url').__version__)),\n packages=['django_kewl'],\n url='https://github.com/Alir3z4/django-kewl',\n license='BSD',\n ... | python | edit | 2 | 0 | bsd-3-clause | f495656a3a9a19a3bdb7cbb02b188e2c54740626 | Alir3z4/django-kewl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\nimport argparse\r\nimport importlib\r\n\r\nfrom .. import robots\r\n\r\nif __name__ == '__main__':\r\n parser = argparse.ArgumentParser()\r\n parser.add_argument(\"--controller\", d... | python | edit | 3 | 0 | mit | b471b4d3a6d9da439f05ccb27d5d39aa884e724b | westpark/robotics | piwars/controllers/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\nimport os\n\n__doc__ = \"\"\"\nCommand line tool and library wrappers around iwlist and\n/etc/network/interfaces.\n\"\"\"\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirna... | python | edit | 3 | 1 | bsd-2-clause | fe79e799f2d3862e4764c69e76ed5a7d0a132002 | rockymeza/wifi,cangelis/wifi,nicupavel/wifi,foosel/wifi,rockymeza/wifi,cangelis/wifi,foosel/wifi,simudream/wifi,nicupavel/wifi,simudream/wifi | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport string\n\n\ndef sanitise_string(messy_str):\n \"\"\"Whitelist characters in a string\"\"\"\n valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)\n return u''.join(char for char in mes... | python | edit | 2 | 5 | mit | 2efe1364a1e37f06dc26f1a3a122c544437d914e | alphagov/backdrop-transactions-explorer-collector,alphagov/backdrop-transactions-explorer-collector | collector/classes/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Initialize xmlsec once to prevent SAML auth from hanging."
},
{
"role": "assistant",
"content": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\n# Python\nimport threading\n\n# Monkeypatch xmlsec.initialize() to onl... | python | new_file | 1 | 2 | apache-2.0 | ff9945037fc27e2053712feef2c4f613d9581ccd | wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx | awx/sso/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport sys\nimport subprocess\n\n\nif __name__ == '__main__':\n if len(sys.argv) > 1:\n unittest.main(module='flask_api.tests')\n else:\n subprocess.call([sys.executable, '-m', 'unittest', 'discover'])\n... | python | edit | 1 | 0 | bsd-2-clause | 3a78496f350c904ce64d30f422dfae8b6bc879c3 | theskumar-archive/flask-api,theskumar-archive/flask-api,theskumar-archive/flask-api,theskumar-archive/flask-api | flask_api/tests/runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility function for retrieving the active registration backend."
},
{
"role": "assistant",
"content": "from django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.importlib im... | python | new_file | 4 | 3 | bsd-3-clause | 953ffccae266f123a3b50f260af259bed1d1d336 | lubosz/django-registration,lubosz/django-registration | registration/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom django.test import TestCase\nfrom django.contrib.sites.models import Site\nfrom django.contrib.auth import get_user_model\n\nfrom opps.channels.models import Channel\nfrom opps.channels... | python | edit | 1 | 1 | mit | d68f28581cd3c3f57f7c41adbd65676887a51136 | jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,opps/opps | opps/channels/tests/test_forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAdd a 'w3cdate' key to every entry -- this contains the date in ISO8601 format\n\nWARNING: you must have PyXML installed as part of your python installation \nin order for this plugin to work\n\nPlace this plugin early in your load_... | python | edit | 1 | 3 | mit | 496481e3bd6392a44788fadc7cf517fc36143e96 | willkg/douglas,daitangio/pyblosxom,willkg/douglas,daitangio/pyblosxom | contrib/plugins/w3cdate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='Fulfil-Shop',\n version='0.1dev',\n packages=['shop'],\n license='BSD',\n include_package_data=True,\n zip_safe=False,\n long_description=open('README.rst').read(),\n in... | python | edit | 1 | 0 | bsd-3-clause | 0940612c13094f1950c70b4abc66ddcd76b20544 | joeirimpan/shop,joeirimpan/shop,joeirimpan/shop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom domain_parser import domain_parser\n\nclass DomainParserTestCase(unittest.TestCase):\n\n def test_google(self):\n \"\"\"Is google.com properly parsed?\"\"\"\n assert domain_parser.parse_domain(\n ... | python | edit | 1 | 1 | apache-2.0 | 3b75688e18ed3adb06f26a51c7f12b6e419b6837 | jeffknupp/domain-parser,jeffknupp/domain-parser | tests/test_domain_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n flaskjk.restconverter\n ~~~~~~~~~~~~~~~~~~~~~\n\n Helper functions for converting RestructuredText\n\n This class heavily depends on the functionality provided by the docutils\n package.\n\... | python | edit | 1 | 1 | bsd-2-clause | 3a0c7caadb46a69fb29fe34bd64de28c9b263fd6 | jkossen/flaskjk | restconverter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create basic user model for auth"
},
{
"role": "assistant",
"content": "import datetime\n\nfrom project import db, bcrypt\n\n\nclass User(db.Model):\n\n __tablename__ = \"users\"\n\n id = db.Column(db.Integer, primary_key=T... | python | new_file | 1 | 1 | mit | 2f3265e6fc64b962334b649f2c7b52f6d44b26b1 | dylanshine/streamschool,dylanshine/streamschool | project/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mongoengine import Document, DateTimeField, EmailField, IntField, \\\n ReferenceField, StringField\nimport datetime, enum\n\nclass Priority(enum.IntEnum):\n LOW = 0,\n MIDDLE = 1,\n HIGH = 2\n\n\"\"\"\nThis defines the bas... | python | edit | 3 | 0 | mit | adc92c01ef72cd937de7448da515caf6c2704cc3 | Zillolo/lazy-todo | app/task.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views import defaults\nfrom sentry_sdk import capture_message\n\n\ndef page_not_found(*args, **kwargs):\n capture_message(\"Page not found\", level=\"error\")\n\n return defaults.page_not_found(*args, **kwargs)\n\n```\n\nA... | python | edit | 1 | 1 | mit | f576004e7d1352c7e8c1e203ae0a8b6769ce1b08 | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/core/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport colorsys # It turns out Python already does HSL -> RGB!\n\n\ndef trim(s):\n return s if not s.endswith('.0') else s[:-2]\n\n\nprint('[')\nprint(',\\n'.join(\n '\"hsl%s(%s, %s%%, %s%%%s)\", [%s, %s, %s, %s]' % (\n ('a' i... | python | edit | 1 | 2 | bsd-3-clause | 6556604fb98c2153412384d6f0f705db2da1aa60 | SimonSapin/tinycss2 | tinycss2/css-parsing-tests/make_color3_hsl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2009 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\"\"\"Breakpad for Python.\n\nSends a notification when a process sto... | python | edit | 3 | 3 | bsd-3-clause | 5b3d69d2c9338ab0c50fd9ea8cf3c01adf0c1de3 | xuyuhan/depot_tools,npe9/depot_tools,SuYiling/chrome_depot_tools,Neozaru/depot_tools,npe9/depot_tools,Midrya/chromium,michalliu/chromium-depot_tools,kaiix/depot_tools,disigma/depot_tools,Chilledheart/depot_tools,fracting/depot_tools,airtimemedia/depot_tools,Midrya/chromium,duongbaoduy/gtools,coreos/depot_tools,duongbao... | breakpad.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import Permission\nfrom django.core.management.base import BaseCommand, CommandError\n\n\nclass Command(BaseCommand):\n\n help = \"Create admin permissions\"\n\n def handle(self, *args, **options):\n ... | python | edit | 1 | 6 | mit | 32c971233fa4c83a163036da0090d35463d43c75 | 5monkeys/django-bananas,5monkeys/django-bananas,5monkeys/django-bananas | bananas/management/commands/syncpermissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"AMQP Messaging Framework for Python\"\"\"\nVERSION = (1, 0, 0, \"rc4\")\n__version__ = \".\".join(map(str, VERSION[0:3])) + \"\".join(VERSION[3:])\n__author__ = \"Ask Solem\"\n__contact__ = \"<EMAIL>\"\n__homepage__ = \"http://github.... | python | edit | 2 | 3 | bsd-3-clause | 56aa7fa21b218e047e9f3d7c2239aa6a22d9a5b1 | urbn/kombu,depop/kombu,bmbouter/kombu,WoLpH/kombu,ZoranPavlovic/kombu,depop/kombu,mathom/kombu,xujun10110/kombu,romank0/kombu,xujun10110/kombu,alex/kombu,numb3r3/kombu,alex/kombu,andresriancho/kombu,daevaorn/kombu,daevaorn/kombu,iris-edu-int/kombu,ZoranPavlovic/kombu,WoLpH/kombu,cce/kombu,mverrilli/kombu,disqus/kombu,c... | kombu/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Basic test of the command-line interface to Myrial.\"\"\"\n\nimport subprocess\nimport unittest\n\n\nclass CliTest(unittest.TestCase):\n\n def test_cli(self):\n out = subprocess.check_output(['python', 'scripts/myrial',\n ... | python | edit | 1 | 1 | bsd-3-clause | 13a39f4e025160f584beef8442e82ec3c3526a95 | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco | raco/myrial/cli_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom chef import Role\nfrom chef.exceptions import ChefError\nfrom chef.tests import ChefTestCase\n\nclass RoleTestCase(ChefTestCase):\n def test_get(self):\n r = Role('test_1')\n self.assertTrue(r.exists)\n self.ass... | python | edit | 3 | 2 | apache-2.0 | 9fece51bc6b3496381871c0fc7db486f8fbfebd7 | cread/pychef,jarosser06/pychef,jarosser06/pychef,coderanger/pychef,Scalr/pychef,dipakvwarade/pychef,cread/pychef,dipakvwarade/pychef,coderanger/pychef,Scalr/pychef | chef/tests/test_role.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'yalnazov'\nfrom setuptools import setup\nsetup(\n name='paymill-wrapper',\n version='2.0.0',\n description='Python wrapper for PAYMILL API',\n author='Aleksandar Yalnazov',\n author_email='<EMAIL>',\n url='ht... | python | edit | 1 | 0 | mit | 16a6783a5671b58836d7c81395ff09b68acf1cb1 | lukasklein/paymill-python,paymill/paymill-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\n\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n return 'Hello Docker + Nginx + Gunicorn + Flask!'\n\n\nif __name__ == \"__main__\":\n app.run(host=\"0.0.0.0\", debug=True)\n\n```\n\nApply this c... | python | edit | 1 | 1 | mit | b55c4c0536ca23484375d93f2ef011de0d5ce417 | everett-toews/guestbook,rackerlabs/guestbook,everett-toews/guestbook,rackerlabs/guestbook | app/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\" Utility functions to help testing. \"\"\"\nfrom unittest.mock import Mock\n\n\nclass dummy(object):\n\n def __init__(self):\n self.components = {}\n\n def get(self, name, default):\n if name not... | python | edit | 1 | 2 | mit | ed92a324cceddce96f2cff51a103c6ca15f62d8e | hkupty/asterix | asterix/test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport arrow\n\nfrom jinja2 import nodes\nfrom jinja2.ext import Extension\n\n\nclass TimeExtension(Extension):\n tags = set(['now'])\n\n def __init__(self, environment):\n super(TimeExtension, self).... | python | edit | 1 | 4 | mit | dfa752590c944fc07253c01c3d99b640a46dae1d | hackebrot/jinja2-time | jinja2_time/jinja2_time.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models, IntegrityError\n\n\nclass EmailAddressManager(models.Manager):\n\n def add_email(self, user, email, **kwargs):\n confirm = kwargs.pop(\"confirm\", False)\n ... | python | edit | 3 | 3 | mit | 0007ea4aa0f7ebadfadb0c6f605c51a1d11e483c | mentholi/django-user-accounts,jawed123/django-user-accounts,ntucker/django-user-accounts,jpotterm/django-user-accounts,rizumu/django-user-accounts,jacobwegner/django-user-accounts,mentholi/django-user-accounts,pinax/django-user-accounts,GeoNode/geonode-user-accounts,nderituedwin/django-user-accounts,mysociety/django-us... | account/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\"\"\"Test script for the binhex C module\n\n Uses the mechanism of the python binhex module\n Roger E. Masse\n\"\"\"\nimport binhex\nimport tempfile\nfrom test_support import verbose, TestSkipped\n\ndef test():\... | python | edit | 1 | 3 | mit | 18ed712bad3beb8c128f56638878e66f34bcf722 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_binhex.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 Russell Heilling\nimport logging\nimport sys\n\nimport args\n\nargs.add_argument('--verbose', '-v', action='count',\n help='Enable verbose logging.')\nARGS = args.ARGS\n\nLEVEL_SETTERS = set([logging.getLog... | python | edit | 3 | 4 | mit | 9fe1c66b70bd396d9a698cc001ccb89644383f3b | xchewtoyx/comicmgt,xchewtoyx/comicmgt | logs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"img2txt\",\n version=\"2.0\",\n author=\"hit9\",\n author_email=\"<EMAIL>\",\n description=\"Image to Ascii Text, can output to html or ansi terminal.\",\n license=\"BSD\",\n... | python | edit | 1 | 0 | bsd-3-clause | d78916f43b289ff56d5a5d87f8db6fbf5f9d7436 | hit9/img2txt,hit9/img2txt | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom web_test import WebTest\nfrom scoring_engine.models.team import Team\nfrom scoring_engine.models.user import User\n\nclass TestAdmin(WebTest):\n def setup(self):\n super(TestAdmin, self).setup()\n team1 = Team(name=\"T... | python | edit | 1 | 1 | mit | 44f0207fe58b6798e612c16c06f3a0ee5b94cc9e | pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine | tests/scoring_engine/web/test_admin.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.