messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport pkgutil\n\nimport pi\nimport pi.commands\n\n\ncommands = {}\nfor imp_importer, name, ispkg in pkgutil.iter_modules(pi.commands.__path__):\n fullname = pi.commands.__name__ + '.' + name\n # if fullname not in sys...
python
edit
1
2
mit
b0b8483b6ff7085585a480308d553d2dd4c84c8b
chbrown/pi
pi/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom astropy.table import Table\n\nTABLE_NAME = 'feder_object_list.csv'\n\n\ndef test_table_can_be_read():\n objs = Table.read(TABLE_NAME, format='ascii', delimiter=',')\n columns = ['object', 'ra', 'dec']\n for col in columns:\n ...
python
edit
1
5
bsd-2-clause
dabc4eb0ad59599a0e801a3af5423861c7dd2105
mwcraig/feder-object-list
test_valid_object_file.py
rejected_duplicate
Near-duplicate of sample 3685
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .generic import Manager, GetByIdMixin, AllMixin, SyncMixin\n\n\nclass LiveNotificationsManager(Manager, GetByIdMixin, AllMixin, SyncMixin):\n\n state_name = 'live_notifications'\n object_type = None # th...
python
edit
1
1
mit
c8c3227cba90a931edb9ae7ee89c5318258a2f25
Doist/todoist-python
todoist/managers/live_notifications.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom enum import Enum\nfrom typing import TypeVar, Optional, Any, Type # noqa\n\nfrom odin.exceptions import ValidationError\nfrom . import Field\n\n__all__ = (\"EnumField\",)\n\n\nET = TypeVar(\"E...
python
edit
1
4
bsd-3-clause
671aeff6fbdab93945a7b8a8f242bff9afc6a613
python-odin/odin
src/odin/fields/future.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# tests.decorators\n\nimport sys\nfrom functools import wraps\nfrom StringIO import StringIO\n\nfrom mock import patch\n\n\ndef redirect_stdout(func):\n \"\"\"temporarily redirect stdout to new output stream\"\"\"\n @wraps(func)\n ...
python
edit
1
2
mit
2c86118cfa2c75787fea22909aaec767e432151e
caleb531/youversion-suggest,caleb531/youversion-suggest
tests/test_add_language/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport dask.array as da\nimport h5py\nimport clodius.tiles.hitile as hghi\nimport numpy as np\nimport os.path as op\nimport tempfile\n\n\ndef test_hitile():\n array_size = int(1e6)\n chunk_size = 2**19\n\n data = da.from_array(np.r...
python
edit
3
1
mit
0fb16c44b13ca467fb8ede67bdc93450712cb2bb
hms-dbmi/clodius,hms-dbmi/clodius
test/tiles/hitile_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Basic scenarios, symmetric tests\"\"\"\nimport pytest\nfrom bloop import (\n BaseModel,\n Column,\n GlobalSecondaryIndex,\n Integer,\n MissingObjects,\n)\n\nfrom .models import User\n\n\ndef test_crud(engine):\n engi...
python
edit
1
1
mit
358dc8e31477c27da8f286f19daa736489625035
numberoverzero/bloop,numberoverzero/bloop
tests/integ/test_basic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nimport pytest\n\n\n@pytest.mark.models('en')\ndef test_beam_parse(EN):\n doc = EN(u'Australia is a country', disable=['ner'])\n ents = EN.entity(doc, beam_width=2)\n print(...
python
edit
1
1
mit
00435d8f0cc906878cd6084c78c17cbc5a49b66e
aikramer2/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/sp...
spacy/tests/parser/test_beam_parse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2010 Google Inc. 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\"\"\"\nVerifies that .so files that are order only de...
python
edit
3
0
bsd-3-clause
c23acde7428d968016af760afe9624c138fc3074
csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp
test/library/gyptest-shared-obj-install-path.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2013 Google Inc. 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\"\"\"\nVerifies that copying files preserves file att...
python
edit
3
2
bsd-3-clause
a2b2e6b79ac28d886b3bb682beeadab06018de66
witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp
test/copies/gyptest-attribs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\n\nfrom unittest import TestCase\n\n\nclass ViewTestCase(TestCase):\n def setUp(self):\n self.view = sublime.active_window().new_file()\n\n settings = self.view.settings()\n default_settings = getattr(...
python
edit
1
2
mit
db8524c1085c16552e548dc7c702f80747804814
randy3k/UnitTesting,randy3k/UnitTesting,randy3k/UnitTesting,randy3k/UnitTesting
unittesting/helpers/view_test_case.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under an MIT open source license - see LICENSE\nfrom __future__ import print_function, absolute_import, division\n\n\nclass TurbuStatTestingWarning(Warning):\n '''\n Turbustat.statistics warning for untested methods.\n '...
python
edit
1
0
mit
bc005622a6fcce2ec53bf93a9b6519f923904a61
Astroua/TurbuStat,e-koch/TurbuStat
turbustat/statistics/stats_warnings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Prod-like, but with resources in different locations\n\n# Data sources\nLANGUAGE_EXPLORER_DB_URL = 'postgresql://esteele@/language_explorer'\nJPHARVEST_DB_URL = 'postgresql://esteele@/jpharvest'\nWALS_DB_URL = 'postgresql://esteele@/wals2...
python
edit
1
0
mit
dfd02ec10a904c5ce52162fa512e0850c789ce32
edwinsteele/language_explorer,edwinsteele/language_explorer,edwinsteele/language_explorer
language_explorer/staging_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nMiddleware!\n\"\"\"\nfrom django_tenant_templates import local\n\n\nclass TenantMiddleware(object):\n \"\"\"Middleware for enabling tenant-aware template loading.\"\"\"\n slug_property_name = 'tenant_slug'\n\n def process_r...
python
edit
1
2
mit
c86c32453e241543317509495357e05c73b57047
grampajoe/django-tenant-templates
django_tenant_templates/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint, request, json\nfrom alfred_db.models import Repository, Commit\n\nfrom .database import db\nfrom .helpers import parse_hook_data\n\n\nwebhooks = Blueprint('webhooks', __name__)\n\n\n@webhooks.route('/', methods=...
python
edit
1
4
isc
88210804900c48a895c6ed90ae20dd08dc32e162
alfredhq/alfred-listener
alfred_listener/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom bluesnap.client import Client\n\n\nclass ClientTestCase(unittest.TestCase):\n DUMMY_CREDENTIALS = {\n 'username': 'username',\n 'password': 'password',\n 'default_store_id': '1',\n 'sel...
python
edit
1
2
mit
fca7ad2068dfec30ad210964234957b46e6436bc
kowito/bluesnap-python,kowito/bluesnap-python,justyoyo/bluesnap-python,justyoyo/bluesnap-python
tests/test_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport os\nimport random\nimport urllib\nimport urllib2\nimport re\n\n\n# POST_URL = 'http://localhost:8000/domains/'\nPOST_URL = 'http://scoretool.appspot.com/domains/'\nTOP_LEVEL_DOMAINS = 'com net org...
python
edit
2
4
mit
184d31de904fad249c618766c715fef94ed4f369
jcrocholl/nxdom,jcrocholl/nxdom
tools/upload_pending_delete.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests against HORIZONS numbers.\"\"\"\n\nfrom skyfield import api\n\n# see the top-level project ./horizons/ directory for where the\n# following numbers come from; soon, we should automate the fetching of\n# such numbers and their in...
python
edit
1
1
mit
e56e50cdecafd9de67255afe4567bc6c41cf2474
GuidoBR/python-skyfield,ozialien/python-skyfield,skyfielders/python-skyfield,skyfielders/python-skyfield,exoanalytic/python-skyfield,GuidoBR/python-skyfield,ozialien/python-skyfield,exoanalytic/python-skyfield
skyfield/tests/test_against_horizons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport datetime\nfrom django.utils import timezone\nfrom datetime import timedelta\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"madapp.settings\")\nfrom django.core.management import execute_from_command_lin...
python
edit
14
0
apache-2.0
5547b0bfcd3903d7786be91c136366ada9c3ebae
gilneidp/TADD,gilneidp/TADD,gilneidp/TADD,gilneidp/TADD,gilneidp/TADD
detection.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = '1.16.14'\n\nfrom model import BaseModel\n\nfrom feature import Feature, JSONFeature, TextFeature, CompressedFeature, \\\n PickleFeature\n\nfrom extractor import Node, Graph, Aggregator, NotEnoughData\n\nfrom bytestream imp...
python
edit
41
0
mit
cd5e52c8e1d481c8e1bf1e7a71b0c421e53c93c9
JohnVinyard/featureflow,JohnVinyard/featureflow
featureflow/__init__.py
rejected_lint
Too many lint violations: 41
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef run(tests):\n print '=> Going to run', len(tests), 'tests'\n ok = []\n fail = []\n for number, test in enumerate(tests):\n print '\\t-> [' + str(number) + '/' + str(len(tests)) + ']', test.__doc__\n error = tes...
python
edit
11
8
mit
60f88e2e90ff411f121236a0e44100ca2022f9bb
fmfi-svt-deadlock/hw-testing,fmfi-svt-deadlock/hw-testing
test_sequencer.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import Group\n\nclass CalendarKey(models.Model):\n\n # The group which has access to this key.\n group = models.ForeignKey(Group, related_name=\"calendar_key\", default=1)\...
python
edit
1
1
mit
474ba4b8983c0f0f40e7a9a7e045cec79dc6845f
sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web,sigmapi-gammaiota/sigmapi-web
SigmaPi/Secure/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the compatiblity for py2.6" }, { "role": "assistant", "content": "import sys\n\n\n# The unittest module got a significant overhaul\n# in 2.7, so if we're in 2.6 we can use the backported\n# version unittest2.\nif sys.version_...
python
new_file
3
0
apache-2.0
c68c88c0d90512bf315312b137b9a10ec5eee03e
henrysher/kamboo,henrysher/kamboo
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom random import randrange\n\nfrom paintings.models import Gallery, Painting\n\n\ndef get_Galleries(request):\n\treturn ( {'galleries' : Gallery.objects.all()} )\n\n\ndef get_random_canvasOilPainting(request):\n\tpaintings = Painting.obje...
python
edit
1
2
mit
46566c568b20a037006cf7bbebdc70353e163bb2
hombit/olgart,hombit/olgart,hombit/olgart,hombit/olgart
paintings/processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nimport markdown\n\nclass Flatpage(models.Model):\n page_name = models.CharField(max_length=100, primary_key=True, unique=True)\n title = models.CharField(blank=True, max_length=100)\n description = mod...
python
edit
1
1
bsd-3-clause
5b4c710df7149b0654fc731979978a9a561614a3
jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website
wluopensource/osl_flatpages/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rmc.shared.constants as c\nimport rmc.models as m\n\nimport mongoengine as me\nimport os\n\nFILE_DIR = os.path.dirname(os.path.realpath(__file__))\nHTML_DIR = os.path.join(FILE_DIR, 'html')\n\nme.connect(c.MONGO_DB_RMC, host=c.MONGO_...
python
edit
1
2
mit
310d7043666726d503dc80894b072d3a7ae29f16
rageandqq/rmc,ccqi/rmc,rageandqq/rmc,sachdevs/rmc,UWFlow/rmc,shakilkanji/rmc,sachdevs/rmc,duaayousif/rmc,MichalKononenko/rmc,duaayousif/rmc,sachdevs/rmc,JGulbronson/rmc,shakilkanji/rmc,UWFlow/rmc,JGulbronson/rmc,rageandqq/rmc,sachdevs/rmc,UWFlow/rmc,rageandqq/rmc,shakilkanji/rmc,shakilkanji/rmc,UWFlow/rmc,UWFlow/rmc,JG...
html_snapshots/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n# Create your models here.\n\nclass CongressionalRecordVolume(models.Model):\n congress = models.IntegerField(db_index=True)\n session = models.CharField(max_length=10, db_index=True)\n volume = mode...
python
edit
1
0
bsd-3-clause
b9b095a2a66f79e36bbad1affaeb57b38e20803b
sunlightlabs/Capitol-Words,sunlightlabs/Capitol-Words,sunlightlabs/Capitol-Words,sunlightlabs/Capitol-Words,sunlightlabs/Capitol-Words,propublica/Capitol-Words,propublica/Capitol-Words,sunlightlabs/Capitol-Words,sunlightlabs/Capitol-Words,propublica/Capitol-Words,propublica/Capitol-Words
cwod_site/cwod/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unipath\nfrom fabric.api import *\nfrom fabric.contrib import files\n\n# Fab settings\nenv.hosts = ['ve.djangoproject.com']\n\n# Deployment environment paths and settings and such.\nenv.deploy_base = unipath.Path('/home/buildbot')\ne...
python
edit
23
3
bsd-3-clause
b6833a9ee7da9a59e50710c0bd4d3ad0b83439ab
jacobian-archive/django-buildmaster,hochanh/django-buildmaster
fabfile.py
rejected_lint
Too many lint violations: 23
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2011 Yesudeep Mangalapilly <<EMAIL>>\n# Copyright 2012 Google, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except i...
python
edit
1
0
apache-2.0
9c42a7925d4e872a6245301ef68b2b9aa1f0aa7b
glorizen/watchdog,ymero/watchdog,javrasya/watchdog,mconstantin/watchdog,teleyinex/watchdog,gorakhargosh/watchdog,javrasya/watchdog,ymero/watchdog,javrasya/watchdog,mconstantin/watchdog,teleyinex/watchdog,teleyinex/watchdog,glorizen/watchdog,glorizen/watchdog,gorakhargosh/watchdog,mconstantin/watchdog,ymero/watchdog
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSome code to manage the Amazon Certificate Service.\n\"\"\"\nimport logging\n\nimport boto3\nimport botocore\n\n\nclass DiscoACM(object):\n \"\"\"\n A class to manage the Amazon Certificate Service\n\n \"\"\"\n\n def __i...
python
edit
1
6
bsd-2-clause
90fa23d1d1b2497d65507b7930323b118f512a25
amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq
disco_aws_automation/disco_acm.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 bioblend import galaxy\nfrom bioblend import toolshed\n\n\nif __name__ == '__main__':\n gi_url = \"http://172.21.23.6:8080/\"\n ts_url = \"http://172.21.23.6:9009/\"\n name = \...
python
edit
2
5
apache-2.0
906c71ed59a6349aed83cd18248dfe8463e3a028
ASaiM/framework,ASaiM/framework
src/integrate_tool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nproject URL Configuration\n\n\"\"\"\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nurlpatterns = [\n url(r'^admin/', include(admin.site.urls)),\n url(r'^admin_tools/', include('admin_tools.urls...
python
edit
1
0
mit
ccc98ced56ee8dda02332720c7146e1548a3b53c
jonsimington/app,compsci-hfh/app,compsci-hfh/app,jonsimington/app
project/project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\" Assignment 1, Exercise 3, INF1340, Fall, 2015. Troubleshooting Car Issues.\n\nThis module contains one function diagnose_car(). It is an expert system to\ninteractive diagnose car issues.\n\n\"\"\"\n\n__autho...
python
edit
3
4
mit
e3c12bd54e143086dd332a51195e4eb3f7305201
xueshen3/inf1340_2015_asst1
exercise3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\nfrom thinc.api import HashEmbed\n\n\ndef test_init():\n model = HashEmbed(64, 1000).initialize()\n assert model.get_dim(\"nV\") == 1000\n assert model.get_dim(\"nO\") == 64\n assert model.get_param(\"E\").shape == ...
python
edit
1
1
mit
6c04c2dc0647f7103000aee2996ce243f7fe3535
explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc
thinc/tests/layers/test_hash_embed.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nproject = \"dependencies\"\n\ncopyright = \"2016-2018, Artem Malyshev\"\n\nauthor = \"Artem Malyshev\"\n\nversion = \"0.15\"\n\nrelease = \"0.15\"\n\ntemplates_path = [\"templates\"]\n\nsource_suffix = \".rst\"\n\n...
python
edit
1
0
bsd-2-clause
b6afc5f1db5c416fde43567623161bbe2244897b
proofit404/dependencies,proofit404/dependencies,proofit404/dependencies,proofit404/dependencies
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nURLS = {\n}\n\n\nclass Documentation(object):\n \"\"\" This class provide documentation-related methods\n Documentation related REST endpoints:\n https://gerrit-review.googlesource.com/Documentation/rest-...
python
edit
2
1
apache-2.0
5dc63d9c544f0335cd037bc2f6c0ce613e7783ea
yumminhuang/gerrit.py
gerrit/documentation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport contextlib\n\nfrom PyQt5 import QtCore\n\nfrom . import __app_name__\nfrom . import helperutils\n\n\ndef _qsettings_group_factory(settings: QtCore.QSettings):\n @contextlib.contextmanager\n ...
python
edit
1
2
mit
c4df7c0de4cadffc665a353763f6d5cabada1b85
espdev/VoiceRecorder
voicerecorder/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyrr import Matrix33\n\n\nclass MeshShader:\n\n def __init__(self, shader):\n self.shader = shader\n\n def draw(self, mesh, proj_mat, view_mat):\n \"\"\"Minimal draw function. Should be overridden\"\"\"\n mes...
python
edit
1
1
isc
fd4bc228c978019a7251fefe2c92899a16b8f95d
Contraz/demosys-py
demosys/scene/shaders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom AllMovies_imdb import add_empty_data, get_connections, get_business_of_movie, check_worksheets, get_companycredits_of_movie, get_fullcredits_of_movie, get_releaseinfo_of_movie, get_techinfo_of_movie, get_detail_of_movie, register_toS...
python
edit
3
0
apache-2.0
e525db1171ccd75db737cea08c377c8c03400c24
softinus/IMDB_DataMiner,softinus/Movie_DataMiner,softinus/IMDB_DataMiner,softinus/Movie_DataMiner
imdb_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\nimport struct\nfrom collections import namedtuple\n\n\nclass NamedStruct(struct.Struct):\n def __init__(self, fields, order='', size=0):\n self.values = namedtuple(\"header\", ' '.join(k for k, _ in fields))\n ...
python
edit
1
5
unlicense
3cab4a8252d89c05895cc7a1715afa4ec14ce6e2
tsudoko/98imgtools
utils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils._os import safe_join\nimport os\nfrom django.conf import settings\nfrom django.contrib.staticfiles.finders import FileSystemFinder\nfrom bluebottle.clients.models import Client\n\n\nclass TenantStaticFilesFinder(FileSystem...
python
edit
3
6
bsd-3-clause
83efb4c86ea34e9f51c231a3b7c96929d2ba5ee6
onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/utils/staticfiles_finders.py
rejected_duplicate
Near-duplicate of sample 5462
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport importlib\nimport sys\n\ndef main():\n try:\n command = sys.argv[1]\n except IndexError:\n sys.stderr.write('must specify a command\\n')\n return -1\n module = importlib.import_mod...
python
edit
1
5
apache-2.0
0033a29537740592ea47b1e372a9aa3873120c35
baxeico/i18n-tools,baxeico/i18n-tools,edx/i18n-tools
i18n/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__version__ = '2.3.5pbs.19'\n\n# patch settings\ntry:\n from django.conf import settings\n if 'cms' in settings.INSTALLED_APPS:\n from conf import patch_settings\n patch_settings()\nexcept Import...
python
edit
1
0
bsd-3-clause
67e0d2b943ef467cfef46f71195f205b1be15a0a
pbs/django-cms,pbs/django-cms,pbs/django-cms,pbs/django-cms
cms/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Project metadata.\"\"\"\n\npackage = \"lambdautils\"\nproject = \"lambdautils\"\nversion = '0.2.8'\ndescription = \"Simple utilities for AWS Lambda functions\"\nauthors = [\"Innovative Travel Ltd\"]\nauthors_s...
python
edit
1
0
mit
88d938fc4050ef99180ff364f0a6d27d31ecc16c
humilis/humilis-lambdautils
lambdautils/metadata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport rethinkdb as r\n\nconn = r.connect('localhost', 30815, db='materialscommons')\n\nif __name__ == \"__main__\":\n selection = list(r.table('datadirs').run(conn))\n for datadir in selection:\n print...
python
edit
2
0
mit
c59c762be198b9c976d25b093860f1d14e9d2271
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/ddirdenorm.py
rejected_duplicate
Near-duplicate of sample 13023
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom collections import defaultdict\nfrom requests.exceptions import RequestException\n\nfrom django.conf import settings\nfrom django.utils.dateparse import parse_datetime\n\nimport sal.plugin\nimport server.utils as utils...
python
edit
1
8
apache-2.0
59691ed33347c60fe15014facee272e00f58ed3a
salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal
server/plugins/cryptstatus/cryptstatus.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA collection of Django extensions that add content-management facilities to Django projects.\n\nDeveloped by Dave Hall.\n\n<http://etianen.com/>\n\"\"\"\n\nVERSION = (1, 7, 11)\n\n```\n\nApply this change: Bump version number for re...
python
edit
1
0
bsd-3-clause
0981fee3834467fcde7f2231ff3b7d35371b9d09
lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,danielsamuels/cms,dan-gamble/cms,dan-gamble/cms,jamesfoley/cms,lewiscollard/cms,danielsamuels/cms,danielsamuels/cms,jamesfoley/cms,jamesfoley/cms,lewiscollard/cms
cms/__init__.py
rejected_duplicate
Near-duplicate of sample 3603
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers\nfrom rest_framework.fields import HyperlinkedIdentityField\n\n\nclass MemberDetailSerializer(serializers.ModelSerializer):\n\n url = HyperlinkedIdentity...
python
edit
1
0
bsd-3-clause
8139a3a49e4ee6d1fc8a2a71becbfd6d625b5c5f
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
apps/accounts/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\n\n\ndef logParams(function):\n @functools.wraps(function) # use this to prevent loss of function attributes\n def wrapper(*args, **kwargs):\n print(\"function: {}, args: {}, kwargs: {}\".format(function.__name...
python
edit
1
2
apache-2.0
b58b270c707b57e9f6c245f1ebb31d68a247471c
precompiler/python-101
mastering-python/ch05/Decorator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom {{ project_name }}.settings import * # noqa\n\nlogging.disable(logging.CRITICAL)\n\nDEBUG = False\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql',\n 'NAME': '{{ project_na...
python
edit
null
null
mit
50e92d3394cfaf1035c6dc29563ce45437efb9c9
leukeleu/wagtail-startproject,leukeleu/wagtail-startproject
wagtailstartproject/project_template/tests/test_settings.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uwsgi\nimport django\n\ndjango.setup()\n\nfrom resources.processing import BaseProcessor\nfrom resources.models import Attachment\n\n\ndef content_processing(env):\n print (env)\n resource_id = int(env.get(b\"id\"))\n proces...
python
edit
1
4
mit
65b3a7fa7ae7ee467d3e8ef32b9a00b99b095c3e
vladimiroff/humble-media,vladimiroff/humble-media
humblemedia/processing_spooler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA template for settings which should be used in production.\n\nIn order for the settings to be truly useful, they need to be\nfilled out with corresponding values.\n\nUse the template to create a ``production.py`` file and then crea...
python
edit
1
0
bsd-3-clause
9d53af13a1f65370414632cd5a8172248c334ce2
mlalic/TumCampusAppBackend,mlalic/TumCampusAppBackend
tca/tca/settings/production.template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nfrom syft.frameworks.torch.tensors import PointerTensor\n\nimport syft\n\n\nclass TorchTensor:\n \"\"\"\n This tensor is simply a more convenient way to add custom functions to\n all Torch tensor types.\n \"\"\"...
python
edit
1
7
apache-2.0
3f39c9d89da004556bcf53fa815f88a3092f600e
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
syft/frameworks/torch/tensors/native.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ObjectDoesNotExist\n\n\ndef get_attributes_display(variant, attributes):\n display = {}\n for attribute in attributes:\n value = variant.get_attribute(attribute.pk)\n if value:\n ...
python
edit
1
6
bsd-3-clause
ab0141d4ea11e20482bb1ae9d5642ed0e6fc3fac
UITools/saleor,laosunhust/saleor,avorio/saleor,tfroehlich82/saleor,Drekscott/Motlaesaleor,arth-co/saleor,car3oon/saleor,rchav/vinerack,itbabu/saleor,spartonia/saleor,arth-co/saleor,HyperManTT/ECommerceSaleor,car3oon/saleor,taedori81/saleor,Drekscott/Motlaesaleor,josesanch/saleor,maferelo/saleor,taedori81/saleor,HyperMa...
saleor/product/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport gc\nimport platform\n\nimport cffi\n\ncffi.verifier.cleanup_tmpdir()\n\n\ndef buffer_writer(string):\n \"\"\"Creates a function that takes a ``buffer`` and ``buffer_size`` as the\n two...
python
edit
1
3
apache-2.0
4e438122b5715f6a8765f50173c1dca1e18c6f8f
jodal/pyspotify,jodal/pyspotify,felix1m/pyspotify,mopidy/pyspotify,kotamat/pyspotify,mopidy/pyspotify,kotamat/pyspotify,felix1m/pyspotify,felix1m/pyspotify,kotamat/pyspotify,jodal/pyspotify
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom roku import Roku\n\nfrom app.core.messaging import Receiver\nfrom app.core.servicemanager import ServiceManager\nfrom app.services.tv_remote.service import RokuScanner, RokuTV\n\n\nclass TestRokuScanner(object):\n @classmethod\n ...
python
edit
1
1
mit
88a04efd1a7aa56a69b76b127908a5eca0c817bd
supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer
test/services/tv_remote/test_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\ndef load_variables_from_env(prefix=\"XII_INTEGRATION_\"):\n length = len(prefix)\n vars = {}\n\n for var in filter(lambda x: x.startswith(prefix), os.environ):\n vars[var[length:]] = os.envi...
python
edit
1
4
apache-2.0
eba49ba765f0ff64d7415ad84116f7ea0781ad38
xii/xii,xii/xii
tests/integration/integration/runner.py
rejected_duplicate
Near-duplicate of sample 5027
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport contextlib as __stickytape_contextlib\n\n@__stickytape_contextlib.contextmanager\ndef __stickytape_temporary_dir():\n import tempfile\n import shutil\n dir_path = tempfile.mkdtemp()\n try:\n ...
python
edit
3
3
bsd-2-clause
5fbf410e0042c82e524b3b08276b2d628d00b3c6
mwilliamson/stickytape
stickytape/prelude.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for vectors.\"\"\"\n\nfrom sympy import sympify\n\nfrom drudge import Vec\n\n\ndef test_vecs_has_basic_properties():\n \"\"\"Tests the basic properties of vector instances.\"\"\"\n\n base = Vec('v')\n v_ab = Vec('v', in...
python
edit
1
2
mit
c4e791ea6175fbefce0ef0671051936a27fc9684
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/vec_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyQt4 import QtGui\nimport matplotlib as mpl\nfrom matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas\nfrom matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar\nfrom matplotlib.f...
python
edit
5
1
apache-2.0
d5f782fc7a8c7835af0d4d2810a923d218dea938
scholi/pyOmicron
mplwidget.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Raise error if migrations imported for old Django" }, { "role": "assistant", "content": "\"\"\"\nDjango migrations for easy_thumbnails app\n\nThis package does not contain South migrations. South migrations can be found\nin the ...
python
new_file
1
0
bsd-3-clause
d6c5f3f8ae7a830b49ebb87fdda4b0b1d0bbf916
siovene/easy-thumbnails,Mactory/easy-thumbnails,sandow-digital/easy-thumbnails-cropman,jaddison/easy-thumbnails,SmileyChris/easy-thumbnails,sandow-digital/easy-thumbnails-cropman
easy_thumbnails/migrations/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n# pylint: disable=maybe-no-member, invalid-name\n\n\"\"\"Test Issue import and updates.\"\"\"\n\nfrom collections import Ord...
python
edit
1
3
apache-2.0
1dcbaeca1d487e2eb773580f66600389ffbb1e34
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core
test/integration/ggrc/converters/test_import_issues.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: fix: Bring modules into package level" }, { "role": "assistant", "content": "\"\"\"Tools for creating infrastructure and Spinnaker Applications.\"\"\"\nfrom . import (app, configs, dns, elb, iam, pipeline, s3, securitygroup, util...
python
new_file
15
0
apache-2.0
2263ea4ec0322e09db92ae368aa219c4e34125d3
gogoair/foremast,gogoair/foremast
src/foremast/__init__.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Get the current upstream branch.\"\"\"\n\nimport re\nfrom subprocess import check_output\n\n\ndef upstream(include_remote=False):\n \"\"\"Get the upstream branch of the current branch.\"\"\"\n\n branch_info = check_output(['git'...
python
edit
3
3
mit
a253eac5e4d7319a7a31dc33c90ce60fe77dfe60
Brickstertwo/git-commands
bin/commands/upstream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n import collectd\n collectd.register_config\n collectd_present = True\nexcept (ImportError, AttributeError):\n collectd_present = False\n\nfrom .plugin import HAProxyPlugin\n\nversion_info = (1, 1, 1)\n\n__version__ = \".\...
python
edit
1
0
mit
bbe7431736afeae575fb3430437d3a0000d4b653
wglass/collectd-haproxy
collectd_haproxy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport emission.core.get_database as edb\n\nfor ue in edb.get_uuid_db().find():\n trip_count = edb.get_analysis_timeseries_db().count_documents({\"user_id\": ue[\"uuid\"], \"metadata.key\": \"analysis/confirmed_trip\"})\n location_cou...
python
edit
1
0
bsd-3-clause
6510705d47a035279e1aa0cb6ce52f79935b2d10
e-mission/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server
bin/monitor/check_participant_status.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.tcontrol import TransferControl\n\n\nclass TestTransfer(BaseTestCase):\n\n @httpretty.activate\n def test_check_balance(self):\n \"...
python
edit
1
1
mit
d8fa685640f674b6f22dacc45c5a9b0152115fce
andela-sjames/paystack-python
paystackapi/tests/test_tcontrol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nsettings = os.path.join(os.path.dirname(__file__),'lib','mapnik_settings.js')\n\n# this goes into a mapnik_settings.js file beside the C++ _mapnik.node\nsettings_template = \"\"\"\nmodule.exports.paths = {\n 'fonts': %s,\n ...
python
edit
1
3
bsd-3-clause
4ad8b1412be2da07e4713b54741aa22064ff33c5
mojodna/node-mapnik,mapnik/node-mapnik,mapnik/node-mapnik,Uli1/node-mapnik,tomhughes/node-mapnik,stefanklug/node-mapnik,mapnik/node-mapnik,mojodna/node-mapnik,langateam/node-mapnik,Uli1/node-mapnik,stefanklug/node-mapnik,tomhughes/node-mapnik,stefanklug/node-mapnik,gravitystorm/node-mapnik,Uli1/node-mapnik,CartoDB/node...
gen_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n\ndef test_tmp_file_is_gone(host):\n tmpfile = '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'\n f = host.file(tmpfile)\n assert not f.exists\n\n\ndef test_command_line_tools_dir(host):\n f = host....
python
edit
1
1
mit
8aeaac1afa501ddc2a7b7992ceeb42a3f409bac0
elliotweiser/ansible-osx-command-line-tools,elliotweiser/ansible-osx-command-line-tools
tests/test_default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.6 on 2017-12-24 06:44\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef create_classifications(apps, schema_editor):\n from ..models import Classific...
python
edit
1
3
mit
628e3cb67fefd32382614af6816d380d36c0b32f
stefanw/froide,fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide
froide/publicbody/migrations/0007_auto_20171224_0744.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n controlbeast\n ~~~~~~~~~~~~\n\n :copyright: Copyright 2013 by the ControlBeast team, see AUTHORS.\n :license: ISC, see LICENSE for details.\n\"\"\"\n\nVERSION = (0, 1, 0, 'alpha', 0)\nCOPYRIGHT ...
python
edit
1
2
isc
91c6c00a16252b2a43a1017ee17b7f6f0302e4be
daemotron/controlbeast,daemotron/controlbeast
controlbeast/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom .settings import * # noqa\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',\n 'NAME': 'dtc',\n },\n }\n\n\nif 'DTC_PG_USERNAME' in os.environ:\n DA...
python
edit
1
0
bsd-3-clause
ec37dae820e49d816014c62f00711eaaeaf64597
carljm/django-transaction-hooks
transaction_hooks/test/settings_pg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nFunctional tests for the ``flocker-changestate`` command line tool.\n\"\"\"\n\nfrom os import getuid\nfrom subprocess import check_output\nfrom unittest import skipUnle...
python
edit
1
1
apache-2.0
6bc5fe6c2ef7cc06436b81150639cf7039b9deeb
mbrukman/flocker,moypray/flocker,hackday-profilers/flocker,adamtheturtle/flocker,moypray/flocker,wallnerryan/flocker-profiles,adamtheturtle/flocker,moypray/flocker,wallnerryan/flocker-profiles,Azulinho/flocker,achanda/flocker,AndyHuu/flocker,hackday-profilers/flocker,AndyHuu/flocker,1d4Nf6/flocker,LaynePeng/flocker,Lay...
flocker/node/functional/test_script.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ApiError(Exception):\n '''General error from the Algorithmia API'''\n pass\n\nclass ApiInternalError(ApiError):\n '''Error representing a server error, typically a 5xx status code'''\n pass\n\nclass DataApiError(ApiError):...
python
edit
1
1
mit
dfe43823c32cf6181ef873095c6cecd13664079d
algorithmiaio/algorithmia-python
Algorithmia/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django haystack `SearchIndex` module.\"\"\"\nfrom pages.models import Page\n\nfrom haystack.indexes import SearchIndex, CharField, DateTimeField\nfrom haystack import site\n\n\nclass PageIndex(SearchIndex):\n \"\"\"Search index for...
python
edit
1
1
bsd-3-clause
ab88748dcd5f48dce753655e0e0802a8b4d7d8b8
remik/django-page-cms,oliciv/django-page-cms,batiste/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,akaihola/django-page-cms,pombredanne/django-page-cms-1,remik/django-page-cms,remik/django-page-cms,batiste/django-page-cms,oliciv/django-page-cms,pombr...
pages/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport weechat\nfrom yapbl import PushBullet\n\napikey = \"\"\n\np = PushBullet(apikey)\n\nweechat.register(\"pushbullet\", \"kekskurse\", \"1.0\", \"GPL3\", \"Test \nSkript\", \"\", \"\")\nweechat.prnt(\"\", \"Hallo, von einem python Skrip...
python
edit
null
null
mit
9018093933e7f8d04ad5d7f753651e3c77c0cf12
sspssp/weechat-pushbullet
pushbullet.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .settings import *\n\nimport os\n\nDEBUG = True\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'getyourdatadevdb',\n 'USER': 'getyourdatadevuser',\n 'PASSW...
python
edit
5
0
mit
6f28e097fb292493c8313854ecc468b491aa562a
sakset/getyourdata,sakset/getyourdata,sakset/getyourdata,sakset/getyourdata
getyourdata/getyourdata/dev_settings.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import Blueprint\nfrom flask.views import MethodView\n\n\nclass MeasurementList(MethodView):\n def get(self):\n return 'GET: measurement list'\n\nclass MeasurementItem(MethodView):\n def ge...
python
edit
1
1
mit
bbbeca09a978d26fa2638c21802d9a27e1159b59
jaapverloop/massa
massa/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bugle_project.configs.settings import *\n\nFAYE_URL = 'http://bugle.fort:8001/faye'\n\nDATABASE_ENGINE = 'postgresql_psycopg2'\nDATABASE_NAME = 'bugle'\nDATABASE_USER = 'bugle'\nDATABASE_PASSWORD = 'bugle'\n\n```\n\nApply this change: ...
python
edit
2
0
bsd-2-clause
fa7a96559b1eea8ee7c7c6ec48b5d01e4b3f1b05
devfort/bugle,devfort/bugle,devfort/bugle
bugle_project/configs/live/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = (0, 0, 1)\n\nDEBUG = False\n\nfrom zakopane.file import SumFile\n\n```\n\nApply this change: Expand package and module extents." }, { "role": "assistant", "content": "version = (0, 0, 1)\n\nDEBUG = False\n\n\nimport os...
python
edit
7
2
bsd-3-clause
50d35de34bf6c2f90d0b8a4595c6d1459355d8fa
j39m/zakopane
zakopane/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nclass MonoMasterPackage(Package):\n\n\tdef __init__(self):\n\t\tPackage.__init__(self, 'mono', os.getenv('MONO_VERSION'),\n\t\t\tsources = ['git://github.com/mono/mono.git'],\n\t\t\trevision = os.getenv('MONO_BUILD_REVISION'),\...
python
edit
10
4
mit
37c0eea76d6aba1180f2a3eae90d7f38566bfc3f
mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/mono-master.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes import generic\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\n\n# TODO: Refactor this into a generic utils app to remove the wells dep\nfrom armstrong.core.arm_wel...
python
edit
1
2
apache-2.0
992950cb4e04fc8db8e55924bfe6ea9fdcac3450
armstrong/armstrong.apps.series,armstrong/armstrong.apps.series
armstrong/apps/series/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version__ = '$Id$'\n\nfrom pywikibot import family\n\n# The wikidata family\n\nclass Family(family.WikimediaFamily):\n def __init__(self):\n super(Family, self).__init__()\n self.name = 'wikida...
python
edit
1
3
mit
12780b68aff0da1c123f3516fc6a020cfddb327d
legoktm/pywikipedia-rewrite
pywikibot/families/wikidata_family.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom importlib import import_module\n\n_modules = ['branching', 'data_processing']\n\nclass Execute(object):\n def __init__(self, registers, process_mode, memory):\n self.instruction = {}\n\n for module_name in _modules:\n ...
python
edit
1
9
mit
c50d470492ed38aa05f147ad554c58877e5050ec
tdpearson/armdecode
Execute/execute.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nimport logging\n\nfrom raven.contrib.flask import Sentry\n\nfrom framework.sessions import get_session\n\nfrom website import settings\n\nlogger = logging.getLogger(__name__)\n\nsentry = Sentry(ds...
python
edit
1
2
apache-2.0
5079ef52751288758596e1c9e0ffed119540a05e
TomBaxter/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,adlius/osf.io,caneruguz/osf.io,chrisseto/osf.io,TomBaxter/osf.io,TomBaxter/osf.io,crcresearch/osf.io,felliott/osf.io,icereval/osf.io,caneruguz/osf.io,sloria/osf.io,mfraezz/osf.io,binoculars/osf.io,brianjgeiger/osf.io,icereval/osf.io,felliott/osf.io,saradbowman/osf.io...
framework/sentry/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n'''PyLibChorus -- Python Chorus API Library'''\n\nimport logging\nfrom pylibchorus.chorus_api import login\nfrom pylibchorus.chorus_api import logout\nfrom pylibchorus.chorus_api import check_login_status\nfrom pylibc...
python
edit
6
1
mit
96968f9f2d38d45d3154fa3c95860091cc909dd9
kennyballou/pylibchorus
pylibchorus/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sh\nfrom sh import docker\n\n\ndef setup_package():\n \"\"\"\n Sets up docker images and host containers for running the STs.\n \"\"\"\n # Pull and save each image, so we can use them inside the host containers...
python
edit
3
2
apache-2.0
7e054868d0df4e69c4b23cb1fb966505d559157f
alexhersh/libcalico,tomdee/libcalico,TrimBiggs/libnetwork-plugin,plwhite/libcalico,L-MA/libcalico,TrimBiggs/libnetwork-plugin,Symmetric/libcalico,insequent/libcalico,TrimBiggs/libcalico,projectcalico/libnetwork-plugin,caseydavenport/libcalico,djosborne/libcalico,tomdee/libnetwork-plugin,robbrockbank/libcalico,projectca...
calico_containers/tests/st/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\n\nimport errno\nimport shutil\nfrom typing import Optional\n\nfrom .error import CommandError\n\n\nclass Which:\n @property\n def command(self):\n return self.__com...
python
edit
1
2
mit
b26bf17154e478ee02e0e2936d7623d71698e1f2
thombashi/subprocrunner,thombashi/subprocrunner
subprocrunner/_which.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom neat.population import Population\nfrom neat.config import Config\n\n\ndef test_minimal():\n # sample fitness function\n def eval_fitness(population):\n for individual in population:\n individual.fitn...
python
edit
1
5
bsd-3-clause
9ac496491fccc1bd1ba55d3302608a0fe34957a1
drallensmith/neat-python,machinebrains/neat-python,CodeReclaimers/neat-python
tests/test_population.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cumulusci.robotframework import locators_49\nimport copy\n\nlex_locators = copy.deepcopy(locators_49.lex_locators)\n\nlex_locators[\"object\"][\n \"button\"\n] = \"//div[contains(@class, 'slds-page-header')]//*[self::a[@title='{titl...
python
edit
1
0
bsd-3-clause
1993a0adad94b0ed22557e2ee87326fc1eca0793
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
cumulusci/robotframework/locators_50.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom clubsandwich.director import DirectorLoop\nfrom clubsandwich.ui import UIScene, WindowView, KeyAssignedListView, ButtonView\n\n\nclass BasicScene(UIScene):\n def __init__(self):\n button_generator = (ButtonView(\n ...
python
edit
1
2
mit
572b9e2919b7c1107fafb0871cbc8b0e403eb187
irskep/clubsandwich
examples/keyassignedlistview.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom polycircles import polycircles\nfrom nose.tools import raises\n\nclass TestExceptions(unittest.TestCase):\n\n @raises(ValueError)\n def test_less_than_3_vertices_no_1(self):\n polycircle = polycircles.Poly...
python
edit
10
1
mit
ae5a8bb000702ee4e0bbce863bc72d603ec6ca3d
adamatan/polycircles
polycircles/test/test_exceptions.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\ntry:\n import _os as os\nexcept ImportError:\n import os\n\nif not hasattr(os, \"unlink\"):\n print(\"SKIP\")\n sys.exit()\n\ntry:\n os.unlink(\"testfile\")\nexcept OSError:\n pass\n\n# Should create a file\nf ...
python
edit
1
0
mit
d292a81e95bd558f3902f88fa4d6d5641a4aa388
tobbad/micropython,ahotam/micropython,adafruit/circuitpython,mhoffma/micropython,noahchense/micropython,adamkh/micropython,vitiral/micropython,orionrobots/micropython,adafruit/circuitpython,pozetroninc/micropython,lowRISC/micropython,ernesto-g/micropython,SHA2017-badge/micropython-esp32,ChuckM/micropython,misterdanb/mi...
tests/io/open_append.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Employee\nfrom rest_framework import serializers\n\n\nclass EmployeeSerializer(serializers.ModelSerializer):\n class Meta:\n model = Employee\n fields = ('pk',\n 'username',\n ...
python
edit
1
0
apache-2.0
879ea9c4234a5d8435f213c6f9b082a86a794ecc
belatrix/BackendAllStars
employees/serializers.py
rejected_duplicate
Near-duplicate of sample 12686
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom pystray import Icon, Menu, MenuItem\nimport webview\nimport sys\n\nif sys.platform == 'darwin':\n raise NotImplementedError('This example does not work on macOS.')\n \nfrom threading import Thread\nfrom que...
python
edit
3
2
bsd-3-clause
45e0605a178c36a4075b59026952ef5a797e09aa
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
examples/pystray_icon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bookmarks\nimport unittest\n\n\nclass FlaskrTestCase(unittest.TestCase):\n def setUp(self):\n bookmarks.app.config['DATABASE_NAME'] = bookmarks.app.config['TEST_DATABASE_NAME']\n bookmarks.app.testing = True\n ...
python
edit
1
1
apache-2.0
eb9fa38f2c4c82a5674474f9a535bc8c35f8e38e
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
tests/test_bookmarks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Include the directory where cvui is so we can load it\nimport sys\nsys.path.append('../../../')\n\nimport numpy as np\nimport cv2\nimport cvui\n\ncvui.random_number_generator(1, 2)\n\n # Create a black image\nimg = np.zeros((512,512,3), n...
python
edit
1
0
mit
7cc76c2716ce54882b7eced67f4435acd100cd83
Dovyski/cvui,Dovyski/cvui,Dovyski/cvui
example/src/hello-world/hello-world.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nimport zeit.content.article.edit.browser.testing\n\n\nclass ArticleTemplateTest(\n zeit.content.article.edit.browser.testing.EditorTestCase):\n\n def setUp(self):\n super(ArticleTemplateTest, self).setUp()\n...
python
edit
1
1
bsd-3-clause
5d4572f08c6e65a062fd2f00590f6eeb5e12ce38
ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article
src/zeit/content/article/edit/browser/tests/test_template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint, render_template\nfrom flask_api.decorators import set_renderers\nfrom flask_api.renderers import HTMLRenderer\n\nfrom ._common import route, get_tid\n\n\nblueprint = Blueprint('latest', __name__, url_prefix=\"/l...
python
edit
1
2
mit
50cff5854983c0235630538ed0b4d909d9cc7890
DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen
memegen/routes/latest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Joachim van der Herten\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www....
python
edit
1
0
apache-2.0
f0c1c078e7edd76b418940f3cbddef405440b5d4
GPflow/GPflowOpt
GPflowOpt/_version.py
accepted
null
true