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\"\"\"Add backside_template column\n\nRevision ID: 3ca338ed5192\nRevises: 35d76c40ca48\nCreate Date: 2017-05-17 11:33:30.295538\n\"\"\"\n\nimport sqlalchemy as sa\nfrom alembic import op\n\n\n# revision identifiers, used by Alembic.\nrevisi... | python | edit | 1 | 1 | mit | d3428d9bb8baf67176e1bd6a22b96845ebcdf42e | pferreir/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,indico/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,OmeGak/indico,mic4ael/indico,mvidalgarcia/indico,mic4ael/indico,ThiefMaster/indico,ThiefMast... | indico/migrations/versions/201705221530_3ca338ed5192_remove_background_image_and_add.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os,sys\nsys.path.insert(0, os.path.abspath('.'))\n\nimport grpc\nimport time\nimport function_pb2_grpc as function\nimport fntypes_pb2 as types\nfrom concurrent import futures\n\nclass StringFunctionServicer(function.StringFunctionSe... | python | edit | 1 | 2 | apache-2.0 | cd359f8487ee5aab3645a0089695967802e485d0 | markfisher/sk8s,markfisher/sk8s,markfisher/sk8s,markfisher/sk8s | samples/python/uppercase/py/func.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass parseFileBacteriaList:\n 'Class for read and print information from text file'\n bacteriaName = []\n fileName = \"\"\n\n def __init__(self,fileName):\n self.fileName = fileName\n\n def readFile(self):\n fi... | python | edit | 3 | 2 | apache-2.0 | 830119c570ed9ec3693d9e002b07777c5542bb1f | kgruba/oop_python | modelToParseFile/parseFileBacteriaList.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass CheckBrackets:\n OPENERS = {'{': '}',\n '[': ']',\n '(': ')'}\n CLOSERS = set(OPENERS.values())\n\n def __init__(self, inp):\n self.check_brackets = self.build_stack(inp)\n\n def build_st... | python | edit | 1 | 6 | mit | 98cd52a2c635a50b6664212ace5e98090246aba2 | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | python/bracket-push/bracket_push.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Nephele - Finding movies to watch on the internet is easy,\nfinding GOOD movies to watch is hard. Let Nephele, the greek\nnymph of the clouds, help you.\n\nUsage:\n nephele.py get_popular [--debug]\n nephele.py get_grades <directory... | python | edit | 1 | 0 | mit | 2548c8a46b04a34db218e522704fa171d8d6f7b7 | EmilStenstrom/nephele | nephele.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom simpleflow import (\n activity,\n Workflow,\n)\n\n\n@activity.with_attributes(task_list='quickstart')\ndef increment(x):\n return x + 1\n\n\n@activity.with_attributes(task_list='quickstart')\ndef double(x):\n return x * 2\n... | python | edit | 2 | 1 | mit | 1e980277f53d12686264b8ce816e65ffea16a2dd | botify-labs/simpleflow,botify-labs/simpleflow | examples/basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import viewsets\nfrom . import serializers, models\n\n\nclass PrintJobViewSet(viewsets.ModelViewSet):\n serializer_class = serializers.PrintJobSerializer\n\n def get_queryset(self):\n return self.request.use... | python | edit | 3 | 1 | mit | e388e3490502acac90ef4c249ba1af63b5698ab7 | aabmass/print-web,aabmass/print-web,aabmass/print-web | print_web_django/api/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subgraph_extractor.cli import extract_from_config\nimport click\nfrom cloudpathlib import AnyPath\n\n@click.command()\n@click.option(\n \"--subgraph-config-folder\",\n help=\"The folder containing the subgraph config files\",\n ... | python | edit | 1 | 2 | mit | 35409711d9976ed44e25e314486f3f703b18c068 | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/cardpay-subgraph-extraction/export.py | rejected_duplicate | Near-duplicate of sample 19104 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\"tools\", \"loader\", \"clib\"]\n\nfrom . import tools\nfrom . import loader\n\nimport pyximport\npyximport.install(build_in_temp=True)\nfrom . import clib\n\n```\n\nApply this change: Add custom build_dir opt for pyximport.inst... | python | edit | 1 | 0 | mit | 9792b1a03af3a3a3c0b9d517cefaee4c137c2a2d | 17zuoye/pyirt,arunlodhi/pyirt,wlbksy/pyirt | pyirt/utl/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib.auth import views as auth_views\nfrom django.contrib import admin\nfrom django.views.generic.base import RedirectView\n\n\nurlpatterns = patterns('',\n url(r'^$', '... | python | edit | 1 | 0 | mit | 08afe7e2946f4343d016f55bfacb4f7bac1d3cb2 | Code4SA/herana,Code4SA/herana,Code4SA/herana,Code4SA/herana | herana/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom docutils.parsers.rst import Directive\nfrom twisted.python.reflect import namedAny\nfrom docutils import nodes\nfrom docutils.statemachine import StringList\n\n\nclass FakeRunner(object):\n def __init__(self):\n self.commands... | python | edit | 1 | 3 | apache-2.0 | 002a598afbdf86472611c018d17d0eff8a9690aa | jml/flocker,wallnerryan/flocker-profiles,runcom/flocker,adamtheturtle/flocker,lukemarsden/flocker,1d4Nf6/flocker,mbrukman/flocker,Azulinho/flocker,moypray/flocker,AndyHuu/flocker,lukemarsden/flocker,agonzalezro/flocker,jml/flocker,1d4Nf6/flocker,runcom/flocker,agonzalezro/flocker,hackday-profilers/flocker,achanda/flock... | flocker/provision/_sphinx.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom kafka import KafkaConsumer\nimport os\nimport nexmo\nimport json\n\nclient = nexmo.Client( key=os.environ[\"API_KEY\"],\n secret=os.environ[\"API_SECRET\"])\nconsumer = KafkaConsumer(bootstrap_servers... | python | edit | 2 | 0 | apache-2.0 | be915a11ebd0d9c4e8a0a52b1bdcc7ca2abfbfb1 | antongorshkov/kafkasms | sms_sender.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Testing gitwash dumper\n\"\"\"\n\nfrom os.path import join as pjoin, dirname, split as psplit\nimport shutil\nfrom tempfile import mkdtemp\nfrom subprocess import call\n\nfrom nose.tools import assert_true, assert_equal, assert_raise... | python | edit | 3 | 7 | bsd-2-clause | e5bf18be1ad32a39f0eef2bbc8f5bd4674cef7a5 | QuLogic/gitwash,QuLogic/gitwash | tests/test_dump.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n################################################################################\n# Copyright (C) 2013 Jaakko Luttinen\n#\n# This file is licensed under the MIT License.\n#####################################################################... | python | edit | 2 | 0 | mit | 9f0b9b68a3c9dfaa64942e55fc97e435b8eb6f50 | bayespy/bayespy,jluttine/bayespy | bayespy/nodes/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom django.conf import settings\n\nfrom pytest_django_test.compat import force_text\n\npytestmark = pytest.mark.urls('pytest_django_test.urls_overridden')\n\ntry:\n from django.core.urlresolvers import is_valid_path\nexce... | python | edit | 1 | 2 | bsd-3-clause | fea9c44be08719f0fcca98a1d531a83c9db4c6af | pombredanne/pytest_django,thedrow/pytest-django,ktosiek/pytest-django,tomviner/pytest-django | tests/test_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom .models import Deployment\n\n\nclass DeploymentFilter(django_filters.FilterSet):\n db_name = django_filters.CharFilter()\n state = django_filters.CharFilter()\n\n class Meta(object):\n model = D... | python | edit | 1 | 0 | mit | ad813973421ed828f724a999fabbc12c4e429247 | opennode/nodeconductor-paas-oracle | src/nodeconductor_paas_oracle/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Root URL routing\"\"\"\nfrom django.conf.urls.defaults import patterns\nfrom django.conf.urls.static import static\nfrom django.views.generic import TemplateView\n\nfrom kitchen.dashboard import api\nimport kitchen.settings as setting... | python | edit | 1 | 0 | apache-2.0 | 30f0b99a2233c6009a3c41d9b22e3f946c40c3cf | edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen | kitchen/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport warnings\nimport platform\n\n\ndef deprecated(func):\n \"\"\"This is a decorator which can be used to mark functions\n as deprecated. It will result in a warning being emmitted\n when the function is used.\"\"\"\n def new... | python | edit | 3 | 2 | mit | cd374366dc6d49cc543a037fba8398e5b724c382 | chezou/tabula-py | tabula/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"Jinja custom filters\"\n\nimport re\nfrom cla_public.apps.base import base\nfrom babel.dates import format_datetime\n\n\n@base.app_template_filter()\ndef datetime(dt, format='medium', locale='en_GB'):\n if form... | python | edit | 1 | 4 | mit | d4da069b43174482f3a75e9553e8283be905fa16 | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | cla_public/apps/base/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.contrib import auth\n\nurlpatterns = patterns('members.views',\n url(r'^login/$', 'login', name='login'),\n url(r'^logout/$', 'logout', name='logout'),\n url(r'^search/(?P<nam... | python | edit | 3 | 0 | mit | cdefb1fdb304939b35f8c881662fa220a57573dc | Hackfmi/Diaphanum,Hackfmi/Diaphanum | members/urls.py | rejected_duplicate | Near-duplicate of sample 23990 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tapiriik.database import db\nfrom tapiriik.messagequeue import mq\nfrom tapiriik.sync import Sync\nimport kombu\nfrom datetime import datetime\nimport time\n\nSync.InitializeWorkerBindings()\n\nproducer = kombu.Producer(Sync._channel, ... | python | edit | 3 | 0 | apache-2.0 | ab640dc35ff87bc32e1e3b54012f69610e73d8d0 | cmgrote/tapiriik,niosus/tapiriik,gavioto/tapiriik,dlenski/tapiriik,olamy/tapiriik,cmgrote/tapiriik,olamy/tapiriik,cheatos101/tapiriik,gavioto/tapiriik,marxin/tapiriik,niosus/tapiriik,cheatos101/tapiriik,cheatos101/tapiriik,mduggan/tapiriik,campbellr/tapiriik,abs0/tapiriik,mjnbike/tapiriik,niosus/tapiriik,marxin/tapirii... | sync_scheduler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport account\n\n\nsetup(\n name=\"django-user-accounts\",\n version=account.__version__,\n author=\"Brian Rosner\",\n author_email=\"<EMAIL>\",\n description=\"a Django user ac... | python | edit | 1 | 0 | mit | d94853ee368fdf4a8ef80c72dd22a9f2b2074ab3 | GeoNode/geonode-user-accounts,mysociety/django-user-accounts,nderituedwin/django-user-accounts,nderituedwin/django-user-accounts,pinax/django-user-accounts,ntucker/django-user-accounts,jpotterm/django-user-accounts,jawed123/django-user-accounts,GeoNode/geonode-user-accounts,jawed123/django-user-accounts,pinax/django-us... | setup.py | rejected_duplicate | Near-duplicate of sample 23089 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open... | python | edit | 1 | 0 | mit | dbc7ad0dad6161d19f65bbf186d84d23628cfd16 | jcollado/pic2map,jcollado/pic2map,jcollado/pic2map | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ndef read(f):\n try:\n with open(f) as file:\n return file.read()\n except:\n return \"\"\n\nsetup(name='shellvars-py',\n version='0.1.2',\n description='Read environme... | python | edit | 1 | 2 | apache-2.0 | 49b13a33d37daa513345f629f5466f9807e24b49 | aneilbaboo/shellvars-py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Setuptools configuration for rpmvenv.\"\"\"\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n\nwith open('README.rst', 'r') as readmefile:\n\n README = readmefile.read()\n\nsetup(\n name='rpmvenv',\n v... | python | edit | 1 | 0 | mit | 701e1ca3f71653fe472a010b1f1ef0ec2be1eaf1 | kevinconway/rpmvenv | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nsetup(\n name='aws-helpers',\n description='Set of AWS helper scripts',\n url='https://github.com/otype/aws-helpers',\n author='Hans-Gunther Schmidt',\n author_email='<EMAIL>',\n version='0.1'... | python | edit | 1 | 0 | mit | 4d83306f89710d70571e2b2fc2f3a61af8b5793b | otype/aws-helpers,otype/aws-helpers | 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 | 166f3d59e40ac795bc929235f8da8e192d25ed93 | uw-it-aca/mdot,charlon/mdot,charlon/mdot,uw-it-aca/mdot,charlon/mdot,uw-it-aca/mdot,uw-it-aca/mdot | setup.py | rejected_duplicate | Near-duplicate of sample 22308 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nwith open('README.rst') as readme:\n long_description = readme.read()\n\nVERSION = '0.1.1'\n\nsetup(\n install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'],\n name='gmusicsync'... | python | edit | 1 | 0 | mit | 66dcfe1561f7ab2424aec58801f547001575b885 | sashgorokhov/gmusicsync | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Author: Braedy Kuzma\n\nfrom rest_framework.views import APIView\n\nfrom .serializers import AuthorSerializer\nfrom .dataUtils import getAuthor\nfrom .httpUtils import JSONResponse\n\nclass AuthorView(APIView):\n \"\"\"\n This view ... | python | edit | 1 | 1 | apache-2.0 | f108da5ab277187fa146fc7db060f706b5e3f0ed | CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project | rest/authorView.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom invoke import task, run\n\n\n@task\ndef clean():\n run(\"rm -rf .coverage dist build\")\n\n\n@task(clean, default=True)\ndef test():\n run(\"py.test\")\n\n\n@task(test)\ndef install():\n run(\"pandoc... | python | edit | 1 | 1 | apache-2.0 | 0793f8dcb6ed27832e7d0adfb920d9c70813f3c7 | miso-belica/sumy,miso-belica/sumy | tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport urllib\nfrom django import template\n\nregister = template.Library()\n\n@register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True)\ndef paginator(context, page=None):\n \"\"\"\n Based on: http://djangos... | python | edit | 4 | 5 | mit | 62f9bf4cb8d02b80c0589c68a308bcba28524d14 | defrex/django-bootstrap-paginator | bootstrap_paginator/templatetags/paginator.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nlong_desc = '''\nThis package contains the mscgen Sphinx extension.\n\nAllow mscgen-formatted Message Sequence Chart graphs to be included in\nSphinx-generated docume... | python | edit | 1 | 0 | bsd-2-clause | f974e39c216067de5af68b3016fb35f129556e44 | sphinx-contrib/spelling,sphinx-contrib/spelling | mscgen/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date\n\nfrom django.db.models import Max, Min\n\n\ndef worklog_period(obj):\n activity_period = obj.worklogentries.aggregate(Max('date'), Min('date'))\n article_period = obj.articleentries.aggregate(Max('date'), M... | python | edit | 1 | 7 | bsd-3-clause | 9c086abd428732080257d073bb6b36f04171f7d1 | dongguangming/pdfdocument,matthiask/pdfdocument | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pygame\n\nLEFT = 1\n\nclass Gui:\n def __init__(self):\n self.gui_elements = list()\n\n def update(self, mouse, events):\n curr_element = None\n for element in self.gui_elements:\n if element.con... | python | edit | 1 | 9 | mit | 465b39b97ec1fa619e96a0c811a496216c275aaf | cthit/CodeIT | src/gui/Gui.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = 'v1.4.3'\nFILE_NAME = 'ok'\n\nimport os\nimport sys\n\nsys.path.insert(0, '')\n# Add directory in which the ok.zip is stored to sys.path.\nsys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))\n\n```\n\n... | python | edit | 1 | 0 | apache-2.0 | 169eb4826ee823b28fc98477af81a69c6c521acc | jathak/ok-client,Cal-CS-61A-Staff/ok-client | client/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom stack import Stack\nimport pytest\n\n\ndef test_stack_push():\n stack = Stack()\n stack.push(\"bacon\")\n assert stack.top.value == \"bacon\"\n assert stack.peek() == \"bacon\"\n\n\ndef test_stack_push_multi():\n stack =... | python | edit | 1 | 1 | mit | ea2d72473c958de90582e1d4ccfc77af1d578b24 | jwarren116/data-structures-deux | test_stack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unittest\n\nfrom thumbnails.backends import generate_filename, get_thumbnail\nfrom thumbnails.images import SourceFile, Thumbnail\n\nfrom .compat import mock\n\n\nclass BackendTestCase(unittest.TestCase):\n ... | python | edit | 1 | 1 | mit | 298cae5d7f15a667195b96c92c4b4320487c922c | relekang/python-thumbnails,python-thumbnails/python-thumbnails | tests/test_backends.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom factory import Sequence\nfrom factory.django import DjangoModelFactory\n\nfrom accelerator.models import Community\n\n\nclass CommunityFactory(DjangoModelFactory):\n class Meta:\n model = Community\n name = Sequence(lambda... | python | edit | 1 | 0 | mit | e2c8c71114692b99f50936dceab77dfd0329a5e0 | masschallenge/django-accelerator,masschallenge/django-accelerator | accelerator/tests/factories/community_factory.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyramid.config import Configurator\nfrom sqlalchemy import engine_from_config\n\nfrom .models import (\n DBSession,\n Base,\n )\n\n\ndef make_session(settings):\n from sqlalchemy.orm import sessionmaker\n engine = engine... | python | edit | 5 | 1 | mit | 65b4cca13c16e9de0d469ec036c1440dd598b3a0 | DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal | learning_journal/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport re\nimport subprocess\n\nfrom conda_build import post\n\nLDD_RE = re.compile(r'\\s*(.*?)\\s*=>\\s*(.*?)\\s*\\(.*\\)')\nLDD_NOT_FOUND_RE = re.compile(r'\\s*(.*?)\\s*=... | python | edit | 1 | 6 | bsd-3-clause | 0158579b9a6c729e7af9a543caeef25018e07834 | takluyver/conda-build,takluyver/conda-build,sandhujasmine/conda-build,frol/conda-build,frol/conda-build,ilastik/conda-build,dan-blanchard/conda-build,mwcraig/conda-build,rmcgibbo/conda-build,dan-blanchard/conda-build,sandhujasmine/conda-build,ilastik/conda-build,ilastik/conda-build,shastings517/conda-build,sandhujasmin... | conda_build/ldd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom pages.models import *\nfrom django.test.client import Client\n\nclass PagesTestCase(TestCase):\n fixtures = ['tests.json']\n\n def test_01_add_page(self):\n \"\"\"\n Test that the... | python | edit | 5 | 1 | bsd-3-clause | b8c4d7aabcd07fcba443558a02cdcb38d32009df | pombredanne/django-page-cms-1,remik/django-page-cms,pombredanne/django-page-cms-1,oliciv/django-page-cms,oliciv/django-page-cms,pombredanne/django-page-cms-1,remik/django-page-cms,oliciv/django-page-cms,batiste/django-page-cms,akaihola/django-page-cms,remik/django-page-cms,batiste/django-page-cms,batiste/django-page-cm... | pages/tests.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom datetime import timedelta\n\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework import serializers\n\nfrom waldur_core.core.seriali... | python | edit | 1 | 5 | mit | 2f4141311af549b6d57e72534b4da0a6ce950629 | opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind | src/waldur_mastermind/analytics/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sublime import Region\nfrom sublime_plugin import TextCommand\n\n\nclass PhpunitTestSetupFixtureCommand(TextCommand):\n def run(self, edit, text):\n self.view.replace(edit, Region(0, self.view.size()), text)\n\n if '|'... | python | edit | 1 | 4 | bsd-3-clause | 07f50c1b01cce4550b3b4ecb369932166412063b | gerardroche/sublime-phpunit | tests/commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of cclib (http://cclib.sf.net), a library for parsing\n# and interpreting the results of computational chemistry packages.\n#\n# Copyright (C) 2006-2013 the cclib development team\n#\n# The library is free software, dist... | python | edit | 7 | 0 | bsd-3-clause | 8ed94e1fb93252eed47239d8c6a5f28796802a36 | berquist/cclib,jchodera/cclib,ghutchis/cclib,ben-albrecht/cclib,andersx/cclib,gaursagar/cclib,Clyde-fare/cclib,ghutchis/cclib,langner/cclib,andersx/cclib,cclib/cclib,Schamnad/cclib,ATenderholt/cclib,berquist/cclib,cclib/cclib,ATenderholt/cclib,langner/cclib,berquist/cclib,cclib/cclib,langner/cclib,gaursagar/cclib,jchod... | src/cclib/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport logging\nimport requests\nimport plugins.settings as settings\n\nheaders = {'accept': 'application/json'}\n\n\ndef get(config, path, data=None):\n request = requests.get(\n url=__format_url(config, path),\n ... | python | edit | 1 | 3 | mit | 02160f46d5e28c394915d44c42e4e1b09e750717 | gpailler/AtlassianBot | utils/rest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\n# Local module\nfrom .structure import Chain, Atom\nfrom .PDB import PDB\n\n# Conditional import\ntry:\n import MDAnalysis\nexcept ImportError:\... | python | edit | 1 | 5 | mit | 9a4cb482cbe0f5dc2de8f6ae89dd0b78a1564a0d | pierrepo/PBxplore,pierrepo/PBxplore,jbarnoud/PBxplore,jbarnoud/PBxplore,HubLot/PBxplore,HubLot/PBxplore | pbxplore/structure/loader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 Hewlett-Packard Development Company, L.P.\n#\n# Author: Kiall Mac Innes <<EMAIL>>\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. Y... | python | edit | 1 | 0 | apache-2.0 | 93dee6a3ff44fb7470b3008e8fbbaf99822bbe82 | openstack/designate,openstack/designate,openstack/designate | designate/cmd/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# FIXME: getting two bits\n# 00_40 31_46\n# Can we find instance where they are not aliased?\nWA7USED = 0\n\nfrom prjxray.segmaker import Segmaker\n\nsegmk = Segmaker(\"design.bits\")\n\nprint(\"Loading tags\")\n''... | python | edit | 1 | 0 | isc | 92e0724f28ce0e6802237b13656064c6add63b85 | SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray | fuzzers/019-ndi1mux/generate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import request\nfrom flask.ext.login import current_user, UserMixin, AnonymousUserMixin\n\nfrom .core import app, auth\n\nlog = logging.getLogger(__name__)\n\n\napp.login_manager.login_view = 'login'\n\n@auth.co... | python | edit | 3 | 3 | bsd-3-clause | 107ecde6c2373deedcb788115811bcbb50de6851 | mikeboers/uWiki,mikeboers/uWiki,mikeboers/uWiki,mikeboers/uWiki | uwiki/auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom IPython.display import Image\n\nimport requests\n\nAPI_ENDPOINT = 'http://api.giphy.com/v1/gifs/random'\n\n# This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI\nAPI_KEY = 'dc6zaTOxFJmzC'\n\ndef giphy(tag):\n... | python | edit | 1 | 4 | mit | 6903f63e76ac5e7686ae55348225d06e3757a64b | AustinRochford/giphy-ipython-magic,AustinRochford/giphy-ipython-magic | giphy_magic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport weka.core.jvm as jvm\nimport weka.core.packages as packages\n\njvm.start()\n\n# checking for installed packages\ninstalled_packages = packages.installed_packages()\nfor item in installed_... | python | edit | 2 | 0 | mit | a1effed87a8e90483f1ab850c77aff7c827b7f48 | srvanrell/libsvm-weka-python | install_packages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .camera import Camera\nfrom .scene import Scene, Element, Light\nfrom .version import __version__\nfrom .grid import Grid\nfrom .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz,\n rot... | python | edit | 18 | 0 | mit | fe32099bf1b6aa387c98dd6afdfc31557fc4e1f9 | OEP/volpy,OEP/volpy | volpy/__init__.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom utils.synonyms import cached_synonyms\nfrom nltk.corpus import wordnet as wn\n\n\ndef semantic_similarity(word1, word2):\n if fast_semantic_similarity(word1, word2) == 1:\n return 1\n max_p = 0\n for s1 in wn.synsets(wo... | python | edit | 1 | 11 | mit | 2533aa96b189eb5aaea293c57f928d594ef92eba | rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics | utils/language.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom . import routes, views, model\n\nMODELS = [\n model.OsfStorageNodeSettings,\n model.OsfStorageFileTree,\n model.OsfStorageFileRecord,\n model.OsfStorageFileVersion,\n model.Osf... | python | edit | 1 | 0 | apache-2.0 | 5e2bcc9ae44d0155be1cc72b3728c3869377e02f | mfraezz/osf.io,caseyrollins/osf.io,leb2dg/osf.io,caseyrygt/osf.io,kushG/osf.io,jmcarp/osf.io,billyhunt/osf.io,Nesiehr/osf.io,haoyuchen1992/osf.io,zkraime/osf.io,HalcyonChimera/osf.io,monikagrabowska/osf.io,lamdnhan/osf.io,HalcyonChimera/osf.io,kushG/osf.io,wearpants/osf.io,samanehsan/osf.io,cwisecarver/osf.io,arpitar/o... | website/addons/osfstorage/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 Cloudbase Solutions Srl\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy o... | python | edit | 1 | 1 | apache-2.0 | 837a0e822905fa8c4e0dda33a03f8423b2f9cdb1 | rahulunair/nova,mahak/nova,gooddata/openstack-nova,Juniper/nova,gooddata/openstack-nova,rahulunair/nova,klmitch/nova,phenoxim/nova,phenoxim/nova,openstack/nova,openstack/nova,Juniper/nova,rahulunair/nova,mikalstill/nova,mahak/nova,vmturbo/nova,vmturbo/nova,openstack/nova,klmitch/nova,vmturbo/nova,mikalstill/nova,klmitc... | nova/policies/hosts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom fabric.api import *\nfrom fab_shared import (test, tornado_test_runner, tornado_deploy as deploy,\n setup, development, production, localhost, staging, restart_webserver,\n rollback, lint... | python | edit | 32 | 0 | mit | bb8506feb44eaa0b38a3d38956bf85c49f54bc5a | peplin/trinity | fabfile.py | rejected_lint | Too many lint violations: 32 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ctypes import CDLL, create_string_buffer, byref\nimport pkg_resources\n\nbf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))\n\n\ndef ectoken_generate(key, string):\n if isinstance(string, unicode):\n strin... | python | edit | 2 | 3 | bsd-3-clause | 11b0608f2cab4f9c804d5a2e67edfc4270448b71 | sebest/ectoken-py,sebest/ectoken-py | ectoken.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unittest\n\nfrom bitbucket.bitbucket import Bitbucket\nfrom bitbucket.tests.private import USERNAME, PASSWORD\n\nTEST_REPO_SLUG = 'test_bitbucket_api'\n\n\nclass AuthenticatedBitbucketTest(unittest.TestCase):... | python | edit | 1 | 1 | isc | d0fb729183f702711127b63b1e0898a9a601a7f4 | robwilkerson/BitBucket-api,wadevries/BitBucket-api,chaiapodi/BitBucket-api,affinitic/BitBucket-api,Sheeprider/BitBucket-api,CBitLabs/BitBucket-api,Sheeprider/BitBucket-api,kubilayeksioglu/BitBucket-api,chaiapodi/BitBucket-api | bitbucket/tests/private/private.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport transaction\n\nfrom sqlalchemy import engine_from_config\n\nfrom pyramid.paster import (\n get_appsettings,\n setup_logging,\n )\n\nfrom pyramid.scripts.common import parse_vars\n\nfrom ..models import... | python | edit | 1 | 2 | mit | c57fd21ca62f9217a943cec5111b64403e968ab5 | matslindh/kimochi,matslindh/kimochi | kimochi/scripts/initializedb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport copy\nfrom rest_framework.routers import DefaultRouter, SimpleRouter\nfrom events.api import all_views as events_views\nfrom helevents.api import all_views as users_views\n\n\nclass LinkedEventsAPIRouter(DefaultRouter):\n # these ... | python | edit | 1 | 3 | mit | 1da1000d7bade80a0f68dbacc93ad1e73463c605 | City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents | linkedevents/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nclass Constellation(object):\n \"\"\"Manage and analyze data from multiple pysat Instruments.\n\n FIXME document this.\n \"\"\"\n def __init__(self, instruments=None, name=None):\n if instruments and name:\n ... | python | edit | 1 | 8 | bsd-3-clause | 54fc2329fa597739ed7d4e2efb859718f25b255d | rstoneback/pysat,jklenzing/pysat | pysat/_constellation.py | rejected_duplicate | Near-duplicate of sample 13671 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.forms import widgets\nfrom django.utils.safestring import mark_safe\n\n\nclass MapWidget(widgets.HiddenInput):\n def render(self, name, value, attrs=None):\n widget = super(MapWidget, self).render(name, value, attrs)\n... | python | edit | 1 | 1 | mit | 900b4c02a2ae1570083bb23e562208331ea2a651 | smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning | python/ecep/portal/widgets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cruditor.mixins import CruditorMixin\nfrom django.views.generic import TemplateView\n\nfrom examples.mixins import ExamplesMixin\n\n\nclass DemoView(ExamplesMixin, CruditorMixin, TemplateView):\n title = 'Demo view'\n template_na... | python | edit | 1 | 1 | mit | 07c2bdab605eb00bcc59a5540477819d1339e563 | moccu/django-cruditor,moccu/django-cruditor,moccu/django-cruditor | examples/minimal/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for the PythonPoint tool.\n\"\"\"\n\nimport os, sys, string\nfrom reportlab.test import unittest\nfrom reportlab.test.utils import makeSuiteForClasses, outputfile\n\nimport reportlab\n\n\nclass PythonPointTestCase(unittest.TestC... | python | edit | 5 | 4 | bsd-3-clause | 44351d1e48159825226478df13c648aaa83018db | kanarelo/reportlab,kanarelo/reportlab,Distrotech/reportlab,Distrotech/reportlab,kanarelo/reportlab,Distrotech/reportlab,Distrotech/reportlab,Distrotech/reportlab,kanarelo/reportlab,kanarelo/reportlab | reportlab/test/test_tools_pythonpoint.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport binascii\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives import hashes\nfrom os import urandom as generate_bytes\n\nfrom knox.settings import knox_settings, CONSTANTS\n\nsha = knox_set... | python | edit | 1 | 1 | mit | 78689cba80d507cc6706ebf5d1981b738837f767 | James1345/django-rest-knox,James1345/django-rest-knox | knox/crypto.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n#\n# Based on AboutNil in the Ruby Koans\n#\n\nfrom runner.koan import *\n\nclass AboutNone(Koan):\n\n def test_none_is_an_object(self):\n \"Unlike NULL in a lot of languages\"\n ... | python | edit | 7 | 2 | mit | f2c5210b771728ba60ffe81993617b8af07bbaeb | javierjulio/python-koans-completed,javierjulio/python-koans-completed | koans/about_none.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Run wave propagation\"\"\"\n# coding=utf-8\nimport numpy as np\n\nfrom ..algorithms import BoundaryCondition\nfrom ..classes import Grid, Simulation\n\n\nclass wave_propagation(Simulation):\n def __init__(self, filename,\n ... | python | edit | 1 | 1 | bsd-3-clause | 53a6e81b6a269589df5c6ce199b6248d838f9180 | StanczakDominik/PythonPIC | pythonpic/configs/run_wave.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport mergesort.merge_sort\nimport quicksort.quicksort\nimport sys\nimport time\nfrom random import randint\n\ndef main(max_len):\n\n\tfor n in [2**(n+1) for n in range(max_len)]:\n\t\tprint 'Array size: %d' % n\n\t\tarr = [randint(0, 2**m... | python | edit | 7 | 5 | mit | c9e2c70e05ade220e5aa6a4790ee2a9b720cc46e | timpel/stanford-algs,timpel/stanford-algs | sorting_test.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-:\nimport urllib2\nimport hashlib\nimport os\n\n\ndef construct_body(link):\n if link.content == u'˘':\n # this signals that content generation previously failed\n return\n try:\n opener = u... | python | edit | 1 | 5 | mit | 2539b08770bb5cf5e7cb5dcab3aeef17b163de83 | vhf/resrc,mrbitsdcf/resrc,janez-svetin/resrc,mrbitsdcf/resrc,janez-svetin/resrc,janez-svetin/resrc,mrbitsdcf/resrc,vhf/resrc,vhf/resrc,janez-svetin/resrc,mrbitsdcf/resrc,mrbitsdcf/resrc,vhf/resrc,vhf/resrc,janez-svetin/resrc | resrc/utils/construct_body.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (1, 1, 0, 'beta', 1)\n\ndef get_version():\n version = '%s.%s' % (VERSION[0], VERSION[1])\n if VERSION[2]:\n version = '%s.%s' % (version, VERSION[2])\n if VERSION[3:] == ('alpha', 0):\n version = '%s pre-al... | python | edit | 1 | 5 | bsd-3-clause | ffd3d61f24a48048ddb562b731ff134a6fc0d924 | aparo/django-nonrel,FlaPer87/django-nonrel,aparo/django-nonrel,aparo/django-nonrel,FlaPer87/django-nonrel,FlaPer87/django-nonrel | django/__init__.py | rejected_duplicate | Near-duplicate of sample 11354 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom collections import namedtuple\nfrom corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path\nfrom corehq.apps.app_manager.xpath_val... | python | edit | 1 | 4 | bsd-3-clause | 1e6e1eae154008a1dddf12a9c7225054ddcf3d15 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/app_manager/xpath_validator/wrapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nViews for the rdap_explorer project, query app.\n\"\"\"\n\nimport ipwhois\n\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render\nfrom django.urls import reverse\nfrom django.views.decorators.cache impo... | python | edit | 1 | 3 | mit | c1e5e6a5c34f1d4617be3053d87af8e95045ad77 | cdubz/rdap-explorer,cdubz/rdap-explorer | query/views.py | rejected_duplicate | Near-duplicate of sample 4784 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom mock import Mock\n\nfrom openelex.base.transform import registry\n\nclass TestTransformRegistry(TestCase):\n def test_register_with_validators(self):\n mock_transform = Mock(return_value=None)... | python | edit | 1 | 1 | mit | 7d54cf820a76340f47f2b55ae1b7ff474810ce2b | datamade/openelections-core,datamade/openelections-core,openelections/openelections-core,cathydeng/openelections-core,openelections/openelections-core,cathydeng/openelections-core | openelex/tests/test_transform_registry.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport theano as _th\nimport numpy as _np\n\n\ndef create_param(shape, init, fan=None, name=None, type=_th.config.floatX):\n return _th.shared(init(shape, fan).astype(type), name=name)\n\n\ndef create_param_and_grad(shape, init, fan=None... | python | edit | 1 | 3 | mit | 4761d359a28630d0fe378d50e52aad66e88d3a36 | elPistolero/DeepFried2,lucasb-eyer/DeepFried2,Pandoro/DeepFried2,yobibyte/DeepFried2 | DeepFried2/utils.py | rejected_duplicate | Near-duplicate of sample 3439 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis module contains the set of Dynochemy's exceptions\n\n:copyright: (c) 2012 by Rhett Garber.\n:license: ISC, see LICENSE for more details.\n\n\"\"\"\nimport json\n\n\nclass Error(Exception):\n \"\"\"... | python | edit | 3 | 3 | isc | 638901243c060b243ebf046304c06ea14a98dbe8 | rhettg/Dynochemy | dynochemy/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\n\nclass Constants(object):\n Constant = namedtuple('Constant', ['codename', 'value', 'description'])\n\n def __init__(self, **kwargs):\n self._constants = []\n try:\n for ... | python | edit | 1 | 4 | bsd-3-clause | 086e54f0b89670027272e5485d9eb832adecc7b9 | caktus/django-dry-choices | constants/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | python | edit | 1 | 1 | apache-2.0 | a6dfc5c5f256acd78d806cc8d4ddac9bd1ac34b5 | openstack/python-barbicanclient | barbicanclient/osc_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom decorator import decorator\n\n@decorator\ndef trace(f, *args, **kw):\n r = f(*args, **kw)\n print \"%s(%s, %s) = %s\" % (f.func_name, args, kw, r)\n return r\n\n```\n\nApply this change: Make our trace decorator a bit more rob... | python | edit | 2 | 2 | apache-2.0 | 16c457faae6ace57afdc9c11c6f76c6d11a53764 | pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha | moksha/lib/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This is the setup file for pip\nfrom setuptools import setup, find_packages\nimport os, sys\nfrom os import path\n\nsetup(\n name = 'ImgProcessingCLI',\n\n version = '0.0.1',\n\n description = 'Image Processing for SUAS Competiti... | python | edit | 5 | 0 | mit | c95085fd43825a57476f8a962563561b42385bd8 | FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition | ImgProcessingCLI/setup.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# Copyright (C) 2019 Radim Rehurek <<EMAIL>>\n#\n# This code is distributed under the terms and conditions\n# from the MIT License (MIT).\n#\n\n\"\"\"\nUtilities for streaming to/from several file-like data stora... | python | edit | 1 | 0 | mit | d9ce6cc440019ecfc73f1c82e41da4e9ce02a234 | RaRe-Technologies/smart_open,RaRe-Technologies/smart_open,piskvorky/smart_open | smart_open/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module contains the main wrapper class.\"\"\"\n\n\nclass BaseWrapper:\n \"\"\"Define base template for function wrapper classes. \"\"\"\n\n def __init__(self, func):\n self.func = func\n self.__doc__ = func.__... | python | edit | 1 | 3 | mit | 220953f4f8136e9c5eff21426421e6ac7f6f502d | mansenfranzen/tssim | tssim/functions/wrapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport ftplib\nimport gzip\nimport sys\n\nhost = 'ftp.ncdc.noaa.gov'\nbase = '/pub/data/noaa'\nretries = 3\n\nftp = ftplib.FTP(host)\nftp.login()\nfor line in sys.stdin:\n (year, filename) = line.strip().split()... | python | edit | 1 | 0 | mit | ac9123c7926c04af7ac68949e2636a81f771fd7d | simonbrady/cat,simonbrady/cat | ncdc_download/download_mapper2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\nfrom cellcounter.accounts import views\n\nurlpatterns = patterns('',\n url('^new/$', views.RegistrationView.as_view(), name='register'),\n url('^(?P<pk>[0-9]+)/$', views.UserDetailView.as_... | python | edit | 1 | 0 | mit | db13de154fa44f3ef0bf1e365d2ee0d7a6951700 | cellcounter/cellcounter,haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter | cellcounter/accounts/urls.py | rejected_duplicate | Near-duplicate of sample 4154 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Needed due to django 1.7 changed app name restrictions\n\nfrom django.apps import AppConfig\n\n\nclass RegistrationConfig(AppConfig):\n label = 'wafer.registration'\n name = 'wafer.registration'\n\n```\n\nApply this change: Fix synt... | python | edit | 1 | 0 | isc | 1d90e26b3f4d84252b98f4ea80709beb96d4007e | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/registration/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work\nSECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='\n\nfrom .test_runner import *\n\n\n# Use firefox for... | python | edit | 2 | 0 | bsd-3-clause | df5594e3da75ecd7f5ab6d112d22e5da628a3ccf | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | onepercentclub/settings/travis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import auth\nfrom django.contrib.auth.middleware import AuthenticationMiddleware\n\nimport base64\n\n\nclass AutologinAuthenticationMiddleware(AuthenticationMiddleware):\n\n def process_request(self, request):\n ... | python | edit | 1 | 5 | apache-2.0 | bea43337d9caa4e9a5271b66d951ae6547a23c80 | kitconcept/robotframework-djangolibrary | DjangoLibrary/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models.query import QuerySet\nfrom django.db.models.fields.related import SingleRelatedObjectDescriptor\n\nclass InheritanceQuerySet(QuerySet):\n def select_subclasses(self, *subclasses):\n if not subclasses:\n subcl... | python | edit | 1 | 5 | isc | cc8f1507c90261947d9520859922bff44ef9c6b4 | rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory | observatory/lib/InheritanceQuerySet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\n\nfrom .models import Submission\n\n\nclass SubmissionForm(ModelForm):\n\n class Meta:\n model = Submission\n fields = ('url',)\n\n```\n\nApply this change: Validate that the submission U... | python | edit | 1 | 7 | mit | 074520d7de93db9b83d8d20dd03640146609eeb2 | team-stroller/critical_critiques,team-stroller/critical_critiques,team-stroller/critical_critiques | critical_critiques/submission/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nscrapple.utils.config\n~~~~~~~~~~~~~~~~~~~~~\n\nFunctions related to traversing the configuration file\n\"\"\"\n\nfrom __future__ import print_function\n\n\ndef traverse_next(page, next, results):\n \"\"\"\n Recursive generato... | python | edit | 1 | 7 | mit | 7e5777c7b09780d7cde1a94e58dd022f98051168 | AlexMathew/scrapple,AlexMathew/scrapple,scrappleapp/scrapple,scrappleapp/scrapple,AlexMathew/scrapple | scrapple/utils/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom core.settings.base import * # noqa\n\n\nDEBUG = False\n\nALLOWED_HOSTS = ['*.miximum.fr']\n\n```\n\nApply this change: Add a dummy secret key to settings\n\n(bad, i know)"
},
{
"role": "assistant",
"content": "from core.se... | python | edit | 1 | 0 | mit | 096496a04ae728103e1bd1460cf654854c7e5527 | thibault/pomodoro_api | src/core/settings/production.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport binascii\nimport datetime\nimport <error descr=\"No module named nonexistent\">nonexistent</error>\n\n\nprint(binascii)\nprint(datetime)\nprint(nonexistent)\n\n```\n\nApply this change: i18n: Fix test data in an env test on skeleton ... | python | edit | null | null | apache-2.0 | 6aad52505450b481d7b47e7ffe5c08cb7774e84a | 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/skeletons/BinaryStandardModule.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# python3\n# Copyright 2018 DeepMind Technologies Limited. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a ... | python | edit | 1 | 0 | apache-2.0 | 0fcb48d98423b1b1e64beaff30a84910920786a2 | deepmind/acme,deepmind/acme | acme/_metadata.py | rejected_duplicate | Near-duplicate of sample 23838 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom .. import flattener\n\ndef test_thingy():\n assert 1 == 1\n\n```\n\nApply this change: Fix test execution. Doesn't actually do anything."
},
{
"role": "assistant",
"content": "import pytest\n\nfrom .. im... | python | edit | 4 | 1 | mit | 1b080248b2f90879ac43957eafa0d7adf5590a9a | BlockCatIO/solidity-flattener,BlockCatIO/solidity-flattener | flattener/tests/test_solidity-flattener.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on Mar 28, 2017\n\n@author: Jack Rausch\n'''\nimport http.client\nimport json\nimport ssl\nimport tbapy\n#import requests\n\nURL = \"http://www.thebluealliance.com/api/v2/\"\nHEADER_KEY = \"X-TBA-App-Id\"\nHEADER_VAL = 'frc4215... | python | edit | 4 | 2 | mit | 4b8b4a295e5b9f9674d351e60ffac74f85eae0d3 | TrinityTrihawks/BluePython | WebIntegration/MatchData.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport hashlib\nimport json\n\nfrom django.http import HttpResponse, HttpResponseForbidden\nfrom django.views.decorators.csrf import csrf_exempt\nfrom app.models import SocialNetworkApp\n\nlogger = logging.getLogger(__name__... | python | edit | 2 | 6 | mit | a600543515c286ed7bcba2bad5a0746588b62f9a | rebearteta/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,joausaga/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,rebearteta/social-ideation,joausaga/social-ideation | app/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom datetime import datetime\n\nfrom stock import Stock\n\n\nclass StockTest(unittest.TestCase):\n def test_new_stock_price(self):\n \"\"\"A new stock should have a price that is None.\n \"\"\"\n st... | python | edit | 1 | 2 | mit | 9deeb98a05483bfa262db59319c55eec78e900db | bsmukasa/stock_alerter | tests/test_stock.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\n\nfrom redis.exceptions import NoScriptError\n\n\nclass LuaScript(object):\n\n def __init__(self, redis, template, cache):\n self.redis = redis\n self.template = template\n self.cache = cache\n ... | python | edit | 1 | 2 | mit | e11166ed27b49250ee914c1227b3022ef7659e15 | eventbrite/curator | curator/script.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import mixins # noqa\nfrom . import generic # noqa\nfrom . import formbase # noqa\nfrom . import crudbase # noqa\nfrom . import create # noqa\nfrom . import update # noqa\nfrom . import delete # noqa\nfrom . import detail # n... | python | edit | 1 | 0 | bsd-3-clause | f9b1418c7ea46d3d69fac027f097c5c1ace62f74 | appressoas/django_cradmin,appressoas/django_cradmin,appressoas/django_cradmin | django_cradmin/viewhelpers/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework.decorators import api_view\nfrom rest_framework.response import Response\n\nfrom .utils import absolute_reverse\nfrom api.users.serializers import UserSerializer\n\n@api_view(('GET',))\ndef root(request, format=None):\n\... | python | edit | 1 | 3 | apache-2.0 | de88382029a01c036a3601c40cacc342f5212080 | KAsante95/osf.io,Johnetordoff/osf.io,petermalcolm/osf.io,mluo613/osf.io,saradbowman/osf.io,emetsger/osf.io,jmcarp/osf.io,Ghalko/osf.io,jinluyuan/osf.io,mluke93/osf.io,monikagrabowska/osf.io,hmoco/osf.io,chennan47/osf.io,zachjanicki/osf.io,acshi/osf.io,rdhyee/osf.io,jeffreyliu3230/osf.io,acshi/osf.io,mfraezz/osf.io,slor... | api/base/views.py | rejected_duplicate | Near-duplicate of sample 4185 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport sys\nimport unittest\n\nimport btceapi\n\n\nclass TestScraping(unittest.TestCase):\n def test_scrape_main_page(self):\n mainPage = btceapi.scrapeMainPage()\n for message in mainPage.mes... | python | edit | 4 | 3 | mit | c88171bef919dc02bf5796b1bc9318d60a680a8f | alanmcintyre/btce-api,CodeReclaimers/btce-api,lromanov/tidex-api | test/test_scraping.py | rejected_lint | Too many lint violations: 4 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.