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\n#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(name='pyspotify_helper',\n version='0.0.1',\n author='Matt Wismer',\n author_email='<EMAIL>',\n description='Simplest integration of Spotify into Python',\n ...
python
edit
1
0
mit
9c50c5e028dd4d8a7a51e142d35fcc45b1b60f58
MattWis/pyspotify_helper
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nsetup.py file for afnumpy\n\"\"\"\n\nfrom distutils.core import setup\nfrom afnumpy import __version__\n\n\nsetup (name = 'afnumpy',\n version = __version__,\n author = \"Filipe Maia\",\n ...
python
edit
1
0
bsd-2-clause
3fc109a396ccbdf1f9b26a0cf89e2a92d3f87fb0
FilipeMaia/afnumpy,daurer/afnumpy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='jobcli',\n version='0.1.a2',\n py_modules=['jobcli'],\n install_requires=['click', 'requests',],\n entry_points={'console_scripts':['jobcli=jobcli:cli',]},\n url='https://www....
python
edit
1
0
mit
50b773cdde5b367ee6cb44426817664ee379ee9f
jobcli/jobcli-app,jobcli/jobcli-app
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nf = open(os.path.join(os.path.dirname(__file__), 'README.rst'))\nreadme = f.read()\nf.close()\n\nsetup(\n name='micawber',\n version='0.3.5',\n description='a small library ...
python
edit
1
0
mit
8b408db0e41dba83cb354787a9b1406f365b0b30
coleifer/micawber,coleifer/micawber
setup.py
rejected_duplicate
Near-duplicate of sample 16019
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\n\"\"\"\nExample sentences to test spaCy and its language models.\n>>> from spacy.lang.tr.examples import sentences\n>>> docs = nlp.pipe(sentences)\n\"\"\"\n\nsentences = [\n\"Apple ...
python
edit
1
0
mit
719037cf20ae17e5fba71136cad1db7e8a47f703
recognai/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spa...
spacy/lang/fi/examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntraceview.formatters\n\nThis module contains functions used to format TraceView API results.\n\n\"\"\"\n\nfrom collections import namedtuple\n\n\ndef identity(results):\n return results\n\n\ndef tuplify...
python
edit
1
3
mit
569840b37f9e43bec0de3f6ddadc89d6a2f9e17b
danriti/python-traceview
traceview/formatters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport argparse\nfrom twstock.codes import __update_codes\nfrom twstock.cli import best_four_point\nfrom twstock.cli import stock\nfrom twstock.cli import realtime\n\n\ndef run():\n parser = argparse.ArgumentPa...
python
edit
null
null
mit
f4691dd72c46fdc1a42f454ceec82128be33e907
mlouielu/twstock,TCCinTaiwan/twstock
twstock/cli/__init__.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom malcolm.modules.ADCore.infos import FilePathTranslatorInfo\n\n\nclass TestInfo(unittest.TestCase):\n\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n\n def test_file_path_translator_d...
python
edit
1
1
apache-2.0
5ea71effd4fc436eeebb361b73202315a5d57916
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
tests/test_modules/test_ADCore/test_infos.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This is an example test settings file for use with the Django test suite.\n#\n# The 'sqlite3' backend requires only the ENGINE setting (an in-\n# memory database will be used). All other backends will require a\n# NAME and potentially aut...
python
edit
1
0
apache-2.0
754d1a18da471e10937dad90478cd8368b20f4c5
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
tests/test_sqlite.py
rejected_duplicate
Near-duplicate of sample 5766
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-flatblocks',\n version='0.9',\n description='django-flatblocks acts like django.contrib.flatpages but '\n 'for parts of a page; like an editable ...
python
edit
1
0
bsd-3-clause
9913e1ed57717af248370149b6f69127bc4a48f0
funkybob/django-flatblocks,funkybob/django-flatblocks
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013, The MITRE Corporation. All rights reserved.\n# See LICENSE.txt for complete terms.\n\nimport cybox.utils as utils\nimport cybox.bindings.port_object as port_binding\nfrom cybox.common import ObjectProperties, String, P...
python
edit
1
0
bsd-3-clause
6da3b2a09914546bbc29caa9f807e05f0ee66b0d
CybOXProject/python-cybox
cybox/objects/port_object.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport versioneer\n\n\ndef read_requirements():\n import os\n\n\n path = os.path.dirname(os.path.abspath(__file__))\n requirements_file = os.path.join(path, 'requirements.txt')\n tr...
python
edit
1
3
mit
05fe4ae3a93662fc919a81d5f0b5680ff4ff40d9
csdms/coupling,csdms/coupling,csdms/pymt
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom google.appengine.api import apiproxy_stub_map\nfrom google.appengine.api.app_identity import get_application_id\n\nhave_appserver = bool(apiproxy_stub_map.apiproxy.GetStub('datastore_v3'))\n\nif not have_appserver:\n fr...
python
edit
4
3
bsd-3-clause
5a307c9ed6ad00c6df40f505caa9a8dfb432892d
potatolondon/djangoappengine-1-4,potatolondon/djangoappengine-1-4
utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\nimport json\nimport logging\n\n\ndef quote(text):\n try:\n return urllib.quote(text.encode('utf-8'))\n except UnicodeDecodeError:\n return urllib.quote(unicode(text, 'utf-8').encode('utf-8'))\n\n\ndef quot...
python
edit
3
3
apache-2.0
b479fbcbd6aa620d060ea626bd0f0097ec04cf79
numixproject/numibot,IamRafy/numibot
plugins/libs/request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='redis-url-py',\n version='0.0.3',\n url='https://github.com/Xopherus/redis-url-py',\n license='BSD',\n author='Chris Raborg',\n author_email='<EMAIL>',\n description='Use R...
python
edit
1
0
bsd-2-clause
8c6c0c425b27f4bfcba93d8d9af7cb0709a5c518
Xopherus/redis-url-py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport aiohttp\nimport json\nfrom aiohttp import web\n\nfrom .consts import KUDAGO_API_BASE_URL, CLIENT_DIR\n\n\nasync def serve_api(request):\n url = '{}/{}/?{}'.format(\n KUDAGO_API_BASE_URL,\n request.match_in...
python
edit
1
4
mit
e0119a582ceb6a55123e8d16ccf33a0d52f7a0a9
despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics
server/app/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request\nfrom flask.ext.restful import reqparse, Api, Resource\nfrom gensim.models.word2vec import Word2Vec\nimport json\n\nprint 'loading model'\nMODEL = Word2Vec.load_word2vec_format(\n 'GoogleNews-vectors-nega...
python
edit
3
2
mit
4d51fad87581281cd98d97a091346018d9784411
mdbecker/word2vec_demo,mdbecker/word2vec_demo
word2vec_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport jingo\n\nfrom innovate.utils import get_blog_feed_entries\nfrom projects.models import Project\n\n\ndef splash(request):\n \"\"\"Display splash page. With featured projects and news feed.\"\"\"\n projects = Project.objects.filt...
python
edit
1
1
bsd-3-clause
cc2a600a7a68e438aa1dceb43f40c7ccd61b5df9
mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm
apps/innovate/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom django.db import models\nfrom django.conf import settings\n\n\nclass UserModel(models.Model):\n name = models.CharField(max_length=20)\n\n\nupload_to = os.path.join(settings.FILE_STORAGE_DIR, 't...
python
edit
1
0
mit
252ffda53d494403133fdb1986c92422264406d8
chibisov/drf-extensions
tests_app/tests/unit/serializers/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nfrom unittest import TestCase\n\nfrom pandora.py2compat import Mock, call\n\nfrom tests.test_pandora.test_clientbuilder import TestSettingsDictBuilder\n\n\nclass SysCallError(IOError):\n pass\n\n\nclass TestTransport(TestCas...
python
edit
1
1
mit
6ca4d689b863aa1caed7d51f8b45951e508fe8bc
mcrute/pydora
tests/test_pandora/test_transport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib.request\nimport json\nimport subprocess\nimport time\nimport os\n\n# We're limited to this number by GH Actions API\n# https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#list-jobs-for-a-workflow-run\nmax_jo...
python
edit
1
0
apache-2.0
25ff50839e50a46b4e973acf0a6ae28472a71473
litex-hub/litex-conda-ci,litex-hub/litex-conda-ci
wait-for-statuses.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\ntsurf.core\n~~~~~~~~~~\n\nThis module defines the TagSurfer class. This class serve two purpose:\n\n 1) Defines the methods that are used by tsurf-owned vim commands.\n 2) Creates all tsurf components and ...
python
edit
1
4
mit
e9c45c30203a3b100ab897dd2337985790b07dff
bossmido/tag-surfer,bossmido/tag-surfer,bossmido/tag-surfer
autoload/tsurf/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Point(object):\n \"\"\"Contains information about for each scan point\n\n Attributes:\n positions (dict): Dict of str position_name -> float position for each\n scannable dimension. E.g. {\"x\": 0.1, \"y\": 2.2...
python
edit
1
1
apache-2.0
b2c32ac006ac62957f56c2cad90615a8f349cb8e
dls-controls/scanpointgenerator
scanpointgenerator/point.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom subprocess import *\n\n\ndef check_output(*popenargs, **kwargs):\n r\"\"\"Run command with arguments and return its output as a byte\n string.\n\n If the exit code was non-zero it rais...
python
edit
5
4
bsd-3-clause
725f5b12c43380e239d6a511a9435577dda37b49
bsipocz/astropy,kelle/astropy,lpsinger/astropy,MSeifert04/astropy,AustereCuriosity/astropy,AustereCuriosity/astropy,joergdietrich/astropy,mhvk/astropy,DougBurke/astropy,astropy/astropy,joergdietrich/astropy,StuartLittlefair/astropy,tbabej/astropy,kelle/astropy,stargaser/astropy,funbaker/astropy,AustereCuriosity/astropy...
astropy/utils/compat/_subprocess_py2/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ndef do_lock_pass(locked):\n for i in xrange(0, len(locked), 2):\n locked[i] = True\n\ndef do_flip_pass(locked):\n for i in xrange(0, len(locked), 3):\n locked[i] = not locked[i]\n\ndef count_unlocked(locked...
python
edit
2
3
unlicense
b67ee17b401df9dec4f76f1a24cef2a7ce25406b
mpillar/codeeval,mpillar/codeeval,mpillar/codeeval,mpillar/codeeval
1-moderate/locks/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# std import\nimport os\nimport sys\nimport configparser\nfrom subprocess import call\n\n# project import\nfrom . import logger\nfrom .mapper import hisat2\n\n\ndef main(config_path):\n \"\"\" Main function of p...
python
edit
1
3
mit
18e1e0a1c1b4492e623d5b86d7a23fff00d5fa72
Fougere87/pysingcells
pysingcells/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom txircd.utils import CaseInsensitiveDictionary, now()\n\nclass IRCChannel(object):\n\tdef __init__(self, ircd, name):\n\t\tself.ircd = ircd\n\t\tself.name = name\n\t\tself.created = now()\n\t\tself.topic = \"\"\n\t\tself.topicSetter = \...
python
edit
2
5
bsd-3-clause
098044c80fff2ff639da088f87f7fc6952813fc1
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
txircd/channel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport configparser\nimport semver\nfrom invoke import run\n\n\ndef get_current_version():\n return run('python setup.py --version', hide=True).stdout.strip()\n\n\ndef evaluate_version_bump(force=None):\n if force:\n return for...
python
edit
1
2
mit
a2ad75b8dac515d1bbc49c32257c62a7da59e2e1
riddlesio/python-semantic-release,relekang/python-semantic-release,relekang/python-semantic-release,wlonk/python-semantic-release,jvrsantacruz/python-semantic-release
semantic_release/helpers.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\"\"\"Contains pytest fixtures which are globally available throughout the suite.\n\"\"\"\n\nimport pytest\n\n\n@pytest.fixture\ndef foobar():\n pass\n\n\n```\n\nApply this change: Change...
python
edit
1
1
bsd-3-clause
952289a08784bc0ee86dee6239025397395f7033
sp1rs/cookiecutter,vincentbernat/cookiecutter,cguardia/cookiecutter,willingc/cookiecutter,drgarcia1986/cookiecutter,kkujawinski/cookiecutter,drgarcia1986/cookiecutter,michaeljoseph/cookiecutter,ionelmc/cookiecutter,audreyr/cookiecutter,takeflight/cookiecutter,dajose/cookiecutter,letolab/cookiecutter,jhermann/cookiecutt...
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nDefine some common units, so users can import the objects directly.\n\nCopyright 2012, Casey W. Stark. See LICENSE.txt for more information.\n\n\"\"\"\n\nfrom sympy.core import Integer\n\nfrom dimensionful.dimensions import *\nfro...
python
edit
2
0
bsd-2-clause
a560868cd6658a4a5134ce8d53a03a5f86d92d6d
caseywstark/dimensionful
dimensionful/common_units.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Utility functions.\n\n:author: Stefan Lehmann <<EMAIL>>\n:license: MIT, see license file or https://opensource.org/licenses/MIT\n\n:created on: 2018-06-11 18:15:53\n:last modified by: Stefan Lehmann\n:last mod...
python
edit
3
2
mit
b5852d1b579325b5ef5d8d7aebca53f1fb9bae04
MrLeeh/pyads
pyads/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# There should be a single (merged) ocean feature in this tile\nassert_less_than_n_features(9, 167, 186, 'water', {'kind': 'ocean'}, 2)\n# There should be a single (merged) earth feature in this tile\nassert_less_than_n_features(9, 170, 186...
python
edit
5
0
mit
749aa35a85b6482cfba9dec7d37473a787d73c32
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/1106-merge-ocean-earth.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport platform\r\nfrom unittest import main\r\n\r\nfrom test_net_use_table import *\r\nfrom test_sanitize import *\r\nfrom test_utils import *\r\nfrom test_unc_directory import *\r\n\r\n\r\nif platform.system() == 'Windows':\r\n\tprint 'In...
python
edit
3
0
mit
7812934504c299464227c4f8cd28cacc2b904008
nithinphilips/py_win_unc,CovenantEyes/py_win_unc
test/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nUser command...\n\n\"\"\"\n\nimport grp\n\n\nclass User(object):\n \"\"\"Something, something, something darkside....\"\"\"\n\n def __init__(self, settingsInstance, commandInstan...
python
edit
1
4
bsd-3-clause
6cd640eb09d674afaff1c96e69322705a843dde9
Tehnix/PyIRCb
src/commands/user/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom InvenTree.forms import HelperForm\n\nfrom .models import StockLocation, StockItem\n\n\nclass EditStockLocationForm(HelperForm):\n\n class ...
python
edit
1
0
mit
030265cc2dca23e256bdce59b2bd0cb77e88ca74
SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree
InvenTree/stock/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\n\nfrom .models import Picture\n\n\nclass PicturePlugin(CMSPlugi...
python
edit
3
3
mit
ec3a70e038efc565ce88294caf0e78d5efaa9a85
okfn/foundation,okfn/website,okfn/website,okfn/foundation,MjAbuz/foundation,MjAbuz/foundation,okfn/website,okfn/foundation,MjAbuz/foundation,okfn/foundation,okfn/website,MjAbuz/foundation
djangocms_picture/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = True\n\nADMINS = (\n ('Zaphod Beeblebrox', '<EMAIL>'),\n)\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij'\n\nDATABASES = {\n 'defau...
python
edit
1
0
mit
cb8bba09372ab85b36dec9ade57e59ed76705f95
colbypalmer/cp-project-template,colbypalmer/cp-project-template,colbypalmer/cp-project-template
project/project/local_settings_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n#Black Hat Python; SSH w/ Paramiko (p 26)\n\nimport threading, paramiko, subprocess\n\n\ndef banner():\n print \"############ n1cFury- NetCat tool #################\"\n print \"############ courtesy of Bl...
python
edit
9
2
mit
322ecf060500e43a05c604be62edefcec48efd5a
n1cfury/BlackHatPython
bh_sshcmd.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport factory\n\nfrom admin.common_auth.models import MyUser\n\n\nclass UserFactory(factory.Factory):\n class Meta:\n model = MyUser\n\n id = 123\n email = '<EMAIL>'\n first_name = 'Yo-yo'\n last_name = 'Ma'\n osf_...
python
edit
1
1
apache-2.0
11543deda3222965ee95adc4ea6db5cdec21ac94
alexschiller/osf.io,HalcyonChimera/osf.io,felliott/osf.io,baylee-d/osf.io,mattclark/osf.io,erinspace/osf.io,alexschiller/osf.io,alexschiller/osf.io,leb2dg/osf.io,chrisseto/osf.io,chennan47/osf.io,cslzchen/osf.io,baylee-d/osf.io,CenterForOpenScience/osf.io,acshi/osf.io,caseyrollins/osf.io,aaxelb/osf.io,icereval/osf.io,h...
admin_tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom flask_cors import CORS\nfrom flask import Flask, json\nfrom flask_hal import HAL, HALResponse\nfrom chaosmonkey.api.attacks_blueprint import attacks\nfrom chaosmonkey.api.executors_blueprint import executors\nfrom chaos...
python
edit
1
1
apache-2.0
c6f65008da2c658d1ebff724d6ca98d67100c161
BBVA/chaos-monkey-engine,BBVA/chaos-monkey-engine
chaosmonkey/api/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc...
python
edit
1
0
bsd-3-clause
8671a368cff459d5a00c5b43d330d084e2f6ed3d
numpy/numpy,mattip/numpy,charris/numpy,simongibbons/numpy,seberg/numpy,charris/numpy,anntzer/numpy,simongibbons/numpy,jakirkham/numpy,numpy/numpy,jakirkham/numpy,endolith/numpy,simongibbons/numpy,jakirkham/numpy,pdebuyl/numpy,rgommers/numpy,seberg/numpy,anntzer/numpy,endolith/numpy,mattip/numpy,numpy/numpy,seberg/numpy...
numpy/_array_api/_types.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 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\"\"\"Runs DomDistillers jstests.\n\nThis uses Chr...
python
edit
5
0
apache-2.0
2fda06e11c9b536a5771d5b7f4fb31e5c20223a0
dalmirdasilva/dom-distiller,dalmirdasilva/dom-distiller,dalmirdasilva/dom-distiller,dalmirdasilva/dom-distiller,dalmirdasilva/dom-distiller
run_jstests.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\n\nfrom RemoteTypograf import RemoteTypograf\n\n\nclass TypographCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\ttypograph = RemoteTypograf('windows-1251')\n\t\ttypograph.htmlEntities()\n\t\t...
python
edit
3
2
mit
ef6cb74f2d574338d9e225764c4f90bd83fcb47d
einomi/sublime-text-3-typographer,einomi/sublime-text-3-typographer
typograph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass SymbolSet():\r\n def __init__(self):\r\n self._address_labels = dict()\r\n self._label_addresses = dict()\r\n self._generic_id = 0\r\n\r\n def load(self, config_path):\r\n pass\r\n\r\n def add_labe...
python
edit
1
3
mit
25c0558b0c75306c8d9c547668df9cef25bae786
achan1989/diSMB
symbolset.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto.s3.connection\nimport optparse\n\ndef main():\n parser = optparse.OptionParser(\n usage='%prog BUCKET [KEY]',\n )\n parser.add_option(\n '--method',\n default='GET',\n help='HTTP method t...
python
edit
2
7
mit
4fa40ddbe6eacb33a97eb18719aa7ae61d8c9218
tv42/s3-url-sign,tv42/s3-url-sign
s3_url_sign.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2007 Albert Strasheim <<EMAIL>>\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...
python
edit
7
0
apache-2.0
0a04143c94540d864a288e5c79ade4ba9bf31e37
aberzan/pyactivemq,WilliamFF/pyactivemq,alberts/pyactivemq,cl2dlope/pyactivemq,aberzan/pyactivemq,winking324/pyactivemq,hetian9288/pyactivemq,winking324/pyactivemq,chenrui333/pyactivemq,cleardo/pyactivemq,haofree/pyactivemq,alberts/pyactivemq,hetian9288/pyactivemq,haofree/pyactivemq,cl2dlope/pyactivemq,WilliamFF/pyacti...
src/test/stresstest.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass JSONIndentAcceptHeaderMiddleware(object):\n\n def process_request(self, request):\n request.META['HTTP_ACCEPT'] = 'application/json; indent=4'\n return None\n\n```\n\nApply this change: PI-248: Apply indenting to only...
python
edit
1
2
apache-2.0
774a57478d93663968c0ed0e9407785f618b6eae
clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio,clarkperkins/stackdio
stackdio/core/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Standard imports\nimport argparse\nimport sys\nimport os.path\n\n# Non-standard imports\nimport jinja2\nimport yaml\n\ndef main(args):\n parser = argparse.ArgumentParser(description=\"Builds a CV using a YAML ...
python
edit
1
4
apache-2.0
4460231b1abf053e8e2bb8581007ccb0e61cae50
proaralyst/cvgen
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Sheared -- non-blocking network programming library for Python\n# Copyright (C) 2003 Sune Kirkeby <<EMAIL>>\n# \n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public Li...
python
edit
19
0
mit
7c805eecc90ead4e412e091c2500e881f47dd383
kirkeby/sheared
test/tests/__init__.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom document import Document\nimport unittest\n\nclass TestDocument(unittest.TestCase):\n \n def _get_document(self):\n spec = {\n \"author\": \"John Humphreys\",\n \"content\": {\n \"title...
python
edit
1
1
mit
52077ba667efcf596c9186dbbd8d7cedc95d624d
gamechanger/schemer,gamechanger/mongothon
tests/document_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom django.core.management import execute_manager\ntry:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py...
python
edit
1
0
unlicense
8e316a4b1305e8fb49e89b867b30bd27b428e689
zacharyvoase/django-qmethod,fdemmer/django-qmethod
test/example/manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport imp\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.utils.importlib import import_module\n\nfrom optparse import make_option\n\n\nclass Command(BaseCommand):\n help = 'Generate...
python
edit
1
11
bsd-3-clause
79a453f503e0f4283700071d415e32e82d35162b
willkg/django-eadred
eadred/management/commands/generatedata.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom SUASSystem import *\nimport math\nimport numpy\nimport unittest\nfrom dronekit import LocationGlobalRelative\n\nclass locationTestCase(unittest.TestCase):\n\n def setUp(self):\n self.position = Location(5, 12, 20)\n\n def ...
python
edit
7
1
mit
f1496f7f5babdf1f9fa8f527f42442aeccab46d7
FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition
tests/test_location.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.schedules import crontab\nfrom celery.task import periodic_task\nfrom django.conf import settings\nfrom django.db.models import Count\n\nfrom corehq.util.datadog.gauges import datadog_gauge\nfrom pillow_retry.models import Pillo...
python
edit
1
2
bsd-3-clause
236c37e39d1c3821b60e183845594195091acd3e
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/ex-submodules/pillow_retry/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom testapp.tests import factories\n\n\nclass SchedulingTestCase(TestCase):\n def test_scheduling(self):\n for i in range(20):\n factories.AssignmentFactory.create()\n fac...
python
edit
1
2
mit
5da7189f195d0daf9595c61f05156c85031ba0c5
matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz
tests/testapp/tests/test_scheduling.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\n\nurlpatterns = patterns(\n '', # First arg to patterns is a namespace parameter.\n\n # A handful of views in a base app.\n url(r'^$', 'base_...
python
edit
1
0
apache-2.0
e66894584a3762af2db8ebdbc4269e6aee1bc24e
petwitter/petwitter,petwitter/petwitter,petwitter/petwitter
thesite/thesite/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# TODO almost everything\n\nsrc_ds = gdal.Open( src_filename )\ndst_ds = driver.CreateCopy( dst_filename, src_ds, 0 )\n# Once we're done, close properly the dataset\ndst_ds = None\nsrc_ds = None\n\n```\n\nApply this change: Save destinati...
python
edit
3
0
mit
5590582fba18f94bec0fab4bd82982ce7d91de3b
lukefi/missamustikka,lukefi/missamustikka,lukefi/missamustikka
backend/generateGeotiff.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import UnitTest\n\n\nclass TestObjector(UnitTest):\n def test_objectify_returns_None_for_None(self):\n assert self.reddit._objector.objectify(None) is None\n\n```\n\nApply this change: Add tests for `Objector.parse_error()`...
python
edit
1
1
bsd-2-clause
0da1f02c0f6bb554a8a093bd4c597ebbe45e479b
praw-dev/praw,gschizas/praw,leviroth/praw,leviroth/praw,gschizas/praw,praw-dev/praw
tests/unit/test_objector.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys; sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))\n\nimport codecs\n\nimport pytest\n\nfrom lasio import read\n\negfn = lambda fn: os.path.join(os.path.dirname(__file__), \"examples\", fn)\n\n\n```\n\nApply this...
python
edit
13
1
mit
249367a835166ca9740cf70f36d6f61c43e0581a
Kramer477/lasio,kwinkunks/lasio,kinverarity1/lasio,kinverarity1/las-reader
tests/test_encoding.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\nimport sys\nimport unittest\n\nfrom functools import partial\n\n\nclass TestExamples(unittest.TestCase):\n pass\n\n\ndef test_file(filename):\n # Ignore the output\n saved = sys.stdout\n with open('/dev/nul...
python
edit
1
2
bsd-2-clause
45663e1d344e8802db37dfb6e040fbcacce90a0d
nicolaka/troposphere,ikben/troposphere,cloudtools/troposphere,mannytoledo/troposphere,horacio3/troposphere,ptoraskar/troposphere,iblazevic/troposphere,ccortezb/troposphere,kid/troposphere,pas256/troposphere,inetCatapult/troposphere,7digital/troposphere,amosshapira/troposphere,jantman/troposphere,garnaat/troposphere,jdc...
tests/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# competition_settings.py\n# This file contains settings for the current competition.\n# This include start and end dates along with round information.\nimport datetime # Only used to dynamically set the round dates.\n\n# The start and end ...
python
edit
1
0
mit
4bf565e363b96dbc13c7c9ba6f592aac6c98ac09
jtakayama/makahiki-draft,yongwen/makahiki,justinslee/Wai-Not-Makahiki,csdl/makahiki,csdl/makahiki,csdl/makahiki,jtakayama/makahiki-draft,jtakayama/ics691-setupbooster,yongwen/makahiki,yongwen/makahiki,jtakayama/ics691-setupbooster,yongwen/makahiki,jtakayama/makahiki-draft,jtakayama/ics691-setupbooster,jtakayama/makahik...
competition_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test FEI SEM image plugin functionality.\n\nFEI TIFFs contain metadata as ASCII plaintext at the end of the file.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport os\n\nimport numpy as np\n\nfrom imageio.testing import run_t...
python
edit
1
1
bsd-2-clause
1889814dc2c2ecc288cc6672de9aa747f55f3ca2
imageio/imageio
tests/test_fei_tiff.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, Integer, String\n\nfrom keybaseproofbot.database import Base\n\n\nclass Proof(Base):\n __tablename__ = 'proofs'\n user_id = Column(Integer, primary_key=True)\n keybase_username = Column(String)\n t...
python
edit
1
1
mit
b2bc9a893a8b7fea59759e74be6235b890a1ff96
pingiun/keybaseproofbot
keybaseproofbot/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom itertools import chain\nfrom rest_framework import permissions\nfrom django.utils import timezone\nfrom seven23 import settings\n\nclass CanWriteAccount(permissions.BasePermission):\n \"\"\"\n Object-level permission to onl...
python
edit
1
3
mit
4ffb58466820cfb2569cf4d4837c8e48caed2c17
sebastienbarbier/723e,sebastienbarbier/723e_server,sebastienbarbier/723e_server,sebastienbarbier/723e
seven23/api/permissions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\nfrom __future__ import print_function\nimport db, os, sys, re\nimport argparse\nimport json\nfrom collections import namedtuple\n\ntf2_key = namedtuple('tf2_key', \"server_account server_token steam_account host\")\n\n# ...
python
edit
4
0
mit
0ec5b3887e42191f1b1dda3c8b0f199655674394
cloudgameservers/tf2-keyserver
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\n\nclass BaseBuilder(object):\n\n def __init__(self, python, system_site_packages=False, clear=False):\n # We default to sys.executable if we're not given a Python.\n if python is None:\n python = sy...
python
edit
1
2
mit
4c4022e3a215b9b591220cd19fedbc501b63a1b2
ionelmc/virtualenv,ionelmc/virtualenv,ionelmc/virtualenv
virtualenv/builders/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport autocomplete_light\nfrom models import JednostkaAdministracyjna\n\n# This will generate a PersonAutocomplete class\nautocomplete_light.register(JednostkaAdministracyjna,\n # Just like in ModelAdmin.search_fields\n search_fields...
python
edit
1
0
mit
205b71aaad9103a1224a5c2999d66fd25a2714df
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/teryt/autocomplete_light_registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy\n# of the License at\n#\n# ht...
python
edit
1
3
apache-2.0
c0fd2b981f2657e0a78de028335ea172735c5f6b
openstack/zaqar,openstack/zaqar,openstack/zaqar,openstack/zaqar
zaqar/common/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User\nfrom doac.models import AuthorizationToken, Client, RefreshToken, Scope\n\n\nclass TestAuthorizationTokenModel(TestCase):\n\n def setUp(self):\n self.o...
python
edit
2
1
mit
97f507ab5869c306ed468c683ca6e6e9b3266f5e
Rediker-Software/doac
tests/tests/models/authorization_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom mopidy.backends import BaseBackend, BasePlaybackController\n\nlogger = logging.getLogger(u'backends.gstreamer')\n\nclass GStreamerBackend(BaseBackend):\n def __init__(self, *args, **kwargs):\n super(GStreame...
python
edit
1
1
apache-2.0
58e636838b0988814905fc163f369dd837aedfde
abarisain/mopidy,rawdlite/mopidy,jodal/mopidy,SuperStarPL/mopidy,dbrgn/mopidy,hkariti/mopidy,swak/mopidy,jmarsik/mopidy,rawdlite/mopidy,swak/mopidy,adamcik/mopidy,glogiotatidis/mopidy,adamcik/mopidy,ali/mopidy,jmarsik/mopidy,mokieyue/mopidy,vrs01/mopidy,tkem/mopidy,woutervanwijk/mopidy,bencevans/mopidy,priestd09/mopidy...
mopidy/backends/gstreamer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.ext import ndb\nfrom endpoints_proto_datastore.ndb import EndpointsModel\nfrom endpoints_proto_datastore.ndb import EndpointsAliasProperty\nfrom protorpc import messages\n\n\nclass ProductGroup(EndpointsModel):\n\n ...
python
edit
2
2
apache-2.0
52f585aa3aaaa4f645b61575d6ca307555247bcc
GoogleDeveloperExperts/experts-app-backend
appengine/models/product_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\n\nfrom us_ignite.common import sanitizer\nfrom us_ignite.blog.models import BlogLink, Post, PostAttachment\n\nfrom tinymce.widgets impo...
python
edit
1
2
bsd-3-clause
0a035a93666eb98b460d083e5dd822d7adb0614f
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/blog/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport textwrap\nfrom pathlib import Path\nfrom unittest.mock import Mock, patch\n\nimport pytest\n\nfrom pyinstrument.__main__ import main\nfrom pyinstrument.renderers.console import ConsoleRenderer\n\nfrom .util import BUSY_WAIT_SCRIPT\n\...
python
edit
4
1
bsd-3-clause
2ac9b826fa56a9b146c90767fe0b7a77b1d7ea5a
joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument
test/test_cmdline_main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport unittest\n\n\nclass GhostscriptTest(unittest.TestCase):\n\n def test_installed(self):\n process = subprocess.Popen(\n ['gs', '--version'],\n stdin=None,\n stdout=subproces...
python
edit
1
1
mit
e2f9c0c0e8b96e44c5410c242d0609ef36b5ee4e
YPlan/treepoem
tests/test_ghostscript.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib.comments.forms import CommentForm\nfrom django.conf import settings\nfrom django.utils.hashcompat import sha_constructor\n\nfrom threadedcomments.models import ThreadedComment\n\nclass ThreadedC...
python
edit
4
2
bsd-3-clause
6eb4c09cfc43e2f939660525101a1a8fac9c4838
yrcjaya/django-threadedcomments,coxmediagroup/django-threadedcomments,nikolas/django-threadedcomments,ccnmtl/django-threadedcomments,yrcjaya/django-threadedcomments,nikolas/django-threadedcomments,SmithsonianEnterprises/django-threadedcomments,PolicyStat/django-threadedcomments,ccnmtl/django-threadedcomments,Smithsonia...
threadedcomments/forms.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom malcolm.core import Controller, DefaultStateMachine, Hook, \\\n method_only_in, method_takes\n\n\nsm = DefaultStateMachine\n\n\n@sm.insert\n@method_takes()\nclass DefaultController(Controller):\n\n Resetting = Hook()\n Disabli...
python
edit
1
2
apache-2.0
84a7b7fd8612121379700498c61e7c292eb8262a
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/controllers/builtin/defaultcontroller.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
031fffb277fbf86e8aba3d7509823ee7b3acf873
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
seleniumbase/config/proxy_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.\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...
python
edit
1
4
apache-2.0
12fbf40ce5ffaab44c7a602925230e0c2d96b9b0
biosustain/cameo,biosustain/cameo,KristianJensen/cameo
cameo/strain_design/heuristic/observers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# main: loader of all the command entry points.\n\nimport sys\nimport traceback\n\nfrom click.formatting import HelpFormatter\nfrom pkg_resources import iter_entry_points\n\nfrom rasterio.rio.cli import BrokenCommand, cli\n\n\n# Find and lo...
python
edit
4
0
bsd-3-clause
7bdcf639f19c2f1960bd46f7400b8010c5da1de8
brendan-ward/rasterio,perrygeo/rasterio,clembou/rasterio,perrygeo/rasterio,njwilson23/rasterio,johanvdw/rasterio,njwilson23/rasterio,clembou/rasterio,brendan-ward/rasterio,clembou/rasterio,kapadia/rasterio,perrygeo/rasterio,brendan-ward/rasterio,kapadia/rasterio,njwilson23/rasterio,johanvdw/rasterio,kapadia/rasterio,yo...
rasterio/rio/main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport argparse\n\nfrom auth import twitter_auth as auth\nfrom twitterbot import TwitterBot\nfrom apscheduler.schedulers.blocking import BlockingScheduler\n\nparser = argparse.ArgumentParser(description='Respond to Twitter ...
python
edit
3
1
mit
fa0513fe303a0111291d459d3bf275229b1eb052
kshvmdn/TwitterBirthdayResponder,kshvmdn/twitter-birthday-responder,kshvmdn/twitter-autoreply
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utilitary shared functions.\"\"\"\n\nboolean_parameters = ['show_labels', 'highlight_collisions',\n 'show_bounding_box', 'show_frame_info',\n 'show_d_lines', 'show_trails']\n\ntuple_parameters...
python
edit
2
12
mit
ee30d1f8b268f6a5862de0527bc48dd45f59b9f6
dmrib/trackingtermites
trackingtermites/utils.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom tests import base\nfrom buildercore import cfngen, project\nimport logging\nLOG = logging.getLogger(__name__)\n\nlogging.disable(logging.NOTSET) # re-enables logging during integration testing\n\n# Depends on talking to ...
python
edit
1
3
mit
30470437a86a58e5d89167f24206227737a04cf8
elifesciences/builder,elifesciences/builder
src/integration_tests/test_validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass GreatExpectationsError(Exception):\n pass\n \n \nclass ExpectationsConfigNotFoundError(GreatExpectationsError):\n def __init__(self, data_asset_name):\n self.data_asset_name = data_asset_name\n self.message = \"N...
python
edit
1
1
apache-2.0
0774eea1027bc9bb88b5289854aa26109f258712
great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations
great_expectations/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = \"srsly\"\n__version__ = \"0.0.4\"\n__summary__ = \"Modern high-performance serialization utilities for Python\"\n__uri__ = \"https://explosion.ai\"\n__author__ = \"Explosion AI\"\n__email__ = \"<EMAIL>\"\n__license__ = \"MIT\"\...
python
edit
1
0
mit
93d6b5e33747169a102629015a63c1d4006cf81e
explosion/srsly,explosion/srsly,explosion/srsly,explosion/srsly
srsly/about.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request, send_file\nimport json\n\nfrom src.generate import generate\n\napp = Flask(__name__)\n\navailable_settings = ['grammarTitle', 'grammarSubtitle', 'author', 'format',\n 'theme']\n\n@app.r...
python
edit
3
4
mit
6113788729b6e5c1df44b793f63a7e95caeeb860
kdelwat/Coda,kdelwat/Coda
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Blitz speed reading trainer add-on for Anki\n#\n# Copyright (C) 2016 Jakub Szypulka, Dave Shifflett\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Ge...
python
edit
1
3
mit
a0dd71a6b56ed8f88f29691edd7a65d84656e019
jaksz/anki-blitz
anki-blitz.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request, Flask\n\nfrom st2reactor.sensor.base import Sensor\n\n\nclass EchoFlaskSensor(Sensor):\n\n def __init__(self, sensor_service, config):\n super(EchoFlaskSensor, self).__init__(\n sensor_service...
python
edit
1
1
apache-2.0
bf7dd8bb6ff3e4a8f6412122ca23829c35554082
StackStorm/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2
contrib/examples/sensors/echo_flask_app.py
rejected_duplicate
Near-duplicate of sample 15487
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"\nCircular Layout\n===============\n\nThis module contains several graph layouts which ...
python
edit
1
2
bsd-3-clause
8f2ca07286bd0950e17c410fc27297775934ba21
drufat/vispy,michaelaye/vispy,drufat/vispy,ghisvail/vispy,Eric89GXL/vispy,Eric89GXL/vispy,ghisvail/vispy,michaelaye/vispy,Eric89GXL/vispy,michaelaye/vispy,drufat/vispy,ghisvail/vispy
vispy/visuals/graphs/layouts/circular.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\n#\n# This is the configuration file of the application\n#\n# Please make sure you don't store here any secret information and use environment\n# variables\n#\n\n\nSQLALCHEMY_DATABASE_URI = os.environ.ge...
python
edit
1
0
bsd-3-clause
55b878bae84fea91bf210e3b30a726877990732e
boazin/anyway,yosinv/anyway,hasadna/anyway,yosinv/anyway,hasadna/anyway,boazin/anyway,hasadna/anyway,hasadna/anyway,boazin/anyway,yosinv/anyway
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.db.models import Q\n\nfrom councils.models import Council, UserCouncils\n\n\ndef get_domain(request):\n return os.environ.get(\"APP_DOMAIN\", request.META.get(\"HTTP_HOST\"))\n\n\ndef assign_councils_to_user(user...
python
edit
1
2
bsd-3-clause
f2a7fe543aa338e81bea692b8267154e64e7478d
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/file_uploads/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport sys\n\n\nclass TerseHelpFormatter(argparse.HelpFormatter):\n def _format_action_invocation(self, action):\n if not action.option_strings or action.nargs == 0:\n super()._format_action_invocation(...
python
edit
1
3
mit
aa5d4e965868d139f32a3d143725e6fe674f95f9
drx/rom-info
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nA simple test engine, not intended for real use but as an example\n'''\n\n# Import python libs\nfrom __future__ import absolute_import, print_function, unicode_literals\nimport logging\n\n# Import salt libs\nim...
python
edit
2
3
apache-2.0
ccf9240f36cbdc9cd44b4bc862ca71538ca17310
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/engines/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom pynux import utils\nfrom os.path import expanduser\nimport collections \nimport pprint\npp = pprint.PrettyPrinter(indent=4)\n\nCHILD_NXQL = \"SELECT * FROM Document WHERE ecm:parentId =...
python
edit
3
0
bsd-3-clause
e71c2c5e593be6d6aef04d9752a675bde3ea3150
ucldc/ucldc-merritt
ramicova_debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport time\n\nfrom website.app import init_app\nfrom website.identifiers.utils import get_or_create_identifiers\n\nlogger = logging.getLogger(__name__)\nlogging.basicConfig(level=logging.INFO)\n\n\ndef add_identifiers_to_pr...
python
edit
1
2
apache-2.0
b8291dd5bee21ea2dfb77f0fc5b6756773eb5798
erinspace/osf.io,brianjgeiger/osf.io,caseyrollins/osf.io,chennan47/osf.io,pattisdr/osf.io,mfraezz/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,saradbowman/osf.io,TomBaxter/osf.io,aaxelb/osf.io,felliott/osf.io,pattisdr/osf.io,leb2dg/osf.io,leb2dg/osf.io,HalcyonChimera/osf.io,caneruguz/osf.io,CenterForOpenScience/osf.io...
scripts/add_identifiers_to_existing_preprints.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add os import to fix port from env" }, { "role": "assistant", "content": "# Run a test server.\nfrom app import app\nimport os\n\nport = int(os.environ.get(\"PORT\", 5000))\napp.run(host='0.0.0.0', port=port, debug=True)\n" } ]
python
new_file
1
0
isc
769348413bce3ddc0e5214bb170ad8c5e4a78946
appletonmakerspace/madlib,mikeputnam/madlib
run_web_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2014 Mirantis Inc.\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#\n# ...
python
edit
1
1
apache-2.0
b95503f38f8a9b8333c864446dca90e104075059
openstack/sahara,openstack/sahara
sahara/api/acl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.view import (\n view_config,\n view_defaults,\n )\n\nfrom pyramid.httpexceptions import HTTPSeeOther\n\nfrom pyramid.security import (\n remember,\n forget,\n )\n\n@view_defaults(accept...
python
edit
1
2
isc
c43b69174e44e3de4888b31d70d3dd8939160988
bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria
alexandria/views/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport string\n\n\ndef generate_rpm_spec(template, patch_file):\n spec_template = string.Template(template)\n\n base_name, _ = os.path.splitext(patch_file)\n\n values = {\n 'name': 'kpatch-module-...
python
edit
1
1
mit
120225323011a53d4a0564d0fcfe834d9ac27062
centos-livepatching/kpatch-package-builder
build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf8\n\n# Local modules\nfrom common import debug\nfrom common.action import action_classes\nfrom common.telegram import telegram_utils\n\nfrom dailydevo import cac_utils\n\nclass CACDevoAction(action_classes.Action):\n def iden...
python
edit
3
2
mit
511030652f4f411b4a97e3412899c6c7980348d4
julwrites/biblicabot
dailydevo/cac_actions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest the \"snabb lwaftr run\" subcommand. Needs NIC names.\n\"\"\"\n\nimport unittest\n\nfrom test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names\n\n\nSNABB_PCI0, SNABB_PCI1 = nic_names()\n\n@unittest.skipUnless(SNABB_PCI0 ...
python
edit
1
3
apache-2.0
8aec91209521d7f2701e63c681f4b765c1b2c6bb
alexandergall/snabbswitch,Igalia/snabbswitch,snabbco/snabb,snabbco/snabb,snabbco/snabb,dpino/snabbswitch,dpino/snabb,eugeneia/snabb,Igalia/snabb,dpino/snabb,eugeneia/snabb,eugeneia/snabbswitch,eugeneia/snabb,SnabbCo/snabbswitch,eugeneia/snabb,Igalia/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,Igalia/snabb,dpino/s...
src/program/lwaftr/tests/subcommands/run_test.py
accepted
null
true