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 import forms\n\nfrom .models import Pin\n\n\nclass PinForm(forms.ModelForm):\n url = forms.CharField(required=False)\n image = forms.ImageField(label='or Upload', required=False)\n\n class Meta:\n model = Pin\n ...
python
edit
1
6
bsd-2-clause
4ad6f599cdcebc34e9f32a5ab8eaf44a3845ed21
supervacuo/pinry,Stackato-Apps/pinry,wangjun/pinry,dotcom900825/xishi,QLGu/pinry,pinry/pinry,lapo-luchini/pinry,dotcom900825/xishi,supervacuo/pinry,MSylvia/pinry,Stackato-Apps/pinry,lapo-luchini/pinry,wangjun/pinry,QLGu/pinry,pinry/pinry,MSylvia/pinry,MSylvia/pinry,pinry/pinry,Stackato-Apps/pinry,pinry/pinry,supervacuo...
pinry/pins/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom openerp import models, fields, api\n \n\n\nclass Course(models.Model):\n _name = 'openacademy.course' # Model odoo name\n\n name = fields.Char(string='Title', required=True) # Field reserved to identified name record\n descr...
python
edit
1
2
apache-2.0
b8bad6cda4bdc78d15303002db6687fbae447e51
felipejta/openacademy-project_072015
openacademy/model/openacademy_course.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\nimport json\nimport subprocess\n\napp = Flask(__name__)\nconfig = None\n\n@app.route('/', methods=['POST'])\ndef hook_listen():\n if request.method == 'POST':...
python
edit
1
6
mit
7e1d42e6730336296ef3b702eb4cde64ce8410c5
glowdigitalmedia/docker-puller,nicocoffo/docker-puller,nicocoffo/docker-puller,glowdigitalmedia/docker-puller
dockerpuller/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Fill out with value from\n# https://firebase.corp.google.com/project/trogdors-29fa4/settings/database\nFIREBASE_SECRET = \"ZiD9uLhDnrLq2n416MjWjn0JOrci6H0oGm7bKyVN\"\nFIREBASE_EMAIL = \"\"\nALLEGIANCES = ('horde', 'resistance', 'none')\nT...
python
edit
1
0
apache-2.0
f710479e01d50dad03133d76b349398ab11e8675
google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz
backend/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.template.defaultfilters import slugify\nfrom django.core.exceptions import ValidationError\n\nfrom competition.validators import greater_than_zero, non_negative, validate_name\n\n\nclass Validat...
python
edit
3
2
bsd-3-clause
c3957dbb25a8b5eeeccd37f218976721249b93e2
michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition
src/competition/tests/validator_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport json\n\n\ndef model_to_json(model):\n \"\"\" Returns a JSON representation of an SQLAlchemy-backed object.\n\n From Zato: https://github.com/zatosource/zato\n \"\"\"\n\n _js...
python
edit
1
3
mit
5ff35d282b61cfdfc53deaa0f1bc0f83850ff7a5
Storj/downstream-node,Storj/downstream-node
downstream_node/lib/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\n\nACTORS = list('NRAIOVF')\n\nFILE_COMMANDS = ['copy', 'compare']\n\nVERBOSITY = OrderedDict(\n [ ('RETURN_CODE', 0),\n ('RESULT' , 1),\n ('ERROR' , 2),\n ...
python
edit
1
0
mit
e7cb98a1006d292a96670a11c807d0bbf9075ebd
shlomihod/scenario,shlomihod/scenario,shlomihod/scenario
scenario/_consts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\n\n\nclass Steckerbrett:\n def __init__(self):\n pass\n\n\nclass Walzen:\n def __init__(self):\n pass\n\n\nclass Enigma:\n def __init__(self):\n pass\n\n def cipher(self, message):\n pas...
python
edit
1
1
mit
9808e97747785c27387ad1ce9ffc3e9a05c80f08
ranisalt/enigma
enigma.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION='2.4.5'\n\nfrom client import *\nfrom oauth2 import *\nfrom util import *\n\n```\n\nApply this change: Make import statements explicit relative imports" }, { "role": "assistant", "content": "VERSION='2.4.5'\n\nfrom .clie...
python
edit
4
0
mit
bafef6a175116aff519579822f2382e8fbbd8808
plamere/spotipy
spotipy/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re, click\nfrom shub.utils import get_key_netrc, NETRC_FILE\n\n@click.command(help='remove Scrapinghug API key from the netrc file')\n@click.pass_context\ndef cli(context):\n if not get_key_netrc():\n context.fail('Key not ...
python
edit
1
4
bsd-3-clause
fa86706ae6cf77ef71402bb86d12cdd3cb79dafc
scrapinghub/shub
shub/logout.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nsentry.utils.imports\n~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport pkguti...
python
edit
1
4
bsd-3-clause
a589aa63f250a347ab24b7309e65ef25c7281437
gencer/sentry,jean/sentry,fotinakis/sentry,gencer/sentry,looker/sentry,BuildingLink/sentry,gencer/sentry,jean/sentry,JackDanger/sentry,fotinakis/sentry,BuildingLink/sentry,beeftornado/sentry,zenefits/sentry,beeftornado/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,JamesMura/sentry,ifduyue/sentry,JamesMura/sentry,B...
src/sentry/utils/imports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport opentracing.ext.tags as ext\nimport opentracing\nimport wrapt\n\n\n@wrapt.patch_function_wrapper('urllib3', 'PoolManager.urlopen')\ndef urlopen_with_instana(wrapped, instance, args, kwargs):\n try:\n span = opentracing.glob...
python
edit
1
3
mit
697d56dcd4aae19e6cb2351eb39a5c195f8ed029
instana/python-sensor,instana/python-sensor
instana/instrumentation/urllib3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\niOS Gyroscope\n---------------------\n'''\n\nfrom plyer.facades import Gyroscope\nfrom pyobjus import autoclass\n\nfrom pyobjus.dylib_manager import load_framework\n\nload_framework('/System/Library/Frameworks/UIKit.framework')\nUIDevi...
python
edit
1
2
mit
f48c15a6b0c09db26a0f1b0e8846acf1c5e8cc62
KeyWeeUsr/plyer,KeyWeeUsr/plyer,kivy/plyer,KeyWeeUsr/plyer,kivy/plyer,kivy/plyer
plyer/platforms/ios/gyroscope.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"App constants\"\"\"\n\nSTUDENT_ROLE = 'student'\nGRADER_ROLE = 'grader'\nSTAFF_ROLE = 'staff'\nINSTRUCTOR_ROLE = 'instructor'\nLAB_ASSISTANT_ROLE = 'lab assistant'\nVALID_ROLES = [STUDENT_ROLE, GRADER_ROLE, STAFF_ROLE, INSTRUCTOR_ROLE...
python
edit
1
0
apache-2.0
857ae593c14ea2401f0bb21d53d8e464fc7d3cb2
Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok
server/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom ansible.forms import AnsibleForm1, AnsibleForm2\nfrom ansible.views import (\n PlaybookWizard, PlaybookListView, PlaybookDetailView,\n PlaybookFileCreateView, PlaybookFileEditView, PlaybookFileVi...
python
edit
3
0
bsd-3-clause
03bc712bca2001042fd856add659854d27b0a5b9
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/ansible/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# inspired from:\n\n# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/\n# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py\n\n__title__ = 'spacy'\n__version__ = '1.0.0+a'\n__summary__ ...
python
edit
1
0
mit
d35aa7344ed96c8e1e17ea74ba14a760a3c8a418
banglakit/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,banglakit/spaCy,recognai/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,banglakit/spaCy,spacy-io/spaCy,...
spacy/about.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom string import split\nfrom os import remove\nfrom mojo.roboFont import version\n\nfrom jkRFoTools.FontChooser import ProcessFonts\n\ndef test_compilation(font):\n temp_font = font.copy(showUI=False)\n\n for g in temp_font:\n ...
python
edit
3
7
mit
235bf56a4f80475f618a62db15844d7a004dd967
jenskutilek/RoboFont,jenskutilek/RoboFont
scripts/TestFontCompilation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = False\n\nBROKER_URL = 'amqp://guest@localhost'\n\nRECORD_HTTP_TRANSACTIONS = False\n\nCELERY_EAGER_PROPAGATES_EXCEPTIONS = True\n\nRAW_PROCESSING = ['cassandra', 'postgres']\nNORMALIZED_PROCESSING = ['elasticsearch', 'cassandra', 'p...
python
edit
1
0
apache-2.0
3680c9e874df4daf2981d524a311d292293ca6d6
mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,erinspace/scrapi
scrapi/settings/travis-dist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\nimport time\n\nfrom collections import Counter\nfrom multiprocessing import Process, Queue\nfrom queue import Empty\n\nshared_queue = None\n\n\ndef datetime_by_minute(dt):\n return dt.replace(second=0, micro...
python
edit
1
6
bsd-3-clause
9bcacb5488d32e9e4483c0b54abfa548885148d2
tamarackapp/tamarack-collector-py
tamarackcollector/worker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport sys\nimport MySQLdb\nsys.path.append('D:\\\\Projects\\\\PySQLKits\\\\lib\\\\simplequery')\nfrom table_data import *\nfrom simplequery import *\n\n\ndef get_mysql_connection():\n args = {'host':'localhost', 'user':'roo...
python
edit
4
1
mit
61e6fbbba42256f0a4b9d8b6ad25575ec6c21fee
healerkx/PySQLKits,healerkx/PySQLKits
scripts/datachain/datachain.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCopyright 2010 Asidev s.r.l.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a co...
python
edit
1
3
apache-2.0
fd2d61e6b9ce22a404ab404dcf4b4a53fe91f81a
asidev/aybu-controlpanel
aybu/controlpanel/handlers/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Example of integration between Fabric and Datadog.\n\"\"\"\n\nfrom fabric.api import *\nfrom fabric.colors import *\nfrom dogapi.fab import setup, notify\n\nsetup(api_key = \"YOUR API KEY HERE\")\n\n# Make sure @notify is just below @...
python
edit
12
1
bsd-3-clause
46dda5e761d3752fce26b379cc8542e3f5244376
DataDog/dogapi,DataDog/dogapi
examples/fabfile.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom time import strftime\n\n\"\"\"logger.py: A simple logging module\"\"\"\n\n__author__ = \"Prajesh Ananthan\"\n\n\ndef printDebug(text):\n print(strftime('%d/%b/%Y %H:%M:%S DEBUG | {}'.format(text)))\n\n\ndef printInfo(text):\n pri...
python
edit
1
1
mit
39228ca69262511b1d0efbfc437dda19c097d530
prajesh-ananthan/Tools
logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for Gremlin database.\"\"\"\nimport os\nimport requests\n\nfrom behave import given, then, when\nfrom urllib.parse import urljoin\n\n\n@when('I access Gremlin API')\ndef gremlin_url_access(context):\n \"\"\"Access the Gremlin...
python
edit
15
1
apache-2.0
fb5fc6e62a3c1b018d8f68cc37e4d541226a564b
tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common,jpopelka/fabric8-analytics-common,tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common
integration-tests/features/steps/gremlin.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n\nurlpatterns = patterns('protocols.views',\n url(r'^archive/$', 'list_all_protocols', name='list_all_protocols'),\n url(r'^add/$', 'add', name='add_protocol'),\n)\n\n```\n\nApply this cha...
python
edit
1
0
mit
243f973ee1757b7b8426e9e4b62de2a272d82407
Hackfmi/Diaphanum,Hackfmi/Diaphanum
protocols/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015,2016,2018 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"MetPy's IO module contains classes for reading files. These classes are written\nto...
python
edit
3
0
bsd-3-clause
ef98d8bf242bfd182b4e5c8675db599182a371a5
Unidata/MetPy,ShawnMurd/MetPy,ahaberlie/MetPy,jrleeman/MetPy,dopplershift/MetPy,jrleeman/MetPy,Unidata/MetPy,ahaberlie/MetPy,dopplershift/MetPy
metpy/io/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom flask_script import Manager, Server\nfrom flask_script.commands import ShowUrls, Clean\nfrom mothership import create_app\nfrom mothership.models import db\n\n# default to dev config because no one...
python
edit
1
1
mit
0bd469751034c9a9bc9c3b6f396885670722a692
afl-mothership/afl-mothership,afl-mothership/afl-mothership,afl-mothership/afl-mothership,afl-mothership/afl-mothership
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n\tsphinxcontrib.openstreetmap\n\t===========================\n\n\tEmbed OpenStreetMap on your documentation.\n\n\t:copyright: Copyright 2015 HAYASHI Kentaro <<EMAIL>>\n\t:license: BSD, see LICENSE for detail...
python
edit
1
1
bsd-2-clause
d483d47ec6670a0be82c323397d995e8f2fb506c
kenhys/sphinxcontrib-openstreetmap,kenhys/sphinxcontrib-openstreetmap
sphinxcontrib/openstreetmap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# see https://ipython.org/ipython-doc/3/config/custommagics.html\n# for more details on the implementation here\nimport uuid\n\nfrom IPython.core.getipython import get_ipython\nfrom IPython.core.magic import Magics, magics_class, cell_magic...
python
edit
1
2
bsd-3-clause
f0c7e1b8a2de6f7e9445e2158cf679f399df6545
ShopRunner/jupyter-notify,ShopRunner/jupyter-notify
jupyternotify/jupyternotify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\nfrom .flag import FLAGS, FlagAdder\nfrom .estimator import def_estimator\nfrom .inputs import def_def_train_input_fn\nfrom .inputs import def_def_eval_input_fn\n\n\ndef def_def_experiment_fn():\n adder = FlagAd...
python
edit
1
2
unlicense
8e3cc5821f3b597b256eb9f586380f3b3cfd35a8
raviqqe/tensorflow-qnd,raviqqe/tensorflow-qnd
qnd/experiment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version = (1, 0, 4)\n\n__version__ = version = '.'.join(map(str, __version))\n__project__ = PROJECT = __name__\n\n#from .jsonrpc import JSONRPCProtocol, JSONRPCRequest, JSONRPCResponse\n#from .exceptions import *\n\n# lint_ignore=W0611,W...
python
edit
1
0
mit
6a462d6cbf1d82e9e600b997185a265bcd35b6e4
pavlov99/json-rpc
jsonrpc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom maas_common import (status_ok, status_err, metric, get_keystone_client,\n get_auth_ref)\nfrom requests import Session\nfrom requests import exceptions as exc\n\n\ndef check(auth_ref):\n ...
python
edit
3
4
apache-2.0
ffee30cb1a5b9e477a7456bcd753a45c2a02fb4f
claco/rpc-openstack,robb-romans/rpc-openstack,cloudnull/rpc-maas,mattt416/rpc-openstack,stevelle/rpc-openstack,nrb/rpc-openstack,npawelek/rpc-maas,xeregin/rpc-openstack,xeregin/rpc-openstack,shannonmitchell/rpc-openstack,cfarquhar/rpc-openstack,git-harry/rpc-openstack,sigmavirus24/rpc-openstack,prometheanfire/rpc-opens...
glance_registry_local_check.py
rejected_duplicate
Near-duplicate of sample 15786
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .widget import Widget, CallbackDispatcher, register, widget_serialization\nfrom .domwidget import DOMWidget\n\nfrom .trait_types import Color, EventfulDict, EventfulList\n\nfrom .widget_bool import Checkbox, ToggleButton, Valid\nfrom ....
python
edit
53
0
bsd-3-clause
0cebce08025844ae1e0154b7332779be0567e9ab
ipython/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,ju...
ipywidgets/widgets/__init__.py
rejected_lint
Too many lint violations: 53
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom django.core.exceptions import ValidationError\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder\nfrom Instanssi.scre...
python
edit
4
1
mit
ac173dd3eace738b705ad5924aa830d3c3dffcf6
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/admin_screenshow/forms.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom base import load_diabetes\nfrom base import load_digits\nfrom base import load_files\nfrom base import load_iris\nfrom mlcomp import load_mlcomp\n\n```\n\nApply this change: Use relative imports in datasets." }, { "role": "assi...
python
edit
7
0
bsd-3-clause
4cf402558c084be208bbf0f4e682b2a06894738e
shikhardb/scikit-learn,imaculate/scikit-learn,IndraVikas/scikit-learn,bhargav/scikit-learn,yonglehou/scikit-learn,q1ang/scikit-learn,yanlend/scikit-learn,pypot/scikit-learn,theoryno3/scikit-learn,lbishal/scikit-learn,466152112/scikit-learn,icdishb/scikit-learn,IshankGulati/scikit-learn,wazeerzulfikar/scikit-learn,spall...
scikits/learn/datasets/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic.list import MultipleObjectMixin\n\n__all__ = ('FilterFormMixin',)\n\n\nclass FilterFormMixin(MultipleObjectMixin):\n \"\"\"\n Mixin that adds filtering behaviour for Class Based Views.\n Changed in a way t...
python
edit
1
2
mit
634d645f949f7dbff8c4e9300eebe01158649a83
zorainc/django-datafilters,freevoid/django-datafilters,zorainc/django-datafilters
datafilters/views.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
582fb412560ce068e2ac516a64ab1979beaccdb2
jamielennox/keystonemiddleware-echo
keystonemiddleware_echo/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = __version__ = '0.6.2'\n\nfrom .defaults import *\nfrom .fields import *\nfrom .models import *\n\n```\n\nApply this change: Bump to 0.7.0 development version" }, { "role": "assistant", "content": "version = __version__...
python
edit
4
0
bsd-3-clause
0b9e8795318922c1c7699932d8a6e984ce00b13d
schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats
mmstats/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.metadata import SimpleMetadata\nfrom django.utils.encoding import force_str\nfrom utilities.api import ContentTypeField\n\n\nclass ContentTypeMetadata(SimpleMetadata):\n\n def get_field_info(self, field):\n fie...
python
edit
1
5
apache-2.0
b26fc811872caf3393be0a6b6c0800f5335ad2df
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
netbox/utilities/metadata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nclass Wordfilter:\n def __init__(self):\n # json is in same directory as this class, given by __location__.\n __location__ = os.path.realpath(\n os.path.join(os.getcwd(), os.path.dirname(__file__)))\n...
python
edit
null
null
mit
d10199e4e3cd5b0557cf2dc2f4aea1014f18a290
dariusk/wordfilter,hugovk/wordfilter,hugovk/wordfilter,mwatson/wordfilter,hugovk/wordfilter,dariusk/wordfilter,mwatson/wordfilter,dariusk/wordfilter,mwatson/wordfilter,mwatson/wordfilter,dariusk/wordfilter,hugovk/wordfilter
lib/wordfilter.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom eachday.tests.base import BaseTestCase\nimport json\n\n\nclass TestResourceUtils(BaseTestCase):\n def test_invalid_json_error(self):\n ''' Test that an invalid JSON body has a decent error message '''\n resp = self.cli...
python
edit
1
1
mit
268753ad6e4c3345e821c541e1851ee7f7a2b649
bcongdon/EachDay,bcongdon/EachDay,bcongdon/EachDay,bcongdon/EachDay
eachday/tests/test_resource_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nfrom grooveshark import Client\n\nclient = Client()\nclient.init()\n\ndef get_song_url(song_name):\n song = client.search(song_name).next()\n return song.stream.url\n\ndef play_song_url(song_url):\n subprocess.ca...
python
edit
1
1
mit
e2b7ebf9a559a50462f64ca15a7688166fd4de9f
adelq/mirror
modules/music/gs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom measurement.base import MeasureBase\n\n\n__all__ = [\n 'Energy'\n]\n\n\nclass Energy(MeasureBase):\n STANDARD_UNIT = 'J'\n UNITS = {\n 'c': 4.18400,\n 'C': 4184.0,\n 'J': 1.0,\n 'eV': 1.602177e-9,\n...
python
edit
1
0
mit
8c8f26ffe52e2df68a8f7ba87871f260a5023406
yggdr/python-measurement,coddingtonbear/python-measurement
measurement/measures/energy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport zlib\nimport base64\n\nimport binascii\nfrom django.db import models\nfrom django.core import exceptions\n\n\nclass ZipField(models.Field):\n\n def db_type(self, connection):\n return 'bytea'\n\n def pre_save(self, model...
python
edit
1
4
apache-2.0
24089dfb12c3ecbec40423acf4d3c89c0b833f40
CenterForOpenScience/SHARE,aaxelb/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE,zamattiac/SHARE,laurenbarker/SHARE,aaxelb/SHARE,zamattiac/SHARE,laurenbarker/SHARE,zamattiac/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE
share/models/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto.ec2\nimport sys\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('aws_access_key_id')\nparser.add_argument('aws_secret_access_key')\nparser.add_argument('region')\nconfig = parser.parse_args()\n\nconn ...
python
edit
3
0
apache-2.0
9aa60f5da016468b345fac4499454ca4abeb8b3f
Kitware/HPCCloud-deploy,Kitware/HPCCloud-deploy,Kitware/HPCCloud-deploy
ansible/roles/cumulus/files/amis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom . import scores\nfrom . import ui\n\n\ndef configure(config, bp, score_processor):\n\n @bp.route(\"/\", methods=[\"GET\"])\n def index():\n return render_template(\"home.html\")\n\n bp = scores.configure(config, bp, s...
python
edit
1
1
mit
4047f744debb73d64de03bc0e7f16d2bbd308529
he7d3r/ores,wiki-ai/ores,he7d3r/ores,he7d3r/ores,wiki-ai/ores,wiki-ai/ores
ores/wsgi/routes/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom path import dirpath\n\n\ndef ans():\n lines = open(dirpath() + '054.txt').readlines()\n cards = [line.strip().split() for line in lines]\n \n return None\n \n\nif __name__ == '__main__':\n print(ans())\n\n```\n\nApply...
python
edit
6
5
mit
eb368c344075ce78606d4656ebfb19c7e7ccdf50
mackorone/euler
src/054.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\nimport random\nimport flask\n\nfrom hashlib import md5\n\nrecords = {}\n\n# Create a hash table of all records.\nfor record in json.loads(open('data/records-2015.json').read())['records']:\n records[md5(str(record...
python
edit
1
1
mit
1b5ad9a8e2b06218d511ce8f97521235c14a9507
judsonsam/tekautoday,judsonsam/tekautoday,judsonsam/tekautoday,judsonsam/tekautoday
src/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flicktor import subcommands\n\n\ndef main():\n parser = subcommands._argpaser()\n args = parser.parse_args()\n try: \n args.func(args)\n # except AttributeError:\n # parser.print_help()\n except KeyboardI...
python
edit
1
3
mit
88517c2f458a0e94b1a526bf99e565571353ed56
minamorl/flicktor
flicktor/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\n regex\n ~~~~~\n\n This is a prototype for an implementation of regular expressions. The goal\n of this prototype is to develop a completely transparent implementation,\n that can be better reasoned a...
python
edit
1
0
bsd-3-clause
6c19837ec2d29e2ad48c09b6287e64c825830bc9
DasIch/editor
prototypes/regex/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom djangae import patches\n\n\nclass CounterShard(models.Model):\n count = models.PositiveIntegerField()\n\n# Apply our django patches\npatches.patch()\n\n```\n\nApply this change: Fix a warning in 1.8" ...
python
edit
1
0
bsd-3-clause
5fcc90741e443133695c65e04b26fc9d1313e530
wangjun/djangae,trik/djangae,martinogden/djangae,asendecka/djangae,grzes/djangae,leekchan/djangae,chargrizzle/djangae,grzes/djangae,martinogden/djangae,armirusco/djangae,potatolondon/djangae,SiPiggles/djangae,kirberich/djangae,potatolondon/djangae,armirusco/djangae,asendecka/djangae,leekchan/djangae,SiPiggles/djangae,c...
djangae/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCheck that copy and repr of _context SafeDict don't result in inifinite loop\n\"\"\"\n#pragma repy\n\n# Create an almost shallow copy of _context\n# Contained self-reference is moved from _context to _context_copy\n_context_copy = _...
python
edit
3
0
mit
c458126baac92e1152026f51a9d3a544e8c6826f
SeattleTestbed/repy_v2
testsV2/ut_repy2api_copycontext.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom curio import Kernel, new_task, run_server\nfrom socket import *\n\nasync def echo_handler(client, addr):\n print('Connection from', addr)\n try:\n client.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)\n except (OSError, NameEr...
python
edit
6
4
mit
eb6e89409296443369b73f5a0475ef8903700037
MagicStack/vmbench,MagicStack/vmbench,MagicStack/vmbench,MagicStack/vmbench,MagicStack/vmbench
servers/curioecho_streams.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom haystack.indexes import *\nfrom haystack import site\nfrom models import Paste, Commit\n\nclass CommitIndex(RealTimeSearchIndex):\n text = CharField(document=True, use_template=True)\n commit = CharField(model_at...
python
edit
15
1
bsd-3-clause
322d8f90f86c40a756716a79e7e5719196687ece
justinvh/gitpaste,GarrettHeel/quark-paste,GarrettHeel/quark-paste,justinvh/gitpaste,justinvh/gitpaste,justinvh/gitpaste,GarrettHeel/quark-paste
saic/paste/search_indexes.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template, request, Blueprint\nimport json\n\nfrom app.state import state\n\n\nindex = Blueprint('index', __name__, template_folder='templates')\n@index.route('/', methods=['POST', 'GET'])\ndef show():\n\n if requ...
python
edit
4
2
mit
1bda3fa8b3bffaca38b26191602e74d0afeaad19
njbbaer/unicorn-remote,njbbaer/unicorn-remote,njbbaer/unicorn-remote
app/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom rest_framework import viewsets, serializers\nfrom integrations.credentials.models import IntegrationCredential\nfrom .environment import EnvironmentSeri...
python
edit
1
0
bsd-3-clause
3d9b7fe808f2c8a64e0b834c0a67fa53631e5235
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/api/integration_credential.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nVERSION = (0, 11,)\n\n__author__ = 'Mosky <http://mosky.tw>'\n__version__ = '.'.join(str(v) for v in VERSION)\n\n```\n\nApply this change: Change the version to v0.12" }, { "role": "assistant", "conten...
python
edit
1
0
mit
0de3ca1439acec9191932a51e222aabc8b957047
moskytw/mosql
mosql/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\nc = get_config()\n\nc.JupyterHub.hub_ip = '0.0.0.0'\nc.DockerSpawner.use_docker_client_env = True\nc.DockerSpawner.tls_assert_hostname = True\n\nc.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'\n\nc.Jupyter...
python
edit
2
3
apache-2.0
db78e585c9b2edfdf9ccb5025d429b2e25f641fd
smashwilson/jupyterhub-carina,smashwilson/jupyterhub-carina
jupyterhub_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n#\n# Define containerized environment for running Diosix on Qemu\n#\n# On Google Cloud Run: Creates HTTP server on port 8080\n# or whatever was specified using the PORT system variable.\n# Outputs via the HTTP port. This...
python
edit
4
0
mit
1dfec537de941e32a13905a2aab7352439961bd3
diodesign/diosix
entrypoint.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport operator\n\ndef get_sentiment(current_user, users, threads):\n friend_msg_count = {}\n for user in users.keys():\n friend_msg_count[user] = 0\n for thread in threads:\n for comment in thread:\n ...
python
edit
2
7
mit
3bf9853e83bf8d95844b58acac0d027b0ef5b863
tomshen/dearstalker,tomshen/dearstalker
fbanalysis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom heapq import heappush, heappushpop, heappop\nimport os\nfrom pathlib import Path\nimport sys\nfrom typing import List, Tuple\n\n\nN_LARGEST = 50\n\"\"\"Number of long file names to list.\"\"\"\n\n\ndef main():\n try:\n root =...
python
edit
1
4
apache-2.0
ebd7a18402168ae7a27f771e1a27daffa88791d0
blokeley/dfb,blokeley/backup_dropbox
file_stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .rest import RestClient\n\n\nclass Client(object):\n\n \"\"\"Docstring for Client. \"\"\"\n\n def __init__(self, domain, jwt_token):\n url = 'https://%s/api/v2/clients' % domain\n\n self.client = RestClient(endpoint...
python
edit
1
2
mit
82ab7f6e618367b5544fe71dea57f793ebb6b453
auth0/auth0-python,auth0/auth0-python
auth0/v2/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 John Reese\n# Licensed under the MIT License\n\nfrom __future__ import absolute_import, division\n\nengine = None\nui = None\n\ndef async_engine_command(command, network=None, params=None):\n \"\"\"Send a command to ...
python
edit
2
5
mit
e5a0fcb1fac87ea23bf032bfb266f5eea89d4c21
jreese/pyranha
pyranha/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport os\nimport shutil\nimport sys\n\n\nif not os.environ.get(\"TEST_NOTEBOOKS\"):\n sys.exit(0)\n\nfor each in list(sys.argv[1:]) + [\n \"reg.h5\",\n \"reg_sub.h5\",\n \"reg_f_f0.h5\",\n \"reg_wt...
python
edit
1
0
apache-2.0
20d63ba3fa1a9780d4a13c5119ae97a772efb502
nanshe-org/nanshe_workflow,DudLab/nanshe_workflow
teardown_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Measurement\nfrom rest_framework import viewsets\nfrom graph.serializers import MeasurementGraphSeriesSerializer\nfrom rest_framework.exceptions import ParseError\nfrom api.permissions import IsPatient\nfrom rest_framewo...
python
edit
5
11
mit
58b5a991d91101b9149014def8e93fe70852ae32
sigurdsa/angelika-api
measurement/views.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tastypie.authorization import DjangoAuthorization\nfrom tastypie.resources import ModelResource\nfrom req_with_auth import DjangoUserAuthentication\n\n\ndef create_tastypie_resource_class(class_inst):\n resource_class = type(class_i...
python
edit
1
2
bsd-3-clause
c7af37a407a2cab7319f910830c6149addcde7d1
weijia/djangoautoconf,weijia/djangoautoconf
djangoautoconf/tastypie_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom logging import config\nfrom flask import Flask\nimport dateutil\nimport dateutil.parser\nimport json\nfrom flask_login import LoginManager\n\nfrom config import CONFIG_DICT\n\n\napp = Flask(__name__)\napp.config.update(...
python
edit
3
3
mit
b0105f42f13b81741b4be2b52e295b906aa0c144
LandRegistry/digital-register-frontend,LandRegistry/digital-register-frontend,LandRegistry/digital-register-frontend,LandRegistry/digital-register-frontend
service/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis.forms import widgets\n\nclass LeafletPointWidget(widgets.BaseGeometryWidget):\n template_name = 'leaflet/leaflet.html'\n\n class Media:\n css = {\n 'all': ('https://cdnjs.cloudflare.com/ajax/l...
python
edit
1
2
bsd-3-clause
b60fabed64fc926066fc41f59a637dbfe2ac0bf9
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
emstrack/forms.py
rejected_duplicate
Near-duplicate of sample 18292
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request, render_template, redirect, url_for\nfrom ldap3 import Server, Connection, ALL\nfrom ldap3.core.exceptions import LDAPSocketOpenError\n\nfrom ..models import User\nfrom ..auth_provider import KnowledgeAuthProvider\...
python
edit
1
3
apache-2.0
68086a879b13040d62a8958bcb4839d6661f9d0c
airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo
knowledge_repo/app/auth_providers/ldap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gitlabform.gitlab.core import GitLabCore\n\n\nclass GitLabMergeRequests(GitLabCore):\n\n def create_mr(self, project_and_group_name, source_branch, target_branch, title, description=None):\n pid = self._get_project_id(project...
python
edit
1
1
mit
b53ebee86c36dfe52e8a11fb8c4f3cec99878fc9
egnyte/gitlabform,egnyte/gitlabform
gitlabform/gitlab/merge_requests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\n@author: jnaous\n'''\nfrom django.db import models\nfrom expedient.clearinghouse.aggregate.models import Aggregate\nfrom expedient.common.extendable.models import Extendable\nfrom expedient.clearinghouse.slice.models import Slice\n\ncl...
python
edit
1
1
bsd-3-clause
1c6b06f240d4388b3e140e3d9ab610711616f539
avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf
src/python/expedient/clearinghouse/resources/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport buildFirefox\nimport buildChrome\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\nbuildFirefox.run()\nbuildChrome.run()\n```\n\nApply this change: Prepare for file concat build system" }, { "role": "assista...
python
edit
1
0
mit
729cea9ae07f7264b765813cac00e869f66069ff
ZergRael/tgarmory
tools/allBuild.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUtility that detects the package of a given object.\n\"\"\"\nfrom __future__ import division, print_function, with_statement\n\nimport inspect\nimport os\n\n\ndef determine_package(some_object):\n \"\"\"\n Resolves a call by o...
python
edit
1
4
bsd-3-clause
570264014456ea0405af28feb92af7639fb7b7e3
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
metaopt/invoker/util/determine_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# python3 only\n#: Okay\nVAR1, *VAR2, VAR3 = 1, 2, 3\n#: Okay\n[VAR1, *VAR2, VAR3] = (1, 2, 3)\n#: N806\ndef extended_unpacking_ok():\n Var1, *Var2, Var3 = 1, 2, 3\n#: N806\ndef extended_unpacking_not_ok():\n [Var1, *Var2, Var3] = (1,...
python
edit
null
null
mit
210e9a6e6b20f724a6d464b5a1c842c8b71eceae
flintwork/pep8-naming
testsuite/N806_py3.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, division\n\nfrom cutadapt.seqio import ColorspaceSequence\nfrom cutadapt.adapters import ColorspaceAdapter, PREFIX\nfrom cutadapt.scripts.cutadapt import AdapterCutter\n\ndef test_cs_5p():\n\tread = Co...
python
edit
4
4
mit
5ee2d734ac3279e142ba7df561ee13c64f236cb8
Chris7/cutadapt,marcelm/cutadapt
tests/testtrim.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef file_is_allowed(file):\n t = file.endswith(\".py\")\n t &= \"__Init__\" not in file.title()\n t &= \"Sample_City\" not in file.title()\n return t\n\n```\n\nApply this change: Disable Frankfurt until requests is fixed\n\nref ...
python
edit
1
1
mit
badc84447ad6a596317c93e7c393e6021da8a18f
offenesdresden/ParkAPI,offenesdresden/ParkAPI
park_api/security.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.forms.models import ModelForm\nfrom installer_config.models import EnvironmentProfile, UserChoice\n \n\nclass EnvironmentForm(ModelForm):\n packages = forms.ModelMultipleChoiceField(widget=forms.Chec...
python
edit
1
0
mit
eb57469f1b14dfd5c2e74f2bbb774513e0662a6c
alibulota/Package_Installer,ezPy-co/ezpy,alibulota/Package_Installer,ezPy-co/ezpy
installer/installer_config/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom newspaper import Article\nfrom goose import Goose\nimport json\nimport sys\n\narticle = Article(sys.argv[1])\n\narticle.download()\narticle.parse()\narticle.nlp()\n\npublished = ''\nif article.publish_date:\n ...
python
edit
1
0
mit
4e94cef9f6617827341af443ac428b9ccc190535
lateral/feed-feeder,lateral/feed-feeder,lateral/feed-feeder,lateral/feed-feeder
lib/recommend-by-url.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport math, utilities.operator\nfrom ...weight import WeightDict, normalize_exp\nfrom .L1 import phase_description\n\n\n# Normalised distances and L2-normalised (Euclidean norm) collector sets\ncolle...
python
edit
3
0
mit
7cf37b966049cfc47ef200ad8ae69763d98185c5
davidfoerster/schema-matching
collector/description/normal/L2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport pytest\n\nfrom tests.consts import examples_path\nfrom valohai_yaml import parse\n\n\ndef _load_config(filename, roundtrip):\n with open(os.path.join(examples_path, filename), 'r') as infp:\n config = parse(inf...
python
edit
1
2
mit
222e2a70f9c2d4ce7cb4a26d717c6bcce1e3f344
valohai/valohai-yaml
tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conans import ConanFile\n\n\nclass ArgsConan(ConanFile):\n name = \"cfgfile\"\n version = \"0.2.8.2\"\n url = \"https://github.com/igormironchik/cfgfile.git\"\n license = \"MIT\"\n description = \"Header-only library for...
python
edit
1
1
mit
c6de39b01b8eac10edbb6f95d86285075bf8a9ab
igormironchik/cfgfile
conanfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport nose\nimport driller\n\nimport logging\nl = logging.getLogger(\"driller.tests.test_driller\")\n\nimport os\nbin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries'))\n\ndef test_drilling_cgc():\n...
python
edit
5
3
bsd-2-clause
0d6d1e735e3c149f6adec370832949a81b930a56
shellphish/driller
tests/test_driller.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nimport csv\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--config', help='path to file containing column header mappings', required=True)\nparser.add_argument('--csv-file', help='path...
python
edit
1
0
mit
f4d9e55cf3dbed0cf21661c33a6efbc98093d1f8
pwaring/csv2qif
paypal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom web_test_base import *\n\nclass TestIATIDiscuss(WebTestBase):\n requests_to_load = {\n 'IATI Discuss': {\n 'url': 'http://discuss.iatistandard.org/'\n }\n }\n\n def test_contains_links(s...
python
edit
12
1
mit
fa9e488c3fa008fa2c9b08a787ea9c2655bd3d02
IATI/IATI-Website-Tests
tests/test_discuss.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom passlib.hash import pbkdf2_sha512\n\nclass Utils:\n\n\t@staticmethod\n\tdef hash_password(password):\n\t\t\"\"\"\n\t\tHashes a password using sha512 -> pbkdf2_sha512 encrypted password\n\t\t\"\"\"\n\t\treturn pbkdf2_sha512.encrypt(pass...
python
edit
1
2
apache-2.0
8ae4594d4f4157568db0dc5cad4d07b8f1142218
asimonia/pricing-alerts,asimonia/pricing-alerts
src/common/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django DDP app config.\"\"\"\n\nfrom __future__ import print_function\n\nfrom django.apps import AppConfig\nfrom django.conf import settings, ImproperlyConfigured\nfrom django.db import DatabaseError\nfrom django.db.models import sign...
python
edit
1
4
mit
71324420df350bba5423006a444927e33c1a5ae2
commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp
dddp/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Configuration file for android gtest suites.\"\"\"\n\n# Add new...
python
edit
1
0
bsd-3-clause
9ae8283e06b0b72213fc8084909ae9c2c2b3e553
jaruba/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,jaruba/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,anirudhSK/chromium,dednal/chromium....
build/android/pylib/gtest/gtest_config.py
rejected_duplicate
Near-duplicate of sample 16745
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport json\nimport ckanapi\nimport unittest\nimport paste.fixture\n\ndef wsgi_app(environ, start_response):\n status = '200 OK'\n headers = [('Content-type', 'application/json')]\n\n path = environ['PATH_INFO']\n if path == '...
python
edit
1
4
mit
f74636d6944b45753d274f6a993678863a368961
LaurentGoderre/ckanapi,perceptron-XYZ/ckanapi,xingyz/ckanapi,metaodi/ckanapi,wardi/ckanapi,eawag-rdm/ckanapi
tests/test_testapp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nimport aiohttp\nfrom aiohttp import web\n\n\n@pytest.mark.run_loop\nasync def test_await(create_server, loop):\n\n async def handler(request):\n return web.HTTPOk()\n\n app, url = await create_server()\n app...
python
edit
1
1
apache-2.0
b0fef4ed92cde72305a2d85f3e96adde93f82547
juliatem/aiohttp,playpauseandstop/aiohttp,juliatem/aiohttp,Eyepea/aiohttp,mind1master/aiohttp,z2v/aiohttp,decentfox/aiohttp,jashandeep-sohi/aiohttp,pfreixes/aiohttp,vaskalas/aiohttp,hellysmile/aiohttp,AraHaanOrg/aiohttp,moden-py/aiohttp,rutsky/aiohttp,z2v/aiohttp,vaskalas/aiohttp,elastic-coders/aiohttp,singulared/aioht...
tests/test_py35/test_resp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scholarly\nimport requests\n\n_SEARCH = '/scholar?q=\\\"{}\\\"&as_ylo={}&as_yhi={}'\ndef search(query, start_year, end_year):\n \"\"\"Search by scholar query and return a generator of Publication objects\"\"\"\n soup = scholarl...
python
edit
1
3
mit
e1e7189bbe859d6dfa6f883d2ff46ff1faed4842
Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker,Spferical/cure-alzheimers-fund-tracker
scrape.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom raygun4py import raygunprovider\n\n\nlog = logging.getLogger(__name__)\n\n\nclass Provider(object):\n\n def __init__(self, app, apiKey):\n self.app = app\n self.sender = raygunprovider.RaygunSender(ap...
python
edit
1
7
mit
667a3d2803529c5b14fd17c6877961646615f2fd
MindscapeHQ/raygun4py
python2/raygun4py/middleware/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cloudenvy.envy import Envy\n\n\nclass EnvySnapshot(object):\n \"\"\"Create a snapshot of an ENVy.\"\"\"\n\n def __init__(self, argparser):\n self._build_subparser(argparser)\n\n def _build_subparser(self, subparsers):\n...
python
edit
1
1
apache-2.0
b8f9b2664f8782a028ce27a361f2a7a28eb925aa
cloudenvy/cloudenvy
cloudenvy/commands/envy_snapshot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\n\nimport click\n\n\ndef admin_command(fn):\n fn.__doc__ += ' [Admin only]'\n return fn\n\n\nclass PyutrackContext(object):\n def __init__(self, connection, config, debug=False):\n self.connection = connec...
python
edit
2
8
mit
a6b9077bf093b64f3b993d032b166586195ae011
alisaifee/pyutrack,alisaifee/pyutrack
pyutrack/cli/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom penchy.jobs import jvms, tools, filters, workloads\nfrom penchy.jobs.job import Job, SystemComposition, NodeSetting\nfrom penchy.jobs.dependency import Edge\n\nJVM = jvms.JVM\n\n# all job elements that are interesting for the user have...
python
edit
1
0
mit
95bb764e78e623310dff1ae48eabf4271b452406
fhirschmann/penchy,fhirschmann/penchy
penchy/jobs/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom reviewboard.hostingsvcs.forms import HostingServiceForm\nfrom reviewboard.hostingsvcs.service import HostingService\n\n\nclass GitoriousForm(HostingSe...
python
edit
1
0
mit
dbc16598a87403f52324bca3d50132fc9303ee90
KnowNo/reviewboard,brennie/reviewboard,1tush/reviewboard,chipx86/reviewboard,davidt/reviewboard,brennie/reviewboard,bkochendorfer/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,reviewboard/reviewboard,beol/reviewboard,1tush/reviewboard,brennie/reviewboard,custode/reviewboard,sgallagher/reviewboard,1tush/reviewbo...
reviewboard/hostingsvcs/gitorious.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ncommand = \"echo 'Without repeated errors:' >> out.txt 2>&1 ;\\n\"\ncommand += testshade(\"-g 2 2 test\")\n\ncommand += \"echo 'With repeated errors:' >> out.txt 2>&1 ;\\n\"\ncommand += testshade(\"--options error_r...
python
edit
3
0
bsd-3-clause
182c02b28a6ffee8744b48e39d378dca505f9287
aconty/OpenShadingLanguage,brechtvl/OpenShadingLanguage,aconty/OpenShadingLanguage,lgritz/OpenShadingLanguage,aconty/OpenShadingLanguage,brechtvl/OpenShadingLanguage,lgritz/OpenShadingLanguage,lgritz/OpenShadingLanguage,brechtvl/OpenShadingLanguage,lgritz/OpenShadingLanguage,aconty/OpenShadingLanguage,imageworks/OpenSh...
testsuite/error-dupes/run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache....
python
edit
1
1
apache-2.0
ae55577e4cea64a0052eb0c219641435c9c0210c
googleapis/python-aiplatform,googleapis/python-aiplatform
samples/model-builder/init_sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ooni.settings import config\nfrom ooni.utils import unzip, gunzip\n\nfrom ooni.deckgen.processors import citizenlab_test_lists\nfrom ooni.deckgen.processors import namebench_dns_servers\n\nconfig.read_config_file()\n\n__version__ = \"0...
python
edit
1
0
bsd-2-clause
318e322fbc29dd20d56dc311c71ae60e010a7cdf
lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-prob...
ooni/resources/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport struct\n\nfrom twisted.internet.protocol import DatagramProtocol\nfrom twisted.internet import reactor\n\n\nclass Announce(DatagramProtocol):\n\n def parse_connection(self, data):\n connection, action, tran...
python
edit
6
2
apache-2.0
cba8ec4754ed3516ba3f873b0879c8379e8f93ab
vtemian/university_projects,vtemian/university_projects,vtemian/university_projects
data_structures/bitorrent/server/udp.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests, json\nimport pandas as pd\n\n\nclass AT:\n\tdef __init__(self, base, api):\n\t\tself.base = base\n\t\tself.api = api\n\t\tself.headers = {\"Authorization\": \"Bearer \"+self.api}\n\n\tdef getTable(self,table):\n\t\tr = requ...
python
edit
1
3
mit
1eb9830485ec82713d3e8d4d1e13ea1fdc1733c6
MeetMangrove/location-bot
airtable.py
accepted
null
true