messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import apps as dj_apps\nfrom django.conf.urls import include, url\nfrom django.template.response import TemplateResponse\nfrom django.utils.text import capfirst\n\n\nclass Router(object):\n def __init__(self):\n s... | python | edit | 1 | 3 | mit | 5a05b1cbe258ef18607aabbc276aaccd5f2eb14c | raizanshine/django-admin-crud,raizanshine/django-admin-crud | admin_crud/router.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport io\nimport os\nimport pickle\nimport pytest\nfrom steamfiles import appinfo\n\ntest_file_name = os.path.join(os.path.dirname(__file__), 'test_data/appinfo.vdf')\n\n\n@pytest.yield_fixture\ndef vdf_data():\n with open(test_file_nam... | python | edit | 3 | 1 | mit | 1e4bdeeb1156c4ff65d261ba261f594be57bc30f | leovp/steamfiles | tests/test_appinfo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\ndef test_cookies_fixture(testdir):\n \"\"\"Make sure that pytest accepts the `cookies` fixture.\"\"\"\n\n # create a temporary pytest test module\n testdir.makepyfile(\"\"\"\n def test_valid_fixt... | python | edit | 1 | 1 | mit | 331f776eef9acd0509c7534040ef225869305d7f | hackebrot/pytest-cookies | tests/test_cookies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tensorflow as tf\n\n\nclass ANN:\n def __init__(self):\n self.inputNodes = 7\n self.hiddenNodes = 64\n self.hiddenNodes2 = 32 # weight3\n self.outputNodes = 1\n\n self.x = tf.placeholder(\"float... | python | edit | 1 | 1 | mit | 072497f0032bae261e78e27daf6c8e6caeea68c1 | DiamondOperators/selfdriving-car | ANN.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ..converter import KnowledgePostConverter\n\nfrom .html import HTMLConverter\n\n\nclass PDFConverter(KnowledgePostConverter):\n '''\n Use this as a template for new KnowledgePostConverters.\n '''\n _registry_keys = ['pdf']\... | python | edit | 1 | 1 | apache-2.0 | e0233b0bb0a5a92c641d06648ec9921318b9a028 | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | knowledge_repo/converters/pdf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2007-2013 by Enthought, Inc.\n# All rights reserved.\n\"\"\" A multi-platform object drawing library.\n Part of the Enable project of the Enthought Tool Suite.\n\"\"\"\n__version__ = '4.3.0'\n\n__requires__ = [\n 'tr... | python | edit | 1 | 0 | bsd-3-clause | e8bb81a8be7c76c2e1839d8315bd29f381fea4ae | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | enable/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom nodes import Node\n\nclass MultiVar(Node):\n char = \"'\"\n args = 0\n results = None\n contents = -1\n \n def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle):\n self.node_1 = node_1\n ... | python | edit | 1 | 1 | mit | 4f05805c0ec31da0b978cdccc0d79336272859fe | muddyfish/PYKE,muddyfish/PYKE | node/multi_var.py | rejected_duplicate | Near-duplicate of sample 15663 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pymongo\n\nfrom .db import connect_to_db\n\n\nfiles_to_check = [\n '/home/irvind/test.log',\n '/home/irvind/test2.log'\n]\n\n\ndef run_scanner():\n _, db = connect_to_db(async=False)\n\n while True:\n tr... | python | edit | 5 | 7 | mit | 1501510e37722a2b68871d44c431ac8c44060e1e | irvind/logster,irvind/logster,irvind/logster | logster/scanner.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport commonware\n\nfrom celery.task import task\nfrom pontoon.base.models import Project\nfrom pontoon.administration.views import _update_from_repository\n\n\nlog = commonware.log.getLogger('pontoon')\n\n\n@task()\ndef update_projects_... | python | edit | 2 | 3 | bsd-3-clause | 5e0dde9e6bb6dc8f24c4eb47e63c5dd68ede809c | yfdyh000/pontoon,sudheesh001/pontoon,mozilla/pontoon,m8ttyB/pontoon,mathjazz/pontoon,participedia/pontoon,sudheesh001/pontoon,Jobava/mirror-pontoon,yfdyh000/pontoon,vivekanand1101/pontoon,jotes/pontoon,m8ttyB/pontoon,yfdyh000/pontoon,mozilla/pontoon,Jobava/mirror-pontoon,participedia/pontoon,Jobava/mirror-pontoon,sudhe... | pontoon/administration/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom cms.sitemaps import CMSSitemap\nfrom django.conf.urls import * # NOQA\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom d... | python | edit | 5 | 0 | bsd-3-clause | 253a375af742699ec4a13e5d8b33e669691ed872 | mfcovington/djangocms-lab-members,mfcovington/djangocms-lab-members | mysite/urls.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.sites.models import Site\nfrom django.utils.translation import ugettext as _\n\n\nclass Feedback(models.Model):\n site = models.ForeignKey(Site, verbose_name=_('site'))\n url = models.... | python | edit | 1 | 1 | mit | e089a75174c003b4d22c4a2f8d65f3adb3d84def | PetrDlouhy/django-feedback,jaredly/django-feedback,jaredly/django-feedback,PetrDlouhy/django-feedback,PetrDlouhy/django-feedback,jaredly/django-feedback | feedback/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Simple blueprint.\"\"\"\nimport os\n\nfrom flask import Blueprint, current_app, render_template\n\nblueprint = Blueprint('simple', __name__, url_prefix='/simple',\n template_folder='templates')\n\n\n@blueprint.route(... | python | edit | 1 | 3 | mit | fcc9a8ed53385f4cf9ca7f1bb73fdc7407b88b7f | Dinoshauer/pryvate,Dinoshauer/pryvate | pryvate/blueprints/simple/simple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .enums import Dialects\nfrom .queries import (\n Query,\n QueryBuilder,\n)\n\n\nclass MySQLQuery(Query):\n \"\"\"\n Defines a query class for use with MySQL.\n \"\"\"\n\n @classmethod\n def _builder(cls):\n ... | python | edit | 1 | 1 | apache-2.0 | 5082354efec86bb0ebb111e51c8e5a039ab7ae88 | kayak/pypika | pypika/dialects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flask import Flask, abort, jsonify, request\nfrom icalendar import Calendar\nfrom urllib import urlopen\n\napp = Flask(__name__)\n\n@app.route('/')\ndef index():\n return u'Please use like <code>%swww.myserv... | python | edit | 2 | 6 | mit | ee349a7e26579ec6dffc3153fb8d55fad3281c5b | philippbosch/ical2json | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport argparse\nfrom flask import Flask\n\napp = Flask(__name__)\n\n@app.route('/')\ndef hello():\n return 'Hi!\\n'\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n pars... | python | edit | 1 | 2 | apache-2.0 | 1ee41f5439f80af139e612591d48cdac5ecfda39 | GradysGhost/pyhiapi | hiapi/hi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .instrument import Instrument, VisaInterface\nfrom types import MethodType\n\nclass Attenuator(Instrument):\n NUM_CHANNELS = 3\n\n \"\"\"BBN 3 Channel Instrument\"\"\"\n def __init__(self, name, resource_name):\n super(... | python | edit | 1 | 2 | apache-2.0 | dde6e451a9e434b980d1ebac84626ec7515485c5 | BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex | instruments/bbn.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCompatibility module for high-level h5py\n\"\"\"\nimport sys\nfrom os import fspath, fsencode, fsdecode\n\nWINDOWS_ENCODING = \"mbcs\"\n\n\ndef filename_encode(filename):\n \"\"\"\n Encode filename for use in the HDF5 library.... | python | edit | 1 | 4 | bsd-3-clause | 3a21d7d174dd8a9cbf76cbf149666337a8352c61 | h5py/h5py,h5py/h5py,h5py/h5py | h5py/_hl/compat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom django.conf import settings\n\n\nSESSION_REDIS_HOST = getattr(\n settings,\n 'SESSION_REDIS_HOST',\n '127.0.0.1'\n)\nSESSION_REDIS_PORT = getattr(\n settings,\n 'SESSION_REDIS_PORT',\n 6379\n)\nSESSION_RE... | python | edit | 1 | 0 | bsd-3-clause | ea8f2c3b036ff62ea2fa7faea6eefc86ac5471c7 | ProDG/django-redis-sessions-fork,hellysmile/django-redis-sessions-fork | redis_sessions_fork/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, absolute_import\n\nimport pytest\nfrom numpy.testing import assert_equal, assert_allclose\nfrom scipy._lib._numpy_compat import suppress_warnings\n\nfrom scipy.misc import pade, logsumexp, fa... | python | edit | 3 | 1 | bsd-3-clause | b3a9a4a1e451815f15dc35c9b6ec9f7b67387260 | Eric89GXL/scipy,jor-/scipy,andyfaff/scipy,ilayn/scipy,andyfaff/scipy,tylerjereddy/scipy,grlee77/scipy,aarchiba/scipy,arokem/scipy,lhilt/scipy,perimosocordiae/scipy,mdhaber/scipy,rgommers/scipy,matthew-brett/scipy,aeklant/scipy,endolith/scipy,rgommers/scipy,person142/scipy,ilayn/scipy,WarrenWeckesser/scipy,matthew-brett... | scipy/misc/tests/test_common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n# Github Tray App\n\nimport rumps\nimport config\nimport contribs\n\nusername = config.get_username()\n\nclass GithubTrayApp(rumps.App):\n\n @rumps.timer(60*5)\n def timer(self, sender):\n count = contribs.get_contribs(userna... | python | edit | 1 | 1 | mit | b096d91564366392c4003b26bafd1e6c3fff47d3 | chrisfosterelli/commitwatch | trayapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom time import sleep\nimport subprocess\nimport httplib, urllib\nimport RPi.GPIO as GPIO\nimport config\nimport logger\n\nGPIO.setmode(GPIO.BCM)\nGPIO.setup(config.bell_pin, GPIO.IN)\n\nLOW_PRIORITY = -1\nMEDIUM_P... | python | edit | 4 | 0 | mit | 403bd1cdea0a8d1fae25710a48dc3148fc21ddd9 | viv/pibell | bell.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nsys.path.append(os.path.abspath(os.path.dirname('./utils/python')))\nfrom python.decorators import timeit\n\n\n@timeit\ndef solution():\n n = 1000\n for b in xrange(1, n):\n for c in xrange(1, n):\n ... | python | edit | 3 | 4 | mit | 39b4141ebd939bde649a9dfeb4f4cc832d0f4c39 | mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler | solutions/problem_9/solution.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport exifread\nimport os\n\n\nclass TweetS3Images(object):\n def __init__(self, twitter, s3_client):\n self._twitter = twitter\n self._s3_client = s3_client\n self._file = None\n\n def send_image(self, bucket, i... | python | edit | 1 | 2 | mit | 35fcaad0474df3352ccdf0545fc34cf2c431761c | onema/lambda-tweet | tweet_s3_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom pytoon.connection import BrickConnection\n\n\napp = Flask(__name__)\napp.config['SQLALCHEMY_DATABASE_URI']... | python | edit | 3 | 2 | bsd-3-clause | cbd39a43d8da9b9fa81582d7e9aaf299631022ae | marcofinalist/pytoon,marcofinalist/pytoon,marcoplaisier/pytoon,marcoplaisier/pytoon | pytoon/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A backend for playing music from Spotify\n\n`Spotify <http://www.spotify.com/>`_ is a music streaming service. The backend\nuses the official `libspotify\n<http://developer.spotify.com/en/libspotify/overview/>`_ library and the\n`pysp... | python | edit | 1 | 0 | apache-2.0 | f6e42f0f2d931533a9cdcab749feceeb5fa98982 | SuperStarPL/mopidy,bacontext/mopidy,priestd09/mopidy,mokieyue/mopidy,hkariti/mopidy,liamw9534/mopidy,adamcik/mopidy,mokieyue/mopidy,rawdlite/mopidy,dbrgn/mopidy,kingosticks/mopidy,mokieyue/mopidy,mopidy/mopidy,SuperStarPL/mopidy,glogiotatidis/mopidy,adamcik/mopidy,rawdlite/mopidy,pacificIT/mopidy,kingosticks/mopidy,hka... | mopidy/backends/spotify/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport threading\n\n_locals = threading.local()\n\n\ndef get_event_context():\n return getattr(_locals, 'context', None)\n\n\ndef set_event_context(context):\n _locals.context = context\n\n\n... | python | edit | 1 | 3 | mit | 87c99c6839d7f74201393066651f3d69a5a2edce | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/logging/middleware.py | rejected_duplicate | Near-duplicate of sample 1934 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nclass ObservableMemory:\n def __init__(self, subject=None):\n if subject is None:\n subject = 0x10000 * [0x00]\n self._subject = subject\n\n self._read_subscribers = {}\n self._write_subscribers ... | python | edit | 1 | 4 | bsd-3-clause | b8d3e62bae3559b24a2a135c921ccc9879fab339 | mkeller0815/py65,mnaberez/py65 | src/py65/memory.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 Daniel Stokes, Mitchell Stokes\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n... | python | edit | 1 | 4 | apache-2.0 | 6183f41cf6fa2125d7d5de626a7b2a994253d4ca | Moguri/ullur,Moguri/ullur | src/levels/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"engine.SCons.Platform.darwin\n\nPlatform-specific initialization for Mac OS X systems.\n\nThere normally shouldn't be any need to import this module directly. It\nwill usually be imported through the generic SCons.Platform.Platform()... | python | edit | 3 | 1 | mit | 06df514496612f194a6103167b867debf6657f5e | datalogics/scons,azverkan/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons,datalogics-robb/scons,azverkan/scons,azverkan/scons,datalogics-robb/scons,datalogics/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons | src/engine/SCons/Platform/darwin.py | rejected_duplicate | Near-duplicate of sample 989 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may ob... | python | edit | 1 | 1 | apache-2.0 | 6480e801de5f21486d99444c25006b70329e580e | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | luigi/tasks/release/process_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom django_seo_js import settings\nfrom django_seo_js.backends import SelectedBackend\nfrom django_seo_js.helpers import request_should_be_ignored\n\nimport logging\nlogger = logging.getLogger(__name__)\n\n\nclass UserAgentMiddl... | python | edit | 1 | 6 | mit | 5db0af8fcf83519a44ed59d14bb00bc08e2a5131 | skoczen/django-seo-js | django_seo_js/middleware/useragent.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, request\nimport requests\nfrom requests_oauthlib import OAuth1\n\napp = Flask(__name__)\napp.config.from_pyfile('app.config')\n\n\n@app.route('/')\ndef index():\n term = request.args.get('q')\n ... | python | edit | 1 | 3 | unlicense | 5ff2390e462219f7dfa148c6ab1bdcecd9248484 | ecarreras/pdicons,ecarreras/pdicons,ecarreras/pdicons,ecarreras/pdicons | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import environ\n\nfrom eve import Eve\n\nfrom settings import API_NAME\n\napi = Eve(API_NAME)\n\nif __name__ == '__main__':\n # Heroku support: bind to PORT if defined, otherwise default to 5000.\n if 'PORT' in environ:\n ... | python | edit | 1 | 1 | apache-2.0 | 08d8f2c30c810cda75961e5bf6025f1bf348fc02 | gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa | api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport sys\n\nfrom pyspark.sql import SparkSession\nfrom pyspark.sql.functions import lit, col\n\nif __name__ == \"__main__\":\n if len(sys.argv) != 3:\n print(\"Usage: c19.py <input> <outp... | python | edit | 1 | 0 | apache-2.0 | dd9161c772e3c345fd21f742b09a62d43f7fa069 | ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim | scripts/c19.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, abort\n\n# Create the main app.\napp = Flask(__name__)\napp.config.from_object('wikked.settings')\napp.config.from_envvar('WIKKED_SETTINGS', silent=True)\n\nif app.config['DEBUG']:\n from werkzeug import SharedDa... | python | edit | 3 | 0 | apache-2.0 | 57a1299e771b97c81249cd3075ff9e7e047356a6 | ludovicchabant/Wikked,ludovicchabant/Wikked,ludovicchabant/Wikked | wikked/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gigs.settings_base import *\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\nADMINS = ()\n\nINSTALLED_APPS += (\n 'gunicorn',\n)\n\nLOGGING = {\n 'version': 1,\n 'disable_existing_loggers': True,\n 'formatters': {\n 'stan... | python | edit | 3 | 0 | bsd-3-clause | 7729af745b9894cfb07d99f754465934a90da40d | shaunokeefe/gigs,shaunokeefe/gigs | gigs/settings_prod.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport falcon.testing\nimport json\n\nfrom displacy_service.server import APP\n\n\nclass TestAPI(falcon.testing.TestCase):\n def __init__(self):\n self.api = APP\n\n\ndef test_deps():\n test_api = TestAPI()\n result = test_a... | python | edit | 1 | 2 | mit | fa67de4900be765a5ea4194b1a786cd237934a33 | jgontrum/spacy-api-docker,jgontrum/spacy-api-docker,jgontrum/spacy-api-docker,jgontrum/spacy-api-docker | displacy_service_tests/test_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\"\"\"Presubmit script f... | python | edit | 1 | 6 | bsd-3-clause | 9826c49225a3d8aac5ab5432e261babaa2585c1e | dart-lang/dart_ci,dart-lang/dart_ci,dart-lang/dart_ci,dart-lang/dart_ci | PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib.parse import urljoin, parse_qs\n\nimport responses\n\nfrom tests.constants import *\nfrom tests.fixtures import PushoverAPI\nfrom tests.util import messages_callback\n\n\n@responses.activate\ndef test_PushoverAPI_sends_message(P... | python | edit | 12 | 1 | mit | 495a368098357c94ccec2f9f84c077fd5b27bde7 | scolby33/pushover_complete | tests/PushoverAPI/test_PushoverAPI.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom src.TwircBot import TwircBot\nimport sys\n\ntry:\n bot = TwircBot(sys.argv[1])\nexcept IndexError:\n bot = TwircBot()\n\nbot.print_config()\nbot.start()\n\n```\n\nApply this change: Change shebang to use ... | python | edit | 1 | 0 | mit | a93607eea32fd5e56de47bf6c7e0e3f098d7bcd8 | johnmarcampbell/twircBot | runTwircBot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .tabulate import _text_type\n\ndef pad(field, total, char=u\" \"):\n return field + (char * (total - len(field)))\n\ndef get_separator(num, header_len, data_len):\n\n sep = u\"***************************[ %d. row ]***************... | python | edit | 1 | 9 | bsd-3-clause | 321924fff843896fc67d3a4594d635546cf90bec | MnO2/rediscli,martijnengler/mycli,qbdsoft/mycli,j-bennet/mycli,D-e-e-m-o/mycli,mdsrosa/mycli,martijnengler/mycli,mattn/mycli,jinstrive/mycli,webwlsong/mycli,brewneaux/mycli,danieljwest/mycli,thanatoskira/mycli,ksmaheshkumar/mycli,brewneaux/mycli,MnO2/rediscli,evook/mycli,webwlsong/mycli,j-bennet/mycli,evook/mycli,suzuk... | mycli/packages/expanded.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport json\nimport logging\nfrom glanerbeard import show\nlog = logging.getLogger(__name__)\n\nclass Server:\n\tdef __init__(self, name, url, apikey):\n\t\tself.name = name\n\t\tself.url = url\n\t\tself.apikey = apikey\n\n... | python | edit | 1 | 2 | apache-2.0 | c3cf9adc2428c4058817daa1aeefca300363e21f | daenney/glanerbeard | glanerbeard/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nEgo graph.\n\n\"\"\"\n# Copyright (C) 2010 by \n# Aric Hagberg <<EMAIL>>\n# Dan Schult <<EMAIL>>\n# Pieter Swart <<EMAIL>>\n# All rights reserved.\n# BSD license.\n__author__ = \"\"\"\\n\"\"\".join(['Drew Conway <<... | python | edit | 1 | 2 | bsd-3-clause | dc86283bb517c56eec177804801f66227477a097 | ghdk/networkx,farhaanbukhsh/networkx,yashu-seth/networkx,bzero/networkx,nathania/networkx,jakevdp/networkx,goulu/networkx,Sixshaman/networkx,ionanrozenfeld/networkx,chrisnatali/networkx,jcurbelo/networkx,tmilicic/networkx,chrisnatali/networkx,RMKD/networkx,ionanrozenfeld/networkx,sharifulgeo/networkx,sharifulgeo/networ... | networkx/generators/ego.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom enum import Enum\nfrom typing import TypeVar, Optional, Any, Type # noqa\n\nfrom odin.exceptions import ValidationError\nfrom . import Field\n\n__all__ = (\"EnumField\",)\n\n\nET = TypeVar(\"E... | python | edit | 1 | 4 | bsd-3-clause | f64fabb83cf57e70f938f803ee0a50599f3ab83a | python-odin/odin | src/odin/fields/future.py | rejected_duplicate | Near-duplicate of sample 13783 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scoring_engine.models.setting import Setting\n\nfrom tests.scoring_engine.unit_test import UnitTest\n\n\nclass TestSetting(UnitTest):\n\n def test_init_setting(self):\n setting = Setting(name='test_setting', value='test value... | python | edit | 1 | 1 | mit | fe9f48415017bcd873140da82a5f2e463d13b307 | pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine | tests/scoring_engine/models/test_setting.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom heisen.config import settings\nfrom heisen.core.log import logger\nfrom jsonrpclib.request import Connection\n\n\ndef get_rpc_connection():\n servers = {\n 'self': [\n ('127.0.0.1', settings.RPC_PORT, 'aliehsanmila... | python | edit | 3 | 2 | mit | f25a32dd0180af91277ace186fc878c8baffed65 | HeisenCore/heisen | heisen/core/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nfrom flask import Blueprint\n\nfrom flask.ext.restful import Api\n\n\napi = Blueprint(\"api\", __name__, template_folder=\"templates\")\n\nrest = Api(api)\n\nfrom karma.api.charity import Charity, Charities\nfrom ... | python | edit | 1 | 0 | mit | c916cc05c57cdda5a9b07901af8af032a97c3841 | hamhut1066/ghu-hack,hamhut1066/ghu-hack | karma/api/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nfrom argparse import ArgumentParser, ArgumentDefaultsHelpFormatter\nimport os, http.server\n\ndef main(args):\n os.chdir(args.directory)\n addr = ('' ,args.port)\n httpd = http.server.HTTPServer(addr, http.s... | python | edit | 3 | 1 | unlicense | 3b5880c375ee92ce931c29a978ff64cd8849d028 | pastly/python-snippits | src/simple-http-server.py | rejected_duplicate | Near-duplicate of sample 9135 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import timedelta\nfrom django_performance_testing.timing import TimeCollector\nfrom freezegun import freeze_time\nimport pytest\nfrom testapp.test_helpers import capture_result_collected\n\n\n@pytest.mark.parametrize('seconds'... | python | edit | 1 | 1 | bsd-3-clause | bd5336d52a1cd2e086dbf1665b90823505d31840 | PaesslerAG/django-performance-testing | tests/testapp/tests/test_timer_collector.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\n#\... | python | edit | 1 | 1 | apache-2.0 | 57164efc9827f7975cdfa171a5a88e6fcc4059e5 | mahak/neutron,mahak/neutron,openstack/neutron,openstack/neutron,openstack/neutron,mahak/neutron | neutron/conf/policies/service_type.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport engine\n\n\nVALID_COORDS = [(x, y) for x in xrange(97, 105) for y in xrange(49, 57)]\nINVALID_COORDS = [\n (0, 0), (-1, -1),\n (96, 49), (96, 48),\n (105, 49), (104, 48),\n (96, 56), (97, 57),\n (105, 56), (104, 57)\n ... | python | edit | 5 | 3 | mit | 88b81ee89800592bccf0a714ae79be74507c8f29 | EyuelAbebe/gamer,EyuelAbebe/gamer | test_engine.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .request import Request\nfrom .response import response\n\n\nclass Handler(object):\n '''\n Simple dispatcher class.\n '''\n\n def __call__(self, event, context):\n self.request = request = Request(event, context)\n ... | python | edit | 1 | 1 | bsd-3-clause | fd6702fbb43eb4e6c5129ac6026908946f03c1a7 | funkybob/paws | paws/handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport configargparse\nfrom goodline_iptv.importer import do_import\n\n\nif __name__ == '__main__':\n parser = configargparse.ArgParser()\n\n parser.add_argument('-o', '--out-dir', required=True, help='Output... | python | edit | 1 | 0 | mit | 6f745ae05a22031a36cb5cedc6b627cbf7ba6512 | nsadovskiy/goodline_tv | import_goodline_iptv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python3\n\nimport json\n\nimport pathlib\n\ninput_file = pathlib.Path(__file__).parent.parent.joinpath('day12_input.txt')\n\n\ndef sum_data(d):\n total = 0\n if isinstance(d, dict):\n d = d.values()\n for it... | python | edit | 1 | 6 | mit | bdcf90a0fdf782b1c6cfd261e0dbb208e013eb1b | robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions | python/day12.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n# NOTE: User roles are not managed here. Visit PlanetLab to change user roles.\nuser_list = [('Stephen', 'Stuart', '<EMAIL>'),\n ('Will', 'Hawkins', '<EMAIL>'),\n ('Jordan', 'McCarthy', '<EMAIL>'),\n ... | python | edit | 1 | 0 | apache-2.0 | 5c8fd314dd89d8964cc5cb75c2b57ed32be275c5 | jheretic/operator,stephen-soltesz/operator,nkinkade/operator,critzo/operator,critzo/operator,jheretic/operator,nkinkade/operator,m-lab/operator,salarcon215/operator,m-lab/operator,salarcon215/operator,stephen-soltesz/operator | plsync/users.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nclass User:\n Groups = {' ':0,'+':1,'☆':1,'%':2,'@':3,'*':3.1,'&':4,'#':5,'~':6}\n @staticmethod\n def compareRanks(rank1, rank2):\n try:\n return User.Groups[rank1] >= User.Groups[rank2]\n excep... | python | edit | 1 | 4 | mit | 513709e123c63e1eb30065b6f35c18faceac820b | QuiteQuiet/PokemonShowdownBot | user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# from django.contrib.auth.models import User\nfrom rest_framework import serializers\nfrom .models import Activity, Stat\n\n\nclass StatSerializer(serializers.HyperlinkedModelSerializer):\n\n class Meta:\n model = Stat\n f... | python | edit | 1 | 1 | mit | 4c3dd0c9d27af0f186f81c4fed0003a9190b4d9e | jal-stats/django | jal_stats/stats/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Given a singly linked list of integers, determine whether or not it's a palindrome\nclass Node(object): # define constructor\n\tdef __init__(self, value):\n\t\tself.value = value\n\t\tself.next = None\n\ndef is_list_palindrome(l):\n\tif n... | python | edit | 1 | 5 | mit | 3436b94a4c69b843c65f6ddf6756c18ca540c090 | derekmpham/interview-prep,derekmpham/interview-prep | linked-list/is-list-palindrome.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n# This is the cabb_scheduler Python library.\n# Jamie Stevens 2017\n# ATCA Senior Systems Scientist\n# <EMAIL>\n\nsetup(name='cabb_scheduler',\n version='1.1',\n description='CABB Scheduling Python ... | python | edit | 1 | 0 | mit | 025b8915306670ac45f200ac4cbf32115eab53c7 | ste616/cabb-schedule-api | python/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom manager import views\n\n_PACKAGE_NAME_REGEX = r'(?P<package_name>[a-zA-Z0-9_+-]+)'\n_PACKAGE_NAME_REGEX_WITH_EMPTY = r'(?P<package_name>[a-zA-Z0-9_+-]*)'\n_BUILD_NUMBER_REGEX = r'(?P<build_number>\\d... | python | edit | 1 | 0 | mit | 4f9b01dcf194c5ce05640852cf8f436fa4e3bf80 | colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager | manager/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom elasticsearch_raven.transport import ElasticsearchTransport\nfrom elasticsearch_raven.utils import get_index\n\nhost = os.environ.get('ELASTICSEARCH_HOST', 'localhost:9200')\ntransport = ElasticsearchTransport(host)\n\n\nd... | python | edit | 1 | 2 | mit | 2d688f97b9869fdfed9237b91fdce287278e3c6c | socialwifi/elasticsearch-raven,pozytywnie/elasticsearch-raven,serathius/elasticsearch-raven | wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport sys\nimport json\n\nfor arg in sys.argv[1:]:\n with open(arg) as f:\n equajson = json.load(f)\n\n field_list = [\n \"always-an-integer\",\n \"always-positive\",\n \"always-... | python | edit | 1 | 0 | mit | 78da548cbf7646ea1d67859cbd0946d6931b2b0d | nbeaver/equajson | ad-hoc-scripts/lift.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom argh import arg, ArghParser\nfrom functools import wraps\n\n\nCONFIG = os.environ.get('ALFRED_LISTENER_CONFIG')\n\n\ndef with_app(func, args):\n if CONFIG is None:\n raise RuntimeError('ALF... | python | edit | 3 | 1 | isc | 80271752183c3f71fba9139bb77466427bd48a0a | alfredhq/alfred-listener | alfred_listener/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nl = [1, 3, 2, 5]\nprint(l)\nl.sort()\nprint(l)\nl.sort(key=lambda x: -x)\nprint(l)\nl.sort(key=lambda x: -x, reverse=True)\nprint(l)\nl.sort(reverse=True)\nprint(l)\nl.sort(reverse=False)\nprint(l)\n\n\n```\n\nApply this change: Add tests f... | python | edit | 1 | 0 | mit | a1a9ab2b2c0ca7749984f5ad6e6430980e0d0ecc | MrSurly/micropython-esp32,KISSMonX/micropython,mpalomer/micropython,mianos/micropython,ernesto-g/micropython,dxxb/micropython,tuc-osg/micropython,lbattraw/micropython,turbinenreiter/micropython,swegener/micropython,swegener/micropython,praemdonck/micropython,SungEun-Steve-Kim/test-mp,pfalcon/micropython,pozetroninc/mic... | tests/basics/list_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom mnist_sequence_api import MNIST_Sequence_API\nimport sys\n\n\ndef main():\n arguments = list(sys.argv[1:])\n if len(arguments) == 4:\n sequence, min_spacing = list(map(int, list(argum... | python | edit | 1 | 2 | mit | 30b64d934d12510e2021aa3bf2e80f5837b88f35 | ankitaggarwal011/MNIST-Sequence | mnist_sequence_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport sys\nimport math\nimport glob\n\nfrom mule_local.postprocessing.pickle_SphereDataPhysicalDiff import *\nfrom mule.exec_program import *\n\npickle_SphereDataPhysicalDiff()\n\n```\n\nApply this change: Use Sp... | python | edit | 8 | 0 | mit | 9516caa0c62289c89b605b9b8a34622a0bb54e2b | schreiberx/sweet,schreiberx/sweet,schreiberx/sweet,schreiberx/sweet | tests/70_program_libpfasst_swe_sphere_timestepper_convergence_l1/postprocessing_pickle.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.sites.shortcuts import get_current_site\nfrom django.urls import reverse\nfrom django.core.signing import TimestampSigner\n\n\nclass BaseEngine:\n def __init__(self):\n self.signer = TimestampSigner()\n\n de... | python | edit | 1 | 1 | mit | 33f4036825c6ff4d9df0038471727648e0df100d | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | feder/virus_scan/engine/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nmd5bot.py -- Twitter bot that tweets the current time as an md5 value\n\"\"\"\n\nimport time\nimport hashlib\nimport tweepy\n\nCONSUMER_KEY = 'xxxxxxxxxxxx'\nCONSUMER_SECRET = 'xxxxxxxxxxxx' \nACCESS_KEY = 'xxxxxxxxxxxx'\nACCESS_SEC... | python | edit | 1 | 2 | mit | d618f430c143874011b70afe0a4fa62c06f5e28c | aerovolts/python-scripts | md5bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.six import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom fluent_contents.models import ContentItem\n\n\n@python_2_unicode_compatible\nclass {{ mo... | python | edit | null | null | apache-2.0 | 535b07758a16dec2ce79781f19b34a96044b99d3 | edoburu/django-fluent-contents,django-fluent/django-fluent-contents,edoburu/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents | fluent_contents/conf/plugin_template/models.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom webmentiontools.send import WebmentionSend\nfrom webmentiontools.urlinfo import UrlInfo\n \ndef handle_new_or_edit(post):\n url = post.permalink_url\n info = UrlInfo(url)\n in_reply_to = info.inReplyTo()\n \n if url a... | python | edit | 3 | 3 | bsd-2-clause | fe6e24d3cadd71b7c613926f7baa26947f6caadd | thedod/redwind,Lancey6/redwind,Lancey6/redwind,thedod/redwind,Lancey6/redwind | webmention_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Comment\nfrom .models import Motel\nfrom .models import Town\nfrom rest_framework import serializers\n\nclass CommentSerializer(serializers.ModelSerializer):\n created_date = serializers.DateTimeField(format='%d/%m/%Y... | python | edit | 1 | 0 | mit | 1bc674ea94209ff20a890b9743a28bc0b9d8cb89 | amartinez1/5letrasAPI | motels/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# piperename.py\n#\n\nfrom pipe2py import util\n\n\ndef pipe_rename(context, _INPUT, conf, **kwargs):\n \"\"\"This operator renames or copies fields in the input source. \n\n Keyword arguments:\n context -- pipeline context\n _I... | python | edit | 4 | 5 | mit | f7a57135ec328063eb4d2d5c4a035994a85ad290 | nerevu/riko,nerevu/riko | modules/piperename.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# ==============================================================================\n# LOAD_IMAGE_AS_ARRAY\n# ==========================================================================... | python | edit | 7 | 2 | apache-2.0 | 8fdd73b7b8b907da264eac26ea52eef2bb8f6ce7 | ronrest/convenience_py,ronrest/convenience_py | ml/img/load_images.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n Copyright 2016 Dee Reddy\n\n\"\"\"\nimport sys\nimport re\n\nargs = sys.argv[1:]\n\n\ndef minify(filepath, comments=False):\n \"\"\" Minifies/uglifies file\n :param\n file_:\n comments: Boolean. If False, del... | python | edit | 1 | 2 | apache-2.0 | 1a39eea8225ebdf7f654df9ba5b87479e9dbc867 | Deesus/Punt | minify.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCartoDB Services Python Library\n\nSee:\nhttps://github.com/CartoDB/geocoder-api\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='cartodb_services',\n\n version='0.19.1',\n\n description='CartoDB Ser... | python | edit | 1 | 0 | bsd-3-clause | a8e96366a55684c14835a3ef183708fa7177bd67 | CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api | server/lib/python/cartodb_services/setup.py | rejected_duplicate | Near-duplicate of sample 468 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nassert_has_feature(\n 15, 5467, 12531, 'landuse',\n { 'kind': 'winter_sports',\n 'sort_key': 27 })\n\n```\n\nApply this change: Sort keys changed, update test."
},
{
"role": "assistant",
"content": "assert_has_feature... | python | edit | 2 | 0 | mit | a4dda07a7c1c8883a8828f43abae51826711b33e | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/343-winter-sports-resorts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, patterns\nfrom .api import AJAX_FUNCTIONS\n\n__author__ = 'jyrkila'\n\n_urls = [url('^checkout.js$', 'checkout_js', name='checkout_js')]\n_urls.extend([\n url(func.url, func.name, name=func.view_name)\n ... | python | edit | 1 | 0 | mit | 98ab2a2ac0279f504195e49d55ff7be817592a75 | mniemela/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,mniemela/kirppu,jlaunonen/kirppu,mniemela/kirppu,jlaunonen/kirppu | kirppu/app/checkout/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals, division\nimport six\nfrom .attribute import Attribute\nimport decimal\n\n\nclass DecimalAttribute(Attribute):\n\n type = decimal.Decimal\n\n def prepa... | python | edit | 1 | 5 | mit | 11f6f98753eae023da73afa111403d34ca818df0 | armet/python-armet | armet/attributes/decimal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nExample settings module.\n\nThis should be copied as `settings.py` and the values modified there.\n\nThat file is ignored by the repo, since it will contain environment\nspecific and sensitive information (like passwords).\n\"\"\"\n... | python | edit | 4 | 1 | mit | e0719d89d00471168ae65891a1024608ff5ea608 | AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files | settings_example.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis module contains errors/exceptions and warnings of general use for\nastropy. Exceptions that are specific to a given subpackage should *not*\nbe here, but rather i... | python | edit | 1 | 0 | bsd-3-clause | 7c425075280fea87b1c8dd61b43f51e19e84b770 | bsipocz/astropy,astropy/astropy,funbaker/astropy,StuartLittlefair/astropy,StuartLittlefair/astropy,larrybradley/astropy,lpsinger/astropy,dhomeier/astropy,funbaker/astropy,MSeifert04/astropy,stargaser/astropy,dhomeier/astropy,mhvk/astropy,AustereCuriosity/astropy,saimn/astropy,pllim/astropy,larrybradley/astropy,joergdie... | astropy/utils/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom conans import ConanFile\nfrom conans.tools import download, unzip\nimport os\n\nVERSION = \"0.0.2\"\n\n\nclass SanitizeTargetCMakeConan(ConanFile):\n name = \"sanitize-target-cmake\"\n version = os.environ.get(\"CONAN_VERSION_OVE... | python | edit | 1 | 1 | mit | 20b0e705fe6eedb05a94a3e9cb978b65a525fe91 | polysquare/sanitize-target-cmake | conanfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .view import View\n\n\nclass HistoryView(View):\n pass\n\n```\n\nApply this change: Add minimal working version for HistoryView (to be refactored)."
},
{
"role": "assistant",
"content": "from datetime import datetime\nfr... | python | edit | 5 | 3 | apache-2.0 | 93e447512b32e61ce41d25e73bb1592a3f8ac556 | ksmaheshkumar/gitfs,rowhit/gitfs,bussiere/gitfs,PressLabs/gitfs,PressLabs/gitfs | gitfs/views/history.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mockito import *\nimport unittest\n\nfrom source.server import *\nfrom source.exception import *\nfrom source.commands.system import *\n\nclass ServerTestCase(unittest.TestCase):\n\n def createCommandResponse(self, command, parameters... | python | edit | 12 | 2 | mit | 4a0491fb018cd96e510f25141dda5e7ceff423b4 | CaminsTECH/owncloud-test | client/test/server_tests.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport getpass\n\nfrom urlparse import urlparse\n\nimport keyring\n\nfrom vr.common.models import Velociraptor\n\n\ndef auth_domain(url):\n hostname = urlparse(url).hostname\n _, _, default_domain = hostname.partition('.')\... | python | edit | 1 | 3 | bsd-3-clause | f5747773e05fc892883c852e495f9e166888d1ea | yougov/rapt,yougov/rapt | rapt/connection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n Entry point and the only view we have.\n\"\"\"\n\nfrom .article_utils import get_articles\n\nfrom flask import Flask, render_template\nfrom os import path\n\napp = Flask(__name__)\n\nconfig_path = path.abspath(path.join(path.dir... | python | edit | 1 | 1 | mit | 267dfd75fa601b44b965d6df1d4440002f542638 | thusoy/robertblag,thusoy/robertblag,thusoy/robertblag | robert/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Utilities(object):\n def get_session_string(self, original_session_string):\n session_attributes = original_session_string.split(' ')\n return session_attributes[0] + ' ' + session_attribu... | python | edit | 1 | 1 | mit | 47530321c413976241e0d4e314f2a8e1532f38c9 | verekia/hackarena,verekia/hackarena,verekia/hackarena,verekia/hackarena | hackarena/utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport logging\nimport pathlib\n\nfrom PyQt5.QtWidgets import QApplication\nfrom PyQt5.QtGui import QIcon\n\nfrom deen.widgets.core import Deen\n\nICON = str(pathlib.PurePath(__file__).parent / 'icon.png')\nLOGGER = logging.getL... | python | edit | 1 | 1 | apache-2.0 | 9a5fa9b32d822848dd8fcbdbf9627c8c89bcf66a | takeshixx/deen,takeshixx/deen | deen/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os,sys,re\nfrom time import sleep\nhome = os.path.expanduser('~')\nif (sys.version_info > (3, 0)):\n # Python 3 code in this block\n exec(open(home+'/homedir/scripts/hexecho.py').read())\nelse:\n # Python 2 code in this block\n e... | python | edit | 7 | 0 | mit | 4811de79c618134cec922e401ec447ef156ffc78 | jdanders/homedir,jdanders/homedir,jdanders/homedir,jdanders/homedir | scripts/pystart.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mythril.solidity.soliditycontract import SolidityContract\nfrom mythril.ethereum.evmcontract import EVMContract\n\n\nclass Source:\n def __init__(\n self, source_type=None, source_format=None, source_list=None, meta=None\n ... | python | edit | 1 | 9 | mit | b2155e167b559367bc24ba614f51360793951f12 | b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril | mythril/support/source_support.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom web3 import Web3, RPCProvider\n\nfrom .singleton import Singleton\n\n\nclass Web3Service(metaclass=Singleton):\n \"\"\"Creates a `web3` instance based on the given `RPCProvider`.\"\"\"\n\n def __... | python | edit | 1 | 5 | mit | 09d356f7b124368ac2ca80efa981d115ea847196 | artemistomaras/django-ethereum-events,artemistomaras/django-ethereum-events | django_ethereum_events/web3_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import annotations\n\nfrom ._array_object import Array\n\nfrom typing import Tuple, Union\n\nimport numpy as np\n\ndef unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = Fa... | python | edit | 1 | 3 | mit | 356891c9b0fbf1d57f67a22ca977d3d1016e5dc1 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | numpy/array_api/_set_functions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .. import inline_translations as _\nfrom django.conf import settings\n\nclass InlineTranslationsMiddleware(object):\n \"\"\" Turn off/on inline tranlations with cookie \"\"\"\n def process_request(self, request, *args, **kwargs):... | python | edit | 1 | 3 | mit | 827bc2751add4905b3fca57568c879e7cb8e70a0 | translationexchange/tml-python,translationexchange/tml-python | django_tml/inline_translations/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom hamcrest import *\nfrom lib.params import parse_args\n\n\nclass test_arguments_parsing(unittest.TestCase):\n\n def test_default_secret_and_token_to_data_dir(self):\n argument = parse_args(\"\")\n\n ass... | python | edit | 10 | 1 | mit | 557d536aebe40bb115d2f0056aaaddf450ccc157 | gds-attic/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer,gds-attic/transactions-explorer,alphagov/transactions-explorer | test/params/test_arguments_parsing.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import (unicode_literals, division,\n absolute_import, print_function)\n\n\nfrom reggae.build import Build, DefaultOptions\nfrom inspect import getmembers\n\n\ndef get_build(module):\n builds = [v f... | python | edit | 1 | 6 | bsd-3-clause | 3039b00e761f02eb0586dad51049377a31329491 | atilaneves/reggae-python | reggae/reflect.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.http import HttpResponseRedirect\nfrom django.contrib.auth.decorators import login_required\n\n@login_required(login_url='/control/auth/login/')\ndef index(request):\n return HttpResponseRedirect(\"... | python | edit | 2 | 4 | mit | 08bd3801c0ecc3d4ef9720094bcbf67acaf1b67b | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | Instanssi/admin_base/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport sys, os\nimport gzip, tempfile\n\nfilename = tempfile.mktemp()\n\ndata1 = \"\"\" int length=DEFAULTALLOC, err = Z_OK;\n PyObject *RetVal;\n int flushmode = Z_FINISH;\n unsigned long start_total_out;\n\n\"\"\"\n\ndata2 = \"\"\"/... | python | edit | 3 | 0 | mit | 9c4bdeae651dd38801b980b4d06edcb8872cd5fa | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_gzip.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nimport unittest\n\nfrom dotenv import load_dotenv\n\nfrom auth0plus.oauth import get_token\n\n\nload_dotenv('.env')\n\n\nclass TestGetAToken(unittest.TestCase):\n def setUp(self):\n \"\"\"\n ... | python | edit | 2 | 1 | isc | 8284a8e61ed6c4e6b3402c55d2247f7e468a6872 | bretth/auth0plus | tests/test_integrations/test_get_a_token.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"ACME protocol implementation.\n\nThis module is an implementation of the `ACME protocol`_. Latest\nsupported version: `draft-ietf-acme-01`_.\n\n.. _`ACME protocol`: https://github.com/ietf-wg-acme/acme/\n\n.. _`draft-ietf-acme-01`:\n ... | python | edit | 1 | 0 | apache-2.0 | fd4f6fb2eef3fd24d427836023918103bac08ada | mitnk/letsencrypt,mitnk/letsencrypt,twstrike/le_for_patching,DavidGarciaCat/letsencrypt,kuba/letsencrypt,DavidGarciaCat/letsencrypt,letsencrypt/letsencrypt,jsha/letsencrypt,thanatos/lets-encrypt-preview,TheBoegl/letsencrypt,kuba/letsencrypt,brentdax/letsencrypt,wteiken/letsencrypt,brentdax/letsencrypt,jtl999/certbot,Vl... | acme/acme/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"test_dataone.py\n\nTest the DataOne utility library.\n\"\"\"\n\nfrom d1lod.dataone import extractIdentifierFromFullURL as extract\n\ndef test_extracting_identifiers_from_urls():\n # Returns None when it should\n assert extract('... | python | edit | 1 | 1 | apache-2.0 | d84e37089a287fd151824f0b48624f243fdded09 | ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod | d1lod/tests/test_dataone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport numpy as np\nimport pickle\nimport os\nimport sys\nimport ws.bad as bad\n\nmydir = os.path.abspath(os.path.dirname(__file__))\n\nprint(mydir)\n\nlookupmatrix = pickle.load(open( \\\n mydir +'/accuweath... | python | edit | 4 | 2 | bsd-3-clause | 577da237d219aacd4413cb789fb08c76ca218223 | BCCN-Prog/webscraping | ws/plugins/accuweather/__init__.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.