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# inspired from:\n\n# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/\n# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py\n\n__name__ = \"thinc\"\n__version__ = \"8.0.0.dev0\"\n__summ... | python | edit | 1 | 0 | mit | 83fdf3051786806486f4ff9e4b05616603f7211a | explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc | thinc/about.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.text import slugify\n\nfrom common.models import TimeStampedModel\n\n\nclass List(TimeStampedModel):\n name = models.CharField(max_length=50)\n slug = models.CharField(max_length=50, edi... | python | edit | 1 | 1 | mit | 1126c0e795d94e004fae03edda3e299b2d3b764c | ajoyoommen/zerrenda,ajoyoommen/zerrenda | todo/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2014-2019 Dontnod Entertainment\n\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal... | python | edit | 14 | 0 | mit | 30609236e703123c464c2e3927417ae677f37c4e | dontnod/nimp | nimp/base_commands/__init__.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the LICENSE.txt file for details.\nimport sys #... | python | edit | 1 | 0 | bsd-3-clause | 5a6a96435b7cf45cbbc5f2b81a7be84cd986b456 | itziakos/haas,sjagoe/haas,scalative/haas,sjagoe/haas,itziakos/haas,scalative/haas | haas/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom .models import ResaleApartment, ResaleApartmentImage\n\n\nclass ResaleApartmentImageSerializer(serializers.ModelSerializer):\n class Meta:\n model = ResaleApartmentImage\n fiel... | python | edit | 1 | 0 | mit | 1cff28b9612c156363ed87cdde1718ee83b65776 | Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency | real_estate_agency/resale/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask, redirect, request, render_template\nfrom flask_mail import Mail, Message\n\napp = Flask (__name__)\nALLOWED_EXTENSIONS = set(['txt', 'png', 'jpg', 'jpeg'])\nmail = Mail(app)\n\n@app.route(\"/\")\ndef inde... | python | edit | 6 | 1 | mit | e84d6dc5be2e2ac2d95b81e4df18bc0ad939916a | JonathanPeterCole/Tech-Support-Site,JonathanPeterCole/Tech-Support-Site | __init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass MediaForm(forms.Form):\n zip_file = forms.FileField(label=\"Zipped Media File\")\n\n def clean_data_file(self):\n file = self.cleaned_data['data_file']\n\n if file:\n extens... | python | edit | 1 | 3 | bsd-2-clause | 0a6078f5d0537cea9f36894b736fa274c3fa3e47 | praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo | molo/core/cookiecutter/scaffold/{{cookiecutter.directory}}/{{cookiecutter.app_name}}/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom app import db\nfrom flask_login import UserMixin\n\nclass User(UserMixin, db.Model):\n __tablename__ = 'users'\n id = db.Column(db.Integer, primary_key=True)\n nickname = db.Column(db.String(64), index=True, unique=True)\n ... | python | edit | 1 | 4 | mit | 49b3fe4e334e25c6afaa9ccace72f5c985e761cb | pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control | wcontrol/src/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Object detection and tracking for cell biology\n\n`scikit-learn` is bla bla bla.\n\nSubpackages\n-----------\ncolor\n Color space conversion.\n\n\nUtility Functions\n-----------------\nimg_as_float\n Convert an image to floating... | python | edit | 3 | 0 | bsd-3-clause | 8a55e9fac0885c5b6eb21cd8f3da54a105de8010 | bnoi/scikit-tracker,bnoi/scikit-tracker,bnoi/scikit-tracker | sktracker/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.utils import simplejson\n\n\nclass JSONField(models.TextField):\n \"\"\"Simple JSON field that stores python structures as JSON strings\n on... | python | edit | 11 | 5 | bsd-3-clause | 3c8b3a24978cf757fb3a8cc8660eb4554f183e0f | WW-Digital/django-social-auth,1st/django-social-auth,vxvinh1511/django-social-auth,limdauto/django-social-auth,michael-borisov/django-social-auth,caktus/django-social-auth,thesealion/django-social-auth,lovehhf/django-social-auth,dongguangming/django-social-auth,VishvajitP/django-social-auth,MjAbuz/django-social-auth,du... | social_auth/fields.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport django\n\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings_dict = dict(\n INSTALLED_APPS=(\n 'django.contrib.contenttypes',\n ... | python | edit | 1 | 3 | bsd-3-clause | 43b077050cd0e914fbe7398f9077e787c496afe4 | sternb0t/django-pandas,perpetua1/django-pandas,arcticshores/django-pandas,chrisdev/django-pandas | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"settings.py\n\nUdacity conference server-side Python App Engine app user settings\n\n$Id$\n\ncreated/forked from conference.py by wesc on 2014 may 24\n\n\"\"\"\n\n# Replace the following lines with client IDs ... | python | edit | 1 | 0 | apache-2.0 | 0eb20c8025a838d93a5854442640550d5bf05b0b | elbernante/conference-central,elbernante/conference-central,elbernante/conference-central | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom .builder import SchemaBuilder\n\n\nclass MySQLSchemaBuilder(SchemaBuilder):\n\n def has_table(self, table):\n \"\"\"\n Determine if the given table exists.\n\n :param table: The table\... | python | edit | 1 | 3 | mit | 1e513d901dfef9135a62c8f99633b10d3900ecb8 | sdispater/orator | orator/schema/mysql_builder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport copy\n\nfrom twisted.internet import defer\n\nfrom mock import Mock\nfrom testtools import ExpectedException, TestCas... | python | edit | 6 | 1 | mit | 6913ef43184eda1166541b2c59e0a82c3981d643 | znerol/spreadflow-pdf | spreadflow_pdf/test/test_savepdfpages.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Movie(models.Model):\n tmdb_id = models.IntegerField()\n```\n\nApply this change: Add some extra fields to movie model"
},
{
"role": "assistant",
"content": "from django.contrib.auth.mo... | python | edit | 1 | 0 | mit | b54a6353a746d54869a7cadca1bdcfb1e1cd3d51 | simon-andrews/movieman2,simon-andrews/movieman2 | moviemanager/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Module containing factory function for the application\"\"\"\nfrom flask import Flask, redirect\nfrom flask_restplus import Api\n\nfrom config import app_config\nfrom api_v1 import Blueprint_apiV1\nfrom api_v1.models import db\n\n\nAp... | python | edit | 1 | 1 | mit | 5dc69c3e88ab4df897c9a1d632a47de42e5bc9c0 | machariamarigi/shopping_list_api | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nimport socket\n\ntry:\n import httplib\nexcept ImportError:\n import http.client as httplib\n\nfrom isso.wsgi import urlsplit\n\n\nclass curl(object):\n \"\"\"Easy to use wrapper around :module:`httplib... | python | edit | 1 | 4 | mit | 894086bda2545fc7d094def6f925b96905920992 | jiumx60rus/isso,janusnic/isso,WQuanfeng/isso,mathstuf/isso,janusnic/isso,Mushiyo/isso,posativ/isso,xuhdev/isso,jelmer/isso,princesuke/isso,mathstuf/isso,princesuke/isso,WQuanfeng/isso,jelmer/isso,jelmer/isso,xuhdev/isso,posativ/isso,Mushiyo/isso,jelmer/isso,xuhdev/isso,princesuke/isso,posativ/isso,jiumx60rus/isso,maths... | isso/utils/http.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom appconf import AppConf\n\n\nclass StaticBuilderConf(AppConf):\n BUILD_COMMANDS = []\n COLLECT_BUILT = True\n INCLUDE_FILES = ['*.css', '*.js']\n\n class Meta:\n required = [\n 'BUILT_ROOT',\n ]\n\n`... | python | edit | 1 | 0 | mit | 5bb6e416cf7c59b7a5f85b1b0b037df7667d5d88 | hzdg/django-ecstatic,hzdg/django-staticbuilder | staticbuilder/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom enum import Enum\nimport re\n\nToken = Enum('Token', 'load comment text var block',)\n\ntag_re = re.compile(\n '|'.join([\n r'{\\!\\s*(?P<load>.+?)\\s*\\!}',\n r'{%\\s*(?P<tag>.+?)\\s*%}',\n r'{{\\s*(?P<var>.+?)... | python | edit | 1 | 7 | mit | 2adc021a520baa356c46ad1316893c1cd96f3147 | funkybob/knights-templater,funkybob/knights-templater | knights/lexer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pymoku import Moku\nfrom pymoku.instruments import *\nimport time, logging\n\nlogging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')\nlogging.getLogger('pymoku').setLevel(logging.INFO)\n\n# Use Moku.get_by_serial... | python | edit | 4 | 0 | mit | 890860f89e353e6afb45dec06e3617f0f70e1ad7 | liquidinstruments/pymoku,benizl/pymoku | examples/basic_datalogger.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom dal import autocomplete\n\nfrom .models import Publisher\n\n\nclass PublisherAutocomplete(autocomplete.Select2QuerySetView):\n # basic publisher autocomplete lookup, based on\n # django-autocomplete-light tutorial\n # restrict... | python | edit | 1 | 1 | apache-2.0 | 75dbd6cea16b6d8c59ae3f26691a22419f2a8269 | Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django | winthrop/books/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport getopt, sys\n\nif __name__ == '__main__':\n sippy_path = None\n\n try:\n opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b')\n except getopt.GetoptError:\n usage()\n\n for o, a in opts:\n if o == '-... | python | edit | 2 | 0 | bsd-2-clause | 21e47557da10e1f4bb14e32d15194bf95211882a | sippy/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy | python/getmonotime.py | rejected_duplicate | Near-duplicate of sample 11321 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mopidy.models import Track\n\nclass BaseCurrentPlaylistControllerTest(object):\n uris = []\n backend_class = None\n\n def setUp(self):\n self.backend = self.backend_class()\n\n def test_add(self):\n playlist =... | python | edit | 3 | 2 | apache-2.0 | 56cdcde184b613dabdcc3f999b90915f75e03726 | hkariti/mopidy,mopidy/mopidy,abarisain/mopidy,quartz55/mopidy,ZenithDK/mopidy,quartz55/mopidy,priestd09/mopidy,diandiankan/mopidy,dbrgn/mopidy,diandiankan/mopidy,SuperStarPL/mopidy,adamcik/mopidy,rawdlite/mopidy,liamw9534/mopidy,pacificIT/mopidy,jcass77/mopidy,bencevans/mopidy,mokieyue/mopidy,swak/mopidy,bacontext/mopi... | tests/backends/__init__.py | rejected_duplicate | Near-duplicate of sample 16258 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = False\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\n\n# TODO: Add MEDIA_ROOT setting.\n#MEDIA_ROOT = get_secret(\"MEDIA_ROOT\")\n\n# Security-related... | python | edit | 6 | 0 | mit | ca2789ad15cba31449e4946494122ab271a83c92 | FarmCodeGary/InspirationForge,FarmCodeGary/InspirationForge,FarmCodeGary/InspirationForge | inspirationforge/settings/production.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom osfclient.models import OSFSession\n\n\ndef test_basic_auth():\n session = OSFSession()\n session.basic_auth('joe@example.com', 'secret_password')\n assert session.auth == ('joe@example.com', 'secret_password')\n assert 'Au... | python | edit | 1 | 1 | bsd-3-clause | 95c7037a4a1e9c3921c3b4584046824ed469ae7f | betatim/osf-cli,betatim/osf-cli | osfclient/tests/test_session.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# This file is part of Evergreen. See the NOTICE for more information.\n#\n\nimport pyuv\nimport sys\n\nfrom evergreen.event import Event\nfrom evergreen.futures import Future\n\n__all__ = ('ThreadPool')\n\n\"\"\"Internal thread pool whi... | python | edit | 3 | 3 | mit | 3f2ab5710fb07a78c5b7f67afb785e9aab5e7695 | saghul/evergreen,saghul/evergreen | evergreen/core/threadpool.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\n\n\ndef path_to_data_dir(name):\n if not isinstance(name, bytes):\n name = name.encode(sys.getfilesystemencoding())\n path = os.path.dirname(__file__)\n path ... | python | edit | 2 | 2 | apache-2.0 | d6a1e13ed6fc1db1d2087ba56fc9130f9ab641f9 | rawdlite/mopidy,jcass77/mopidy,SuperStarPL/mopidy,jcass77/mopidy,bencevans/mopidy,jmarsik/mopidy,vrs01/mopidy,jcass77/mopidy,ali/mopidy,pacificIT/mopidy,tkem/mopidy,jodal/mopidy,diandiankan/mopidy,tkem/mopidy,adamcik/mopidy,vrs01/mopidy,mokieyue/mopidy,adamcik/mopidy,bencevans/mopidy,swak/mopidy,swak/mopidy,ali/mopidy,... | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\nfrom django_filters.filters import Lookup\n\nfrom apps.events.models import Event\n\n\nclass ListFilter(django_filters.Filter):\n # https://github.com/carltongibson/django-filter/issues/137#issuecomment-37820702\n ... | python | edit | 1 | 1 | mit | 7ebda7fca01372ae49a8c66812c958fc8200f4b0 | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | apps/events/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# coding: utf8\n\nfrom __future__ import absolute_import\n\nimport logging\n\nfrom geocoder.opencage import OpenCageResult, OpenCageQuery\nfrom geocoder.location import Location\n\n\nclass OpenCageReverseResult(OpenCageRe... | python | edit | 1 | 1 | mit | 9499721aa6a3ae6c01b94594f6a9e595560c2c7e | DenisCarriere/geocoder | geocoder/opencage_reverse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n 'create_engine',\n]\n\nimport sqlalchemy\n\n\ndef create_engine(db_uri, check_same_thread=False, echo=False):\n engine = sqlalchemy.create_engine(\n db_uri,\n echo=echo,\n connect_args={\n ... | python | edit | 1 | 1 | mit | 1e148822b4611403add32154fbe47bc8775f8001 | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | py/garage/garage/sql/sqlite.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license. \n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom tornado.httpserver import HTTPServer\nfrom tornado.ioloop import IOLoop, Per... | python | edit | 3 | 2 | mit | ab25537b67b14a8574028280c1e16637faa8037c | mvaled/gunicorn,wong2/gunicorn,prezi/gunicorn,elelianghh/gunicorn,wong2/gunicorn,WSDC-NITWarangal/gunicorn,MrKiven/gunicorn,mvaled/gunicorn,alex/gunicorn,1stvamp/gunicorn,z-fork/gunicorn,1stvamp/gunicorn,ephes/gunicorn,prezi/gunicorn,gtrdotmcs/gunicorn,tejasmanohar/gunicorn,urbaniak/gunicorn,gtrdotmcs/gunicorn,prezi/gu... | gunicorn/workers/gtornado.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom datetime import datetime\nfrom time import mktime\n\nfrom django.core.management.base import BaseCommand\nfrom django.utils.timezone import get_default_timezone, make_aware\nfrom feedparser import parse\n\nfrom ...models import Link\... | python | edit | 1 | 5 | bsd-2-clause | 8febff1065c67db1599f6b9bccd27f843981dd95 | tsybulevskij/drum,j00bar/drum,j00bar/drum,yodermk/drum,skybluejamie/wikipeace,yodermk/drum,renyi/drum,sing1ee/drum,yodermk/drum,renyi/drum,tsybulevskij/drum,stephenmcd/drum,sing1ee/drum,j00bar/drum,stephenmcd/drum,abendig/drum,tsybulevskij/drum,renyi/drum,skybluejamie/wikipeace,abendig/drum,sing1ee/drum,abendig/drum | main/management/commands/poll_rss.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import annotations\n\nimport functools\nfrom pathlib import Path\nfrom typing import Mapping\n\nimport tomli\n\nDEFAULT_OPTS = {\n \"wrap\": \"keep\",\n \"number\": False,\n \"end_of_line\": \"lf\",\n}\n\n\nclass In... | python | edit | 1 | 6 | mit | cebd4d613cc95ef6e775581a6f77f4850e39020a | executablebooks/mdformat | src/mdformat/_conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\nfrom flask_login import LoginManager\nfrom flask_sqlalchemy import SQLAlchemy\n\ntemplate_directory = os.path.join(\n os.path.dirname(os.path.abspath(__file__)),\n 'frontend/templates'\n)\nstatic_... | python | edit | 1 | 1 | mit | 6874ff82ddf5e9d803a45676c45d83be65ad3b33 | LINKIWI/linkr,LINKIWI/linkr,LINKIWI/linkr | core/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Add movie metadata (imdb rating, number of votes, metascore) and relevancy\n\nRevision ID: 2c240cb3edd1\nRevises: 588336e02ca\nCreate Date: 2014-02-09 13:46:18.630000\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '... | python | edit | 1 | 1 | mit | dd5774c30f950c8a52b977a5529300e8edce4bc7 | streamr/marvin,streamr/marvin,streamr/marvin | migrations/versions/2c240cb3edd1_.py | rejected_duplicate | Near-duplicate of sample 8575 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nfrom numpy.testing import assert_approx_equal\nfrom UliEngineering.Physics.Light import *\nfrom UliEngineering.EngineerIO import auto_format\nimport unittest\n\nclass TestJohnsonNyquistNoise(... | python | edit | 4 | 1 | apache-2.0 | 7e2835f76474f6153d8972a983c5d45f9c4f11ee | ulikoehler/UliEngineering | tests/Physics/TestLight.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Example:\n # (r'^store/', include('store.foo.urls... | python | edit | 5 | 0 | bsd-3-clause | f5fe10907d1ecffb89f62a56e8b7f8e34f4fcf2a | willmurnane/store | urls.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for A2.4 and A2.5"
},
{
"role": "assistant",
"content": "\"\"\"\n Tests for the NURBS-Python package\n Released under The MIT License. See LICENSE file for details.\n Copyright (c) 2018 Onur Rauf Bingol\n\n ... | python | new_file | 3 | 1 | mit | eca9ee90bf64b14c6a8eacdb4197825790ab7825 | orbingol/NURBS-Python,orbingol/NURBS-Python | tests/test_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport interleaving as il\nimport numpy as np\nnp.random.seed(0)\n\nclass TestMethods(object):\n\n def assert_almost_equal(self, a, b, error_rate=0.1):\n half_error_rate = error_rate / 2.0\n lower_bound = (1.0 - half_error_... | python | edit | 3 | 3 | mit | 99683d16551450686397f953668b7d6bf4167a5e | mpkato/interleaving | tests/test_methods.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport viper.grammar as vg\nimport viper.grammar.languages as vgl\nimport viper.lexer as vl\n\nimport pytest\n\n\n@pytest.mark.parametrize('line,sppf', [\n ('foo',\n vgl.SPPF(vgl.ParseTreeChar(vl.Name('foo')))),\n ('2',\n vgl.... | python | edit | 3 | 1 | apache-2.0 | 715098531f823c3b2932e6a03d2e4b113bd53ed9 | pdarragh/Viper | tests/test_grammar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext.commands import Bot\nimport json\n\nclient = Bot(\"~\", game=discord.Game(name=\"~help\"))\n\n@client.event\nasync def on_ready():\n print('We have logged in as {0.user}'.format(client))\n\n@client.comman... | python | edit | 1 | 2 | mit | 94529f62757886d2291cf90596a179dc2d0b6642 | HarkonenBade/yutu | yutu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.urlresolvers import RegexURLResolver, RegexURLPattern\nfrom rest_framework.views import APIView\nfrom rest_framework_docs.api_endpoint import ApiEndpoint\n\n\nclass ApiDocumentation(object)... | python | edit | 1 | 6 | bsd-2-clause | 694a3e1aa5eec02e81cfde517ca126f00b21bd2f | manosim/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,manosim/django-rest-framework-docs,manosim/django-rest-framework-docs | rest_framework_docs/api_docs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Module providing views for asset storage folder\"\"\"\nfrom Products.Five.browser import BrowserView\nfrom plone import api\nfrom plone.app.blob.interfaces import IATBlobImage\n\n\nclass AssetRepositoryView(Br... | python | edit | 1 | 3 | mit | 84deb31cc2bdbf30d8b6f30725a3eaaccd1dd903 | ade25/ade25.assetmanager | ade25/assetmanager/browser/repository.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTest lldb 'process connect' command.\n\"\"\"\n\nimport os\nimport unittest2\nimport lldb\nimport pexpect\nfrom lldbtest import *\n\nclass ConnectRemoteTestCase(TestBase):\n\n mydir = \"connect_remote\"\n\n @unittest2.expectedF... | python | edit | 6 | 2 | apache-2.0 | 2da44025051e6a0c0bffe4dba25ed7084e7ae277 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb | test/connect_remote/TestConnectRemote.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.db import models\n\n\nclass ActiveOfferManager(models.Manager):\n \"\"\"\n For searching/creating ACTIVE offers only.\n \"\"\"\n def get_query_set(self):\n today = datetime.date.today()\n ... | python | edit | 1 | 1 | bsd-3-clause | 6ece85c530d9856a7db650729e57a9f2a92dfa4b | sasha0/django-oscar,thechampanurag/django-oscar,ka7eh/django-oscar,elliotthill/django-oscar,eddiep1101/django-oscar,john-parton/django-oscar,adamend/django-oscar,nfletton/django-oscar,jmt4/django-oscar,pdonadeo/django-oscar,bschuon/django-oscar,sonofatailor/django-oscar,QLGu/django-oscar,monikasulik/django-oscar,Willis... | oscar/apps/offer/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.text import capfirst\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom feincms.module.page.extensions.navigation import NavigationExtension, PagePretender\n\n\nclass ZivinetzNavigationExtension(NavigationExt... | python | edit | 1 | 1 | mit | 6e1337f7079ba48aafcde59e4d5806caabb0bc29 | matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz | navigation_extensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Gregory Oschwald\n# Copyright (c) 2013 Gregory Oschwald\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Perl plugin class.\"\"... | python | edit | 1 | 2 | mit | 8608283592338960c80113ff4d68f42936ddb969 | oschwald/SublimeLinter-perl | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\nfrom client import Client\n\n\nclass EtcdResult(collections.namedtuple(\n 'EtcdResult',\n [\n 'action',\n 'index',\n 'key',\n 'prevValue',\n 'value',\n 'expiration',\n ... | python | edit | 3 | 1 | mit | 6d91ed53a15672b1e70d74691158e9afb7162e74 | dmonroy/python-etcd,ocadotechnology/python-etcd,thepwagner/python-etcd,dmonroy/python-etcd,jlamillan/python-etcd,ocadotechnology/python-etcd,aziontech/python-etcd,jplana/python-etcd,sentinelleader/python-etcd,vodik/python-etcd,projectcalico/python-etcd,j-mcnally/python-etcd,j-mcnally/python-etcd,mbrukman/python-etcd,az... | src/etcd/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\ndynesty is nested sampling package.\nThe main functionality of dynesty is performed by the\ndynesty.NestedSampler and dynesty.DynamicNestedSampler\nclasses\n\"\"\"\nfrom .dynesty impor... | python | edit | 6 | 0 | mit | b0d8280927bdd33cfb16da2782ca54100a5ece09 | joshspeagle/dynesty | py/dynesty/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._convert import convert\nfrom . import log\nfrom . import random\nfrom . import version\nfrom .version import module as __version__\nfrom .version import api as __api_version__\n\ndef get_include():\n \"\"\"Returns the directory cont... | python | edit | 8 | 3 | bsd-3-clause | 5747284df86016958ab1ae9dcf437b375e79beba | tiagofrepereira2012/bob.core,tiagofrepereira2012/bob.core,tiagofrepereira2012/bob.core | xbob/core/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport mysql.connector\n\ndef insert():\n cursor = connection.cursor()\n try:\n cursor.execute(\"drop table employees\")\n except:\n pass\n cursor.execute(\"create table employe... | python | edit | 2 | 3 | mit | c2859bd8da741862ee01a276a1350fb4a5931dbc | goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop,goldshtn/linux-tracing-workshop | data_access.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .__about__ import __version__\nfrom .compiler import RDLCompiler\nfrom .walker import RDLListener, RDLWalker\nfrom .messages import RDLCompileError\n\n```\n\nApply this change: Bring forward more contents into top namespace"
},
{
... | python | edit | 23 | 0 | mit | 807d7efe7de00950df675e78249dcada298b6cd1 | SystemRDL/systemrdl-compiler,SystemRDL/systemrdl-compiler,SystemRDL/systemrdl-compiler,SystemRDL/systemrdl-compiler | systemrdl/__init__.py | rejected_lint | Too many lint violations: 23 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# touch.py - /bin/touch that writes the LLVM epoch -*- python -*-\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors\n# License... | python | edit | 1 | 0 | apache-2.0 | ed491860864c363be36d99c09ff0131a5fe00aaf | aschwaighofer/swift,tinysun212/swift-windows,arvedviehweger/swift,xwu/swift,airspeedswift/swift,parkera/swift,tinysun212/swift-windows,JGiola/swift,JaSpa/swift,JGiola/swift,parkera/swift,zisko/swift,hughbe/swift,codestergit/swift,CodaFi/swift,rudkx/swift,huonw/swift,tkremenek/swift,jtbandes/swift,codestergit/swift,prac... | test/Driver/Dependencies/Inputs/touch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__all__ = [\"randh\", \"wrap\"]\n\nimport numpy as np\nimport numpy.random as rng\n\ndef randh():\n \"\"\"\n Generate from the heavy-tailed distribution.\n \"\"\"\n return 10.0**(1.5 - 3*np.abs(rng.randn... | python | edit | 1 | 2 | mit | f68e8cb9751a32cc4d8bdc97c6f753395381e1e1 | eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4 | python/dnest4/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {\n 'DeclBuildable': [\n 'CodeBlockItem',\n 'MemberDeclListItem',\n 'SyntaxBuildable'\n ],\n 'ExprList': [\n 'ConditionElement',\n 'SyntaxBuildable'\... | python | edit | 1 | 0 | apache-2.0 | 6d7d04b095eacb413b07ebcb3fed9684dc40fc80 | atrick/swift,atrick/swift,apple/swift,rudkx/swift,benlangmuir/swift,roambotics/swift,rudkx/swift,glessard/swift,atrick/swift,ahoppen/swift,glessard/swift,JGiola/swift,atrick/swift,ahoppen/swift,ahoppen/swift,apple/swift,glessard/swift,JGiola/swift,rudkx/swift,rudkx/swift,atrick/swift,roambotics/swift,apple/swift,roambo... | utils/gyb_syntax_support/protocolsMap.py | rejected_duplicate | Near-duplicate of sample 12826 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport logging.handlers\n\nDEBUG = True\n\nLOG_FORMAT = '[%(asctime)s: %(levelname)s] %(message)s'\nif DEBUG:\n LOG_LEVEL = logging.DEBUG\nelse:\n LOG_LEVEL = logging.WARN\nLOG_COLOR = True\n\nPORT = 8000\n\nTORNADO_SE... | python | edit | 1 | 0 | mit | 93b4fd9c6d2c7b113551d1f6f565c7fffc66b5e2 | peplin/astral | astral/conf/global_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import patterns, url\n\nfrom reviewboard.accounts.views import MyAccountView\n\n\nurlpatterns = patterns(\n \"reviewboard.accounts.views\",\n\n url(r'^register/$', 'acco... | python | edit | 1 | 0 | mit | 4fa21d91ada4df904fc8fdddff608fc40c49aaee | reviewboard/reviewboard,custode/reviewboard,1tush/reviewboard,brennie/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,reviewboard/reviewboard,1tush/reviewboard,custode/reviewboard,chipx86/reviewboard,beol/reviewboard,reviewboard/reviewboard,1tush/reviewboard,custode/reviewboard,1tush/reviewboard,davidt/reviewbo... | reviewboard/accounts/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test analysis page.\"\"\"\n\n\ndef test_analysis(webapp):\n \"\"\"Test we can analyse a page.\"\"\"\n response = webapp.get('/analyse/646e73747769737465722e7265706f7274')\n\n assert response.status_code == 200\n assert 'Us... | python | edit | 1 | 1 | unlicense | 9fb89c7e76bd3c6db5f7283b91a2852225056b40 | thisismyrobot/dnstwister,thisismyrobot/dnstwister,thisismyrobot/dnstwister | tests/test_analyse.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Increase version to 0.9.3 for release"
},
{
"role": "assistant",
"content": "__version__ = '0.9.3'\n\nfrom dicomweb_client.api import DICOMwebClient\n"
}
] | python | new_file | 3 | 0 | mit | ffc7f4e87da72866ce391f78084385eac3485049 | MGHComputationalPathology/dicomweb-client | src/dicomweb_client/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# See readme.md for instructions on running this code.\n\n\nclass IncrementorHandler(object):\n\n def __init__(self):\n self.number = 0\n self.message_id = None\n\n def usage(self):\n return '''\n This is a... | python | edit | 1 | 3 | apache-2.0 | 323b201b8a498402d9f45cbc5cbac049299feea8 | jackrzhang/zulip,zulip/zulip,Galexrt/zulip,eeshangarg/zulip,kou/zulip,brainwane/zulip,timabbott/zulip,verma-varsha/zulip,vabs22/zulip,mahim97/zulip,verma-varsha/zulip,hackerkid/zulip,rishig/zulip,zulip/zulip,rht/zulip,timabbott/zulip,punchagan/zulip,jackrzhang/zulip,punchagan/zulip,timabbott/zulip,hackerkid/zulip,punch... | api/bots/incrementor/incrementor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom app import db, bcrypt\n\nclass User(db.Model):\n __tablename__ = \"users\"\n \n id = db.Column(db.Integer, primary_key=True)\n username = db.Column(db.String(80), unique=True)\n email = d... | python | edit | 1 | 1 | mit | 5329c48a6f0a36809d3088560f91b427f7a2bf0b | ChristopherChudzicki/math3d,stardust66/math3d,stardust66/math3d,stardust66/math3d,stardust66/math3d,ChristopherChudzicki/math3d,ChristopherChudzicki/math3d,ChristopherChudzicki/math3d | models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (0, 9, 0, 'beta', 1)\n\n\ndef get_version():\n from django.utils.version import get_version as django_get_version\n return django_get_version(VERSION) # pragma: no cover\n\n```\n\nApply this change: Fix version number report... | python | edit | 1 | 4 | bsd-3-clause | 99b96d2c0b82e186b9eaa13d2efe8b617c9cf3aa | dinie/django-registration,dinie/django-registration,FundedByMe/django-registration,FundedByMe/django-registration,Avenza/django-registration | registration/__init__.py | rejected_duplicate | Near-duplicate of sample 13080 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom ...product.models import Collection\n\n\nclass CollectionForm(forms.ModelForm):\n class Meta:\n model = Collection\n exclude = []\n\n```\n\nApply this change: Update CollectionForm to handle s... | python | edit | 1 | 1 | bsd-3-clause | 5a0116378b6906fbfb3146bbf635d6d9c39ec714 | mociepka/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor | saleor/dashboard/collection/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom app import db\nfrom app.mod_auth.model import User\n\nclass Category(db.Document):\n # The name of the category.\n name = db.StringField(required = True)\n\nclass Entry(db.Document):\n # The amount of the entry.\n amount = ... | python | edit | 2 | 3 | mit | 58120c937e04357f6fbdcf1431f69fe7a38aacb2 | Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault | app/mod_budget/model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto3\nimport botocore\nimport time\n\nec2 = boto3.resource('ec2', region_name='us-east-1')\nclient = boto3.client('ec2')\n\n# Create a security group\ntry:\n sg = ec2.create_security_group(GroupName='jupyter', Description='EC2 fo... | python | edit | 3 | 0 | apache-2.0 | 7c4e372ec901e88ed0c6193a5c06f94a4bbc418b | flashxio/FlashX,icoming/FlashX,flashxio/FlashX,icoming/FlashX,flashxio/FlashX,flashxio/FlashX,icoming/FlashX,flashxio/FlashX,icoming/FlashX,icoming/FlashX,flashxio/FlashX | EC2/create_instance.py | rejected_duplicate | Near-duplicate of sample 5793 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport functools\nfrom flask import Flask, Response\nfrom foxgami.red import Story\n\napp = Flask(__name__)\n\n\ndef return_as_json(inner_f):\n @functools.wraps(inner_f)\n def new_f(*args, **kwargs):\n result = inn... | python | edit | 1 | 1 | mit | 015ecbbe112edaa3ada4cb1af70f62f03654dfe4 | flubstep/foxgami.com,flubstep/foxgami.com | py/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom scipy.interpolate import PchipInterpolator\n\n\nclass UcPoly():\n def __init__(self, coef):\n self.p = np.poly1d(coef)\n\n def machine_to_physics(self, machine_value):\n return self.p(machine_val... | python | edit | 1 | 4 | apache-2.0 | 7bfefe50c00d86b55c0620207e9848c97aa28227 | razvanvasile/RML,willrogers/pml,willrogers/pml | rml/units.py | rejected_duplicate | Near-duplicate of sample 3324 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Module for optimized functions\n\nSome methods performed in Python may be slowing down solvers. In this optimization\nmodule we place optimized functions that are to be used instead of default\nPython methods. Some methods are impleme... | python | edit | 4 | 6 | bsd-2-clause | d487e8d74d8bbbadf003cd128f80868cc5651d21 | spectralDNS/shenfun,spectralDNS/shenfun,spectralDNS/shenfun | shenfun/optimization/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask, Blueprint, request, jsonify\n\napp = Flask(__name__)\n# Read configuration to apply from environment\nconfig_name = os.environ.get('FLASK_CONFIG', 'development')\n# apply configuration\ncfg = os.path.join... | python | edit | 4 | 4 | apache-2.0 | dc45f973faa5655e821364cfbdb96a3e17ff9893 | javicacheiro/salt-git-synchronizer-proxy | app/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n# <a> followed by another <a> without any intervening </a>s\nlink_inside_link_regex = re.compile(\n ur\"(?P<outer_link><a ((?!</a>).)*)(<a ((?!</a>).)*>\"\n ur\"(?P<internal_content>((?!</a>).)*)</a>)\",\n re.IGNORECAS... | python | edit | 3 | 3 | cc0-1.0 | 7c3c0fac58822bcfa7bbd69de5ce46b36f84740c | 18F/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,18F/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site | regulations/generator/link_flattener.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom anser import Anser\n\n\nserver = Anser(__name__, debug=True)\n\n\n@server.action('default')\ndef action_a(message, address):\n print message['type']\n print message['body']\n\n\nserver.run()\n```\n\nApply this change: Clean the o... | python | edit | 2 | 1 | mit | accaf0bc0ab81d12927b55fdfd24ad75907b772f | iconpin/anser | runserver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport time\nimport shutil\nimport pandas as pd\nfrom bert_trainer import BERTTrainer\nfrom utils import *\n\nclass TestBERT(unittest.TestCase):\n\n def __init__(self, *args, **kwargs):\n super(TestBERT, self).__i... | python | edit | 4 | 1 | apache-2.0 | 37b8cf1af7818fe78b31ed25622f3f91805ade01 | googleinterns/smart-news-query-embeddings,googleinterns/smart-news-query-embeddings | test_bert_trainer.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\nimport uuid\n\nfrom contextlib import contextmanager\nfrom subprocess import check_call, CalledProcessError\n\nLOG = logging.getLogger(__name__)\n\n\ndef touch(directory, filename=None):\n file_path = os.path.j... | python | edit | 1 | 3 | mit | d38180f627cf421268f64d94e0eec36a19573754 | rcbops-qa/test_runner | test_runner/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tempfile\n\nfrom saltunittest import TestCase, TestLoader, TextTestRunner\n\nfrom salt import config as sconfig\nfrom salt.modules import file as filemod\nfrom salt.modules import cmdmod\n\nfilemod.__salt__ = {\n 'cmd.run': cmdmod... | python | edit | 3 | 1 | apache-2.0 | 0d5c3b5f0c9278e834fc4df2a5d227972a1b513d | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/unit/modules/file_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2011 by Florian Mounier, Kozea\n# This file is part of pystil, licensed under a 3-clause BSD license.\n\"\"\"\npystil - An elegant site web traffic analyzer\n\"\"\"\nfrom pysti... | python | edit | 2 | 1 | bsd-3-clause | 096bd7e3357e85c57ec56695bfc16f0b4eab9c4d | Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil | pystil.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom django.http import Http404, JsonResponse\nfrom django.views.decorators.csrf import csrf_exempt\nfrom breach.strategy import Strategy\nfrom breach.models import Victim\n\n\ndef get_work(request, victim_id=0):\n assert(vi... | python | edit | 3 | 2 | mit | 09f649ac0b14269067c43df9f879d963ab99cdac | dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,esarafianou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,d... | backend/breach/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom opps.core.models.channel import *\nfrom opps.core.models.profile import *\nfrom opps.core.models.source import *\nfrom opps.core.models.publisher import *\n\n```\n\nApply this change: Change package core mdoels... | python | edit | 5 | 0 | mit | a4d5a74c675b0c1d90dd9f254367975af9ea2735 | jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,williamroot/opps,YACOWS/opps | opps/core/models/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport types\n\ndb = connect( \"test\" );\nt = db.pythonnumbers\nt.drop()\n\nthing = { \"a\" : 5 , \"b\" : 5.5 }\nassert( type( thing[\"a\"] ) == types.IntType );\nassert( type( thing[\"b\"] ) == types.FloatType );\n\nt.save( thing )\n\nt... | python | edit | 1 | 0 | apache-2.0 | fc27b35dd1ac34b19bdc2d71dd71704bd9321b9d | babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble | src/test/ed/db/pythonnumbers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nimport lit.formats\nimport lit.util\n\nimport lit.llvm\n\n# Configuration file for the 'lit' test runner.\nlit.llvm.initialize(lit_config, config)\n\n# name: The name of this test suite.\nconfig.name = 'TFLITEHUB'\n... | python | edit | 12 | 0 | apache-2.0 | 0d96ff52ca66de8afd95fb6dc342e8529764e89b | iree-org/iree-samples,iree-org/iree-samples,iree-org/iree-samples,iree-org/iree-samples | tflitehub/lit.cfg.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Unit tests configuration file.\"\"\"\n\nimport logging\n\n\ndef pytest_configure(config):\n \"\"\"Disable verbose output when running tests.\"\"\"\n logging.basicConfig(level=logging.DEBUG)\n\n terminal = config.pluginmanager... | python | edit | 1 | 1 | mit | 94d99dea05bbd17220f3959a965cc6abd456bf12 | jacebrowning/template-python-demo | demo/tests/conftest.py | rejected_duplicate | Near-duplicate of sample 15277 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nfrom typing import ClassVar, List\n\n\n# Annotated function (Issue #29)\ndef foo(x: int) -> int:\n return x + 1\n\n\n# Annotated variables #575\nCONST: int = 42\n\n\nclass Class:\n cls_var: ClassVar[str]\n f... | python | edit | 3 | 1 | mit | d87a44367c5542ab8052c212e6d51f1532086dd1 | PyCQA/pep8 | testsuite/python3.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This module contains built-in introspector plugins for various common\n# Django apps.\n\n# These imports trigger the lower-down files\nimport south.introspection_plugins.geodjango\nimport south.introspection_plugins.django_tagging\nimport... | python | edit | 3 | 0 | apache-2.0 | 55646644c18fe5e10669743025cc00b8225f9908 | philipn/django-south,philipn/django-south,nimnull/django-south,RaD/django-south,RaD/django-south,RaD/django-south,nimnull/django-south | south/introspection_plugins/__init__.py | rejected_duplicate | Near-duplicate of sample 1917 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nclass Channel(object):\n def __init__(self, name, branch, position, cate... | python | edit | 1 | 1 | bsd-3-clause | 7a0b8550fa2f52519df81c7fa795d454e5e3b0bc | eunchong/build,eunchong/build,eunchong/build,eunchong/build | scripts/master/factory/dart/channels.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Copyright (c) 2016 All rights reserved\n# This program and the accompanying materials\n# are made available under the terms of the Apache License, Version 2.0\n# which accompanies this distribution, and is available ... | python | edit | 1 | 1 | apache-2.0 | e59055e29b5cc6a027d3a24803cc05fd709cca90 | opnfv/functest,mywulin/functest,opnfv/functest,mywulin/functest | functest/opnfv_tests/features/odl_sfc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib import request\n\nfrom bs4 import BeautifulSoup\n\nHEADERS = {\n 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7'\n}\n\n\nclass AbstractScraper():\n\n def __init__(... | python | edit | 1 | 2 | mit | 4840763265675407ed9fc612dc8884d859bdc28e | hhursev/recipe-scraper | recipe_scrapers/_abstract.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\n\n\nclass TalksUser(models.Model):\n\n ... | python | edit | 1 | 2 | apache-2.0 | 47faf3ad38eff5de2edc529a7347c01ddeddf4c4 | ox-it/talks.ox,ox-it/talks.ox,ox-it/talks.ox | talks/users/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom rest_framework import serializers\nfrom rest_framework.exceptions import ValidationError\n\nfrom users.models import User\n\n\nclass UserSerializer(serializers.HyperlinkedModelSerializer):\n class M... | python | edit | 3 | 2 | bsd-2-clause | a268a886e0e3cab1057810f488feb6c2227414d3 | pinry/pinry,lapo-luchini/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry | users/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom .. import items\n\nclass DatasetSpider(CrawlSpider):\n\n name = 'dataset'\... | python | edit | 1 | 1 | mit | 9f216f1fdde41730b2680eed2174b1ba75d923be | MaxLikelihood/CODE | dataset/dataset/spiders/dataset_spider.py | rejected_duplicate | Near-duplicate of sample 2461 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, division, absolute_import\n\nimport numpy as np\n\nfrom .common import *\nfrom train.utils import preprocessImage, loadNetwork, predict\nfrom constants import *\n\ntest_image = 234 * np.ones((*CAMERA_R... | python | edit | 15 | 1 | mit | d8abffb340a852d69128977fa17bafdfc6babb71 | sergionr2/RacingRobot,sergionr2/RacingRobot,sergionr2/RacingRobot,sergionr2/RacingRobot | tests/test_utils.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Author: Taylor Smith <<EMAIL>>\n#\n# The pyramid module\n\n__version__ = \"0.7.0-dev\"\n\ntry:\n # this var is injected in the setup build to enable\n # the retrieval of the version number without actuall... | python | edit | 7 | 1 | mit | affad020348ca8aa6a7b9431811d707ab8f6d99a | tgsmith61591/pyramid,alkaline-ml/pmdarima,tgsmith61591/pyramid,tgsmith61591/pyramid,alkaline-ml/pmdarima,alkaline-ml/pmdarima | pyramid/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# stdlib\nfrom typing import Optional\nfrom typing import Union\n\n# third party\nfrom nacl.encoding import HexEncoder\nfrom nacl.signing import SigningKey\nfrom pydantic import BaseModel\nfrom pydantic import EmailStr\n\n\nclass BaseUser(B... | python | edit | 1 | 1 | apache-2.0 | 95e61ccdebc33c1c610d0672558cd00798c3105f | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | packages/grid/backend/grid/api/users/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom drupdates.utils import *\nfrom drupdates.constructors.reports import *\nimport json\n\nclass slack(Reports):\n\n def __init__(self):\n self.currentDir = os.path.dirname(os.path.realpath(__file__))\n self.settings = Settings(self... | python | edit | 10 | 3 | mit | 194b72c7d3f0f60e73d1e11af716bfbdd9d4f08d | jalama/drupdates | drupdates/plugins/slack/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\n\n__version__ = \"5.0.1\"\n\nlogger = logging.getLogger('vies')\n\nVIES_WSDL_URL = str('http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl') # NoQA\nVATIN_MAX_LENGTH = 14\n\n```\n\nApply... | python | edit | 1 | 0 | mit | 5ac88fd5a10444b8f6384d127c13216545319169 | codingjoe/django-vies | vies/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import Counter\nimport datetime\n\n\nfrom parler.managers import TranslatableManager\n\n\nclass RelatedManager(TranslatableManager):\n\n # TODO: uncomment this when we'll have image field\n # def get_query_set(self):\... | python | edit | 1 | 3 | bsd-3-clause | f39982f0cab45ba898bf8de7a4170e615cd9569c | mkoistinen/aldryn-newsblog,mkoistinen/aldryn-newsblog,mkoistinen/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog,czpython/aldryn-newsblog | aldryn_newsblog/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"\nA program to extract raw text from Telegram chat log\n\"\"\"\nimport argparse\nfrom json import loads\n\ndef main():\n\n parser = argparse.ArgumentParser(\n description=\"Extract all raw text fr... | python | edit | 1 | 6 | mit | 988f4655a96076acd3bfb906d240bd4601fbe535 | expectocode/telegram-analysis,expectocode/telegramAnalysis | getalltext.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport distutils.sysconfig\nfrom glob import glob\nimport os\nfrom os.path import join as pjoin, basename\nfrom shutil import copy\nfrom sys import platform\n\ndef main():\n \"\"\"\n Copy HDF5 DLLs into installed h5py package\n \"\... | python | edit | 1 | 5 | bsd-3-clause | 9056746db7406e6640607210bea9e00a12c63926 | h5py/h5py,h5py/h5py,h5py/h5py | ci/fix_paths.py | rejected_duplicate | Near-duplicate of sample 15133 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom core.models import Category\n\nfrom django.test.testcases import TestCase\nfrom django.urls import reverse\n\n\nclass ExportViewMixinTest(TestCase):\n\n def setUp(self):\n self.url = reverse('export-category')\n self.c... | python | edit | 1 | 1 | bsd-2-clause | 3b091fba819f1ad69d0ce9e9038ccf5d14fea215 | bmihelac/django-import-export,bmihelac/django-import-export,bmihelac/django-import-export,jnns/django-import-export,jnns/django-import-export,jnns/django-import-export,django-import-export/django-import-export,django-import-export/django-import-export,django-import-export/django-import-export,django-import-export/djang... | tests/core/tests/test_mixins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.gis import admin\n\nfrom cities.models import *\n\nclass CityAdmin(admin.OSMGeoAdmin):\n\tlist_display = ('__unicode__', 'population_2000')\n\tlist_filter = ('pop_range',)\n\tsearch_fields = ('name',)\n\nadmin.site.regis... | python | edit | 3 | 0 | bsd-3-clause | cd8d7235190b4040fd135df6bb45e984c341b568 | adamfast/usgsdata-citiesx020 | cities/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime_plugin\ntry:\n from VcsGutter.view_collection import ViewCollection\nexcept ImportError:\n from view_collection import ViewCollection\n\nclass VcsGutterBaseChangeCommand(sublime_plugin.WindowCommand):\n def lines_to_... | python | edit | 1 | 3 | mit | 3921c00a6eb4d0dc50bf3efaaeb9b91ff3ad7608 | ariofrio/VcsGutter,bradsokol/VcsGutter,ariofrio/VcsGutter,bradsokol/VcsGutter | vcs_gutter_change.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.16.4\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\... | python | edit | 1 | 0 | mit | c8291c72b21be4b06a834449d89b2e4f91c1bc2b | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/config/__init__.py | rejected_duplicate | Near-duplicate of sample 1349 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.