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\nimport BroControl.plugin\nimport BroControl.config\n\nclass Napatech(BroControl.plugin.Plugin):\n def __init__(self):\n super(Napatech, self).__init__(apiversion=1)\n\n def name(self):\n return 'napatech'\n\n def plug...
python
edit
1
4
bsd-3-clause
b16474b4523e8e804f28188ba74c992896748efe
hosom/bro-napatech,hosom/bro-napatech
broctl/Napatech.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom PyQt5.QtWidgets import QApplication, QMainWindow\nfrom PyQt5.uic import loadUi\n\nclass MainWindow(QMainWindow):\n\tdef __init__(self, *args):\n\t\tsuper(MainWindow, self).__init__(*args)\n\n\t\tloadUi(\"ui_files/main.ui\",...
python
edit
1
3
bsd-2-clause
6049a916ea3adfe4ef8a7ae9dbfc918b69907ef4
neelchauhan/OnionLauncher
OnionLauncher/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport os\nimport shutil\nimport datetime\nimport sys\nimport argparse\n\nfrom ete3 import Tree\n\nimport logging\n\nDEFAULT_FORMAT = 1\n\nclass TreeIndex:\n\n\tdef __init__(self,tree_newick_fn,format=DEFAULT_FORM...
python
edit
5
5
mit
fa8783f3307582dafcf636f5c94a7e4cff05724b
karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle
bin/tree_print_fasta_names.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.core.management.base import BaseCommand\n\nfrom readthedocs.oauth.models import RemoteRepository\n\n\nclass Command(BaseCommand):\n help = \"Load Project and RemoteRepository Relationship from JSON file\"\n\n ...
python
edit
1
5
mit
29c437e15f7793886c80b71ca6764184caff2597
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom celery import Celery\n\nfrom temp_config.set_environment import DeployEnv\nruntime_env = DeployEnv()\nruntime_env.load_deployment_environment()\n\nredis_server = os.environ.get('REDIS_HOSTNAME')\nredis_port =...
python
edit
1
0
unlicense
69705079398391cdc392b18dcd440fbc3b7404fd
puruckertom/ubertool_ecorest,puruckertom/ubertool_ecorest,quanted/ubertool_ecorest,quanted/ubertool_ecorest,puruckertom/ubertool_ecorest,quanted/ubertool_ecorest,quanted/ubertool_ecorest,puruckertom/ubertool_ecorest
celery_cgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\nfrom extutils import get_filename\nfrom template import render\nimport requests\nimport yaml\nimport jsonschema\n\nSCHEMA = {\n '$schema': 'http://json-schema.org/draft-04/schema#',\n 'description': 'Describes the extra...
python
edit
3
3
mit
1b9622cedecef0c6c45c11a84bd178adcff752e2
gosquadron/squadron,gosquadron/squadron
squadron/exthandlers/download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\n'''\nGiven:\n1. status code: (0 - OK, other value - BAD)\n2. terminal window width\n\nshows red/green bar to visualize return code of previous command\n'''\n\nimport sys\n\nif len(sys.argv) >= 2:\n code = sys.ar...
python
edit
1
0
mit
fa3841fd79c4cbc8545b253a2797cfed2b644284
kwadrat/rgb_tdd
red_green_bar2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\nfrom builtins import range\n\nimport functools\n\n\nITERABLE_TYPES = (\n list,\n set,\n tuple,\n)\n\ntry:\n from numpy import ndarray\n ITERABLE_TYPES = ITERAB...
python
edit
1
9
apache-2.0
14b8a2a689414e65efda9b466db430ed09f777d5
zooniverse/panoptes-python-client
panoptes_client/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nimport os\nfrom .Mouse import MouseCommand\n\nclass AcmePlumbingSend(MouseCommand):\n \"\"\" Sends the current selected text to the plumbing \"\"\"\n def run(self, edit):\n file_name = self.view....
python
edit
4
2
mit
62a3ab3409dbc1dd22896fb7c3b5376c1b6432e2
lionicsheriff/SublimeAcmePlumbing
AcmePlumbingSend.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='ActionCableZwei',\n version='0.1.3',\n license='MIT',\n description='Action Cable Client for Python 3',\n author='Tobias Feistmantl',\n author_email='<EMAIL>'...
python
edit
1
0
mit
c0724bb7471f51b5d3acc8a403168607ff5a0f5c
tobiasfeistmantl/python-actioncable-zwei
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport platform\nimport h5py\nimport numpy\n\nsegh5 = sys.argv[1]\npredh5 = sys.argv[2]\nclassifier = sys.argv[3]\nthreshold = float(sys.argv[4])\n\nfrom neuroproof import Agglomeration\n\n# open as uint32 and float respectively...
python
edit
1
0
bsd-3-clause
f0b188f398d82b000fdaa40e0aa776520a962a65
janelia-flyem/NeuroProof,janelia-flyem/NeuroProof,janelia-flyem/NeuroProof,janelia-flyem/NeuroProof
integration_tests/testpyagglom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport errno\nimport importlib\n\nfrom scrapi import settings\n\n\ndef import_consumer(consumer_name):\n # TODO Make suer that consumer_name will always import the correct module\n return importlib.import_module('scrapi.con...
python
edit
1
4
apache-2.0
aa8a54c765ace8f4aa3a88fd7a956d481b1484a2
alexgarciac/scrapi,erinspace/scrapi,icereval/scrapi,mehanig/scrapi,erinspace/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,fabianvf/scrapi,felliott/scrapi
scrapi/util/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom util import hook, http\n\napi_key = \"\"\n\napi_url = \"http://ws.audioscrobbler.com/2.0/?format=json\"\n\n@hook.command\ndef lastfm(inp, nick='', say=None):\n if inp:\n user = inp\n else:\n user = nick\n\n respo...
python
edit
1
9
unlicense
67a50f33177e0fa6aec15fc7d26836c38b374c31
parkrrr/skybot,Jeebeevee/DouweBot_JJ15,craisins/wh2kbot,callumhogsden/ausbot,df-5/skybot,ddwo/nhl-bot,Jeebeevee/DouweBot,rmmh/skybot,TeamPeggle/ppp-helpdesk,crisisking/skybot,Teino1978-Corp/Teino1978-Corp-skybot,isislab/botbot,cmarguel/skybot,jmgao/skybot,craisins/nascarbot,olslash/skybot,andyeff/skybot,SophosBlitz/gla...
plugins/lastfm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\n\nif __name__ == \"__main__\":\n input = sys.argv[1]\n output = sys.argv[2]\n processor = fix_changeline_budget_titles().process(input,output,[])\n\nclass fix_changeline_budget_titles(object):\n\n de...
python
edit
2
5
mit
8521ff7dcac5b81067e9e601b0901a182c24d050
omerbartal/open-budget-data,omerbartal/open-budget-data,OpenBudget/open-budget-data,OpenBudget/open-budget-data
processors/fix_changeline_budget_titles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom flask import Flask\nimport os\nimport psycopg2\nfrom contextlib import closing\n\n\nDB_SCHEMA = \"\"\"\nDROP TABLE IF EXISTS entries;\nCREATE TABLE entries (\n id serial PRIMARY KEY,\n title VARCHAR (...
python
edit
1
4
mit
a96cb89524f2fa17a015011d972d396e509a1079
rivese/learning_journal,EyuelAbebe/learning_journal,EyuelAbebe/learning_journal
journal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from urlparse import urlparse\nexcept ImportError:\n from urllib.parse import urlparse\n\nfrom .app import settings\nfrom django.conf.urls.static import static\n\ntry:\n from django.conf.urls import include, patterns, url\ne...
python
edit
1
0
mit
f4479b3aa7828e646e3a26493a1b8dfe9174e209
theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper
betty/conf/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nimport crits.stats.handlers as stats\n\nclass Command(BaseCommand):\n \"\"\"\n Script Class.\n \"\"\"\n\n help = \"Runs mapreduces for CRITs.\"\n\n def handle(self, *args, ...
python
edit
1
1
mit
36f4144a01ed56baea9036e4e09a5d90b1c13372
Magicked/crits,lakiw/cripts,Magicked/crits,lakiw/cripts,lakiw/cripts,Magicked/crits,Magicked/crits,lakiw/cripts
crits/core/management/commands/mapreduces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n==================\nToT histogram.\n==================\n\nCreate a simple histogram of the PMT signals (ToTs) in all events.\n\"\"\"\n\n# Author: Tamas Gal <<EMAIL>>\n# License: BSD-3\n\nimport pandas as pd\nimport matplotlib.pyplot...
python
edit
1
0
mit
f48063cfb9674c1e5f1f94e62ff43b239f687abd
tamasgal/km3pipe,tamasgal/km3pipe
examples/plot_tot_histogram.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\n weasyprint.logging\n ------------------\n\n Logging setup.\n\n The rest of the code gets the logger through this module rather than\n ``logging.getLogger`` to make sure that it is configured.\n\n ...
python
edit
1
0
bsd-3-clause
532df8a669d7e54125c102ef4821272dc24aab23
Kozea/WeasyPrint,Kozea/WeasyPrint
weasyprint/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nTest Matcher matches with '*' operator and Boolean flag\n'''\nfrom __future__ import unicode_literals\nimport pytest\n\nfrom ...matcher import Matcher\nfrom ...vocab import Vocab\nfrom ...attrs import LOWER\nfrom ...tokens import Doc\n...
python
edit
3
1
mit
4e75e742475236cf7358b4481a29a54eb607dd4d
aikramer2/spaCy,oroszgy/spaCy.hu,raphael0202/spaCy,spacy-io/spaCy,explosion/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,explosion/spaCy,recognai/spaCy,raphael0202/spaCy,recognai/spaCy,honnibal/spaCy,raphael0202/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,raphael0202/spaCy,explosion/spaCy,honnibal/spaCy,Gregory-Howa...
spacy/tests/regression/test_issue850.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom serf_master import SerfHandlerProxy\nfrom base_handler import BaseHandler\ntry:\n from my_handler import MyHandler\nexcept ImportError:\n print \"Could not import user's handler.\"\n print \...
python
edit
3
0
mit
2b2401fcbefc5c385f5e84057a76a4fcdbed0030
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
serfnode/handler/handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'test.db',\n }\n}\n\nINSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'tests',\n)\n\n```\n\nApply th...
python
edit
1
0
bsd-2-clause
0d1ab7106e438b418b575c4e0f6c22797158358a
bruth/django-preserialize,scottp-dpaw/django-preserialize
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAutoEncoder Models\n\"\"\"\n\nfrom model_base import *\nfrom metrics_base import *\n\n\nclass H2OAutoEncoderModel(ModelBase):\n \"\"\"\n Class for AutoEncoder models.\n \"\"\"\n def __init__(self, dest_key, model_json):\n sup...
python
edit
7
2
apache-2.0
e818860af87cad796699e27f8dfb4ff6fc9354e8
kyoren/https-github.com-h2oai-h2o-3,h2oai/h2o-3,mathemage/h2o-3,h2oai/h2o-dev,mathemage/h2o-3,datachand/h2o-3,YzPaul3/h2o-3,h2oai/h2o-3,brightchen/h2o-3,mathemage/h2o-3,YzPaul3/h2o-3,h2oai/h2o-dev,datachand/h2o-3,kyoren/https-github.com-h2oai-h2o-3,printedheart/h2o-3,pchmieli/h2o-3,madmax983/h2o-3,YzPaul3/h2o-3,datacha...
h2o-py/h2o/model/autoencoder.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cffi import FFI\nffi = FFI()\n\nprint \"Loading Spotify library...\"\n#TODO: Use absolute paths for open() and stuff\n#Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h\nwith o...
python
edit
2
0
mit
326f0b881d36ed19d0a37495ae34fc24fc1eb707
Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web,Fornoth/spotify-connect-web
connect_ffi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .default import * # NOQA\n\n#\n# Django Development\n# ..........................\n\nDEBUG = True\nTEMPLATE_DEBUG = True\n\nSOUTH_TESTS_MIGRATE = False # Tested at settings.tests\n\n#\n# Developper additions\n# .........................
python
edit
10
0
bsd-2-clause
0909837d93c44acc7374a7dee50e7eb869999e92
makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,Anaethelion/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin
geotrek/settings/dev.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# TestREPLThrowReturn.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Exception\n#\n#...
python
edit
7
1
apache-2.0
d20f147a9baf0c0eee48fe2b6242020d500018cc
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
packages/Python/lldbsuite/test/repl/error_return/TestREPLThrowReturn.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test for conversation definition." }, { "role": "assistant", "content": "from vumi.tests.helpers import VumiTestCase\n\nfrom go.apps.rapidsms.definition import ConversationDefinition\n\n\nclass TestConversationDefinition(Vumi...
python
new_file
1
1
bsd-3-clause
51b28e286bc7f8f272a1f45b47d246976b65ddda
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/apps/rapidsms/tests/test_definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n\r\nimport os\r\nimport sys\r\nfrom robot.variables import GLOBAL_VARIABLES\r\nfrom robot.api import logger\r\nfrom keywordgroup import KeywordGroup\r\n\r\nclass _LoggingKeywords(KeywordGroup):\r\n\r\n # Privat...
python
edit
3
5
apache-2.0
ec6a8374fd0e1411b52bfcb12e2a8a599d025287
jollychang/robotframework-appiumlibrary,yahman72/robotframework-appiumlibrary,lzhang1/robotframework-appiumlibrary,Meallia/robotframework-appiumlibrary,minhnguyenphuonghoang/robotframework-appiumlibrary,valaxy/robotframework-appiumlibrary,serhatbolsu/robotframework-appiumlibrary
src/AppiumLibrary/keywords/_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# import analyze\nfrom analyze import check_blob_in_direct_path\nimport os\nimport sys\nsys.path.insert(0, os.getcwd())\nfrom get_images_from_pi import get_image, get_image_x_times\n\nget_image()\ncheck_blob_in_direct_path(os.getcwd() + \"/...
python
edit
3
0
mit
78be1f58d618077f42d04390baf97938d01df44f
jwarshaw/RaspberryDrive
models/analyze_pic_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom blanc_basic_news.news.models import Category, Post\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef get_news_categories():\n return Category.objects.all()\n\n\n@register.assignment_tag...
python
edit
1
1
bsd-3-clause
13e4a0ef064460ffa90bc150dc04b9a1fff26a1c
blancltd/blanc-basic-news
blanc_basic_news/news/templatetags/news_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Do not run actual tests in linter environments.\n\n\ndef pytest_collection_modifyitems(session, config, items):\n for linter in [\"flake8\", \"black\", \"isort\"]:\n try:\n if config.getoption(\"--\" + linter):\n ...
python
edit
1
6
bsd-2-clause
8691191000af0ad736f6b4bedf720e972ab962a8
proofit404/dependencies,proofit404/dependencies,proofit404/dependencies,proofit404/dependencies
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is a setup.py script generated by py2applet\n\nUsage:\n python setup.py py2app\n\"\"\"\n\nfrom setuptools import setup\nfrom glob import glob\nimport syncplay\n\nAPP = ['syncplayClient.py']\nDATA_FILES = [\n ('resources',...
python
edit
1
0
apache-2.0
0e60863d43a5b230839191743f72818763eeee71
Syncplay/syncplay,NeverDecaf/syncplay,NeverDecaf/syncplay,alby128/syncplay,Syncplay/syncplay,alby128/syncplay
buildPy2app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport os\nfrom pathlib import Path\nfrom invoke import task\n\n\n@task\ndef update(ctx):\n \"\"\"\n Update youtube-dl\n\n \"\"\"\n cmd = ['pipenv', 'update', 'youtube-dl']\n subprocess.call(cmd)\n\n\n@task\ndef clea...
python
edit
3
3
apache-2.0
bd8901c18a6722660e7af742260ae4b8317a064b
feihong/chinese-music-processors,feihong/chinese-music-processors
youtube/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='Flask-DebugToolbar',\n version='0.04',\n url='http://github.com/mvantellingen/flask-debugtoolbar',\n license='BSD',\n author='Michael van Tellingen',\n author...
python
edit
1
0
bsd-3-clause
8ddc7ecbc768ae25b1d0e74ecfeb9045fb461d16
dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar,lepture/flask-debugtoolbar,lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\n\nfrom django.test import TestCase\n\nimport oscar.apps\n\n\nclass TestMigrations(TestCase):\n\n def check_for_auth_model(self, filepath):\n with open(filepath) as f:\n s = f.read()...
python
edit
1
6
bsd-3-clause
f9b2f8cd60af9b37ad80db10c42b36059ca5a10f
django-oscar/django-oscar,django-oscar/django-oscar,Bogh/django-oscar,anentropic/django-oscar,pdonadeo/django-oscar,manevant/django-oscar,nickpack/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj.com,faratro/django-oscar,QLGu/django-oscar,eddiep1101/django-oscar,monikasulik/django-oscar,michaelkuty/django-oscar,jmt4/dj...
tests/unit/core/migrations_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass PardotAPIError(Exception):\n \"\"\"\n Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out\n the error code and message.\n \"\"\"\n\n def __init__(self, json_...
python
edit
1
2
mit
413bebe630c29764dcbf17b114662427edfdac3c
joshgeller/PyPardot
pydot/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom django.conf import settings\nfrom django.utils.importlib import import_module\n\n__all__ = ('events', 'register', 'unregister')\n\nlogger = logging.getLogger('webhooks')\n\nclass AlreadyRegistered(Exception):\n pass\...
python
edit
1
2
bsd-2-clause
db136a4313c859495109e4ddaa0b715260526f63
chop-dbhi/django-webhooks,pombredanne/django-webhooks,pombredanne/django-webhooks,chop-dbhi/django-webhooks
webhooks/registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template\nfrom app.main import main\n\n\n@main.app_errorhandler(400)\ndef page_not_found(e):\n return _render_error_page(500)\n\n\n@main.app_errorhandler(404)\ndef page_not_found(e):\n return _render_error_pag...
python
edit
2
2
mit
68b0f560322884967b817ad87cef8c1db9600dbd
alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend,alphagov/notify-frontend
app/main/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, absolute_import\n\nimport logging\nimport bugsnag\n\nclass BugsnagHandler(logging.Handler):\n def __init__(self, api_key=None):\n super(BugsnagHandler, self).__init__()\n\n #...
python
edit
2
5
mit
3b7658dd7783b789cd4632caa94f0ba044305418
overplumbum/bugsnag-python,overplumbum/bugsnag-python,bugsnag/bugsnag-python,bugsnag/bugsnag-python
bugsnag/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fuel.downloaders.base import default_downloader\n\n\ndef fill_subparser(subparser):\n \"\"\"Sets up a subparser to download the CelebA dataset file.\n\n Parameters\n ----------\n subparser : :class:`argparse.ArgumentParser`...
python
edit
1
1
mit
6d18ff715a5fa3059ddb609c1abdbbb06b15ad63
mila-udem/fuel,dmitriy-serdyuk/fuel,dmitriy-serdyuk/fuel,mila-udem/fuel,vdumoulin/fuel,vdumoulin/fuel
fuel/downloaders/celeba.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.views import exception_handler\n\nfrom rest_framework_friendly_errors import settings\nfrom rest_framework_friendly_errors.utils import is_pretty\n\n\ndef friendly_exception_handler(exc, context):\n response = excepti...
python
edit
1
5
mit
7e5973b5490fd938078ce50723527d0c09f8e11e
oasiswork/drf-friendly-errors,FutureMind/drf-friendly-errors
rest_framework_friendly_errors/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import models\n\n\nclass HashTag(models.Model):\n # The hash tag length can't be more than the body length minus the `#`\n text = models.CharField(max_length=139)\n\n def __str__(sel...
python
edit
2
1
mit
e33b0e36d3e6dd7d374f1cf8846324275da0d331
pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone,pennomi/openwest2015-twitter-clone
tweets/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms.widgets import Input, ClearableFileInput\nfrom django.template.loader import render_to_string\n\n\nclass CIImgWidget(ClearableFileInput):\n\n def render(self, name, value, attrs=None):\n try:\n attrs[\...
python
edit
1
2
mit
e073e020d46953e15f0fb30d2947028c42261fc1
rewardz/cropimg-django,rewardz/cropimg-django,rewardz/cropimg-django
cropimg/widgets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015, Google, Inc.\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a copy of the\n# License at http://www.apache.org/license...
python
edit
4
2
apache-2.0
a4013c7f33226915b3c1fb7863f3e96b24413591
bshaffer/appengine-python-vm-hello,googlearchive/appengine-python-vm-hello,bshaffer/appengine-python-vm-hello,googlearchive/appengine-python-vm-hello
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django_countries import CountryField\n\n\nclass Address(models.Model):\n \"\"\"\n A postal address.\n \"\"\"\n line1 = models.CharField(max_length=100, blank=True)\n line2 = models.CharField...
python
edit
1
1
bsd-3-clause
febd7d8b113b8ef3ac9a843b873f4be5b203b53c
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
apps/bluebottle_utils/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport sys\n\nif not sys.version_info >= (3, 5):\n sys.stderr.write(\"Pegasus requires Python 3.5 or above\\n\")\n sys.exit(1)\n\ntry:\n pass\nexcept:\n sys.stderr.write(\"Pegasus requires the Python3 YAML ...
python
edit
1
0
apache-2.0
0254ad22680d32a451d1faf4b21809394a399311
pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus
packages/pegasus-python/src/Pegasus/cli/startup-validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport json\nimport subprocess\n\nprocess = subprocess.Popen([\"yum\", \"check-update\", \"-q\"], stdout=subprocess.PIPE)\n(output, err) = process.communicate()\nexit_code = process.wait()\n\nif exit_code == 0 and output ...
python
edit
3
0
mit
6656493c3bf9b24d67c6de8cb33a1ca3defa4db8
ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content,ScriptRock/content
code/python/yum-check-update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n.. module:: config_parser\n :platform: linux\n :synopsis: Module to parse a YAML configuration file using the bunch module.\n\n.. moduleauthor:: Paul Fanelli <<EMAIL>>\n\n.. modulecreated:: 6/26/15\n\n\"\"\"\nfrom bunch import f...
python
edit
1
4
mit
a26fa991e7a01188f09e755da67442a71cee3deb
paulfanelli/planet_alignment
planet_alignment/config/bunch_parser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import connection\n\nfrom shop.apps import get_tuple_version\n\ntry:\n if str(connection.vendor) == 'postgresql':\n import psycopg2\n\n psyc...
python
edit
1
1
bsd-3-clause
0903b18d1e4213cb88aa8cfcd0eb473ae54aa40b
jrief/django-shop,awesto/django-shop,nimbis/django-shop,khchine5/django-shop,jrief/django-shop,nimbis/django-shop,awesto/django-shop,nimbis/django-shop,khchine5/django-shop,divio/django-shop,nimbis/django-shop,jrief/django-shop,divio/django-shop,awesto/django-shop,divio/django-shop,khchine5/django-shop,khchine5/django-...
shop/models/fields.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
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSettings for DEMO_MODE.\n\nMust set DEMO_MODE = True in local_settings.py.\n\"\"\"\n\n# Views that are visible in demo mode.\nDEMO_SAFE_VIEWS = [\n 'main.views.home_view',\n 'main.views.project_list_view',\n 'main.views.pro...
python
edit
1
0
mit
cd0b6af73dd49b4da851a75232b5829b91b9030c
woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,churchlab/millstone,churchlab/millstone
genome_designer/conf/demo_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .ide.command import plugin_unloaded\nfrom .ide.error import *\nfrom .ide.rebuild import *\nfrom .ide.server import *\nfrom .ide.settings import plugin_loaded\nfrom .ide.text_command import *\nfrom .ide.type_hints import *\nfrom .ide.ut...
python
edit
10
0
mit
c61d5e84863dd67b5b76ec8031e624642f4c957c
b123400/purescript-ide-sublime
main.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -------------------------------------------------------\nimport socket, traceback\nimport time\nimport json\n\nhost = ''\nport = 2390\n\ns = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\ns.setsockopt(socket.SOL_SOCKET, socket.SO_REUSE...
python
edit
1
0
mit
684ac5e6e6011581d5abcb42a7c0e54742f20606
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Arduino/IMUstream_WifiUDP_iot33/read_UDP_JSON_IMU.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport airpy\ndef airlist():\n\tinstalled_docs = os.listdir(airpy.data_directory)\n\tfor dir in installed_docs:\n\t\tprint(dir, end= ' ')\n\tprint(end = '\\n')\n```\n\nApply this change: Add a Backwards compatibility for python ...
python
edit
1
2
mit
47f495e7e5b8fa06991e0c263bc9239818dd5b4f
kevinaloys/airpy
airpy/list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\"\nExposes utility functions.\n\n\"\"\"\n\nfrom contextlib import contextmanager\nimport logging\nimport timeit\n\n\nlog = logging.getLogger(\"wineds\")\n\n\n@contextmanager\ndef time_it(task_desc):\n \"\"\"\n A context manager...
python
edit
1
1
bsd-3-clause
6c2a154bf902b5f658b2c2cbf4b65c6ed33e6c1b
cjerdonek/wineds-converter
pywineds/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file...
python
edit
1
0
apache-2.0
b4e5a284201d6d25607ff54aedcf6082e8a4d621
pinterb/st2,peak6/st2,pixelrebel/st2,jtopjian/st2,pixelrebel/st2,alfasin/st2,pinterb/st2,Itxaka/st2,Plexxi/st2,lakshmi-kannan/st2,Itxaka/st2,grengojbo/st2,Plexxi/st2,jtopjian/st2,punalpatel/st2,punalpatel/st2,Plexxi/st2,nzlosh/st2,armab/st2,StackStorm/st2,punalpatel/st2,dennybaa/st2,nzlosh/st2,pixelrebel/st2,peak6/st2,...
st2client/st2client/models/reactor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom flask import Flask, render_template\nfrom flask_flatpages import FlatPages, flatpages\nfrom flask_frozen import Freezer\n\nDEBUG = True\nFLATPAGES_AUTO_RELOAD = DEBUG\nFLATPAGES_EXTENSION = '.md'\nFREEZER_DESTINATION = 'd...
python
edit
3
3
mit
ac863c20ac4094168b07d6823241d55e985ba231
claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io
site.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#\n# U...
python
edit
1
1
apache-2.0
b4c97d3b7b914c193c018a1d808f0815778996b4
ilay09/keystone,rajalokan/keystone,mahak/keystone,openstack/keystone,ilay09/keystone,openstack/keystone,mahak/keystone,mahak/keystone,openstack/keystone,rajalokan/keystone,rajalokan/keystone,ilay09/keystone
keystone/common/sql/data_migration_repo/versions/002_password_created_at_not_nullable.py
rejected_duplicate
Near-duplicate of sample 397
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#\n# U...
python
edit
1
2
apache-2.0
36e5af74e6ecaba4cea4bfcd2c1ef997d1e15eb0
openstack/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,dudymas/python-openstacksdk,briancurtin/python-openstacksdk
openstack/tests/functional/telemetry/v2/test_meter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8\nfrom unittest import TestCase\nfrom education.views import AbsenteeismForm\nfrom datetime import datetime\n\nclass TestAbsenteeismForm(TestCase):\n def test_should_invalidate_empty_form(self):...
python
edit
1
1
bsd-3-clause
a99dd63f357548cc4eef5121e3a2da9dfd6b7a01
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
education/test/test_absenteeism_form.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport crowd\nfrom auth import Authenticator\n\n\nclass CrowdAuthenticator(Authenticator):\n \"\"\"Atlassian Crowd authenticator. Requires configuration options CROWD_URL, CROWD_APP_NAME, CROWD_APP_PASSWORD\"\"\"\n def __init__(self, ...
python
edit
1
2
mit
95ccab69cfff30c24932c4cd156983a29639435d
akurdyukov/nginxauthdaemon,akurdyukov/nginxauthdaemon
nginxauthdaemon/crowdauth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nif os.environ.get('DATABASE_URL') is None:\n SQLALCHEMY_DATABASE_URI = 'sqlite:///meetup.db'\nelse:\n SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']\n\nSQLALCHEMY_TRACK_MODIFICATIONS = False # supress deprecation...
python
edit
1
0
mit
c713273fe145418113d750579f8b135dc513c3b8
Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom devbot import chat\n\n\ndef call(message: str, name, protocol, cfg, commands):\n if ' ' in message:\n chat.say('/msg {} Sorry, that was not a valid player name: It contains spaces.'.format(name))\n return\n chat.say...
python
edit
3
3
mit
ce639400d48462bdc593e20d13979c33ed4c7fe9
Ameliorate/DevotedBot,Ameliorate/DevotedBot
commands/globaladd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSteam and Leaf Plot\n-------------------\nThis example shows how to make a steam and leaf plot. \n\"\"\"\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\nnp.random.seed(42)\n\n# Generating Random Data\noriginal_data...
python
edit
1
0
bsd-3-clause
8d7657ed52a40070136bbbe3da7069dcbe3fc1c3
altair-viz/altair,ellisonbg/altair,jakevdp/altair
altair/vegalite/v2/examples/stem_and_leaf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\nfrom email.MIMEBase import MIMEBase\nfrom django.core.mail.backends.base import BaseEmailBackend\nfrom database_email_backend.models import Email, Attachment\n\n\nclass DatabaseEmailBackend(BaseEmailBackend):\n de...
python
edit
1
6
mit
ae918211a85654d7eaa848cbd09f717d0339f844
machtfit/django-database-email-backend,machtfit/django-database-email-backend,jbinary/django-database-email-backend,stefanfoulis/django-database-email-backend,jbinary/django-database-email-backend
database_email_backend/backend.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\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
python
edit
1
0
bsd-3-clause
bf96bf9d71f432f2db75b0c62b49098235d75661
Lukasa/cryptography,kimvais/cryptography,skeuomorf/cryptography,sholsapp/cryptography,dstufft/cryptography,bwhmather/cryptography,glyph/cryptography,dstufft/cryptography,bwhmather/cryptography,kimvais/cryptography,dstufft/cryptography,Ayrx/cryptography,Lukasa/cryptography,skeuomorf/cryptography,sholsapp/cryptography,Ha...
cryptography/bindings/openssl/pkcs12.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# MIT licensed\n# Copyright (c) 2020 Felix Yan <<EMAIL>>, et al.\n\nimport re\nfrom nvchecker_source.cmd import run_cmd\n\nasync def get_version(\n name, conf, *, cache, keymanager=None\n):\n git = conf['git']\n cmd = f\"git ls-remote -t...
python
edit
1
1
mit
d7624defd7d05e721aeb0ccd074c7172c51295bf
lilydjwg/nvchecker
nvchecker_source/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework import routers\n\nfrom api import views\n\n\nrouter = routers.DefaultRouter()\nrouter.register(r'categories', views.CategoryViewSet)\nrouter.register(r'commodities', views.Commo...
python
edit
1
0
mit
61b5a3f2bdbde977fbc6dd0042209e0d67a53318
Puciek/elite-backend,Puciek/elite-backend
api/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nregistered = {}\n\nclass GObjectMeta(type):\n def __new__(cls, name, bases, dict):\n c = super().__new__(cls, name, bases, dict)\n qualname = '{}.{}'.format(c.__module__, c.__qualname__)\n if qualname in registered:\...
python
edit
1
3
bsd-3-clause
34575124ea6b16f7a7d4f2ae5e073a87709843d2
entwanne/NAGM
engine/meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom dbaas.celery import app\nfrom util.decorators import only_one\nfrom models import CeleryHealthCheck\n#from celery.utils.log import get_task_logger\n\n#LOG = get_task_logger(__name__)\n\nimport logging\nLOG = ...
python
edit
5
3
bsd-3-clause
c3e81aee9852a94befdec9d9b2d3f9cd3d7914e2
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/system/tasks.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom .default import DefaultClient\nfrom .sharded import ShardClient\nfrom .herd import HerdClient\nfrom .experimental import SimpleFailoverClient\nfrom .sentinel import SentinelClient\n\n__all__ = ['DefaultClient...
python
edit
2
0
bsd-3-clause
bcaf887ccad40adf2cb09627c12f2a3e1b4b006d
zl352773277/django-redis,smahs/django-redis,yanheng/django-redis,lucius-feng/django-redis,GetAmbassador/django-redis
redis_cache/client/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nimport pytest\nimport holviapi\n\n@pytest.fixture\ndef connection():\n pool = os.environ.get('HOLVI_POOL', None)\n key = os.environ.get('HOLVI_KEY', None)\n if not pool or not key:\n raise...
python
edit
1
3
mit
b021fa0335414d3693aabf4c32b7219f0ba33369
rambo/python-holviapi,rambo/python-holviapi
holviapi/tests/test_api_idempotent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#ODB2 datalogger\n\nimport obd\n\nconnection = obd.OBD()\n\nwhile true:\n request = connection.query(obd.commands.RPM)\n\n if not r.is_null():\n print(r.value)\n```\n\nApply this change: Handle ctrl+c with signal Fix more typos...
python
edit
1
1
mit
a72468f6988ba3fc5f815b68a07c990809f80864
ProtaconSolutions/iot-hackday-2015-obd2
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.apps import AppConfig\n\n\nclass CommonConfig(AppConfig):\n name = 'common'\n\n def ready(self):\n pass\n\n```\n\nApply this change: Clear the SERVER_RESTART_REQUIRED flag automatically wh...
python
edit
1
3
mit
d4db750d2ff2e18c9fced49fffe7a3073880078b
SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
InvenTree/common/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .test import * # noqa\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.contrib.gis.db.backends.postgis',\n 'NAME': 'gis',\n 'USER': 'postgres',\n 'PASSWORD': '',\n 'HOS...
python
edit
1
0
bsd-2-clause
fdf014fb0602cbba476b0e35d451f43e86be7cdc
AIFDR/inasafe-django,timlinux/inasafe-django,timlinux/inasafe-django,AIFDR/inasafe-django,AIFDR/inasafe-django,timlinux/inasafe-django,AIFDR/inasafe-django,timlinux/inasafe-django
django_project/core/settings/test_travis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n###############################################################################\n# Copyright Kitware Inc.\n#\n# Licensed under the Apache License, Version 2.0 ( the \"License\" );\n# you ...
python
edit
1
0
apache-2.0
b15872bff28628c468d3d485eae2f79efba41160
girder/girder_worker,girder/girder_worker,girder/girder_worker
worker/server/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef bug(issue=None):\n message = \"A known bug.\"\n if issue is not None:\n message += \" See issue #{issue}.\".format(issue=issue)\n return message\n\n```\n\nApply this change: Improve the internal skipped-test helper messa...
python
edit
1
2
mit
86a5fff9add5980892c90a3e34476802dec7a6dc
python-jsonschema/jsonschema
jsonschema/tests/_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.ext import webapp\nimport re\n\n# More info on custom Django template filters here:\n# https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#registering-custom-filters\n\nregister = webapp.template.create_t...
python
edit
1
3
mit
3bbe101f609349c2475079f052d5400e77822237
nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,tsteward/the-blue-alliance,fangeugene/the-blue-alliance,the-blue-alliance/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/th...
common/my_filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBase settings for Proxito\n\nSome of these settings will eventually be backported into the main settings file,\nbut currently we have them to be able to run the site with the old middleware for\na staged rollout of the proxito code....
python
edit
1
3
mit
20017da43fe1bf5287b33d9d2fc7f597850bb5b5
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
readthedocs/settings/proxito/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. utils import TranspileTestCase, BuiltinFunctionTestCase\n\n\nclass InputTests(TranspileTestCase):\n pass\n\n\nclass BuiltinInputFunctionTests(BuiltinFunctionTestCase, TranspileTestCase):\n functions = [\"input\"]\n\n not_im...
python
edit
3
0
bsd-3-clause
fe0d86df9c4be9d33a461578b71c43865f79c715
cflee/voc,Felix5721/voc,ASP1234/voc,cflee/voc,glasnt/voc,ASP1234/voc,glasnt/voc,freakboy3742/voc,freakboy3742/voc,gEt-rIgHt-jR/voc,Felix5721/voc,gEt-rIgHt-jR/voc,pombredanne/voc,pombredanne/voc
tests/builtins/test_input.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Increment minor version for new feature release." }, { "role": "assistant", "content": "__version__ = '1.6.0'\n__author__ = 'Cameron Higby-Naquin'\n" } ]
python
new_file
1
0
mit
75a4097006e6ea5f1693b9d746456b060974d8a0
chigby/mtg,chigby/mtg
mtglib/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom mezzanine.conf import settings\n\nfrom cartridge.shop.models import Cart\n\n\nclass ShopMiddleware(object):\n\n def __init__(self):\n old = (\"SHOP_SSL_ENABLED\", \"SHOP_FORCE_HOST\", \"SHOP_FORCE_SSL_VIEWS\")\n for ...
python
edit
1
3
bsd-2-clause
a4df3f966e232e8327522a3db32870f5dcea0c03
traxxas/cartridge,traxxas/cartridge,Parisson/cartridge,Kniyl/cartridge,syaiful6/cartridge,jaywink/cartridge-reservable,wbtuomela/cartridge,syaiful6/cartridge,ryneeverett/cartridge,wbtuomela/cartridge,dsanders11/cartridge,wbtuomela/cartridge,dsanders11/cartridge,wyzex/cartridge,jaywink/cartridge-reservable,Parisson/cart...
cartridge/shop/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport unittest\n\nPOSSIBLE_TEST_BINARIES = [\n 'libreadline.so.5',\n 'libreadline.so.6',\n]\n\nPOSSIBLE_TEST_BINARY_PATHS = [\n '/lib',\n '/usr/lib',\n '/usr/local/lib',\n]\n\nclass TestBase(unittest.TestCase...
python
edit
1
4
bsd-2-clause
a8d873e178d45024db9c0ef6a25c6867424785f7
chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,ch...
bindings/python/llvm/tests/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make the first test pass by checking if source_path argument exists" }, { "role": "assistant", "content": "import os.path\ndef build(source_path, overwrite = True):\n if not os.path.exists(source_path):\n raise IOError...
python
new_file
1
2
mit
ff011f280f6f6aaf74dd2f4ff3cdfb3831aa147c
jruizaranguren/ideskeleton
ideskeleton/builder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom nose.tools import assert_raises\n\nfrom scalymongo import Document\nfrom scalymongo.errors import ModifyFailedError\nfrom tests.acceptance.base_acceptance_test import BaseAcceptanceTest\n\n\nclass ModifyableDocument(...
python
edit
8
1
bsd-3-clause
b1c1b28e58b59eac81954fb55570dfd389b99c0f
allancaffee/scaly-mongo
tests/acceptance/test_modify.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.contenttypes.models import ContentType\n\n\nclass PermissionAdmin(admin.ModelAdmin):\n list_display = ['__unicode__', 'codename']\n ...
python
edit
1
0
mit
edf95105b7522b115dd4d3882ed57e707126c6af
BocuStudio/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,BocuStudio/django-timepiece,caktus/django-timepiece,BocuStudio/django-timepiece,arbitrahj/django-timepiece
timepiece/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nif True:\n if True:\n if True:\n self.__heap.sort(\n ) # pylint: builtin sort probably faster than O(n)-time heapify\n\n if True:\n foo = '( ...
python
edit
3
0
mit
ee9c5c8265b4971a9b593d252711a88f59fe6b75
Vauxoo/autopep8,hhatto/autopep8,SG345/autopep8,hhatto/autopep8,MeteorAdminz/autopep8,vauxoo-dev/autopep8,MeteorAdminz/autopep8,Vauxoo/autopep8,SG345/autopep8,vauxoo-dev/autopep8
test/suite/out/long_lines.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, include, url\nfrom django.conf import settings\nfrom filebrowser.sites import site\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover(...
python
edit
1
0
bsd-3-clause
921ce44cd766540d74b8496029e871d5aceb5cbb
uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam
urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport random\nimport string\n\n\ndef secure_uuid():\n \"\"\"\n Strength: 6*3 random characters from a list of 62, approx. 64^18 possible\n strings, or 2^100. Should be enough to prevent a successful bruteforce, as\n ...
python
edit
1
2
mit
517d25cf79c4d04661309ab7b3ab0638a2f968ee
docbleach/DocBleach-Web,docbleach/DocBleach-Web,docbleach/DocBleach-Web,docbleach/DocBleach-Web
api/docbleach/utils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Konstrukteur - Static website generator\n# Copyright 2013 Sebastian Fastner\n#\n\n__all__ = [\"parse\"]\n\nfrom jasy.env.State import session\nfrom jasy.core import Console\nfrom bs4 import BeautifulSoup\n\n\ndef parse(filename):\n\t\"...
python
edit
4
5
mit
837efcddd6c111dabf14a6017d0ae2f6aacbddac
fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur
konstrukteur/HtmlParser.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport argparse\n\nfrom robot.errors import DataError\nfrom robot.tidy import Tidy\n\n\ndef main(argv=None):\n parser = argparse.ArgumentParser()\n parser.add_argument('filenames', nargs='*', h...
python
edit
1
3
mit
c8a1b25c1579eba5cb68c1a4cdd60116b3496429
guykisel/pre-commit-robotframework-tidy
pre_commit_robotframework_tidy/rf_tidy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy.ext.mutable import (\n Mutable,\n MutableDict)\nfrom sqlalchemy_utils.types.json import JSONType\n\nfrom . track import (\n TrackedDict,\n TrackedList)\n\n__all__ = 'MutableJson', 'NestedMutableJson'\n\n\nclass N...
python
edit
1
5
bsd-2-clause
db6b869eae416e72fa30b1d7271b0ed1d7dc1a55
edelooff/sqlalchemy-json
sqlalchemy_json/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRole tests\n\"\"\"\n\nimport os\nimport pytest\nfrom testinfra.utils.ansible_runner import AnsibleRunner\n\ntestinfra_hosts = AnsibleRunner(\n os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')\n\n\n@pytest.mark.parametrize(...
python
edit
1
2
mit
3ba5b6491bf61e2d2919f05bbf5cef088a754aeb
infOpen/ansible-role-vsftpd
molecule/default/tests/test_installation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.views.generic import View\n\nfrom stackviz import settings\n\n_cached_csv = None\n\n\ndef _load_csv():\n global _cached_csv\n\n if _cached_csv:\n return _cached_csv\n\n with ...
python
edit
3
3
apache-2.0
e5fb2f327b5ec51cd908e5915ef5415ff2b9dcc3
openstack/stackviz,timothyb89/stackviz-ng,dklyle/stackviz-ng,timothyb89/stackviz-ng,timothyb89/stackviz-ng,timothyb89/stackviz,timothyb89/stackviz,timothyb89/stackviz,dklyle/stackviz-ng,openstack/stackviz,openstack/stackviz
stackviz/views/dstat/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport hashlib\nimport os\nimport shutil\n\nimport cdsapi\n\nSAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data')\nEXTENSIONS = {'grib': '.grib', 'netcdf': '.nc'}\n\n\ndef ensure_data(dataset, request, folder=SAMPLE...
python
edit
1
3
apache-2.0
68eb1bd58b84c1937f6f8d15bb9ea9f02a402e22
ecmwf/cfgrib
tests/cdscommon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport multiprocessing\n\nfrom .base import Processor\n\n\nclass BackgroundProcessor(Processor):\n '''Local background processor...
python
edit
1
3
apache-2.0
9d0ea4eaf8269350fabc3415545bebf4da4137a7
4degrees/segue
source/segue/backend/processor/background.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding=utf-8 -*-\nfrom __future__ import print_function, absolute_import\nimport os\nimport platform\nimport sys\n\n\ndef is_type_checking():\n from typing import TYPE_CHECKING\n return TYPE_CHECKING\n\n\nPYENV_INSTALLED = bool(...
python
edit
1
2
mit
206a59c838623aae5e0b0f91f8089ffc13e2cfd0
kennethreitz/pipenv
pipenv/vendor/pythonfinder/environment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n#\n# Copyright © 2012 eNovance <<EMAIL>>\n#\n# Author: Julien Danjou <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in ...
python
edit
1
1
apache-2.0
8232832bbae07c485b5600542c09c5eb5adef7ff
eayunstack/ceilometer,citrix-openstack-build/ceilometer,rickerc/ceilometer_audit,r-mibu/ceilometer,chungg/aodh,sileht/aodh,m1093782566/openstack_org_ceilometer,citrix-openstack-build/ceilometer,pczerkas/aodh,froyobin/ceilometer,luogangyi/Ceilometer-oVirt,idegtiarov/ceilometer,maestro-hybrid-cloud/ceilometer,tanglei528/...
ceilometer/service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nr\"\"\"\n=======\nOpenPNM\n=======\n\nOpenPNM is a package for performing pore network simulations of transport in\nporous materials.\n\nOpenPNM consists of several key modules. Each module is consisted of\nseveral classes and each class is...
python
edit
19
0
mit
1b1652053213f3939b50b2ac66a775cd5d4beed9
PMEAL/OpenPNM
openpnm/__init__.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom gitlabform.gitlabform import GitLabForm\nfrom gitlabform.gitlabform.test import create_group, create_project_in_group, get_gitlab, GROUP_NAME\n\nPROJECT_NAME = 'project_settings_project'\nGROUP_AND_PROJECT_NAME = GROUP...
python
edit
3
1
mit
53c4d10ecb7a9592f3cdf311ca2ddc5cb52c413c
egnyte/gitlabform,egnyte/gitlabform
gitlabform/gitlabform/test/test_project_settings.py
accepted
null
true