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 os\nfrom setuptools import setup, find_packages\n\nROOT = os.path.abspath(os.path.dirname(__file__))\n\nsetup(\n name='Flask-Mobility',\n version='0.1',\n url='http://github.com/rehandalal/flask-mobility/',\n license='BSD...
python
edit
3
0
bsd-3-clause
44b0634b387c3856aa26b711bf38862380ab1ffe
rehandalal/flask-mobility
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\nimport pytest\n\nfrom statsmodels.compat.platform import PLATFORM_WIN\nfrom statsmodels.compat.scipy import SCIPY_11\n\n\ndef test_lazy_imports():\n # Check that when statsmodels.api is imported, matplotlib is _not_ ...
python
edit
1
2
bsd-3-clause
5d3c6452f8efd0667948094693e90392abb99091
jseabold/statsmodels,bashtage/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,jseabold/statsmodels,bashtage/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,josef-pk...
statsmodels/tests/test_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom itertools import chain\n\nfrom datrie import Trie as DATrie\n\nfrom ._base import Trie as ABCTrie\n\nclass Trie(ABCTrie):\n def __init__(self, data):\n cha...
python
edit
3
5
mit
094132685688d0e9e599da6e8c0e0554945d56a5
mindw/html5lib-python,html5lib/html5lib-python,alex/html5lib-python,gsnedders/html5lib-python,ordbogen/html5lib-python,dstufft/html5lib-python,alex/html5lib-python,mgilson/html5lib-python,alex/html5lib-python,mindw/html5lib-python,dstufft/html5lib-python,dstufft/html5lib-python,ordbogen/html5lib-python,html5lib/html5li...
html5lib/trie/datrie.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\nfrom flask.ext.assets import Bundle, Environment\nfrom flask.ext.login import LoginManager\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\napp = Flask(__name__)\n\n# Load the app config\napp.config.from...
python
edit
4
0
mit
76243416f36a932c16bee93cc753de3d71168f0b
hreeder/ignition,hreeder/ignition,hreeder/ignition
manager/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado import ioloop, web, websocket\r\n\r\n\r\nclass EchoWebSocket(websocket.WebSocketHandler):\r\n def open(self):\r\n print(\"WebSocket opened\")\r\n\r\n def on_message(self, message):\r\n self.write_message(\"Y...
python
edit
2
3
bsd-3-clause
8a6002015cf873d3054bd20d8d287a3fe7be6b84
GrAndSE/livehtml,GrAndSE/livehtml
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom matchzoo.data_generator.callbacks.callback import Callback\n\n\nclass LambdaCallback(Callback):\n \"\"\"\n LambdaCallback. Just a shorthand for creating a callback class.\n\n See :class:`matchzoo.data_generator.callbacks.Callb...
python
edit
1
2
apache-2.0
6dceb819f86fd469a4d817dec0156646a5f574cf
faneshion/MatchZoo,faneshion/MatchZoo
matchzoo/data_generator/callbacks/lambda_callback.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom functools import partial\nfrom lala.util import command, msg\nfrom twisted.internet.utils import getProcessOutput\n\n@command\ndef fortune(user, channel, text):\n \"\"\"Show a random, hopefully interesting, adage\"...
python
edit
1
1
mit
b3ef748df9eca585ae3fc77da666ba5ce93bc428
mineo/lala,mineo/lala
lala/plugins/fortune.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from django.conf.urls import patterns, url\nexcept ImportError:\n from django.conf.urls.defaults import patterns, url\n\nurlpatterns = patterns(\n 'robots.views',\n url(r'^$', 'rules_list', name='robots_rule_list'),\n)\n\...
python
edit
1
0
bsd-3-clause
3037562643bc1ddaf081a6fa9c757aed4101bb53
jezdez/django-robots,jezdez/django-robots,jscott1971/django-robots,jscott1971/django-robots,jazzband/django-robots,jazzband/django-robots
robots/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Retrieve file from Facebook\n\nimport urllib, convert, re, os\n# from speech_py import speech_to_text_offline as STT_o\n# from speech_py import speech_to_text_google as STT\nfrom speech_py import speech_to_text_ibm_rest as STT\n\ndef tran...
python
edit
1
2
mit
f33c66d4b1b439f6d4ede943812985783d961483
hungtraan/FacebookBot,hungtraan/FacebookBot,hungtraan/FacebookBot
Speech/processor.py
rejected_duplicate
Near-duplicate of sample 1308
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import unicode_literals\nfrom setuptools import setup, find_packages\n\ninstall_requires = [\n \"Jinja2\",\n \"boto\",\n \"flask\",\n \"httpretty>=0.6.1\",\n \"requests\",\n \"xmltodi...
python
edit
1
0
apache-2.0
e736482bec7be7871bd4edd270f8c064961c20fc
gjtempleton/moto,botify-labs/moto,dbfr3qs/moto,botify-labs/moto,heddle317/moto,braintreeps/moto,spulec/moto,rocky4570/moto,ZuluPro/moto,kennethd/moto,okomestudio/moto,Affirm/moto,alexdebrie/moto,Brett55/moto,riccardomc/moto,2mf/moto,heddle317/moto,rocky4570/moto,dbfr3qs/moto,botify-labs/moto,dbfr3qs/moto,2rs2ts/moto,js...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'jacob'\nimport ROOT\nimport numpy as np\nimport os\nfrom root_numpy import root2array, root2rec, tree2rec\n\n# Look at r284484 data\n\nfilename = os.path.join(\"data\", \"r284484.root\")\n\n# Convert a TTree in a ROOT file int...
python
edit
4
0
mit
91709b78c27ed0e05f3c67fcc13ffa8085dac15a
jacobbieker/ATLAS-Luminosity
heavy-ion-luminosity.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\ntry:\n from urllib import urlencode\nexcept ImportError:\n from urllib.parse import urlencode\n\n\ndef urlencode(string):\n return urlencode(string)\n\n```\n\nApply this change: Add...
python
edit
1
1
mit
688bec4dc00dd1040901ca446c6b6cc7fa6fbbcb
Storj/downstream-farmer
downstream-farmer/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport lldb\nimport lldbutil\n\ndef stop_if_called_from_a():\n # lldb.debugger_unique_id stores the id of the debugger associated with us.\n dbg = lldb.SBDebugger.FindDebuggerWithID(lldb.debugger_unique_id)\n\n # Perfor...
python
edit
3
4
apache-2.0
17ac79bd57c1d89767bffccfec755df159205e2c
apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb
test/conditional_break/conditional_break.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nwith open('requirements.txt') as f:\n required = f.read().splitlines()\n\nsetup(\n name=\"pysovo\",\n version=\"0.4.1\",\n packages=['pysovo', 'pysovo.comms',\n ...
python
edit
1
0
bsd-2-clause
0e400261b2dad04dc9f290cdbc5b16222487d4e3
timstaley/pysovo
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nLevel 1 file for creating Eddystone beacons\n\"\"\"\nfrom bluezero import tools\nfrom bluezero import broadcaster\n\n\nclass EddystoneURL:\n def __init__(self, url):\n service_data = tools.url_to_advert(url, 0x10, 0x00)\n ...
python
edit
1
2
mit
5352e164b38099cbc7fe4eba87c00bc1c1d30d44
ukBaz/python-bluezero,ukBaz/python-bluezero
bluezero/eddystone.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\nimport time\n\n\nTIMEOUTS = defaultdict(list)\n\n\ndef windows(*args, **kwargs):\n return []\n\n\ndef set_timeout(func, timeout, *args, **kwargs):\n then = time.time() + timeout\n TIMEOUTS[then]...
python
edit
1
5
apache-2.0
a71c6c03b02a15674fac0995d120f5c2180e8767
Floobits/floobits-neovim,Floobits/floobits-neovim-old,Floobits/floobits-vim
plugin/floo/sublime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport urllib2\nimport json\nimport re\n\n# album_url = 'http://www.ximalaya.com/7712455/album/6333174'\nalbum_url = 'http://www.ximalaya.com/7712455/album/4474664'\nheaders = {'User-Agent': 'Safari/537.36'}\nresp = urllib...
python
edit
2
0
mit
04f3003c8ac261edd862323624bbdba565b9e36c
bangbangbear/ximalayaDownloader
download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging.handlers\n\nimport coloredlogs\n\n\ndef configure(verbose=False):\n logging_level = logging.INFO if verbose else logging.DEBUG\n\n logging.captureWarnings(True)\n\n log_format = \"%(asctime)-20s %(module)-11s %(level...
python
edit
1
2
mit
e910c9f3ee3fec868f2a6dfb7b7d337440cbb768
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
virtool/logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add column for profile picture type to User\n\nRevision ID: f37d509e221c\nRevises: c997dc927fbc\nCreate Date: 2020-09-04 15:43:18.413156\n\"\"\"\n\nimport sqlalchemy as sa\nfrom alembic import op\n\nfrom indico.core.db.sqlalchemy impo...
python
edit
1
1
mit
0c89a78d3a0574ef491d3695366cd786b4c3f950
DirkHoffmann/indico,indico/indico,DirkHoffmann/indico,ThiefMaster/indico,indico/indico,indico/indico,pferreir/indico,ThiefMaster/indico,pferreir/indico,pferreir/indico,pferreir/indico,indico/indico,ThiefMaster/indico,DirkHoffmann/indico,DirkHoffmann/indico,ThiefMaster/indico
indico/migrations/versions/20200904_1543_f37d509e221c_add_user_profile_picture_column.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .affine import Affine\nfrom ... import describe\nfrom ...describe import Dimension, Synapses, Biases\nfrom ...check import has_shape\nfrom ... import check\n\n\n@describe.attributes(\n W=Synapses(\"Weights matrix\",\n lambda ...
python
edit
4
2
mit
d0bf235af3742a17c722488fe3679d5b73a0d945
spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
thinc/neural/_classes/softmax.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\nfrom __future__ import print_function\n\nimport multyvac\n\nmultyvac.config.set_key(api_key='admin', api_secret_key='12345', api_url='http://docker:8000/v1')\n\ndef add(a, b):\n return a + b\n\njid = multyvac.sub...
python
edit
1
1
bsd-3-clause
06e858fc86f8f34ccae521cb269c959569f53f97
cloudpipe/cloudpipe,cloudpipe/cloudpipe,cloudpipe/cloudpipe
script/sample/submitpython.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tempfile\n\nimport pytest\n\nfrom pre_commit_hooks.pretty_format_json import pretty_format_json\nfrom testing.util import get_resource_path\n\n\n@pytest.mark.parametrize(('filename', 'expected_retval'), (\n ('not_pretty_formatted_...
python
edit
1
1
mit
7376a29d69ac78cabc5d392cb748f708ffa0e68c
Coverfox/pre-commit-hooks,Harwood/pre-commit-hooks,pre-commit/pre-commit-hooks
tests/pretty_format_json_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport time\n\nfrom redis import StrictRedis\nfrom rq import Queue\nfrom apscheduler.schedulers.blocking import BlockingScheduler\n\nsys.path.append('/usr/local/d1lod')\nfrom d1lod import jobs\n\nconn = StrictRedis(ho...
python
edit
5
1
apache-2.0
1b6217eea2284814583447901661823f3a3d0240
ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod
service/scheduler/schedule.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n====================================\nPlotting simple exponential function\n====================================\n\nA simple example of the plot of a exponential function\nin order to test the autonomy of th...
python
edit
1
0
bsd-3-clause
07d2ffe3c14a6c908a7bf138f40ba8d49bf7b2c3
lesteve/sphinx-gallery,Eric89GXL/sphinx-gallery,sphinx-gallery/sphinx-gallery,Titan-C/sphinx-gallery,lesteve/sphinx-gallery,Titan-C/sphinx-gallery,Eric89GXL/sphinx-gallery,sphinx-gallery/sphinx-gallery
examples/plot_grow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.blueprints.news.views\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom flask import abort, g\n\nfrom ...s...
python
edit
1
2
bsd-3-clause
f7c9bbd5ac49254d564a56ba3713b55abcfa4079
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
byceps/blueprints/news/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom . import BaseTestCase\n\nfrom ..models import Channel\n\n\nclass TestCoreModels(BaseTestCase):\n def setUp(self):\n # Create method was not returning the created object with\n # the create() method\n ...
python
edit
2
1
mit
5b8ff4276fbe92d5ccd5fa63fecccc5ff7d571a9
romulocollopy/quokka,felipevolpone/quokka,lnick/quokka,ChengChiongWah/quokka,felipevolpone/quokka,wushuyi/quokka,wushuyi/quokka,cbeloni/quokka,felipevolpone/quokka,CoolCloud/quokka,ChengChiongWah/quokka,lnick/quokka,romulocollopy/quokka,Ckai1991/quokka,cbeloni/quokka,CoolCloud/quokka,alexandre/quokka,felipevolpone/quok...
quokka/core/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404\nfrom django.views.decorators.cache import cache_page\nfrom django.conf import settings\nfrom django.utils.decorators import method_decorator\nfrom djgeojson.views import GeoJSONLayerView\n\nfr...
python
edit
1
1
bsd-2-clause
34db760c5b763ad2df02398d58ea417b47b785e7
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/zoning/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport logging.config\n\nLOG_CONFIG = {\n 'version': 1,\n 'formatters': {\n 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'}\n },\n 'handlers': {\n 'default': {\n 'class': '...
python
edit
2
1
mit
3ef1531f6934055a416cdddc694f6ca75694d649
snare/voltron,snare/voltron,snare/voltron,snare/voltron
voltron/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rospy\nfrom time import time\n\n\ndef wait_for_param(param_name, timeout=None, poll_rate=0.1):\n '''Blocking wait for a parameter named $parameter_name to exist\n Poll at frequency $poll_rate\n Once the parameter exi...
python
edit
4
5
mit
3875b1ec7d056d337cc1c02d9567cd7ff1ae9748
pemami4911/Sub8,pemami4911/Sub8,pemami4911/Sub8
utils/sub8_ros_tools/sub8_ros_tools/init_helpers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport distarray as da\nfrom distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError\n\n\nclass TestDistributedArrayProtocol(unittest.TestCase):\n\n def setUp(self):\n try:\n comm = creat...
python
edit
1
2
bsd-3-clause
2e3045ed1009a60fe6e236387cae68ddf63bb9b5
enthought/distarray,enthought/distarray,RaoUmer/distarray,RaoUmer/distarray
distarray/core/tests/test_distributed_array_protocol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url, include\n\n\nurlpatterns = patterns('',\n url(r'', include(patterns('',\n url(r'^$', include('serrano.resources')),\n url(r'^fields/', include('serrano.resources.field')),\n ...
python
edit
3
0
bsd-2-clause
3c1523f2fc3fec918f451a7dc361be9eb631524c
chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night,chop-dbhi/serrano
serrano/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nThese are tests to assist with creating :class:`.LinearOperator`.\n'''\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\ndef adjointTest(O, significant = 7):\n ''' Test for verifying forward and adjoint functions in ...
python
edit
1
1
bsd-3-clause
11b70d10b07c38c1d84b58f5e8563a43c44d8f91
ryanorendorff/pyop
pyop/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Resource, ResourceLink, IntendedAudience\nfrom rest_framework import serializers\n\n\nclass ResourceLinkSerializer(serializers.ModelSerializer):\n class Meta:\n model = ResourceLink\n fields = ('link_typ...
python
edit
1
0
apache-2.0
21dbb8af7412c04b768a9d68e1f8566786d5100c
uw-it-aca/mdot-rest,uw-it-aca/mdot-rest
mdot_rest/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Test the virtual IO system. \"\"\"\nfrom StringIO import StringIO\nimport sys\nimport os\n\nfrom mock import call\nfrom mock import patch\nimport pytest\n\nsys.path.append(os.path.join('..', '..', 'snake'))\nfrom snake.vm import Syst...
python
edit
1
1
bsd-3-clause
5a7b3e024eba2e279ada9aa33352046ab35b28f5
travcunn/snake-vm
tests/test_io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nProxy Server \"Phone Book\".\n\nSimplify running browser tests through a proxy server\nby adding your frequently-used proxies here.\n\nNow you can do something like this on the command line:\n\"pytest SOME_TEST.py --proxy=proxy1\"\n...
python
edit
1
0
mit
71cb7a3d83cbb352a358ba8ac260584a6666b5ad
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
seleniumbase/config/proxy_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix the imports for Python 3" }, { "role": "assistant", "content": "from .mdsxray import open_mdsdataset\nfrom .gridops import GCMDataset\nfrom .regridding import regrid_vertical\n" } ]
python
new_file
5
0
mit
be3cfd7033097bbc073e05c232f702bbcbfbd4db
rabernat/xmitgcm,xgcm/xmitgcm,sambarluc/xmitgcm,xgcm/xgcm,rabernat/xgcm
xgcm/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Node(object):\n \"\"\" \"\"\"\n def __init__(self, value, pointer=None):\n self.value = value\n self.pointer = pointer\n\n\nclass LinkedList(object):\n \"\"\" \"\"\"\n def __init_...
python
edit
1
1
mit
f29377a4f7208d75490e550a732a24cb6f471f18
jefferyrayrussell/data-structures
linked_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file contains the project wide settings. It is not\n# part of version control and it should be adapted to\n# suit each deployment. \n\nfrom os import environ\n\n\n# Use the absolute path to the directory that stores the data.\n# This...
python
edit
3
0
mit
6fcc041c45dc426d570aa4c44e48c3fc9d8fd5c0
CentreForCorpusResearch/clic,CentreForCorpusResearch/clic,CentreForResearchInAppliedLinguistics/clic,CentreForResearchInAppliedLinguistics/clic,CentreForResearchInAppliedLinguistics/clic,CentreForCorpusResearch/clic
settings/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport boto3\n\n\ndef create_session(profile_name):\n if not profile_name:\n return boto3\n else:\n return boto3.Session(profile_name=profile_name)\n\n```\n\nApply this change: Add error message ...
python
edit
3
3
mit
6be3a40010b7256cb5b8fadfe4ef40b6c5691a06
achiku/jungle
jungle/session.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport os\n\nfrom .local import *\n\nEMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'\n\nif 'TRAVIS' not in os.environ:\n LOGGING = {\n 'version': 1,\n 'disable_existin...
python
edit
8
0
mit
fff33f238d840b89350d50e2349af8f60f298a2a
annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc
openprescribing/openprescribing/settings/test.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom blinker import ANY\nfrom urlparse import urlparse\nfrom contextlib import contextmanager\nfrom addons.osfstorage import settings as osfstorage_settings\n\n\ndef create_test_file(node, user, filename='test_file', create_guid=True):\n ...
python
edit
1
3
apache-2.0
1af120a5ce7f2fc35aeb7e77a747b0e8382bba51
mattclark/osf.io,cslzchen/osf.io,HalcyonChimera/osf.io,mfraezz/osf.io,mattclark/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,adlius/osf.io,pattisdr/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,mattclark/osf.io,mfraezz/osf.io,mfraezz/osf.io,cslzchen/osf.i...
api_tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom grow.pods import pods\nfrom grow.pods import storage\nfrom grow.conversion import *\nimport click\nimport os\n\n\n@click.command()\n@click.argument('pod_path', default='.')\n@click.option('--type', type=click.Choice(['content_locale_sp...
python
edit
1
2
mit
1d88ea54d1f4ce63893b906a5b79faa4dd25243f
grow/pygrow,grow/pygrow,grow/pygrow,grow/grow,grow/grow,grow/grow,grow/grow
grow/commands/convert.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test import support\n# Skip test if _tkinter wasn't built.\nsupport.import_module('_tkinter')\n\nimport tkinter\nfrom tkinter.test import runtktests\nimport unittest\n\n\nimport tkinter\n\ntry:\n tkinter.Button()\nexcept tkinter.Tcl...
python
edit
1
4
mit
d96b07d529ea7ced5cbe5f5accaa84485e14395a
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_tk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Share utility functions.\"\"\"\n\nfrom urllib import parse\n\n\ndef get_route_value(environ, name):\n value = environ['wsgiorg.routing_args'][1][name]\n value = parse.unquote(value)\n return value.replace('%2F', '/')\n\n```\n...
python
edit
1
1
apache-2.0
666d9c999ebf0cc388d8f045a04756424c2d9b62
cdent/gabbi-demo,cdent/gabbi-demo
gdemo/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# We're going to simulate how evolution_master should import things\n\nfrom genes import golang\nfrom genes import web_cli\n\n# etc...\n\n```\n\nApply this change: Change simulated around for existing modules" }, ...
python
edit
4
0
mit
4d4de16969439c71f0e9e15b32b26bd4b7310e8f
hatchery/Genepool2,hatchery/genepool
Simulated_import.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Virgil Dupras\n\n# This software is licensed under the \"BSD\" License as described in the \"LICENSE\" file,\n# which should be included with this package. The terms are also available at\n# http://www.hardcoded.net/license...
python
edit
2
0
bsd-3-clause
3071684f73e736950023be9f47c93dd31c50be1c
hsoft/send2trash
send2trash/compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# MAKE IT UNICODE OK\nimport sys\nreload( sys )\nsys.setdefaultencoding( 'utf-8' )\n\nimport os, sys\nimport Bot\nimport logging\n\t\nif __name__ == '__main__':\n\tlogging.basicConfig( level = logging.DEBUG, format ...
python
edit
3
0
mit
33328f7d6c3fbab4a7ae968103828ac40463543b
jawsper/modularirc
__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import FlaskForm\nfrom wtforms import StringField, PasswordField\nfrom wtforms.validators import DataRequired, Email\n\n\nclass Login(FlaskForm):\n username = StringField('Username', validators=[DataRequired()])\n passw...
python
edit
3
3
mit
b98bd25a8b25ca055ca92393f24b6a04382457a8
openedoo/module_employee,openedoo/module_employee,openedoo/module_employee
forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom uuid import uuid4\nimport hashlib\n\n\ndef _get_rand_hash():\n uid = uuid4()\n return hashlib.sha1(str(uid)).hexdigest()\n\n\ndef generate_token_secret():\n return _get_rand_hash(), _get_rand_hash...
python
edit
1
1
bsd-2-clause
a094d29959243777fad47ea38b4497d891b9990e
honza/oauth-service,honza/oauth-service
data/data/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rpython.rlib.streamio import Stream, StreamError\n\nclass StringStream(Stream):\n def __init__(self, string):\n self._string = string\n self.pos = 0\n self.max = len(string) - 1\n\n def write(self, da...
python
edit
1
4
mit
e1c6b7c369395208b467fcf169b6e3d0eb8c8dd9
SOM-st/RPySOM,smarr/RTruffleSOM,smarr/RTruffleSOM,smarr/PySOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,SOM-st/PySOM,SOM-st/RTruffleSOM,SOM-st/PySOM,smarr/PySOM
src/rlib/string_stream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lib.config import Config\nfrom slackclient import SlackClient\n\nclass Tubey():\n\n def __init__(self, **kwargs):\n ### Cache the client in memory ###\n self._client = None\n\n def get_client(self):\n ### Fet...
python
edit
2
2
mit
63ee144892ed0e740b87cb87895cf07d78b87d1f
ImShady/Tubey
lib/slack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nChatterBot is a machine learning, conversational dialog engine.\n\"\"\"\nfrom .chatterbot import ChatBot\n\n__version__ = '0.6.0'\n__author__ = 'Gunther Cox'\n__email__ = '<EMAIL>'\n__url__ = 'https://github.com/gunthercox/ChatterBo...
python
edit
1
0
bsd-3-clause
e94f2cb6dd144cec7b10aecb29669e7ba2ef98b1
gunthercox/ChatterBot,vkosuri/ChatterBot
chatterbot/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom salt.exceptions import CommandExecutionError\n\n\n@pytest.fixture(scope=\"module\", autouse=True)\ndef install_npm(sminion):\n try:\n sminion.functions.pkg.install(\"npm\")\n # Just name the thing we're ...
python
edit
1
2
apache-2.0
087a706fb8cadf98e3bd515427665997ca2001ba
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/functional/states/test_npm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pass in a Couchdb doc, get back one with de-duplicated sourceResource values\n\n\ndef dedup_sourceresource(doc):\n ''' Look for duplicate values in the doc['sourceResource'] and \n remove.\n Values must be *exactly* the same\n ...
python
edit
1
5
bsd-3-clause
cd30723af9f82b7a91d1ad1e2a5b86f88d8f4b17
barbarahui/harvester,ucldc/harvester,ucldc/harvester,mredar/harvester,mredar/harvester,barbarahui/harvester
harvester/post_processing/dedup_sourceresource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nNeuPy is the Artificial Neural Network library implemented in Python.\n\"\"\"\n\n\n__version__ = '0.2.1'\n\n```\n\nApply this change: Set up version 0.3.0 dev 1." }, { "role": "assistant", "content": "\"\"\"\nNeuPy is th...
python
edit
1
0
mit
0261930771864cc4cdba58ece3959020fb499cd1
itdxer/neupy,itdxer/neupy,itdxer/neupy,itdxer/neupy
neupy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"podium URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.11/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app imp...
python
edit
3
0
mit
6443a0fed1b915745c591f425027d07216d28e12
pyatl/podium-django,pyatl/podium-django,pyatl/podium-django
podium/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2016, Digital Reasoning\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 Lice...
python
edit
1
2
apache-2.0
0c50fa3feaf61b2cafddf6a7a530e4181d21105d
stackdio/stackdio,stackdio/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio
stackdio/core/templatetags/stackdio.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom echo_client import client\n\n\ndef test_ok():\n response = client('GET a_web_page.html HTTP/1.1').split('\\r\\n')\n first_line = response[0]\n assert first_line == 'HTTP/1.1 200 OK'\n\n\ndef test_body():\n response = client...
python
edit
1
1
mit
fd87d09b03be003dcd13d778c175f796c4fdf7d6
jwarren116/network-tools,jwarren116/network-tools
test_http2_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nclass Params(object):\n\t'''\n The purpose of this class is for accesing params via dot notation.\n '''\n pass\n```\n\nApply this change: Change tabs with spaces. Sorry." }, { "role": "assistant", "content": "\n\ncl...
python
edit
1
0
mit
18541b80ea1a7e2d6a73bf58e40bac53b97b02fd
bunnyinc/django-oidc-provider,wayward710/django-oidc-provider,ByteInternet/django-oidc-provider,wojtek-fliposports/django-oidc-provider,Sjord/django-oidc-provider,django-py/django-openid-provider,Sjord/django-oidc-provider,juanifioren/django-oidc-provider,bunnyinc/django-oidc-provider,torreco/django-oidc-provider,djang...
openid_provider/lib/utils/params.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 Huawei Technologies Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n...
python
edit
1
1
apache-2.0
04c32537f7925aaeb54d8d7aa6da34ce85479c2c
openstack/mistral-dashboard,openstack/mistral-dashboard,openstack/mistral-dashboard
mistraldashboard/test/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nimport sys\n\ntry:\n from StringIO import StringIO\nexcept ImportError:\n from io import StringIO\n\n\n@contextmanager\ndef captured_output():\n \"\"\"Allows to safely capture stdout and stder...
python
edit
1
2
mit
4ddce41a126395141738f4cd02b2c0589f0f1577
bertrandvidal/parse_this
test/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom unittest import TestCase\n\nimport requests\n\nfrom furikura import utils\n\n\ndef test_request():\n requests.get('https://example.com')\n\nclass TestUtils(TestCase):\n def test_get_file(self):\n self.assertEqua...
python
edit
1
1
mit
f7acd07138abff6028fe6ce39f12ede04b5d7c9a
benjamindean/furi-kura,benjamindean/furi-kura
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.4 on 2017-08-24 02:39\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\ndef fix_realm_string_ids(apps, schema_editor):\n # type: (StateApps, DatabaseSchema...
python
edit
4
3
apache-2.0
632180274abe4cf91f65cf0e84f817dc7124e293
eeshangarg/zulip,Galexrt/zulip,shubhamdhama/zulip,punchagan/zulip,Galexrt/zulip,tommyip/zulip,brainwane/zulip,tommyip/zulip,zulip/zulip,brainwane/zulip,punchagan/zulip,eeshangarg/zulip,rht/zulip,timabbott/zulip,rht/zulip,zulip/zulip,andersk/zulip,synicalsyntax/zulip,brainwane/zulip,rht/zulip,eeshangarg/zulip,rishig/zul...
zerver/migrations/0108_fix_default_string_id.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\n\n# atrocious and unholy!\ndef get_my_path():\n import fake\n return os.path.dirname(str(fake).split()[3][1:])\n\nlibpath = os.path.abspath(get_my_path())\n#print \"libpath =\", libpath\nos.environ['PATH'] =...
python
edit
2
1
mit
e68836173dec1e1fe80e07cca8eb67ebe19e424e
ruleless/CEGUI,OpenTechEngine/CEGUI,ruleless/CEGUI,ruleless/CEGUI,ruleless/CEGUI,OpenTechEngine/CEGUI,OpenTechEngine/CEGUI,OpenTechEngine/CEGUI
cegui/src/ScriptingModules/PythonScriptModule/bindings/distutils/PyCEGUI/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chainer import cuda\nfrom chainer.functions import matmul\nfrom chainer.functions import transpose\nfrom chainer.functions import softmax_cross_entropy\nfrom chainer.functions import batch_l2_norm_squared\n\n\ndef n_pair_mc_loss(f, f_p...
python
edit
1
1
mit
d3933d58b2ebcb0fb0c6301344335ae018973774
ronekko/deep_metric_learning
n_pair_mc_loss.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app.na_celery.email_tasks import send_emails\n\n\nclass WhenProcessingSendEmailsTask:\n\n def it_calls_send_email_to_task(self, mocker, db, db_session, sample_admin_user, sample_email):\n mock_send_email = mocker.patch('app.n...
python
edit
1
1
mit
a797f4862ccfdb84ff87f0f64a6abdc405823215
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
tests/app/na_celery/test_email_tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Utility functions for PhotoScan processing \"\"\"\n\nimport os, sys\nimport PhotoScan\n\ndef align_and_clean_photos(chunk):\n ncameras = len(chunk.cameras)\n for frame in chunk.frames:\n frame.matchPhotos()\n\n chunk....
python
edit
null
null
mit
05e19922a5a0f7268ce1a34e25e5deb8e9a2f5d3
rmsare/sfmtools
sfmtools.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Module for generating Barcode Checksum Poster resource.\"\"\"\n\nfrom PIL import Image\nfrom utils.retrieve_query_parameter import retrieve_query_parameter\n\n\ndef resource_image(request, resource):\n \"\"\"Create a image for Barc...
python
edit
1
1
mit
49a275a268fba520252ee864c39934699c053d13
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
csunplugged/resources/views/barcode_checksum_poster.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nVerseBot for reddit\nBy Matthieu Grieger\nverse.py\nCopyright (c) 2015 Matthieu Grieger (MIT License)\n\"\"\"\n\nclass Verse:\n \"\"\" Class that holds the properties and methods of a Verse object. \"\"\"\n \n def __init__(...
python
edit
1
1
mit
990f4f3ec850525ac4fcb78b33031b60dbe25ce4
Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot
versebot/verse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\n\n\nclass OrderedModel(models.Model):\n \"\"\"\n An abstract model that allows objects to be order...
python
edit
4
4
bsd-3-clause
ed1a14ef8f2038950b7e56c7ae5c21daa1d6618a
foozmeat/django-ordered-model,foozmeat/django-ordered-model,pombredanne/django-ordered-model,pombredanne/django-ordered-model,pombredanne/django-ordered-model,foozmeat/django-ordered-model
ordered_model/models.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import Flask\n\n\nlog = logging.getLogger(__name__)\n\n\ndef create_app(config_dict):\n app = Flask(__name__, static_folder=None)\n app.config.update(**config_dict)\n\n from uiharu.api.views import api ...
python
edit
1
0
mit
805e67ad540e3072929dea30b8894af87fc622ef
kennydo/uiharu
uiharu/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is a simple cheatsheet webapp.\n\"\"\"\nimport os\n\nfrom flask import Flask, send_from_directory\nfrom flask_sslify import SSLify\n\nDIR = os.path.dirname(os.path.realpath(__file__))\nROOT = os.path.join(DIR, 'docs', '_build',...
python
edit
2
5
mit
9605b60fb537714c295dfa0f50313e38f89d2d88
caimaoy/pysheeet
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\ndef obfuscate_string(value):\n return ''.join(['&#%s;'.format(str(o...
python
edit
1
2
mit
0571864eb2d99b746386ace721b8e218f127c6ac
morninj/django-email-obfuscator
email_obfuscator/templatetags/email_obfuscator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import unicode_literals\n\n\n<<<<<<< HEAD\ndef check_statement1(value):\n output = 0\n while output >= 0:\n for item in value:\n if item == \")\":\n output -= 1\n...
python
edit
1
7
mit
db981f7616283992fd1d17a3b1bf7d300b8ee34f
constanthatz/data-structures
proper_parens.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='django-mingus',\n version='0.9.7',\n description='A django blog engine.',\n ...
python
edit
1
1
apache-2.0
a021b077834a932b5c8da6be49bb98e7862392d4
emorozov/django-mingus,emorozov/django-mingus,emorozov/django-mingus,emorozov/django-mingus
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyqode.qt import QtCore\nfrom pyqode.qt.QtTest import QTest\nfrom pyqode.core.api import TextHelper\nfrom pyqode.core import modes\nfrom test.helpers import editor_open\n\n\ndef get_mode(editor):\n return editor.modes.get(modes.Smar...
python
edit
1
1
mit
40edd4a635dd8f83a21f15f22883e7dae8d8d0a8
pyQode/pyqode.core,zwadar/pyqode.core,pyQode/pyqode.core
test/test_modes/test_backspace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport numpy as np\nimport numpy.ma as ma\n\nimport projections.r2py.reval as reval\nimport projections.r2py.rparser as rparser\n\nclass SimpleExpr():\n def __init__(self, name, expr):\n self.name = name\n self.tree = reval.make_in...
python
edit
1
3
apache-2.0
c8c9c42f14c742c6fcb180b7a3cc1bab1655ac46
ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project
projections/simpleexpr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom Sensor import SenseController\nfrom KeyDispatcher import KeyDispatcher\nfrom Display import Display\nfrom DataLogger import SQLiteLogger\nimport time\n\n\nDEVICE = \"PiSense\"\nDELAY = 0.0\n\n\nclass Handler:\...
python
edit
1
3
mit
0de0818e5a0c52dde8c841d8e8254e2f4a3f9633
gizmo-cda/g2x,thelonious/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x
app/sense.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for input manipulation machinery.\"\"\"\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\nimport nose.to...
python
edit
4
3
bsd-3-clause
7f127ae718ada85c66342a7d995aab21cb214a46
ipython/ipython,ipython/ipython
IPython/core/tests/test_prefilter.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Performance tests on concrete code execution without invoking Unicorn engine\n\nimport os\nimport time\nimport logging\n\nimport angr\n\n\ntest_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binari...
python
edit
3
1
bsd-2-clause
5a82f76e3e95268fb1bbb297faa43e7f7cb59058
angr/angr,schieb/angr,schieb/angr,iamahuman/angr,schieb/angr,iamahuman/angr,angr/angr,iamahuman/angr,angr/angr
tests/perf_concrete_execution.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Distutils import build_ext\n\n\ncore = Extension(\n 'geopy.core', \n [\"geopy/core.pyx\"], \n language='c++', \n lib...
python
edit
1
0
bsd-3-clause
a6f0b0db3e32c71e89d73db8997308e67aae294f
FRidh/python-geometry
setup_cython.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport os\nimport json\nimport time\n\nfrom urllib import request\n\n# Create the requested json\ndemo_json = {\n \"payload\": {\n \"aud\": \"ANY\",\n \"ver\": \"scitokens:2.0\",\n \"scope\": \"...
python
edit
1
0
apache-2.0
36ea751618287a75fc82db500d953d4fa40b373b
matyasselmeci/htcondor-ce,brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce
tests/containers/entrypoint/renew-demo-token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nglobal adjectives, animals, rares\n\nwith open('adjectives.txt') as f:\n adjectives = f.readlines()\n\nwith open('animals.txt') as f:\n animals = f.readlines()\n\nwith open('rares.txt') as f:\n rares = f.readlines(...
python
edit
1
7
unlicense
b2cac05be3f6c510edfaf1ae478fabdcf06fd19a
rotated8/mgsv_names
mgsv_names.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bullsandcows import isdebugmode\r\n\r\ndef test_isdebugmode():\r\n assert isdebugmode() == 0, \"program is in debug mode, this should not be commited\"\r\n\n```\n\nApply this change: Test modified to work with renamed debug function...
python
edit
1
1
mit
1b06091101c119f30eb5eabb2d2638fab0e8f658
petrgabrlik/BullsAndCows
test_debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 SAP SE.\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# http: //www.apache.org/lic...
python
edit
2
2
apache-2.0
f91a39b7d85021459c865a6b7a74aae21085f19d
SAP/sqlalchemy-hana
test/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.template import Context\nfrom django.template.loader import get_template\nfrom _base import BaseExporter\n\n\nclass HTMLExporter(BaseExporter):\n preferred_formats = ('html', 'string')\n\n def write(self, iterable, buff=No...
python
edit
2
7
bsd-2-clause
c1d6e066ea622cc3fa7cec33cb77aa12e43a6519
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
avocado/exporters/_html.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport six\n\nfrom formats import FormatBank, discover_json, discover_yaml\n\n\nformats = FormatBank()\n\ndiscover_json(formats, content_type='application/json')\ndiscover_yaml(formats, content_type='application/x...
python
edit
1
4
mit
cde7dbd5a1bb83e85e15559120189d108f6f66aa
redodo/tortilla
tortilla/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tools for checking environment variables\"\"\"\n\nimport os\nfrom configparser import NoOptionError\n\nfrom .config import CONFIG\n\ndef path_sufficient():\n \"\"\"\n Checks whether all of the given paths are in the PATH environ...
python
edit
3
3
mit
4bac0cfeb2d8def6183b4249f0ea93329b282cb4
jackstanek/BotBot,jackstanek/BotBot
botbot/envchecks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sys import argv, stderr\nfrom drawer import *\nfrom kmeans import kmeans\n\n\ndef read_vectors(file_name):\n result = None\n with open(file_name, 'r') as f:\n vector_length = int(f.readline())\n vectors = list(map(l...
python
edit
4
3
mit
769c83564d5f2272837c2fbea6d781110b71b8ca
vanashimko/k-means
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\nimport mailchimp\n\nfrom django.contrib import messages\nfrom django.conf import settings\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\n\nfrom us_ignite.mailinglist.forms impo...
python
edit
4
5
bsd-3-clause
5c40cbfcb89649738945eda02c1bfb804e2ecdae
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/mailinglist/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework import routers\n\nimport service.authors.views\nimport service.friendrequest.views\nimport service.users.views\nimport service.nodes.views\nimport service.posts.views\n\nrouter ...
python
edit
1
0
apache-2.0
7a37e7ab531c151b6426dcf04647e063f3c0b0d6
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
service/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .configure import configure_kubeconfig, configure_kubernetes_component\nfrom .install import install_kubernetes\n\n\ndef deploy_kubernetes_master(etcd_nodes):\n # Install server components\n install_kubernetes(components=(\n ...
python
edit
1
1
mit
2c05dba69c838cfd3808d8e03dbea3cc56d4f6d2
EDITD/pyinfra-kubernetes,EDITD/pyinfra-kubernetes
pyinfra_kubernetes/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer\n\nclass JSONAPIRenderer(JSONRenderer):\n format = \"jsonapi\"\n media_type = 'application/vnd.api+json'\n\n def render(self, data, accepted_media_t...
python
edit
1
2
apache-2.0
e2ac721cb3e745a149e039aec0f71d33d1e28efc
adlius/osf.io,brandonPurvis/osf.io,mattclark/osf.io,Johnetordoff/osf.io,amyshi188/osf.io,CenterForOpenScience/osf.io,SSJohns/osf.io,emetsger/osf.io,kch8qx/osf.io,samchrisinger/osf.io,samchrisinger/osf.io,kch8qx/osf.io,rdhyee/osf.io,binoculars/osf.io,aaxelb/osf.io,samchrisinger/osf.io,hmoco/osf.io,binoculars/osf.io,TomH...
api/base/renderers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2015, Sebastian Linke\n\n# Released under the Simplified BSD license\n# (see LICENSE file for details).\n\n\"\"\"\nConstants that are used by `shcol` in many places. This is meant to modified (i...
python
edit
1
0
bsd-2-clause
0bd84e74a30806f1e317288aa5dee87b4c669790
seblin/shcol
shcol/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .test_common import CommonTestCase\nfrom ..runner import Runner, RunnerForm\nfrom ..utils import xml_from_file\n\n\nclass RunnerTestCase(CommonTestCase):\n\n def setUp(self):\n super(RunnerTestCase, self).setUp()\n\n s...
python
edit
1
1
mit
539bd8a9df362f285bda375732ec71b3df1bcaae
bobslee/orbeon-xml-api
orbeon_xml_api/tests/test_runner.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# Copyright (C) 2008 John Paulett (john -at- paulett.org)\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part...
python
edit
1
1
bsd-3-clause
aa8820bd7b78ba5729e0a7a17e43b87bfd033980
mandx/jsonpickle,dongguangming/jsonpickle,dongguangming/jsonpickle,mandx/jsonpickle,mandx/jsonpickle,dongguangming/jsonpickle,mandx/jsonpickle,dongguangming/jsonpickle
tests/runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass AuthType(object):\n \"\"\"\n An auth type defines what write privileges an authenticated agent has.\n \"\"\"\n EVENT_DATA = 0\n MATCH_VIDEO = 1\n EVENT_TEAMS = 2\n EVENT_MATCHES = 3\n EVENT_RANKINGS = 4\n EV...
python
edit
1
0
mit
50fd28e67109f47893a6d38ede7f64758f3fe618
tsteward/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,the-...
consts/auth_type.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nnvcc_version_cmd = 'nvcc -V > output.txt'\nos.system(nvcc_version_cmd)\n\nwith open('output.txt') as f:\n lines = f.readlines()\n for line in lines:\n if \", release\" in line:\n start = line.index(', re...
python
edit
1
0
mit
7e738ddbc1a4585f92e605369f8d6dc1d986dbec
GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC
scripts/get_cuda_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# System imports first\nimport sys\n\n# Module (local) imports\nfrom import_data import import_data\nfrom process import process_data, normalize, rotate_data\nfrom output import plot_data\n\n\ndef main(argv=None):\n \"\"\" Main function,...
python
edit
4
1
bsd-3-clause
dd269cea5623450c3c608d10b8ddce1ae6c9e84a
dokterbob/slf-project-one
project_one/project_one.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom . import views\n\nurlpatterns = [\n url(r'^$', views.UwsgiStatus.as_view(), name='uwsgi_index'),\n url(r'^reload/$', views.UwsgiReload.as_view(), name='uwsgi_reload'),\n url(r'^clear...
python
edit
1
0
mit
67255ac86d2ef91ce355655112c919f2e08045b4
unbit/django-uwsgi,unbit/django-uwsgi
django_uwsgi/urls.py
accepted
null
true