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\n\nimport random\nfrom nott_params import *\n\nnum_samples = int(gridDim[0] * gridDim[1] * 10)\n\ndef generate_data(numx, numy):\n stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1))\n return st...
python
edit
10
1
mit
806a6d8e029ef1c4708a265abd99219b167cc843
jeffames-cs/nnot
generate-data.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nfrom withtool import __version__\n\n\ndef read(fname):\n path = os.path.join(os.path.dirname(__file__), fname)\n with open(path, encoding='utf-8') as f:\n return f.read()\n\nsetup(\n ...
python
edit
1
1
mit
7fc2b2d1c2f21cd44b3fbcd641ae2b36f38f080d
renanivo/with
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom extras.api.serializers import CustomFieldSerializer\nfrom tenancy.models import Tenant, TenantGroup\n\n\n#\n# Tenant groups\n#\n\nclass TenantGroupSerializer(serializers.ModelSerializer):\n\n ...
python
edit
1
0
apache-2.0
97c0f23c676de7e726e938bf0b61087834cf9fd9
digitalocean/netbox,snazy2000/netbox,digitalocean/netbox,snazy2000/netbox,Alphalink/netbox,snazy2000/netbox,lampwins/netbox,Alphalink/netbox,snazy2000/netbox,Alphalink/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,Alphalink/netbox
netbox/tenancy/api/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCross-process log tracing: HTTP client.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport sys\nimport requests\n\nfrom eliot import Logger, to_file, start_action\nto_file(sys.stdout)\nlogger = Logger()\n\n\ndef request(x, y...
python
edit
1
1
apache-2.0
7b1766a6f07d468f1830871bfe2cdc1aaa29dcbf
ScatterHQ/eliot,ScatterHQ/eliot,ClusterHQ/eliot,iffy/eliot,ScatterHQ/eliot
examples/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding:utf-8 -*-\n# Powered By KK Studio\n# Index Page\n\nfrom BaseHandler import BaseHandler\nfrom tornado.web import authenticated as Auth\n\nclass IndexHandler(BaseHandler):\n\n #@Auth\n def get(self):\n ...
python
edit
1
1
mit
53a518aa9e00af8f2b24b566f6d0420d107e93bf
kkstu/Torweb,kkstu/Torweb
handler/index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#######################################################################\n# Name: test_examples\n# Purpose: Test that examples run without errors.\n# Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com>\n#...
python
edit
3
5
mit
1c7e6a9c973551193d19bacb79d602e4d3cca630
leiyangyou/Arpeggio,leiyangyou/Arpeggio
tests/unit/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom invoke import run, task\n\nTESTPYPI = \"https://testpypi.python.org/pypi\"\n\n\n@task\ndef lint():\n \"\"\"Run flake8 to lint code\"\"\"\n run(\"python setup.py flake8\")\n\n\n@task(lint)\ndef test():\n \"\"\"Lint, unit test, ...
python
edit
1
4
mit
35541f35ebed2b41b3fde073e8f3d2aaaca41dcb
questrail/taffmat
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.db import models\n\nfrom django.contrib.auth.models import User\n\n\nclass UserAssociation(models.Model):\n \n user = models.ForeignKey(User)\n service = models.CharField(max_length=75, db_index=True)...
python
edit
1
2
bsd-3-clause
6e6383037fc86beba36f16e9beb89e850ba24649
eldarion/django-oauth-access,eldarion/django-oauth-access
oauth_access/models.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\"\"\"\ntest_get_user_config\n--------------------\n\nTests formerly known from a unittest residing in test_config.py named\n\"\"\"\n\nimport pytest\n\n\n@pytest.fixture(scope='function')\nd...
python
edit
1
2
bsd-3-clause
05dbb8055f4e1c61d04daf8324169c7834b5393b
nhomar/cookiecutter,audreyr/cookiecutter,vincentbernat/cookiecutter,cguardia/cookiecutter,luzfcb/cookiecutter,dajose/cookiecutter,vincentbernat/cookiecutter,dajose/cookiecutter,janusnic/cookiecutter,atlassian/cookiecutter,jhermann/cookiecutter,0k/cookiecutter,agconti/cookiecutter,cguardia/cookiecutter,venumech/cookiecu...
tests/test_get_user_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nclass KMeans(object):\n def __init__(self, clusters, init=None):\n self.clusters = clusters\n self.init = init\n self.centroids = np.array([])\n self.partition = np.array([])\n\n def c...
python
edit
1
10
mit
384e7076f8c07f6192f11a813569540ddc98cc0c
kubkon/kmeans
kmeans.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport pytest\nimport rain.compiler as C\n\ndef ls(*path):\n path = os.path.join(*path)\n for file in os.listdir(path):\n yield os.path.join(path, file)\n\ndef lsrn(*path, recurse=False):\n for file in ls(*path):\n ...
python
edit
1
7
mit
9d02fcd251cc2f954e559794507e1b052d8bef3c
philipdexter/rain,philipdexter/rain,philipdexter/rain,scizzorz/rain,philipdexter/rain,scizzorz/rain,scizzorz/rain,scizzorz/rain
tests/test_compile_samples.py
rejected_duplicate
Near-duplicate of sample 10064
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport re\nimport shlex\nimport subprocess\nfrom termcolor import cprint\n\nENV_PATTERN = re.compile('^(?P<name>[^\\s]+)\\s*=\\s*(?P<value>.+)$')\n\n\ndef previous_alias(alias):\n return ...
python
edit
1
4
mit
2a0a29effa48caf5d95ed892d85cee235ebe1624
marcy-terui/lamvery,marcy-terui/lamvery
lamvery/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom move import load_moves, encode_moves, normalize_index, move\nimport unittest\n\nclass TestMove(unittest.TestCase):\n def setUp(self):\n self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] \n\n def test_load_moves(self):\n ...
python
edit
5
1
mit
b2badddd5fb58d6928bdfce84e88951e190f15fb
machinelearningdeveloper/aoc_2016
02/test_move.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls.defaults import url, patterns, include\nfrom django.conf.urls.static import static\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.http import HttpRes...
python
edit
4
0
bsd-3-clause
79dd3b4d0bd1fb331558892b5d29b223d4022657
rmoorman/feedhq,vincentbernat/feedhq,vincentbernat/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,vincentbernat/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,feedhq/feedhq
feedhq/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport unittest\nfrom jktest.config import TestConfig\nfrom jktest.jkind import JKind\nfrom jktest.results import ResultList\n\nclass TestCase( unittest.TestCase ):\n def assertTrue( self, expr, msg = None ):\n super( TestCase, ...
python
edit
1
5
bsd-3-clause
ce59932d485440c592abbacc16c1fc32a7cde6e2
agacek/jkindRegression,pr-martin/jkindRegression
jktest/testcase.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\nimport logging\n\nfrom aioredlock import Aioredlock, LockError\n\n\nasync def basic_lock():\n lock_manager = Aioredlock([{\n 'host': 'localhost',\n 'port': 6374,\n 'db': 0,\n 'password': None\n...
python
edit
1
2
mit
10be4d04d5e96993f5dd969b3b1fdb0686b11382
joanvila/aioredlock
examples/basic_lock.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Parsing of command line arguments into parallel inputs.\n\"\"\"\n\ndef to_parallel(args, module=\"bcbio.distributed\"):\n \"\"\"Convert input arguments into a parallel dictionary for passing to processing.\n \"\"\"\n ptype, c...
python
edit
1
5
mit
cb39c1edf395f7da1c241010fc833fe512fa74ac
brainstorm/bcbio-nextgen,brainstorm/bcbio-nextgen,vladsaveliev/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,brainstorm/bcbio-nextgen,lbeltrame/bcbio-nextgen,a113n/bcbio-nextgen,biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,chapmanb/bcbio-nextgen,a113n/bcbio-nextgen,cha...
bcbio/distributed/clargs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8\n\nimport random, string\n\ndef random_string(length,\n letters=True,\n digits=True,\n punctuation=False,\n whitespace=False):\n \"\"\" Returns a random string \"\"\"\n chars = ''\n i...
python
edit
1
6
bsd-2-clause
b7d0d81bd6030abfee5b3993d42e02896e8c0b50
tampakrap/edpwd
edpwd/random_string.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uwsgidecorators import spool\nimport database as db\nfrom database.model import Team\nfrom geotools import simple_distance\nfrom geotools.routing import MapPoint\n\n\n@spool\ndef get_aqua_distance(args):\n team = db.session.query(Te...
python
edit
4
2
bsd-3-clause
18204d7e508052cfabc58bc58e4bb21be13fbd00
janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
src/webapp/tasks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add module declaration for karenina" }, { "role": "assistant", "content": "default_app_config = 'material.admin.apps.MaterialAdminConfig'\n\n\ntry:\n from . import modules\n admin = modules.Admin()\nexcept ImportError:\n ...
python
new_file
1
0
bsd-3-clause
ad42c66676cc8b7778a4020fff3402bc100f212c
Axelio/django-material,MonsterKiller/django-material,refnode/django-material,lukasgarcya/django-material,2947721120/django-material,afifnz/django-material,afifnz/django-material,sourabhdattawad/django-material,MonsterKiller/django-material,koopauy/django-material,koopauy/django-material,thiagoramos-luizalabs/django-mat...
material/admin/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\"\"\"Add CycleTaskGroupObject.object\n\nRevision ID: 26d9c9c91542\nRevises: 19a67dc67c3\nCreate Date: 2014-07-15 21:49:34.073412\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '26d9c9c91542'\ndown_revision = '19a67dc67...
python
edit
1
1
apache-2.0
99884ec3e960fa7b73e10a6969c455de6eca542b
NejcZupec/ggrc-core,hasanalom/ggrc-core,hyperNURb/ggrc-core,hasanalom/ggrc-core,vladan-m/ggrc-core,plamut/ggrc-core,uskudnik/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,hasanalom/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-cor...
src/ggrc_workflows/migrations/versions/20140715214934_26d9c9c91542_add_cycletaskgroupobject_object.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\n\n\ndef fn(row):\n if row['Type'] == 'DIRECT DEBIT':\n return 'DD'\n if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME':\n return 'BP'\n if row['Amount (GBP)'] < 0:\n ...
python
edit
1
5
mit
7f0b561625b94c6fa6b14dab4bbe02fa28d38bfa
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
statement_format.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions for processing ScheduleInstances" }, { "role": "assistant", "content": "from corehq.sql_db.util import (\n get_object_from_partitioned_database,\n save_object_to_partitioned_database,\n run_query_across_par...
python
new_file
4
2
bsd-3-clause
05f220d6090be58ee465b6f30d01e14079bcbeba
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/messaging/scheduling/scheduling_partitioned/dbaccessors.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport toml\n\ndef parse(file):\n with open(file) as conffile:\n data = toml.loads(conffile.read())\n\n return data\n\n```\n\nApply this change: Use pytoml instead of toml library" }, { "role": "assistant", "content...
python
edit
1
1
mit
2e10e1bbfe6c8b7b4fba9adfe0cbb8518a19eeca
mvdnes/mdms,mvdnes/mdms
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import getenv, \\\n path\nfrom time import time\nfrom datetime import timedelta\n\n\nclass Config(object):\n AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID')\n AWS_REGION = getenv('AWS_REGION')\n AWS_S3_BUCKET ...
python
edit
1
0
mit
955d83391540d9d1dd7732c204a99a51789745e4
taeram/aflutter,taeram/aflutter,taeram/aflutter,taeram/aflutter
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\n\ndef main(argv=sys.argv):\n raise NotImplementedError\n\n```\n\nApply this change: Add argument parsing for 'pygout' command" }, { "role": "assistant", "content": "import sys\nimport argparse\n\nimport pygments...
python
edit
2
1
bsd-3-clause
5e0e0e792ca36b7a6daea3931e5333d5d6f28281
alanbriolat/PygOut
pygout/cmdline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom scout.demo import cnv_report_path\nfrom scout.commands import cli\n\n\ndef test_load_cnv_report(mock_app, case_obj):\n \"\"\"Testing the load delivery report cli command\"\"\"\n\n # Make sure...
python
edit
1
1
bsd-3-clause
660cd7526c1aad6632446b1af5ae286b5383b52c
Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout
tests/commands/load/test_load_cnv_report_cmd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = '1.2.0'\n\ntry:\n from django.conf import settings\n getattr(settings, 'dummy_attr', 'dummy_value')\n _LOAD_PACKAGES = True\nexcept:\n # Just running sdist, we think\n _LOAD_PACKAGES = False\n\nif _LOAD_PACKAGES...
python
edit
11
0
bsd-3-clause
76b47fec3b24410f875db96b3404c47d4c3634cb
SheepDogInc/sheepdog_tables,SheepDogInc/sheepdog_tables
sheepdog_tables/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport sys\nimport time\nimport glob\n\nimport serial\nimport psutil\n\n\nCPU_INTERVAL = 0.5\nCONNECT_TIMEOUT = 2\nBAUD = 4800\n\ndef update_loop(conn):\n while True:\n load = psutil.cpu_percent(interval=CP...
python
edit
1
3
mit
fbe446727b35680e747c74816995f6b7912fffeb
swarmer/syslights
syslights_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom os.path import dirname, abspath\nimport sys\n\nfrom django.conf import settings\n\nif not settings.configured:\n from django import VERSION\n settings_dict = dict(\n INSTALLED_APPS=(\n '...
python
edit
1
3
mit
51c5e4e1e670f52584c157330a9a3b910be92d57
simonluijk/django-localeurl,jmagnusson/django-localeurl
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom restless.dj import DjangoResource\nfrom restless.resources import skip_prepare\n\nfrom django.conf.urls import patterns, url\n\n\nfrom harvest.models import Job\nfrom harvest.jobstatemachine import JobStatemachine\nfrom...
python
edit
4
4
bsd-3-clause
95a2d0bb226d57c3aa6977d5d1ce78b014e21e1e
rockychen-dpaw/borgcollector,rockychen-dpaw/borgcollector,parksandwildlife/borgcollector,rockychen-dpaw/borgcollector,parksandwildlife/borgcollector,parksandwildlife/borgcollector
harvest/jobresource.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis is a simple test script to that is meant to be run by Travis CI to ensure\neverything works properly foreach bindings on each supported python\nversion (3.2, 3.3, 3.4).\n\nIt runs a QApplication and sho...
python
edit
1
1
mit
7e8823b59e7a41430fd5f7aad5481c3a9903b4ba
pyQode/pyqode.python,mmolero/pyqode.python,zwadar/pyqode.python,pyQode/pyqode.python
test/test_editor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\n\nclass GroupTestCase(TestCase):\n\n def get_persons(self):\n pass\n```\n\nApply this change: Test the ability to add and get all persons in the group" }, { "role": "assistant", "conten...
python
edit
1
1
mit
be922ce28931c101a245aa4b5b0f74c31c23cc60
dizpers/python-address-book-assignment
tests/test_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Functions copypasted from newer versions of numpy.\n\n\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nimport warnings\n\nimport numpy as np\n\nfrom scipy.lib._version import NumpyVersion\n\nif NumpyVersion(...
python
edit
1
3
bsd-3-clause
d18ff01e737155eca2cb6c765291e6239328b003
perimosocordiae/scipy,andyfaff/scipy,aman-iitj/scipy,jakevdp/scipy,dominicelse/scipy,zerothi/scipy,zxsted/scipy,matthewalbani/scipy,anielsen001/scipy,zxsted/scipy,WillieMaddox/scipy,endolith/scipy,cpaulik/scipy,anielsen001/scipy,woodscn/scipy,bkendzior/scipy,gef756/scipy,mdhaber/scipy,futurulus/scipy,Stefan-Endres/scip...
scipy/lib/_numpy_compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom abc import ABCMeta, abstractmethod\n\n\nclass IdaTypes:\n __metaclass__ = ABCMeta\n\n @abstractmethod\n def decode(self, data):\n raise NotImplementedError()\n\n @abstractmethod\n def get_name(self):\n rais...
python
edit
1
1
mit
12728f6b924a3d45f78b3955cb9fcb563db6a81f
goodwinxp/ATFGenerator,goodwinxp/ATFGenerator,goodwinxp/ATFGenerator
pida_abc_type.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\n\nimport tornado.ioloop\nimport tornado.web\nimport tornado.autoreload\n\nfrom tornado.options import parse_command_line, define, options\n\n\ndefine('port', default=8888)\ndefine('...
python
edit
3
1
mit
638ff83c99264fc8336b0a60e39400cafbcc643e
mlgruby/mining,seagoat/mining,seagoat/mining,avelino/mining,mlgruby/mining,jgabriellima/mining,mining/mining,chrisdamba/mining,mining/mining,mlgruby/mining,jgabriellima/mining,AndrzejR/mining,chrisdamba/mining,avelino/mining,AndrzejR/mining
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAn url to AutocompleteView.\n\nautocomplete_light_autocomplete\n Given a 'autocomplete' argument with the name of the autocomplete, this url\n routes to AutocompleteView.\n\nautocomplete_light_registry\n Renders the autocom...
python
edit
1
0
mit
94e68ff420ecb07ad830e213b38863bf34b7f85c
shubhamdipt/django-autocomplete-light,luzfcb/django-autocomplete-light,shubhamdipt/django-autocomplete-light,dsanders11/django-autocomplete-light,Perkville/django-autocomplete-light,Perkville/django-autocomplete-light,Eraldo/django-autocomplete-light,luzfcb/django-autocomplete-light,yourlabs/django-autocomplete-light,d...
autocomplete_light/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Remove a property from the datastore.\nHow to use:\n\n$ cd experimental/db/\n$ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com\n> import remove_property\n\"\"\"\n\nfrom google.appengine.api import namespace_manager\nf...
python
edit
2
3
mit
e421a3cfd9ecfe05aa21b2b3da792f7ab824727d
tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation
experimental/db/remove_property.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.script import Manager\nfrom flask.ext.alembic import ManageMigrations\nimport os\n\nfrom starter import app, db\nfrom starter.users.models import user_datastore\n\n\nmanager = Manager(app)\nmanager.add_command(\"migrate\", Ma...
python
edit
6
3
mit
bca298cc9942005f3ab6c74359a52a4c410a5231
litnimax/flask-starter,andrewsnowden/flask-starter,wenxer/flask-starter,andrewsnowden/flask-starter,litnimax/flask-starter,litnimax/flask-starter,wenxer/flask-starter,andrewsnowden/flask-starter,wenxer/flask-starter
manage.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Jack Brewer\n# Copyright (c) 2015 Jack Brewer\n#\n# License: MIT\n\n\"\"\"This module exports the Stylint plugin class.\"\"\"\n\nfrom...
python
edit
1
0
mit
1fac10d27f00322e34c3b89527c32b1dcb02decd
jackbrewer/SublimeLinter-contrib-stylint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom plumbum import local, CommandNotFound\n\nfrom changes.changelog import generate_changelog\nfrom changes.packaging import build_package, install_package, upload_package, install_from_pypi\nfrom changes.vcs import tag_a...
python
edit
1
3
mit
33b5e210ffc32f9f7b3764e1f6f3d54e1f040783
goldsborough/changes
changes/flow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Copyright 2016 Battelle Energy Alliance, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
1
apache-2.0
6418eb4cb76a00372552b3e06b71f42c520ada7b
brianmoose/civet,idaholab/civet,idaholab/civet,idaholab/civet,idaholab/civet,brianmoose/civet,brianmoose/civet,brianmoose/civet
ci/TimeUtils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nmolvs.utils\n~~~~~~~~~~~\n\nThis module contains miscellaneous utility functions.\n\n:copyright: Copyright 2014 by Matt Swain.\n:license: MIT, see LICENSE file for more details.\n\"\"\"\n\nfrom __future__ im...
python
edit
1
2
mit
6aec2246389934bca253a2fcd18f3ac24525c670
mcs07/MolVS
molvs/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bioshareX.models import ShareLog, Share, Tag, ShareStats\nfrom rest_framework import serializers\nfrom django.contrib.auth.models import User\nfrom django.core.urlresolvers import reverse\nclass UserSerializer(serializers.ModelSerializ...
python
edit
1
1
mit
57fbdb0f3856b91f55ef8e230044a1f60b46f14d
amschaal/bioshare,amschaal/bioshare,amschaal/bioshare,amschaal/bioshare,amschaal/bioshare
bioshareX/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# TestAccelerateSIMD.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Exception\n#\n# ...
python
edit
3
0
apache-2.0
d2ac548441523e2ed4d0ac824e5972ae48be3b19
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
packages/Python/lldbsuite/test/lang/swift/closure_shortcuts/TestClosureShortcuts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom pathlib import Path\nimport subprocess\n\n\nclass TestVintDoNotDiedWhenLintingVital(unittest.TestCase):\n def assertVintStillAlive(self, cmd):\n try:\n got_output = subprocess.check_output(cmd,\n ...
python
edit
1
2
mit
d99ad3de00ec8bb9b3a36de5f50bd4f48a08cbb1
Kuniwak/vint,RianFuro/vint,Kuniwak/vint,RianFuro/vint
test/acceptance/test_cli_vital.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport boto\nfrom bucketeer import commit\n\nclass BuckeeterTest(unittest.TestCase):\n\n global existing_bucket\n existing_bucket = 'bucket.exists'\n\n def setUp(self):\n # Create a bucket with one file\n connectio...
python
edit
4
1
mit
c973068ada6fa5039a289719c852f06fe786c8fa
mgarbacz/bucketeer
bucketeer/test/test_commit.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a simple app initialization function since paster shell is busted" }, { "role": "assistant", "content": "import os.path\nimport pylons\nfrom paste.deploy import appconfig\n\n\ndef easy_app_init(ini_path):\n ini_path = os.p...
python
new_file
1
1
mit
ede7a27ca8862bdd1b9b0b7a113b80d055492ae1
jonnylamb/debexpo,jadonk/debexpo,jonnylamb/debexpo,jonnylamb/debexpo,swvist/Debexpo,jadonk/debexpo,swvist/Debexpo,swvist/Debexpo,jadonk/debexpo
debexpo/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\nfrom celery import shared_task\nfrom django.conf import settings\nfrom integrations import slack\n\n\ndef switchable_task(func):\n @wraps(func)\n def wrapper(*args, **kwargs):\n if settings.USE_SC...
python
edit
1
2
mit
78a157d25018a9ed858d4b3b89ee565e6ae9a44c
patrick91/pycon,patrick91/pycon
backend/integrations/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom luigi import Parameter\nfrom ob_airtable import get_record_by_name, get_record\n\nAIRTABLE_EXPT_TABLE = 'Genomics%20Expt'\nAIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample'\n\nS3_BUCKET = os.environ.get('S3_BUCKET')\n\n\ndef get...
python
edit
3
2
apache-2.0
150dad224dd985762714b73e9a91d084efb11e06
outlierbio/ob-pipelines,outlierbio/ob-pipelines,outlierbio/ob-pipelines
ob_pipelines/sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport redis\nimport pickle\n\nfrom .idatabasemanager import IDatabaseManager\n\nclass RedisManager(IDatabaseManager):\n KEY_MESSAGE_QUEUE = 'message_queue'\n\n def __init__(self, redis_url):\n self.connection = redis.Redis.fro...
python
edit
1
2
mit
af10bb6acd0a7f4f68d71662eca648ef51eba1c4
edonosotti/wechat-bot-skeleton-python
src/lib/db/redismanager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\nclass Config:\n SECRET_KEY = 'secret'\n\n\n\nclass DevelopmentConfig(Config):\n DEBUG = True\n\nclass ProductionConfig(Config):\n DEBUG = False\n\n\nclass TestingCo...
python
edit
1
0
mit
fbbef3b57f115fa7adc291c80459cd04e7c4e877
JoshuaOndieki/buckylist,JoshuaOndieki/buckylist
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nfrom doorman import Doorman\n\nparser = argparse.ArgumentParser(description='Doorman keeps your secret things')\nparser.add_argument('-s', '--secret', action=\"store_true\", dest=\"status\", help='Hide all secret...
python
edit
2
2
mit
0dcc2a5865ed31618f63e9b152501cf8fbc201ac
halitalptekin/doorman
doorman/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nclass BatchMoonScanForm(forms.Form):\n data = forms.CharField(\n widget=forms.Textarea(attrs={'class':'form-control monospace'}),\n )\n\n```\n\nApply this change: Add clean method for batch submissio...
python
edit
1
4
mit
7fb46bc6fc2c5783569f869bf4855d1ed3709ccb
StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser
elmo/moon_tracker/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass FandomHierarchy(models.Model):\n\tname = models.CharField(max_length=100)\n\tparent = models.ForeignKey('self')\n\t\nclass Image(models.Model):\n\tpixel_width = models.IntegerField()\n\tpixel_height = m...
python
edit
1
1
bsd-3-clause
f4d7f7207cff82c38d6973dbef717bfc50345b32
willmurnane/store
models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, include, url\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^admin/doc/', include('django.contrib.admindocs.urls')),\n url(r'^admin/', incl...
python
edit
1
0
apache-2.0
ce291ba622ae27e0bdb448fee26b37c9af4ffeb0
BangorUniversity/django-fluent-comments,PetrDlouhy/django-fluent-comments,mgpyh/django-fluent-comments,Afnarel/django-fluent-comments,django-fluent/django-fluent-comments,BangorUniversity/django-fluent-comments,PetrDlouhy/django-fluent-comments,BangorUniversity/django-fluent-comments,Afnarel/django-fluent-comments,djan...
example/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport guv\n\nguv.monkey_patch()\n\nfrom guv import gyield, sleep\nimport threading\nimport greenlet\n\ngreenlet_ids = {}\n\n\ndef debug(i):\n print('{} greenlet_ids: {}'.format(i, greenlet_ids))\n\n\ndef f():\n greenlet_ids[1] = gree...
python
edit
1
1
mit
a8ac03e3a556230e9318daee1dd80f77502d76c2
veegee/guv,veegee/guv
examples/threads.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Comet VOEvent Broker.\n# Example event handler: print an event.\n\nimport lxml.etree as ElementTree\nfrom zope.interface import implementer\nfrom twisted.plugin import IPlugin\nfrom comet.icomet import IHandler\n\n# Event handlers must im...
python
edit
1
1
bsd-2-clause
71cc08178729c81d1af75e3ad5cf637f658e68b1
jdswinbank/Comet,jdswinbank/Comet
comet/plugins/eventprinter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom dataset import DatasetItem\n\nclass DatasetSpider(CrawlSpider):\n\n name =...
python
edit
1
1
mit
0827ea6ef23e87461bb936684bc61bcc1cb6b42f
MaxLikelihood/CODE
spider.py
rejected_duplicate
Near-duplicate of sample 2461
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Generated by Django 3.0.5 on 2020-04-15 09:43\n\nfrom django.db import migrations\n\n\ndef change_extension_permission_to_plugin_permission(apps, schema_editor):\n permission = apps.get_model(\"auth\", \"Permission\")\n users = apps...
python
edit
1
5
bsd-3-clause
4117b767f48678542797d811cc1a8ea75f37c714
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/account/migrations/0040_auto_20200415_0443.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'Abraham Othman'\n__copyright__ = 'Copyright 2014, Abraham Othman'\n\n__version__ = '1.0'\n__maintainer__ = 'Abraham Othman'\n__email__ = '<EMAIL>'\n\nfrom .engine import create, HiScoreEngine, Point\nfrom .errors import Monoto...
python
edit
8
0
bsd-3-clause
bf97ea6e188175cb452fd1534356fc205d1434f7
aothman/hiscore
hiscore/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = (0,5,1)\n\nfrom humanize.time import *\nfrom humanize.number import *\nfrom humanize.filesize import *\nfrom humanize.i18n import activate, deactivate\n\n__all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword',\n ...
python
edit
14
0
mit
fc2d03b5ec8de233b61994b26d27214ada719d33
jmoiron/humanize,jmoiron/humanize
humanize/__init__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO\nfrom PIL import Image\nfrom PIL.Image import DecompressionBombWarning\n\nfrom ingestors.exc import ProcessingException\n\n\nclass ImageSupport...
python
edit
1
4
mit
554cedb2113f57799f0c62b42d6ff1b317c6100a
alephdata/ingestors
ingestors/support/image.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom django.conf import settings\n\nBASE_DIR = os.path.dirname(os.path.realpath(__file__))\nREPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {})\n\nDEFAULT_SQLITE_ENGINES = (\n 'django.db....
python
edit
1
0
mit
f8c61141e8466a408284f45ca331a2f6d87f9363
django-extensions/django-extensions,django-extensions/django-extensions,django-extensions/django-extensions
django_extensions/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nfrom argparse import ArgumentParser\nfrom json import dumps\n\nfrom pycargr.model import to_dict\nfrom pycargr.parser import parse_car_page\n\nparser = ArgumentParser()\nparser.add_argument('car_ids', nargs='+')\nparser.add_argu...
python
edit
1
7
mit
1cb0b66476f9876f9d59c3c3049e2f00dd8b9dca
Florents-Tselai/PyCarGr
pycargr/cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add show_result view that extracts data from the database for the file, and sends it on to the result.html template" }, { "role": "assistant", "content": "# Create your views here.\nfrom django.shortcuts import render_to_response...
python
new_file
12
1
bsd-2-clause
080101d59490ca5f5b0b1208a9a11663cdfaf7a7
ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark
results/views.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom datetime import timedelta\n\nfrom jose import utils\n\n\nclass TestUtils:\n\n def test_total_seconds(self):\n td = timedelta(seconds=5)\n\n assert utils.timedelta_total_seconds(td) == 5\n\n def test_long_to_base64...
python
edit
1
1
mit
59fef68bee92c45438a87336c92bce031de21139
mpdavis/python-jose
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"SoCo (Sonos Controller) is a simple library to control Sonos speakers.\"\"\"\n\n# There is no need for all strings here to be unicode, and Py2 cannot import\n# modules with unicode names so do not use from __future__ import\n# unicode...
python
edit
1
0
mit
1ea9dd3cf9effc6f65d01a31acdbd39848492223
SoCo/SoCo,SoCo/SoCo
soco/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nSpawns an interactive Python shell.\n\nUsage:\n python pwb.py shell [args]\n\nIf no arguments are given, the pywikibot library will not be loaded.\n\nThe following parameters are suppor...
python
edit
1
2
mit
e58c3de5e4537478299f9c9caff751e908bf569a
magul/pywikibot-core,hasteur/g13bot_tools_new,xZise/pywikibot-core,jayvdb/pywikibot-core,icyflame/batman,Darkdadaah/pywikibot-core,PersianWikipedia/pywikibot-core,happy5214/pywikibot-core,emijrp/pywikibot-core,npdoty/pywikibot,VcamX/pywikibot-core,h4ck3rm1k3/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core...
scripts/shell.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass UnionFind:\n def __init__(self, it=None):\n self.uf = {} if it is None else {i : i for i in it}\n\n self.count = len(self.uf)\n\n def __iter__(self):\n return iter(self.uf.keys())\n\n def __getitem__(self...
python
edit
1
4
mit
53cca5180ec5ad04694ce28d0fc0d945004c33b3
all3fox/algos-py
src/unifind.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import generics\nfrom django.contrib.auth.models import User\nfrom users.serializers import UserSerializer\n\n\nclass UserList(generics.ListCreateAPIView):\n queryset = User.objects.all()\n serializer_class = UserS...
python
edit
1
0
mit
b7e6e2d6665e5ec81bddcb77b33de6a2d2bc7807
OscaRoa/api-cats
users/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Patrik,,,\n# Copyright (c) 2015 Patrik,,,\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Polylint plugin class.\"\"\"\n\nfrom...
python
edit
1
0
mit
557f4129dc50acddd6c80d0a0679d8c82d5d9215
nomego/SublimeLinter-contrib-polylint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division, print_function, unicode_literals\n\nfrom os.path import abspath, dirname, join\n\n\nTEST_DIR = abspath(dirname(__file__))\n\n\ndef load_snipp...
python
edit
1
1
bsd-2-clause
05d2230015e085cba408474539f997f7fecd2f91
bookieio/breadability,bookieio/breadability
tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sublime\n\ndef plugin_loaded():\n\n disable_native_php_package_completions()\n\ndef disable_native_php_package_completions():\n\n completions_file = os.path.join(\n sublime.packages_path(),\n 'PHP',\n ...
python
edit
1
2
bsd-3-clause
f41e46c0dd0b859cdcc88a2d3ae96fa01864445f
gerardroche/sublime-phpck
plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#-----------------------------------------------------------------------------\n# Copyright (C) 2010 The IPython Development Team\n#\n# Distributed under the terms of the BSD License. The full license is in\n# the file COPYING.txt, dis...
python
edit
1
7
bsd-3-clause
3d74cd5a02f1d5aefb98e4ef97a1ef458a6b79ea
ipython/ipython,ipython/ipython
IPython/zmq/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.views.generic.edit import FormView\n\nfrom registration.forms import RegistrationFormUniqueEmail\nfrom registration.backends.default.views import RegistrationView\n\nfrom preferences.forms im...
python
edit
1
4
mit
71100d859689a975c6a9bcb06bd5ec8dedbcc876
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef decomposeGlyph(glyph):\n \"\"\"Moves the components of a glyph to its outline.\"\"\"\n\n font = glyph.getParent()\n for component in glyph.components:\n componentGlyph = font[component.baseGlyph]\n for contour in ...
python
edit
1
3
apache-2.0
5cf4cd8b457bf3c6fa7b4f46b1ed4dfd542e5139
supriyantomaftuh/roboto,anthrotype/roboto,urandu/roboto,urandu/roboto,bowlofstew/roboto,googlefonts/roboto,moyogo/roboto,Cartman0/roboto,moyogo/roboto,Cartman0/roboto,supriyantomaftuh/roboto,googlefonts/roboto,anthrotype/roboto,bowlofstew/roboto
scripts/lib/fontbuild/decomposeGlyph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom plumbium import artefacts\n\n\ndef test_NiiGzImage_basename():\n img = artefacts.NiiGzImage('foo.nii.gz')\n assert img.basename == 'foo'\n\n\ndef test_NiiGzImage_bad_extension():\n with pytest.raises(ValueError)...
python
edit
4
1
mit
56cde7a0a93a733e0f2958837f935b1446214168
jstutters/Plumbium
tests/test_artefacts.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom struct import unpack\n\n\ndef read_uint32(fileobj):\n return unpack(\"I\", fileobj.read(4))[0]\n\n# read int as a big endian number\ndef read_uint32_BE(fileobj):\n return unpack(\">I\", fileobj.read(4))[0]\n```\n\nApply this chan...
python
edit
1
1
mit
460bb04533b96e7812964553d9af0c5e25033f21
RenolY2/battalion-tools
rxet/helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nif not os.environ.get(\"RMG_workingDirectory\"):\n import os.path\n message = \"Please set your RMG_workingDirectory environment variable.\\n\" +\\\n \"(eg. export RMG_workingDirectory=%s )\" % \\\n os.path.ab...
python
edit
1
0
mit
ab0e5da8c56817ed80552d94e02b7cec7b9d1a97
comocheng/RMG-Py,pierrelb/RMG-Py,enochd/RMG-Py,KEHANG/RMG-Py,nyee/RMG-Py,enochd/RMG-Py,nyee/RMG-Py,KEHANG/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,nickvandewiele/RMG-Py
rmgpy/qm/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef shell():\n '''\n Return the default shell to use on this system\n '''\n # Provides:\n # shell\n return {'shell': os.environ.get('SHELL', '/bin/sh'}\n\n```\n\nApply this change: Add missing parens that wa...
python
edit
1
1
apache-2.0
fe698148b69d90270b309bf63d1289522a120e86
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/grains/extra.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom clarifai.rest import ClarifaiApp\n\nclass Clarifai():\n \n def __init__(self, api_id, api_secret):\n self.api_id = api_id\n self.api_secret = api_secret\n\n self.app = ClarifaiApp(self.api_id, self.api_secret...
python
edit
1
3
apache-2.0
ebfc7061f7515af3ec8b2f61bdbcf4a26c212095
rlokc/PyCVTagger
src/clarifai_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Django\n# Third-Party\nfrom rest_framework.documentation import include_docs_urls\nfrom rest_framework.schemas import get_schema_view\n\nfrom django.conf import settings\nfrom django.conf.urls import (\n include,\n url,\n)\nfrom dja...
python
edit
1
0
bsd-2-clause
a54135deeb90ea8248a26c235843c9b8f16e1372
dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api
project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pre\n\nimport supybot.log as log\nimport supybot.conf as conf\nimport supybot.utils as utils\nimport supybot.world as world\nimport supybot.ircdb as ircdb\nfrom supybot.commands import *\nimport supybot.irclib as irclib\nimport supyb...
python
edit
14
2
mit
95dab3dbd10ed923c3d37d29efda6ab8ee971c61
bcowdery/supybot-predb-plugin
plugin.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Add first batch of team endpoints" }, { "role": "assistant", "content": "from src.endpoints.base import Base\n\n\nclass Teams(Base):\n\tendpoint = '/teams'\n\n\tdef create_team(self, options=None):\n\t\treturn self.client.post(\n...
python
new_file
1
1
mit
acb8d6e8cff9878a14b157d47072de415d12757b
Vaelor/python-mattermost-driver
src/endpoints/teams.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib import quote\n\nfrom pylons import c, g\n\nfrom r2.lib.pages import Ads as BaseAds\n\n\nclass Ads(BaseAds):\n def __init__(self):\n BaseAds.__init__(self)\n adzerk_test_srs = g.live_config.get(\"adzerk_test_srs\...
python
edit
1
4
bsd-3-clause
424d8ed4b24afc8fc0c2e8e7fd9212091a5a0fcc
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
reddit_adzerk/adzerkads.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n__all__ = []\n\ntry:\n from silk.webdoc import css, html, node\n __all__.extend(('css', 'html', 'node'))\nexcept ImportError:\n pass\n\ntry:\n from silk.webdb import (\n AuthenticationError, BoolC...
python
edit
1
0
bsd-3-clause
e93789084c03b2a566835006d6d5adaee3d4bbe6
orbnauticus/silk
silk/globals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom crispy_forms.layout import Div\nfrom geotrek.common.forms import CommonForm\nfrom geotrek.outdoor.models import Site\n\n\nclass SiteForm(CommonForm):\n geomfields = ['geom']\n\n fieldslayout = [\n Div(\n 'struct...
python
edit
1
4
bsd-2-clause
51222dd65133159c1fe65a51e8f2ce237d40edef
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/outdoor/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bottle\nimport threading\nimport time as _time\n\ndef start_bottle_server(app, port, **kwargs):\n server_thread = ServerThread(app, port, kwargs)\n server_thread.daemon = True\n server_thread.start()\n _time.sleep(0.1)\n\...
python
edit
4
4
bsd-2-clause
76f6497389d2e6588d91fbd7c24d2f368592140b
p/webracer
tests/utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Testing support (tools to test IPython itself).\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2009-2011 The IPython Development Team\n#\n# Distributed under the terms of ...
python
edit
1
2
bsd-3-clause
0af35018fbdf2460d8890a7d7b4ad8246a3d121d
ipython/ipython,ipython/ipython
IPython/testing/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport webbrowser\nimport BaseHTTPServer\nfrom SimpleHTTPServer import SimpleHTTPRequestHandler\n\n__all__ = ['run_server']\n\n\ndef run_server(port=8000,scene_file=\"Null\"):\n #change dir to static f...
python
edit
1
1
bsd-3-clause
dc786699618e6ebc1206080d9c0fdb697d519668
Shekharrajak/pydy,Shekharrajak/pydy,skidzo/pydy,skidzo/pydy,oliverlee/pydy,Shekharrajak/pydy,oliverlee/pydy,skidzo/pydy,skidzo/pydy,Shekharrajak/pydy,oliverlee/pydy
pydy/viz/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2011 by Florian Mounier, Kozea\n# This file is part of pystil, licensed under a 3-clause BSD license.\n\"\"\"\npystil - An elegant site web traffic analyzer\n\"\"\"\nfrom flask...
python
edit
1
1
bsd-3-clause
ac403cc68eac59c918ce83d48dc1beb98ddd3484
Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil
pystil/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Anonymous7 from Reddit, Julian Andrews\n#\n# This software may be modified and distributed under the terms\n# of the MIT license. See the LICENSE file for details.\n\nfrom __future__ import absolute_import, division\n\nimp...
python
edit
1
3
mit
d446a634cf2d903b8f7a7964210017065ffb9b9a
JulianAndrews/pyeval7,JulianAndrews/pyeval7
tests/test_xorshift_rand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom tweepy import Stream\nfrom tweepy import OAuthHandler\nfrom tweepy import API\nfrom tweepy.streaming import StreamListener\nfrom listener import Listener\n\nckey = os.environ['CKEY']\nconsumer_secret...
python
edit
3
1
mit
a973f489d265c0f4f5baa3357eaf5a772a825821
robot-overlord/syriarightnow
tweetstream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\"\nURL conf for django-sphinxdoc.\n\n\"\"\"\nfrom django.conf.urls.defaults import patterns, url\nfrom django.views.generic import list_detail\n\nfrom sphinxdoc import models\nfrom sphinxdoc.views import ProjectSearc...
python
edit
1
0
mit
b7433c0d18a01a9e1340123f7c0423d1fdec04a3
kamni/django-sphinxdoc
sphinxdoc/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom spec2scl.transformers.R import RTransformer\n\nfrom transformer_test_case import TransformerTestCase\n\nclass TestRTransformer(TransformerTestCase):\n def setup_method(self, method):\n self.t = RTransformer('...
python
edit
1
1
mit
a4efaef6474592229156d7c434679f98d0b5cbea
mbooth101/spec2scl,sclorg/spec2scl
tests/test_R_transformer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom scrapi.base import OAIHarvester\nfrom scrapi.linter import RawDocument\n\nfrom .utils import TEST_OAI_DOC\n\n\nclass TestHarvester(OAIHarvester):\n base_url = ''\n long_name = 'Test'\n ...
python
edit
1
3
apache-2.0
a8bf783c99691d12acc9298a67b09a857bed755e
icereval/scrapi,mehanig/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,alexgarciac/scrapi,ostwald/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,mehanig/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi
tests/test_oai_harvester.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\nif __name__ == '__main__':\n pytest.main(\"--pyargs lifelines.tests\")\n\n```\n\nApply this change: Exit with correct error code after tests\n\nSigned-off-by: Jonas Kalderstam <<EMAIL>>" }, { "role": "assistant...
python
edit
1
0
mit
31fc3b8c9fd2f0c7f10e14078fca2e7cd43ac4b1
wavelets/lifelines,jstoxrocky/lifelines,nerdless/lifelines,CamDavidsonPilon/lifelines
lifelines/tests/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport turtle\nimport random\nfrom time import sleep\n\nturtle1 = turtle.Turtle()\n\nwn = turtle.Screen()\nwn.bgcolor(\"lightgreen\")\ncolors = (\"blue\",\"red\",\"green\",\"pink\",\"gray\")\nfor s in range(5):\n x = 10\n c = random.r...
python
edit
3
0
mit
807c02f081dff8945f18f6017fa4bf1769c97513
erichmatt/turtle
spiral-maker01.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass IGBMiddleware(object):\n \"\"\"\n Middleware to detect the EVE IGB\n \"\"\"\n\n def process_request(self, request):\n\n request.is_igb = False\n request.is_igb_trusted = False\n\n if request.META.has...
python
edit
1
5
bsd-3-clause
0b9d3dbfca2fa54444e8d95b1c63ecf3e726ee5b
nikdoof/test-auth
sso/middleware.py
accepted
null
true