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 setuptools import setup\n\n\nwith open('README.md') as readme_file:\n long_description = readme_file.read()\n\n\nsetup(\n name=\"ipuz\",\n version=\"0.1.1\",\n license=\"MIT\",\n description=\"Python library for reading ...
python
edit
1
0
mit
5844d7203a2f17752bbeca57dd404b83cc8ad475
svisser/ipuz
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Open list of correcly-spelled words.\nwordFile = open(\"words.txt\")\nthreshold = 8\nlistOfWords = input().split()\nindex = 0\n\ndef lev(a, b):\n if min(len(a), len(b)) == 0:\n return max(len(a), len(b))\n else:\n retu...
python
edit
1
4
mit
0498778db28fd2e2272b48fb84a99eece7b662ff
jmanuel1/spellingbee
autocorrect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport autocomplete_light\nfrom .models import Company\n\n\nclass CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):\n search_fields = ['^name']\n model = Company\nautocomplete_light.register(CompanyAutocomplete)\n\n```\n\...
python
edit
1
0
bsd-3-clause
764f8d9d7818076555cde5fcad29f3052b523771
KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend
company/autocomplete_light_registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom django.conf import settings\n\nDIR_NAME = os.path.dirname(__file__)\nsettings.configure(\n DEBUG=True,\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n }\n ...
python
edit
1
0
bsd-3-clause
06599b85719aa0c82da9635939bfcaf20b473fd3
Alir3z4/django-cuser
run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.mail import send_mail\n\n\n# TODO: check whether this should be sent from Phuxivator\ndef mailApplicantSubmission(context, sender='<EMAIL>'):\n name = context['name']\n receiver = context['email']\n\n subject = 'Ta...
python
edit
1
1
mit
0cd55ad979912112edb5e26381a2697f235c890a
Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io,Teknologforeningen/teknologr.io
teknologr/registration/mailutils.py
rejected_duplicate
Near-duplicate of sample 3548
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pytest import fixture\n\nfrom oshino.config import Config, RiemannConfig\n\n\n@fixture\ndef base_config():\n return Config({\"riemann\": {\"host\": \"localhost\",\n \"port\": 5555\n ...
python
edit
1
1
mit
0ac053e9c27f8381bb1aceff0bfdb12fc9c952cb
CodersOfTheNight/oshino
tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='xwing',\n version='0.0.1.dev0',\n url='https://github.com/victorpoluceno/xwing',\n license='ISC',\n description='Xwing is a Python library writen using that help '\n 'to...
python
edit
1
0
isc
69386a024e461a7b4a46f7c68d4512e0c7d4f277
victorpoluceno/xwing
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport reversi\n\n\nclass TestUM(unittest.TestCase):\n\n def setUp(self):\n self.board = reversi.ReversiBoard().set_default_board()\n\n def tearDown(self):\n self.board = None\n\n def test_up(self):\n...
python
edit
1
1
mit
4bf614e072a603f4b46038e2f59459c305844553
dmitrym0/reversi-py
ReversiTest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport graphene\nfrom django.http import Http404\nfrom graphql import GraphQLError\nfrom wagtail.core.models import Page\n\nfrom . import types\n\n\nclass Query(graphene.ObjectType):\n page = graphene.Field(types.Page, path=graphene.Stri...
python
edit
3
4
mit
6d291571dca59243c0a92f9955776e1acd2e87da
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/content/queries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n__author__ = '<EMAIL>'\n\nfrom setuptools import setup\n\n\nsetup(name=\"Power\",\n version=\"1.0\",\n description=\"Cross-platform system power status information.\",\n author=\"Ilya Kulakov\...
python
edit
1
0
mit
cc4be37ef6d1ed2b8d89f14a051514d56f05b43b
Kentzo/Power
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\n# We want to restrict newer versions while we deal with upstream breaking changes.\ndiscordpy_version = '==0.10.0'\n\n# TODO read README(.rst? .md looks bad on pypi) f...
python
edit
1
0
mit
9cb406e18cedf8995c31a1760968a1ee86423c5f
TAOTheCrab/CrabBot
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom copy import deepcopy\nfrom threading import Lock\n\nimport rospy\nfrom arc_utilities.ros_helpers import wait_for\n\n\nclass Listener:\n def __init__(self, topic_name, topic_type, wait_for_data=False):\n \"\"\"\n Listen...
python
edit
1
2
bsd-2-clause
b090c7ae0f5407562e3adc818d2f65ccd4ea7e02
WPI-ARC/arc_utilities,UM-ARM-Lab/arc_utilities,UM-ARM-Lab/arc_utilities,UM-ARM-Lab/arc_utilities,WPI-ARC/arc_utilities,WPI-ARC/arc_utilities
src/arc_utilities/listener.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.backends.base import BaseDictBackend\n\nfrom djcelery.models import TaskMeta, TaskSetMeta\n\n\nclass DatabaseBackend(BaseDictBackend):\n \"\"\"The database backends. Using Django models to store task metadata.\"\"\"\n\n de...
python
edit
1
2
bsd-3-clause
fc21802b68cf9a907218dab5b0e22cd8f1dc75d0
Amanit/django-celery,kanemra/django-celery,axiom-data-science/django-celery,celery/django-celery,alexhayes/django-celery,digimarc/django-celery,tkanemoto/django-celery,iris-edu-int/django-celery,CloudNcodeInc/django-celery,Amanit/django-celery,CloudNcodeInc/django-celery,iris-edu-int/django-celery,CloudNcodeInc/django-...
djcelery/backends/database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nsetup(\n name='Kozinaki',\n description='OpenStack multi-cloud driver for AWS, Azure',\n url='https://gith...
python
edit
1
1
apache-2.0
e7e2aa5d25f5c1d3c271948c98b6ef970e77c0b4
compunova/kozinaki
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n# Utility function to read the README file.\n# Used for the long_description. It's nice, because now 1) we have a top level\n# README file and 2) it's easier to type in the README f...
python
edit
1
1
bsd-3-clause
b2e378a747f4cd1172c9c8bffecda327c3dd25cc
sunlightlabs/nanospider
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom thefuck.rules.git_remote_seturl_add import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.mark.parametrize('command', [\n Command(script='git remote set-url origin url', stderr=\"fatal: No such r...
python
edit
1
1
mit
797b42cfd752d4ce43fdce616280710478420197
nvbn/thefuck,Clpsplug/thefuck,scorphus/thefuck,nvbn/thefuck,Clpsplug/thefuck,scorphus/thefuck,mlk/thefuck,SimenB/thefuck,SimenB/thefuck,mlk/thefuck
tests/rules/test_git_remote_seturl_add.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright (c) 2009 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\"\"\"Presubmit script for perf_expectations.\n\nS...
python
edit
1
4
bsd-3-clause
28fe69ab1bb9362a1ee105821ec4631b574417d3
littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,markYoungH/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,keishi/chromium,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crossw...
tools/perf_expectations/PRESUBMIT.py
rejected_duplicate
Near-duplicate of sample 864
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# A class which represents the CPU itself, the brain of the virtual\n# machine. It ties all the systems together and runs the story.\n#\n# For the license of this file, please consult the LICENSE file in the\n# root directory of this dis...
python
edit
2
1
bsd-3-clause
cf83c92ee2160a9d27d18347137b55b4a111228d
sussman/zvm,sussman/zvm
zvm/zcpu.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding:utf8 -*-\n\nimport httplib2\nfrom flask import Blueprint, redirect, request, Response, abort\n\nfrom model.oauth import OAuth\nfrom model.utils import Utils\n\n\ndrive = Blueprint('drive', __name__, url_prefix='/drive')\n\n\n...
python
edit
1
2
mit
d44a338e704732b9e3e7cb935eb2c9b38d2cfa06
supistar/Botnyan
api/drive.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# restfns - REST functions for azurerm\n\nimport requests\n\n# do_get(endpoint, access_token)\n# do an HTTP GET request and return JSON\ndef do_get(endpoint, access_token):\n headers = {\"Authorization\": 'Bearer ' + access_token}\n r...
python
edit
1
1
mit
f953a5e6b52301defc3aee1f191507ed7005caa1
gbowerman/azurerm
azurerm/restfns.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-yadt',\n\n url='https://chris-lamb.co.uk/projects/django-yadt',\n version='2.0.5',\n description=\"Yet Another Django Thumbnailer\",\n...
python
edit
1
0
bsd-3-clause
1fe9117c57a947eb22a1f269220d21553a131f02
lamby/django-yadt
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User, Group\nfrom rest_framework import serializers\n\nclass UserSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = User\n fields = ('url', 'username', 'email'...
python
edit
null
null
mit
2aed2eb4a1db5fba9d161a679c147f2260fb0780
orisi/fastcast
msg/serializers.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\ndef listify(filename):\n return filter(None, open(filename, 'r').read().strip('\\n').split('\\n'))\n\nsetup(\n name=\"distributex\",\n version=\"0.1\",\n url='http://github.com/calston/distribut...
python
edit
1
1
mit
7f7b3a73b33e6a2857520dd8b9e00b2dc17a04f3
calston/distributex
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nf = open(\"README.rst\")\ntry:\n try:\n readme_content = f.read()\n except:\n readme_content = \"\"\nfinally:\n f.close()\n\nsetup(\n name='restea',\n packages=['restea', 'restea....
python
edit
1
0
mit
16202e43ebc49f014763d3dc55bac3a691ccaadf
bodbdigr/restea
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef createBlankGrid(row,column):\n blankgrid = [[0 for x in range(column)] for y in range(row)]\n \n return blankgrid\n\ndef getHeight(grid):\n return len(grid)\n\ndef getWidth(grid):\n return len(gri...
python
edit
1
3
mit
ea1c62ae3f13d47ee820eae31a2e284e3d66b6ab
rorasa/RPiClockArray
libPiLite.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
2
apache-2.0
8c9739572aa679cb6d55cb31737bff6d304db2d1
briancurtin/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,dudymas/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-openstacksdk
openstack/tests/functional/network/v2/test_extension.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport os\n\nif \"publish\" in sys.argv[-1]:\n os.system(\"python setup.py sdist upload\")\n sys.exit()\n\ntry:\n from setuptools import setup\n setup\nexcept ImportError:\n from distutils.c...
python
edit
1
0
mit
6dc434de2b23f4a8e93e5969d52eb6f641b9665f
mrtommyb/K2fov,KeplerGO/K2fov
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a small test for renderer" }, { "role": "assistant", "content": "import mfr\nimport json\nfrom tests import utils\nfrom tornado import testing\n\n\nclass TestRenderHandler(utils.HandlerTestCase):\n\n @testing.gen_test\n ...
python
new_file
4
1
apache-2.0
3d1f4a241363d2acff056798e6cb459db1acfb1b
AddisonSchiller/modular-file-renderer,haoyuchen1992/modular-file-renderer,TomBaxter/modular-file-renderer,Johnetordoff/modular-file-renderer,TomBaxter/modular-file-renderer,rdhyee/modular-file-renderer,AddisonSchiller/modular-file-renderer,haoyuchen1992/modular-file-renderer,felliott/modular-file-renderer,Johnetordoff/...
tests/server/handlers/test_render.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='python-five91',\n version='0.1',\n description='Simple 591.com.tw wrapper',\n url='http://github.com/tzengyuxio/python-five91',\n author='Tzeng Yuxio',\n author_email='<EM...
python
edit
1
0
mit
f4c77f6e770bc8c5a8f16168a655f8e3a25a3d10
tzengyuxio/python-five91
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFilters for converting plain text to HTML and enhancing the\ntypographic appeal of text on the Web.\n\n\"\"\"\n\nfrom django.conf import settings\nfrom django.template import Library\nfrom template_utils.markup import formatter\n\nd...
python
edit
2
3
bsd-3-clause
b5e5a18bfb6071189d96f64ba9d86f91fc48fd66
dongpoliu/django-template-utils
template_utils/templatetags/generic_markup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ninstall_requires = [\n 'prompt_toolkit',\n 'pathlib',\n 'python-keystoneclient'\n]\n\ntest_requires = [\n 'mock'\n]\n\nsetup(\n name='contrail-api-cli',\n version='0.1a2',\n ...
python
edit
1
0
mit
7ae590a0ba1b8fba8eb6643c9a44fe848fe9c5ee
eonpatapon/contrail-api-cli
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import with_statement\nimport os.path\nimport tempfile\n\nfrom nose.tools import *\nfrom behave import configuration\n\n# one entry of each kind handled\nTEST_CONFIG='''[behave]\noutfile=/tmp/spam\npaths = /absolute/path\n ...
python
edit
8
1
bsd-2-clause
a8d2ede0a38188670f6921bd9c2f08ee073b0cdd
allanlewis/behave,allanlewis/behave,Gimpneek/behave,vrutkovs/behave,metaperl/behave,kymbert/behave,jenisys/behave,Abdoctor/behave,kymbert/behave,benthomasson/behave,mzcity123/behave,joshal/behave,charleswhchan/behave,joshal/behave,hugeinc/behave-parallel,benthomasson/behave,spacediver/behave,connorsml/behave,KevinOrtma...
test/test_configuration.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013-2014 Massachusetts Open Cloud Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the\n# License. You may obtain a copy of the License...
python
edit
1
0
apache-2.0
aba2ccc48fdae23c1e04eab705402e319c97e76a
apoorvemohan/haas,SahilTikale/switchHaaS,kylehogan/haas,henn/hil_sahil,henn/hil,kylehogan/hil,henn/hil,SahilTikale/haas,kylehogan/hil,meng-sun/hil,apoorvemohan/haas,CCI-MOC/haas,henn/hil_sahil,henn/haas,meng-sun/hil
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport pytest\n\nfrom hgtools import managers\n\n\ndef _ensure_present(mgr):\n\ttry:\n\t\tmgr.version()\n\texcept Exception:\n\t\tpytest.skip()\n\n\n@pytest.fixture\ndef hg_repo(tmpdir):\n\ttmpdir.chdir()\n\tmgr = managers.Merc...
python
edit
1
2
mit
5e3b712c4c2eac7227d6e894ce05db6f1ede074a
jaraco/hgtools
hgtools/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\nfrom setuptools import setup, find_packages\n\ntry:\n import multiprocessing # NOQA\nexcept ImportError:\n pass\n\ninstall_requires = ['mock']\nlint_requires = ['pep8', 'pyflakes']\ntests_require ...
python
edit
1
0
mit
6d0307c7d145b02f7659efbed164833983cf1fcc
Fluxx/exam,Fluxx/exam,gterzian/exam,gterzian/exam
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport re\nfrom setuptools import setup\n\n\ndef get_version(filename):\n content = open(filename).read()\n metadata = dict(re.findall(\"__([a-z]+)__ = '([^']+)'\", content))\n return meta...
python
edit
1
1
apache-2.0
381c2a53b9aa11acb140d7807fc218c003e14f5b
mopidy/mopidy-scrobbler,mthssdrbrg/mopidy-scrobbler
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'tests.db',\n },\n}\n\nINSTALLED_APPS = [\n 'django.contrib.auth',\n 'django.contrib.admin',\n 'django.contrib.sessions',\n 'dj...
python
edit
1
0
mit
60290b0ae96f144cc3b5672a47596355fe117ba7
ionelmc/django-easyfilters,ionelmc/django-easyfilters
tests/test_project/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom utils.testcase import EndpointTestCase\nfrom rest_framework import status\nfrom rest_framework.test import APIClient\n\nfrom django.utils.translation import ugettext_lazy as _\n\nimport sure\n\n\nclass TestUtils(EndpointTestCase):\n ...
python
edit
3
1
mit
3016872091618c78f60e17338f5581856a17f7af
Amoki/Amoki-Music,Amoki/Amoki-Music,Amoki/Amoki-Music
endpoints/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport pymongo\nimport bson\nimport time\nimport sys\nfrom mongo_connector import util\n\nmongo_url = 'mongodb://localhost:27017'\nif len(sys.argv) == 1:\n\tprint \"First argument is mongodb connection string, i.e. localh...
python
edit
2
0
apache-2.0
44e31e2153f4eec2863f9d712ab60f0ef00d1779
10gen-labs/mongo-connector,ShaneHarvey/mongo-connector,mongodb-labs/mongo-connector,10gen-labs/mongo-connector,mongodb-labs/mongo-connector,ShaneHarvey/mongo-connector
mongo_connector/get_last_oplog_timestamp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\n\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nclassifiers = [\n 'Development Status :: 4 - Beta',\n 'License :: OSI Approved :: BSD License',\n 'Programming Language :: Pyt...
python
edit
4
0
bsd-2-clause
a88452582e8d5ac01f9ccbdd3bf1736bf2209af2
getwarped/powershift-cluster,getwarped/powershift-cluster
setup.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\nimport platform\nimport sys\n\nBASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = '26dd65a62e35aa98b25c10cbfc00f1a621fd4c4b'\n\nARCH = {\n 'cygwin': '32bit',...
python
edit
2
1
mit
4663fdb44628238997ecc5adbb0f0193c99efc6c
Jonekee/electron,Faiz7412/electron,cos2004/electron,mubassirhayat/electron,smczk/electron,fomojola/electron,Jonekee/electron,IonicaBizauKitchen/electron,howmuchcomputer/electron,Floato/electron,bruce/electron,joaomoreno/atom-shell,tomashanacek/electron,ervinb/electron,gbn972/electron,Zagorakiss/electron,rhencke/electro...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 3285
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\n\nfrom django.test import TestCase\n\nfrom foirequest.tasks import _process_mail\nfrom foirequest.models import FoiRequest\n\n\nclass MailTest(TestCase):\n fixtures = ['publ...
python
edit
3
1
mit
aa82f91d220e8985c7f6dc68433ad65e70a71d15
catcosmo/froide,okfse/froide,fin/froide,stefanw/froide,catcosmo/froide,fin/froide,LilithWittmann/froide,LilithWittmann/froide,okfse/froide,LilithWittmann/froide,ryankanno/froide,stefanw/froide,LilithWittmann/froide,catcosmo/froide,catcosmo/froide,ryankanno/froide,CodeforHawaii/froide,okfse/froide,ryankanno/froide,ryank...
froide/foirequest/tests/test_mail.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n url(r'^$', 'lots_client.views.home', name='h...
python
edit
1
0
mit
d5cd1eddf1ecf0c463a90d0e69413aadd311977a
opencleveland/large-lots,skorasaurus/large-lots,opencleveland/large-lots,skorasaurus/large-lots,skorasaurus/large-lots,skorasaurus/large-lots,opencleveland/large-lots,opencleveland/large-lots
lots/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom setuptools import setup\nimport re\nfrom os import path\n\nversion = ''\nwith open('cliff/__init__.py', 'r') as fd:\n version = re.search(r'^__version__\\s*=\\s*[\\'\"]([^\\'\"]*)[\\'\"]', fd.read(), re.MULTI...
python
edit
1
0
mit
f1cba9b90d4b85a88b799a43a05807484e9b9910
c4fcm/CLIFF-API-Client
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = '0.21.0rc'\n\n\nfrom dicomweb_client.api import DICOMwebClient\n\n```\n\nApply this change: Increase package version for release" }, { "role": "assistant", "content": "__version__ = '0.21.0'\n\n\nfrom dicomweb_clie...
python
edit
3
0
mit
418b65554d86f6fea33d0656ef2a98cb32607fd9
MGHComputationalPathology/dicomweb-client
src/dicomweb_client/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/env python\n\"\"\"Runs the three manual-building scripts\"\"\"\nif __name__=='__main__':\n import os, sys\n d = os.path.dirname(sys.argv[0])\n\n #need a quiet mode for the test suite \n if '-s' in sys.argv: # 'silent\n...
python
edit
1
4
bsd-3-clause
af91b7c2612fab598ba50c0c0256f7e552098d92
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
reportlab/docs/genAll.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom skbuild import setup\n\nsetup(\n name=\"avogadrolibs\",\n version=\"0.0.8\",\n description=\"\",\n author='Kitware',\n license=\"BSD\",\n packages=['avogadro'],\n cmake_args=[\n '-DUSE_SPGLIB:BOOL=FALSE',\n ...
python
edit
1
0
bsd-3-clause
4b451e7c2e399baac311727de407db9138e97e56
ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = '0.1'\n\nimport os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.rst')).read()\nCHANGES = open(os.path.join(here, 'CHANGES.rst'))....
python
edit
1
0
mit
3187ff297b02eaf1c0b6debdb48d2f6396751947
bbangert/retools,0x1997/retools,mozilla-services/retools
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUnification is a generalization of Numpy broadcasting.\n\nIn Numpy we two arrays and broadcast them to yield similar\nshaped arrays.\n\nIn Blaze we take two arrays with more complex datashapes and\nunify the types prescribed by more...
python
edit
3
3
bsd-2-clause
6869d5edd706d95c8cadbd1945b29fdd3bfecd6b
seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core
blaze/datashape/unification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\nsetup(name=\"sysops-api\",\n version=\"1.0\",\n description=\"LinkedIn Redis / Cfengine API\",\n author = \"Mike Svoboda\",\n author_email = \"<EMAIL>\",\n ...
python
edit
1
0
apache-2.0
9ddc63eb0e1e3612ac4a1ea5b95e405ca0915b52
linkedin/sysops-api,linkedin/sysops-api,slietz/sysops-api,slietz/sysops-api
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nimport io\nimport os\n\ndef read(fname, encoding='utf-8'):\n here = os.path.dirname(__file__)\n with io.open(os.path.join(here, fname), encoding=encoding) as f:\n return f.read()\n\nsetup(\n n...
python
edit
1
1
apache-2.0
26bcb43a40a351b9ead4f2e5adb7d9a0e68e2777
moreati/b-prefix-all-the-doctests
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\"\"\"\nThis is an Astropy affiliated package.\n\"\"\"\n\n# Affiliated packages may add whatever they like to this file, but\n# should keep this content at the top.\n# -----...
python
edit
9
0
bsd-3-clause
88a31ebcd7b65f9282bb0d0a19ad299c1ad431ec
e-koch/spectral-cube,jzuhone/spectral-cube,radio-astro-tools/spectral-cube,keflavich/spectral-cube,low-sky/spectral-cube
spectral_cube/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n pytest_pipeline.plugin\n ~~~~~~~~~~~~~~~~~~~~~~\n\n pytest plugin entry point.\n\n :copyright: (c) 2014 Wibowo Arindrarto <<EMAIL>>\n :license: BSD\n\n\"\"\"\n\n## credits to Holger Krekel hi...
python
edit
1
3
bsd-3-clause
569dbdc820d9ead02a8941d69b1c8143fe4d4cfa
bow/pytest-pipeline
pytest_pipeline/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nimport transip\n\nsetup(\n name = transip.__name__,\n version = transip.__version__,\n author = transip.__author__,\n author_email = transip.__email__,\n license = transip.__license__,\n des...
python
edit
1
0
mit
ad6c51fdbc0fbfa2993902b89a7dac04b62a244f
benkonrath/transip-api,benkonrath/transip-api
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom invocations.docs import docs, www, sites, watch_docs\nfrom invocations.testing import test, coverage, integration, watch_tests\nfrom invocations.packaging import vendorize, release\n\nfrom invoke import Collection\nfrom invoke.util imp...
python
edit
1
0
bsd-2-clause
c5490366235d4e8d4f77b46707a424375f2dec29
pfmoore/invoke,pyinvoke/invoke,mkusz/invoke,pyinvoke/invoke,mkusz/invoke,pfmoore/invoke
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport csv\nimport json\nimport os\nimport sys\n\n\ndef format_entities_as_list(entities):\n for i, entity in enumerate(entities, 1):\n yield (unicode(i), json.dumps(entity[\"terms\"]))\n\n\ndef generate_e...
python
edit
2
3
mit
552afcd33d890d2798b52919c0b4c0d146b7d914
alphagov/entity-manager
make_ids.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.1 on 2016-09-21 11:37\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\nimport wagtail.wagtailcore.blocks\nimport wagt...
python
edit
1
0
bsd-3-clause
611f95b0c72e436ebf056329349216625c61e133
mixxorz/wagtail,nutztherookie/wagtail,rsalmaso/wagtail,torchbox/wagtail,chrxr/wagtail,gasman/wagtail,zerolab/wagtail,Toshakins/wagtail,takeflight/wagtail,FlipperPA/wagtail,iansprice/wagtail,takeflight/wagtail,wagtail/wagtail,nilnvoid/wagtail,nealtodd/wagtail,FlipperPA/wagtail,nilnvoid/wagtail,chrxr/wagtail,takeflight/w...
wagtail/tests/testapp/migrations/0009_defaultstreampage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name = 'jsuite',\n packages = ['jsuite'], # this must be the same as the name above\n version = '0.3.0',\n\n scripts=['bin/jsuite'],\n install_requires = [\n 'lxml==3.6.4',\n 'clint==0...
python
edit
1
0
mit
436fa5dd4ee955b35ef9d68a0f6b293f957e2ce0
schatten/jsuite,TypesetIO/jsuite
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bb2gh\nimport time\n\nconfig_yaml = 'config.yaml'\n\nfor issue_id in range(1, 500):\n while True:\n try:\n bb2gh.migrate(config_yaml, verbose=True, issue_ids=[issue_id])\n except Exception as inst:\n ...
python
edit
5
0
mit
80215a593c2fdcf0a0ae8b1c61c4342faffd6dac
wd15/bb2gh
run.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom django.conf import settings\n\nlog = logging.getLogger(__name__)\n\nCDN_SERVICE = getattr(settings, 'CDN_SERVICE')\nCDN_USERNAME = getattr(settings, 'CDN_USERNAME')\nCDN_KEY = getattr(settings, 'CDN_KEY')\nCDN_SECET =...
python
edit
1
1
mit
cb2c937fa16590a7431f450c0fc79cc68dd9984c
sid-kap/readthedocs.org,wanghaven/readthedocs.org,CedarLogic/readthedocs.org,mhils/readthedocs.org,sunnyzwh/readthedocs.org,titiushko/readthedocs.org,laplaceliu/readthedocs.org,hach-que/readthedocs.org,pombredanne/readthedocs.org,safwanrahman/readthedocs.org,wanghaven/readthedocs.org,michaelmcandrew/readthedocs.org,saf...
readthedocs/cdn/purge.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom ckanext.qa import __version__\n\nsetup(\n name='ckanext-qa',\n version=__version__,\n description='Quality Assurance plugin for CKAN',\n long_description='',\n classifiers=[],...
python
edit
1
0
mit
b2026158e0aec2c79bba9e61ff02c14d42166b20
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
setup.py
rejected_duplicate
Near-duplicate of sample 572
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n#from distutils.core import setup\n\nsetup(name='imagesize',\n version='0.7.1',\n description='Getting image size from png/jpeg/jpeg2000/gif file',\n long_description='''...
python
edit
1
0
mit
5ed223883a39c58af7db10d92829894407fba822
shibukawa/imagesize_py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.auth',\n version='0.1a4.dev0',\n description='Tangled auth integration',\n long_description=open('README.rst').read(),\n url='http://tangledframework.org/',\n downlo...
python
edit
1
0
mit
eb2cfa7578012f7312bdb655368ce543cb680a0d
TangledWeb/tangled.auth
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write script to remove duplicates from stocks.json" }, { "role": "assistant", "content": "from pprint import pprint\nimport json\nimport re\nREGEXP = re.compile(\"(?P<symbol>[A-Z]{1,4}).*\")\nwith open(\"stocks.json\") as f:\n ...
python
new_file
3
0
apache-2.0
c5946e378147f6d4d42c7a3e531388e6203f29e4
ddsnowboard/FantasyStocks,ddsnowboard/FantasyStocks,ddsnowboard/FantasyStocks
fantasyStocks/static/stockCleaner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.6\n\ntry:\n from setuptools import setup\nexcept:\n from distutils.core import setup\n\n\ndef getVersion():\n import os\n packageSeedFile = os.path.join(\"lib\", \"_version.py\")\n ns = {\"__name__\": _...
python
edit
2
1
bsd-3-clause
888ffba93f4b9ed9a889aebd9d3e4296b469579d
olix0r/pub
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\nimport glob\nimport os\n\ndef check(cmd, mf):\n name = 'PySide'\n m = mf.findNode(name)\n if m is None or m.filename is None:\n return None\n\n from PySide import QtCore\n plugin_dir = QtCore.QLib...
python
edit
3
11
mit
efe15dae9d57fe6e18d722057c1cf48bd855c28e
metachris/py2app,metachris/py2app,metachris/py2app,metachris/py2app
py2app/recipes/pyside.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport setuptools\nfrom gitvendor.version import Version\nfrom setuptools import find_packages\n\nCLASSIFIERS = [\n 'Development Status :: 3 - Alpha',\n 'License :: OSI Approved :: MIT License',\n 'Environment :: Console',\n 'To...
python
edit
1
0
mit
b65b0ed8d09d4a22164f16ed60f7c5b71d6f54db
chuckbutler/git-vendor
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom tests.conftest import assert_cache_control\n\n\nclass TestViewPDFAPI:\n def test_caching_is_disabled(self, test_app):\n response = test_app.get(\"/pdf?url=http://example.com/foo.pdf\")\n\n assert_cache...
python
edit
1
1
bsd-2-clause
932ee2737b822742996f234c90b715771fb876bf
hypothesis/via,hypothesis/via,hypothesis/via
tests/functional/api/view_pdf_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nwith open('README.rst', 'r') as f:\n long_desc = f.read().decode('utf-8')\n\nsetup(name='dmgbuild',\n version='1.0.0',\n description='Mac OS X command line utility to bui...
python
edit
1
0
mit
0dce3b4101b29ecb79d5743d2c86b40c22d0e7e9
al45tair/dmgbuild
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom .system import System\n\n\nclass TightBindingSystem(System):\n def setDefaultParams(self):\n self.params.setdefault('t', 1) # nearest neighbor tunneling strength\n self.params.setdefault('t2', 0...
python
edit
1
1
mit
2f360d9986c13adaaf670b80b27dad995823b849
sharkdp/bandstructure,sharkdp/bandstructure
bandstructure/system/tightbindingsystem.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = \"John Kirkham <<EMAIL>>\"\n__date__ = \"$Nov 10, 2015 17:09$\"\n\n\ntry:\n from IPython.utils.shimmodule import ShimWarning\nexcept ImportError:\n class ShimWarning(Warning):\n \"\"\"Warning issued by IPython 4.x ...
python
edit
5
5
apache-2.0
59daf205869c42b3797aa9dbaaa97930cbca2417
nanshe-org/nanshe_workflow,DudLab/nanshe_workflow
nanshe_workflow/ipy.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport docutils.core as dc\n\nfrom writer import writer\n\nimport os.path\nimport sys\nimport glob\n\npreamble = r'''\n% These preamble commands are from build_paper.py\n\n% PDF Standard Fonts\n\\usepackage{mathptmx...
python
edit
2
0
bsd-2-clause
9f485a55227406c3cfbfb3154ec8d0f2cad8ae67
Stewori/euroscipy_proceedings,helgee/euroscipy_proceedings,juhasch/euroscipy_proceedings,mwcraig/scipy_proceedings,sbenthall/scipy_proceedings,helgee/euroscipy_proceedings,SepidehAlassi/euroscipy_proceedings,SepidehAlassi/euroscipy_proceedings,chendaniely/scipy_proceedings,dotsdl/scipy_proceedings,mikaem/euroscipy_proc...
publisher/build_paper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('README.rst') as f:\n readme = f.read()\n\nsetup(\n name='django-addendum',\n version='0.0.1',\n description='Simple template-based content sw...
python
edit
1
0
bsd-2-clause
db442d2300ee99f8b062432225291696f26448b7
adw0rd/django-addendum-inline,bennylope/django-addendum,bennylope/django-addendum,adw0rd/django-addendum-inline
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom datetime import datetime\n\nTRAILING_NUM_REGEX = re.compile(\"(\\d+)$\")\n\"\"\"A regular expression to extract the trailing number from a string.\"\"\"\n\nDATE_REGEX = re.compile(\"(0?\\d|1[12])/(0?\\d|[12]\\d|3[12])/((19|2...
python
edit
1
4
bsd-2-clause
2fe5f960f4998a0337bceabd7db930ac5d5a4fd1
ohsu-qin/qipipe
qipipe/qiprofile/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nimport os\nimport time\nfrom slackclient import SlackClient\nimport pyrebase\nimport linkatos.parser as parser\nimport linkatos.confirmation as confirmation\nimport linkatos.printer as printer\nimport linkatos.utils ...
python
edit
5
0
mit
7ddc4b975910bf9c77b753e8e0aeaebc45949e4e
iwi/linkatos,iwi/linkatos
linkatos.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport logging\nimport re\n\nimport requests\nfrom django.conf import settings\nfrom onadata.apps.restservice.RestServiceInterface import RestServiceInterface\nfrom onadata.apps.logger.models import Instance\n\n\nclass Serv...
python
edit
1
3
bsd-2-clause
2901988d46a644c70ba12409c06e0bcb3bfc0eff
kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat
onadata/apps/restservice/services/kpi_hook.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\nwith open('README.md') as f:\n long_description = f.read().strip()\n\nsetup(name='python-circuit',\n version='0.1.6',\n description='Simple implementation of the Circuit Br...
python
edit
1
0
apache-2.0
c537ec56660d6829c3297db9760fc75e2f6260b2
edgeware/python-circuit
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe\n\n\nclass CryptographyRecipe(CompiledComponentsPythonRecipe):\n name = 'cryptography'\n version = '2.4.2'\n url = 'https://github.com/pyca/cryptography/arc...
python
edit
1
1
mit
84b01f0015163dc016293162f1525be76329e602
kronenpj/python-for-android,rnixx/python-for-android,PKRoma/python-for-android,germn/python-for-android,PKRoma/python-for-android,kronenpj/python-for-android,rnixx/python-for-android,germn/python-for-android,rnixx/python-for-android,kivy/python-for-android,PKRoma/python-for-android,rnixx/python-for-android,germn/python...
pythonforandroid/recipes/cryptography/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom utils import file_templates\nfrom utils.validation import is_valid_gpu_mem\n\n\ndef main():\n\tgpu_mem = 0\n\twhile gpu_mem == 0:\n\t\tuser_input = raw_input(\"Enter GPU memory in MB (16/32/64/128/256): \")\n\t\t...
python
edit
3
4
mit
72301067306d6baf4aab0315a769c75dd585b46d
projectweekend/Pi-Setup,projectweekend/Pi-Setup
pi_setup/boot_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport sys\n\nfrom setuptools import setup\n\n\nPY_VERSION = sys.version_info[0], sys.version_info[1]\n\nrequirements = [\n 'requests>=1.0',\n 'python-dateutil>=2.1',\n 'six>=1.2.0',\n]\n\nif PY_VERSION == (2, 6):\...
python
edit
1
0
mit
160ad684262b654ce4f1e6ca2fc97a06f79ec6c6
uploadcare/pyuploadcare
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nconfig = {\n 'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),\n 'SECRET_KEY': 'Some big sentence',\n}\n```\n\nApply this change: Set DEBUG to true only when using Development server" }, ...
python
edit
1
0
mit
f036e74a6d887a5267885ef09cfe9c3a4de7eea5
i2nes/app-engine-blog,i2nes/app-engine-blog,i2nes/app-engine-blog
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='kf5py',\n py_modules = ['kf5py'],\n version='0.1.dev5',\n author='Chris Teplovs',\n author_email='<EMAIL>',\n url='https://github.com/problemshift/kf5py',\n license='LICENS...
python
edit
1
0
mit
3e4e44968412acb2ada2279b6fb4108eb66b02b2
problemshift/kf5py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.view import view_config\n\nfrom pyramid.httpexceptions import (\n HTTPNotFound,\n)\n\n@view_config(route_name='page', renderer='templates/page.mako')\n@view_config(route_name='page_view', renderer='templates/page.mako')\ndef...
python
edit
1
3
mit
70d2f182c09583802da2860994a99fd2bc9e39d5
matslindh/kimochi-consumer
kimochiconsumer/views.py
rejected_duplicate
Near-duplicate of sample 169
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup\n\nsetup(\n name='sht',\n version='1.0',\n description='A fast spherical harmonic transform implementation',\n author='Praveen Venkatesh',\n url='https://github.com/prave...
python
edit
1
0
mit
48f664721fc866871a17b459eb22e5641b311067
praveenv253/sht,praveenv253/sht
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport functools\nimport blessed\n\n\ndef color(func):\n functools.wraps(func)\n def wrapper(string):\n if os.environ.get('JARN_NO_COLOR') == '1':\n return string\n return func(string)\n return w...
python
edit
1
4
bsd-2-clause
e0989ff4c2292d0f2d053065bfa71124a3705559
Jarn/jarn.mkrelease
jarn/mkrelease/colors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Installation script.\"\"\"\nfrom os import path\nfrom setuptools import find_packages, setup\n\nHERE = path.abspath(path.dirname(__file__))\n\nwith open(path.join(HERE, 'README.rst')) as f:\n LONG_DESCRIPTION = f.read().strip()\n\n...
python
edit
1
0
mit
78497a5ef492f18511c4a09b5ca62facafe9c302
capybaralet/fuel,glewis17/fuel,EderSantana/fuel,bouthilx/fuel,laurent-dinh/fuel,orhanf/fuel,mila-udem/fuel,rizar/fuel,codeaudit/fuel,udibr/fuel,glewis17/fuel,orhanf/fuel,ejls/fuel,capybaralet/fuel,dmitriy-serdyuk/fuel,markusnagel/fuel,ejls/fuel,dwf/fuel,janchorowski/fuel,laurent-dinh/fuel,dribnet/fuel,janchorowski/fuel...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# Code Fights Knapsack Problem\n\n\ndef knapsackLight(value1, weight1, value2, weight2, maxW):\n if weight1 + weight2 <= maxW:\n return value1 + value2\n else:\n return max([v for v, w in zip((va...
python
edit
1
4
mit
26749bd6bd36c4cd930e60c1eb2d0460fd16506e
HKuz/Test_Code
CodeFights/knapsackLight.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nscriptnames = ['runElegant.sh',\n 'sddsprintdata.sh',\n 'renametolower.sh',\n 'file2lower.sh',\n 'lte2json',\n '...
python
edit
1
1
mit
3a67b514968f0c002f049ce8e34710412ca39904
Archman/beamline
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom exoline import __version__ as version\n\nwith open('requirements.txt') as f:\n required = f.read().splitlines()\n\ntry:\n from collections import OrderedDict\nexcept ImportEr...
python
edit
3
0
bsd-3-clause
7627b8759ab08df562048ec1fa94fe9d69d01374
tadpol/exoline,azdle/exoline,asolz/exoline,danslimmon/exoline,tadpol/exoline,asolz/exoline,azdle/exoline,danslimmon/exoline
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport pkg_resources\nimport sys\nfrom types import ModuleType\n# allow high-level functions to be accessed directly from the mappyfile module\nfrom mappyfile.utils import load, loads, find, findall, dumps, write\n\n__versio...
python
edit
2
1
mit
6ce216f449fbd7da5f8eea6785ce71542caa2fcd
geographika/mappyfile,geographika/mappyfile
mappyfile/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom nimp.commands._command import *\nfrom nimp.utilities.build import *\n\n#-------------------------------------------------------------------------------\nclass VsBuildCommand(Command):\n\n def __init__(self...
python
edit
6
1
mit
0b7636422c632172dfc68ea2a5f21ec649248c8c
dontnod/nimp
nimp/commands/vs_build.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast...
python
edit
1
0
bsd-3-clause
723a102d6272e7ba4b9df405b7c1493c34ac5b77
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.chromium.fyi/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Adapted from Astropy core package until 1.0 is released\n#\n# Copyright (c) 2011-2014, Astropy Developers\n#\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted p...
python
edit
3
0
bsd-3-clause
e640ed3770cd3c3dbab90866a77449d17a633704
stargaser/astropy,stargaser/astropy,saimn/astropy,astropy/astropy,DougBurke/astropy,aleksandr-bakanov/astropy,pllim/astropy,mhvk/astropy,AustereCuriosity/astropy,StuartLittlefair/astropy,bsipocz/astropy,tbabej/astropy,StuartLittlefair/astropy,AustereCuriosity/astropy,larrybradley/astropy,larrybradley/astropy,joergdietr...
wcsaxes/wcs_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\nfrom valohai_cli import __version__\n\nsetup(\n name='valohai-cli',\n version=__version__,\n entry_points={'console_scripts': ['vh=valohai_cli.cli:cli']},\n ...
python
edit
1
0
mit
9ed88cba879168a7b9ba550668e7f7a617b4e789
valohai/valohai-cli
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport signal\nimport sys\nfrom app.main import app, queues, sched\n\n\ndef _teardown(signal, frame):\n sched.shutdown(wait=False)\n for queue in queues.values():\n queue.put(None)\n queue...
python
edit
1
2
mit
1778b3943ed55819ef38a46e8fdc417ed835176f
martinp/jarvis2,mpolden/jarvis2,Foxboron/Frank,Foxboron/Frank,martinp/jarvis2,mpolden/jarvis2,martinp/jarvis2,Foxboron/Frank,mpolden/jarvis2
run.py
rejected_duplicate
Near-duplicate of sample 831
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^$', views.post_list.as_view()),\n url(r'/?P<id>[0-9]/$', views.post_detail.as_view())\n]\n```\n\nApply this change: Remove leading slash from URL." },...
python
edit
1
0
mit
a4585dc9a0d30b223db14755a00df79b96dd1f28
annaelde/forum-app,annaelde/forum-app,annaelde/forum-app
site/threads/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nViews and functions for serving static files. These are only to be used during\ndevelopment, and SHOULD NOT be used in a production setting.\n\n\"\"\"\nfrom django.views.static import serve as django_serve\nfrom staticfiles.resolver...
python
edit
1
2
bsd-3-clause
0aa61fb32df9ae3ef9c465f4b246edf04897cd14
tusbar/django-staticfiles,jezdez-archive/django-staticfiles,tusbar/django-staticfiles
staticfiles/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport discord\n\nclient = discord.Client()\n\n\n@client.event\nasync def on_message(message):\n if message.author == client.user:\n return\n if message.content.startswith('!ping'):\n msg = 'Pong! This bot is alive.'\n ...
python
edit
3
4
mit
3e07e509fe0b1dd7c02b39c490c994e3c0bb94b5
suclearnub/scubot
bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# This file is part of pysnmp software.\n#\n# Copyright (c) 2005-2019, Ilya Etingof <<EMAIL>>\n# License: http://snmplabs.com/pysnmp/license.html\n#\nfrom pysnmp.proto.rfc1902 import *\nfrom pysnmp.smi.rfc1902 import *\nfrom pysnmp.hlapi...
python
edit
10
0
bsd-2-clause
2a3fe3b5e08c91ab8d77569b02b36da63909f619
etingof/pysnmp,etingof/pysnmp
pysnmp/hlapi/v1arch/asyncore/sync/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utiltiy functions for workign on the NinaPro Databases (1 & 2).\"\"\"\n\nfrom setuptools import setup, find_packages\n\n\nsetup(name='nina_helper',\n version='2.1',\n description='Utiltiy functions for workign on the NinaPro...
python
edit
1
0
mit
ad579b09e691811a39714f816721bba615dcc651
Lif3line/nina_helper_package_mk2
setup.py
accepted
null
true