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 sys\nimport os\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nimport bottle\n\nsetup(name='Bottle-Async',\n version=bottle.__version__,\n des...
python
edit
4
0
mit
6f965f0014922560de20f725c76ca4060856cb77
mrdon/bottle,mrdon/bottle
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.scoring_engine.web.web_test import WebTest\n\n\nclass TestServices(WebTest):\n\n def test_auth_required_services(self):\n self.verify_auth_required('/services')\n\n def test_auth_required_service_id(self):\n s...
python
edit
1
1
mit
109b753c807dae30ee736a6f071a058fa8b68d92
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
tests/scoring_engine/web/views/test_services.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import task, local\nfrom buildercore import project\nimport utils\nimport sys\nimport logging\nLOG = logging.getLogger(__name__)\n\ndef vault_addr():\n defaults, _ = project.raw_project_map()\n return defaults['aws']['...
python
edit
1
3
mit
d1b7b629218830e4b7c584fc1c0804a3b9ee553a
elifesciences/builder,elifesciences/builder
src/vault.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test the PUDL console scripts from within PyTest.\"\"\"\n\nimport pytest\n\n\n@pytest.mark.parametrize(\n \"script_name\", [\n \"pudl_setup\",\n \"pudl_datastore\",\n \"ferc1_to_sqlite\",\n \"pudl_etl\",...
python
edit
1
1
mit
ccf4ceab6fafb6f32668500f913eb256106bcc34
catalyst-cooperative/pudl,catalyst-cooperative/pudl
test/integration/console_scripts_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url, include\n\nfrom docs.sitemaps import DocsSitemap\nfrom docs.urls import urlpatterns as docs_urlpatterns\n\nsitemaps = {'docs': DocsSitemap}\n\nurlpatterns = patterns('',\n url(r'^sitemap\\.xml$...
python
edit
3
0
bsd-3-clause
a0907ff742c81b676f602d1e17d820152f95d22e
hassanabidpk/djangoproject.com,hassanabidpk/djangoproject.com,gnarf/djangoproject.com,rmoorman/djangoproject.com,vxvinh1511/djangoproject.com,rmoorman/djangoproject.com,nanuxbe/django,vxvinh1511/djangoproject.com,relekang/djangoproject.com,alawnchen/djangoproject.com,rmoorman/djangoproject.com,django/djangoproject.com,...
django_docs/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys, logging\nfrom rdflib.graph import ConjunctiveGraph\nfrom trustyuri.rdf import RdfUtils, RdfTransformer\nfrom rdflib.term import URIRef\nimport os\n\ndef transform(args):\n filename = args[0]\n baseuristr = args[1]\n \n ...
python
edit
2
1
mit
7cc3d10b829b51825e6f670fb0f3d29b54a8ead1
trustyuri/trustyuri-python,trustyuri/trustyuri-python
trustyuri/rdf/TransformRdf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.conf import settings\nfrom django.views.decorators.http import require_http_methods\nfrom django.http import HttpResponse\n\nfrom healthcheck.healthcheck import (\n DjangoDBsHealthCheck, FilesDontExistHealthChe...
python
edit
1
6
mit
8c52f7d65d460dbe659256ed54eb4b60f702bab3
yola/healthcheck
healthcheck/contrib/django/status_endpoint/views.py
rejected_duplicate
Near-duplicate of sample 2365
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core import serializers\nimport requests\nfrom tinyblog.models import Post\n\n\nclass Command(BaseCommand):\n args = 'url'\n help = u'Fetches blog entries ...
python
edit
1
6
bsd-3-clause
ea6a84cee4f452f4503c6ce0fdd04b77d9017bdd
dominicrodger/tinyblog,dominicrodger/tinyblog
tinyblog/management/commands/import_tinyblog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom requests import get\nfrom bs4 import BeautifulSoup as BS\nfrom os.path import exists\n\nurl = \"https://www.projecteuler.net/problem=%d\"\n\n\ndef get_info(i):\n soup = BS(get(url % i, verify=False).content)\n problem = soup.fi...
python
edit
2
1
mit
35c97d14eede0e48a0daff8e7f04aeba09f02268
zlsun/ProjectEuler
get.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User, Group\nfrom waterfall_wall.models import Image\nfrom rest_framework import serializers\n\n\nclass ImageSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = Image\...
python
edit
4
1
mit
e745cbd16cd2eef2a5805aa7bd113bcaf147af4e
carlcarl/rcard,carlcarl/rcard
waterfall_wall/serializers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFabric's own fabfile.\n\"\"\"\n\nfrom __future__ import with_statement\n\nimport nose\n\nfrom fabric.api import *\n\nimport docs, tag\nfrom utils import msg\n\n\n@task(default=True)\ndef test(args=None):\n \"\"\"\n Run all uni...
python
edit
8
2
bsd-2-clause
25bfdfccc89c8150ea8bc4a024415861808d4a6e
fernandezcuesta/fabric,xLegoz/fabric,tolbkni/fabric,askulkarni2/fabric,hrubi/fabric,StackStorm/fabric,cgvarela/fabric,bitprophet/fabric,mathiasertl/fabric,jaraco/fabric,cmattoon/fabric,rbramwell/fabric,rodrigc/fabric,rane-hs/fabric-py3,MjAbuz/fabric,bitmonk/fabric,kmonsoor/fabric,tekapo/fabric,sdelements/fabric,qinrong...
fabfile/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nclass VisitedThreadSet():\n set = None\n\n def __init__(self):\n pass\n\n def load(self):\n pass\n\n def save(self):\n pass\n\n def add_thread(self):\n pass\n\n def check_thread_exists(self)...
python
edit
1
2
mit
eddd7f856c7dc423c387d496a87cf5fdf941215b
AFFogarty/SEP-Bot,AFFogarty/SEP-Bot
helpers/visited_thread_set.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf.urls import patterns, url\n\n\nurlpatterns = patterns('impersonate.views',\n url(r'^stop/$',\n 'stop_impersonate',\n name='impersonate-stop'),\n url(r'^list/$',\n 'list_us...
python
edit
1
0
bsd-3-clause
80cecb69170adf7235ecbff3eec4e737cf5d9292
Top20Talent/django-impersonate,Top20Talent/django-impersonate
impersonate/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = (1, 4, 2)\n__version__ = '.'.join(map(str, VERSION))\n\n\nclass LazySettings(object):\n def _load_settings(self):\n from feincms import default_settings\n from django.conf import settings as django_settings\n\n ...
python
edit
1
4
bsd-3-clause
a20fc95d3a4dc194ef4f6d227976ff5bba229aaa
matthiask/django-content-editor,nickburlett/feincms,matthiask/django-content-editor,matthiask/feincms2-content,michaelkuty/feincms,matthiask/feincms2-content,pjdelport/feincms,mjl/feincms,joshuajonah/feincms,matthiask/django-content-editor,feincms/feincms,nickburlett/feincms,nickburlett/feincms,mjl/feincms,joshuajonah/...
feincms/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom rest_framework import routers\n\n\nif 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism':\n from g...
python
edit
1
0
bsd-2-clause
1e04152b69f88f6512920db8ccdd9ba2f0201517
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin
geotrek/api/mobile/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2017, the cclib development team\n#\n# This file is part of cclib (http://cclib.github.io) and is distributed under\n# the terms of the BSD 3-Clause License.\n\n\"\"\"Test coupled cluster logfiles...
python
edit
1
1
bsd-3-clause
d7ca978c696deb13c53fc3fdc9d227d0836b97f8
berquist/cclib,berquist/cclib,cclib/cclib,ATenderholt/cclib,ATenderholt/cclib,langner/cclib,cclib/cclib,berquist/cclib,cclib/cclib,langner/cclib,langner/cclib
test/data/testCC.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#import ibmcnx.test.loadFunction\nimport sys\nfrom java.lang import String\nfrom java.util import HashSet\nfrom java.util import HashMap\nimport java\nimport lotusConnectionsCommonAdmin\n\nglobdict = globals()\n\ndef loadFilesService():\n ...
python
edit
10
1
apache-2.0
169d5b56ab5936a785ae501a91005fcfe3af6674
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/test/test.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Room\nfrom rest_framework import viewsets\nfrom .serializers import RoomDetailSerializer, RoomListSerializer\nfrom rest_framework.decorators import detail_route\nfrom django.core.exceptions import PermissionDenied\nfrom ...
python
edit
1
7
mit
3166d48bed0bd7663a3332736a236d8f424b6cd3
iver56/useat-api
room/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom blas_lapack_checkers import CheckCLAPACK, CheckCBLAS, CheckF77BLAS, CheckF77LAPACK\nfrom fft_checkers import CheckFFT\n\nfrom simple_check import NumpyCheckLibAndHeader\n\nfrom perflib import *\nfrom fortran import *\n\nfrom perflib_in...
python
edit
12
0
bsd-3-clause
16acf6dba180d17b142e5799f62e59a2771099fa
cournape/numscons,cournape/numscons,cournape/numscons
numscons/checkers/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom nose.tools import ok_\n\nfrom _utils import _output_eq, IntegrationSpec, _dispatch, trap, expect_exit\n\n\nclass ShellCompletion(IntegrationSpec):\n \"\"\"\n Shell tab-completion behavior\n \"\"\"\n\n def no_i...
python
edit
3
2
bsd-2-clause
6df54729954d5f9bd25549c482b3bc170a338ff0
mattrobenolt/invoke,frol/invoke,pfmoore/invoke,singingwolfboy/invoke,pyinvoke/invoke,kejbaly2/invoke,tyewang/invoke,pyinvoke/invoke,mkusz/invoke,frol/invoke,pfmoore/invoke,mkusz/invoke,mattrobenolt/invoke,kejbaly2/invoke
tests/completion.py
rejected_duplicate
Near-duplicate of sample 6983
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_\nfrom mock import MagicMock\n\nfrom buffpy.models.link import Link\n\ndef test_links_shares():\n '''\n Test link's shares retrieving from constructor\n '''\n\n mocked_api = MagicMock()\n mocked_api.get.retu...
python
edit
1
1
mit
9a5d2a6f9efefb5b1647de5e467a9dfb74b86c9b
vtemian/buffpy
buffpy/tests/test_link.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist\n\nfrom social_auth.utils import setting\nfrom social_auth.models import UserSocialAuth\nfrom social_auth.backends.pipeline import warn_setting\nfrom social_auth...
python
edit
3
6
bsd-3-clause
71fd42a92b41529d9f5c784840ab4c190946adef
antoviaque/django-social-auth-norel
social_auth/backends/pipeline/associate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport redis\nimport urlparse\n\n\ndef redis_client(redis_url):\n r_url = urlparse.urlparse(redis_url)\n r_host = r_url.netloc.split(\":\")[0]\n r_port = int(r_url.netloc.split(\":\")[1])\n r_db = int(r_url.path[1:])\n pool =...
python
edit
1
1
apache-2.0
7989252dd687dfaa1fd12ed8900c947190bfe4f7
therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea
ichnaea/cache.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nReturn data to a mongodb server\n\nThis is the default interface for returning data for the butter statd subsytem\n\nRequired python modules: pymongo\n'''\n\nimport logging\n\ntry:\n import pymongo\n has_pymongo = True\nexcept Im...
python
edit
1
5
apache-2.0
7e4c38c482bc908e85d8121c8e9d70b07ad9cd0d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/returners/mongo_return.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import base\n\n\nclass ActiveMQTestCase(base.IntegrationTestCase):\n '''RabbitMQ integration test case.'''\n CTXT = {\n 'plugin.activemq.pool.1.port': 61614,\n 'plugin.activemq.pool.1.password': 'marionette',\n ...
python
edit
1
0
bsd-3-clause
a29d712b69f64ec248fb7f6829da9996dc5b217a
rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective
tests/integration/test_with_activemq.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404\nfrom invoice.models import Invoice\nfrom invoice.pdf import draw_pdf\nfrom invoice.utils import pdf_response\n\n\ndef pdf_view(request, pk):\n invoice = get_object_or_404(Invoice, pk=pk)\n ...
python
edit
1
1
bsd-3-clause
747af88d56dc274638f515825405f58b0e59b8d7
Chris7/django-invoice,Chris7/django-invoice,simonluijk/django-invoice
invoice/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom db import tables as dbTables\n\napp = Flask(__name__, template_folder='./web/templates/')\napp.config['SECRET_KEY'] = 'some_secret_key'\napp.config['SQLALCHEMY_DATABASE_...
python
edit
4
2
mit
8c0af29e7b6ec3a5e76fdb1efc56068bf276ad39
Relrin/Helenae,Relrin/Helenae,Relrin/Helenae
helenae/flask_app.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import BaseRunner\n\n\nclass SimpleRunner(BaseRunner):\n\n \"\"\"\n Simple blocking task runner.\n \"\"\"\n\n @classmethod\n def run(cls, task):\n \"\"\"\n Simple blocking task runner.\n\n Run ...
python
edit
1
4
bsd-3-clause
4a20a36aa920a6450eb526a9913d8fb0ab08fa8c
tkf/buildlet
buildlet/runner/simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_collection.management.commands import BaseXpressWebLookupCsvImporter\n\nclass Command(BaseXpressWebLookupCsvImporter):\n council_id = 'E07000143'\n addresses_name = 'May 2017/BrecklandPropertyPostCodePollingStationWebL...
python
edit
1
2
bsd-3-clause
4e40575147fd9af02c0e0a380e4d35f6c5d8f67a
chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_breckland.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nimport xlrd\nimport os\n\n\nbase_loader_error = 'The Loader class can only be used by extending it.'\n\n\nextensions = getattr(\n settings,\n 'IMPORTER_EXTENSIONS',\n {\n 'excel': ('.xls',...
python
edit
1
2
mit
31168c729ac486e6a0705e9c5117586dfb964cf7
monokrome/django-drift
importer/loaders.py
rejected_duplicate
Near-duplicate of sample 2690
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom ..hub_script import hub_script\n\nfrom ..utils import ALLOW_INTERNET\n\ndef setup_module(module):\n ALLOW_INTERNET.set(False)\n\n\ndef test_hub_script():\n sys.argv.append('-m') # run in multiple mode\n sys.argv...
python
edit
1
1
bsd-3-clause
7a1a90cbaba73da44efeaf385865519cfa078a6c
StuartLittlefair/astropy,dhomeier/astropy,saimn/astropy,funbaker/astropy,larrybradley/astropy,MSeifert04/astropy,kelle/astropy,lpsinger/astropy,bsipocz/astropy,aleksandr-bakanov/astropy,DougBurke/astropy,lpsinger/astropy,lpsinger/astropy,astropy/astropy,funbaker/astropy,AustereCuriosity/astropy,StuartLittlefair/astropy...
astropy/vo/samp/tests/test_hub_script.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make the flask app easier to import" }, { "role": "assistant", "content": "import os\nPACKAGEDIR = os.path.abspath(os.path.dirname(__file__))\n\nfrom .webapp import goldstarsapp\n" } ]
python
new_file
3
0
mit
3d7e02e58353fdc3290440344efd5591d233f449
barentsen/AstroGoldStars,barentsen/AstroGoldStars
bot/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom oscar.core.application import Application\n\nfrom systempay import views\n\n\nclass SystemPayApplication(Application):\n name = 'systempay' \n\n place_order_view = views.PlaceOrderView\...
python
edit
1
1
mit
44749393191aebf730c4dca17766fbdb713e636b
bastien34/django-oscar-systempay,bastien34/django-oscar-systempay,dulaccc/django-oscar-systempay
systempay/app.py
rejected_duplicate
Near-duplicate of sample 12968
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n requires=['beautifulsoup4', 'requests'],\n name='python-ninegag',\n version='0.1',\n py_modules=['pyninegag'],\n url='https://github.com/sashgorokhov/python-ninegag',\n license=...
python
edit
1
0
mit
b946768acb8c9e34dbb72cb6d3bc33a7e67f4548
sashgorokhov/python-ninegag
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import include, url, patterns\nfrom django.conf.urls.static import static\nfrom settings import API_BASE\nfrom website.settings import DEV_MODE\n\nfrom . import views\n\nbase_pattern =...
python
edit
1
0
apache-2.0
3146aa3379f5c928fc7ba79776de19a1c64c7c01
alexschiller/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,emetsger/osf.io,zachjanicki/osf.io,aaxelb/osf.io,binoculars/osf.io,RomanZWang/osf.io,Johnetordoff/osf.io,HalcyonChimera/osf.io,Johnetordoff/osf.io,billyhunt/osf.io,doublebits/osf.io,cwisecarver/osf.io,DanielSBrown/osf.io,doublebits/osf.io,chrisseto/osf.io,abought/o...
api/base/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nsetup(\n name = \"biofloat\",\n version = \"0.1.1\",\n packages = find_packages(),\n scripts = ['scripts/load_biofloat_cache.py'],\n\n # metadata for upload to PyPI\n author = \...
python
edit
1
0
mit
a6d87b6e4dba63b0a74dc6173e90823bdb9fe070
MBARIMike/biofloat,MBARIMike/biofloat,biofloat/biofloat,biofloat/biofloat
setup.py
rejected_duplicate
Near-duplicate of sample 1842
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom rohrpost import __version__\n\n\ndef read(filepath):\n with open(filepath, \"r\", encoding=\"utf-8\") as f:\n return f.read()\n\n\nsetup(\n name=\"rohrpost\",\n version=__version__,\n ...
python
edit
1
1
mit
c136d5897a9c36cf5c4eca1d9a8c0be960ead730
axsemantics/rohrpost,axsemantics/rohrpost
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom setuptools import setup\n\n# See https://stackoverflow.com/questions/19534896/enforcing-python-version-in-setup-py\nif sys.version_info < (3,6):\n sys.exit(\"Sorry, Python < 3.6 is not supported by Auspex.\")\n\nsetup(\n...
python
edit
1
0
apache-2.0
5db334fac528494006755703d4563fd08dbfc4b2
BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(\n name = 'watsongraph',\n packages = ['watsongraph'], # this must be the same as the name above\n install_requires=['networkx', 'requests', 'mwviews'],\n version = '0.1.5',\n description = 'Conc...
python
edit
1
0
mit
17c18a610ba0fe35d88ffb4ca1b6d0c91ae4fad6
ResidentMario/watson-graph,ResidentMario/watsongraph
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.a...
python
edit
1
0
bsd-2-clause
a53b0f540b8aac87f96743bf4d383607ad5a398f
ethoms/django-djaken,ethoms/django-djaken
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Always prefer setuptools over distutils\nfrom setuptools import setup\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the READ...
python
edit
1
0
mit
86d17b1898b5654aeeb432722dcb599136376236
rbeagrie/wrapit
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nROOT = os.path.dirname(os.path.realpath(__file__))\n\nsetup(\n name='grab',\n version='0.6.30',\n description='Web Scraping Framework',\n long_description=open(os.path.jo...
python
edit
1
0
mit
9bf381993a6862a3413f5e1d3439ff1301260d62
lorien/grab,lorien/grab,istinspring/grab,istinspring/grab
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef read(filename):\n return open(os.path.join(os.path.dirname(__file__), filename)).read()\n\n\nsetup(\n name='gears-less',\n version='0.1',\n url='https://github.com/...
python
edit
1
1
isc
e68ca88db996e817d607f51a25fabb47c8cf685c
gears/gears-less,gears/gears-less
setup.py
rejected_duplicate
Near-duplicate of sample 15434
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.a...
python
edit
1
0
mit
1eba15e0c187b7afca85c43e031ce9e9e926e622
Corvia/django-tenant-users
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys\nfrom setuptools import setup, find_packages\n\n\npkgname = \"SHARPpy\"\n\n\n### GET VERSION INFORMATION ###\nsetup_path = os.path.split(os.path.abspath(__file__))[0]\nsys.path.append(os.path.join(setup_path, pkgname.lower())...
python
edit
1
0
bsd-3-clause
34de8fbae91b367ed1ada417c5d3cea669ccc1f3
blizzardwarriorwx/SHARPpy,blizzardwarriorwx/SHARPpy,scollis/SHARPpy,scollis/SHARPpy,djgagne/SHARPpy,djgagne/SHARPpy,djgagne/SHARPpy,scollis/SHARPpy,djgagne/SHARPpy,blizzardwarriorwx/SHARPpy,blizzardwarriorwx/SHARPpy,scollis/SHARPpy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport setuptools\n\n\nsetuptools.setup(\n name='bumper',\n version='0.1.1',\n\n author='Max Zheng',\n author_email='maxzheng.os @t gmail.com',\n\n description=open('README.rst').read(),\n\n entry_points={\n ...
python
edit
1
0
mit
330bdcb3bc50acf4c15299a15fb7fdf8b58e152c
maxzheng/bumper
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport re\nfrom setuptools import setup\n\n\ndef get_version(filename):\n content = open(filename).read()\n metadata = dict(re.findall(\"__([a-z]+)__ = '([^']+)'\", content))\n return meta...
python
edit
1
1
apache-2.0
d803647eeb1644985f1788d232a72587ff156bb4
mopidy/mopidy-scrobbler,mthssdrbrg/mopidy-scrobbler
setup.py
rejected_duplicate
Near-duplicate of sample 5175
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nlong_description = (\n open('README.rst').read()\n + '\\n' +\n open('CHANGES.txt').read())\n\nsetup(name='more.static',\n version='0.1.dev0',\n description=\"Bower...
python
edit
3
0
bsd-3-clause
0243af9efb3caf83268af35f9f2d80977e13afb1
morepath/more.static
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib.parse import urlparse, urljoin\nfrom flask import request\n\ndef get_or_create(model, **kwargs):\n \"\"\" Returns an instance of model and whether or not it already existed in a tuple. \"\"\"\n instance = model.query.filte...
python
edit
1
4
mit
bb951b655ca49b341fec3f6cb813f2b07c118696
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
app/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Config for PyPI.\"\"\"\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n author='Kyle P. Johnson',\n author_email='<EMAIL>',\n classifiers=[\n 'Intended Audience :: Education',\n ...
python
edit
1
0
mit
684e2894a8c4da327410a8898e63df504780d7f8
TylerKirby/cltk,cltk/cltk,mbevila/cltk,LBenzahia/cltk,diyclassics/cltk,kylepjohnson/cltk,D-K-E/cltk,LBenzahia/cltk,coderbhupendra/cltk,TylerKirby/cltk
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import current_app\nfrom functools import wraps\nfrom hashlib import md5\n\nfrom changes.ext.redis import UnableToGetLock\nfrom changes.config import redis\n\n\ndef lock(func):\n @wraps(func)\n def wrapped(**kwargs):\n ...
python
edit
1
3
apache-2.0
b3d9696d02855ba7a3243b4dc10e931f22a587b8
dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes
changes/utils/locking.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\nfrom distutils.core import setup\n\ntry:\n if os.path.exists(\".git\"):\n s = subprocess.Popen([\"git\", \"rev-parse\", \"HEAD\"],\n stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n ...
python
edit
1
2
bsd-3-clause
c7689244b6de2cc9a01568e7cdab543cf8790214
sahg/SAHGutils
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado.testing import AsyncHTTPTestCase\nfrom tornado.websocket import websocket_connect\n\nfrom . import app\n\n\nclass TestMyApp(AsyncHTTPTestCase):\n def get_app(self):\n return app.get_app()\n\n def test_homepage(self...
python
edit
3
1
apache-2.0
c31bf6447f7b373ecbcc79e161dc406907887344
chirpradio/command-center,chirpradio/command-center
commandcenter/app_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#ckwg +5\n# Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to\n# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,\n# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 120...
python
edit
4
3
bsd-3-clause
02faa67481e0902501e9e269c17351d9b8f05afa
mathstuf/sprokit,Kitware/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,Kitware/sprokit,Kitware/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,mathstuf/sprokit,linus-sherrill/sprokit
tests/python/pipeline_util/test-export_.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\nfrom ..util import static_shape, static_rank\n\n\n\ndef accuracy(output_layer, true_label):\n assert static_rank(output_layer) == 2\n #assert static_shape(output_layer)[0] == (batch size)\n #assert static_shape...
python
edit
1
1
unlicense
499defc47f0647afda47be8a8a25d04095b07e1b
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/slmc/accuracy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport time\n\nfrom .. import emails\nfrom ..database import get_sql_connection\nfrom ..models import Account, Session as SqlSession\n\n\n__description__ = 'Send out summary emails.'\n\n\ndef send_out_emails():\n session...
python
edit
1
3
mit
6e8efdbb31c8713eeee0105ddafbd88d6286cfc9
thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts
ganttcharts/cli/send_summary_emails.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lingcod.features.forms import FeatureForm\nfrom lingcod.bookmarks.models import Bookmark\nfrom django import forms\n\nclass BookmarkForm(FeatureForm):\n name = forms.CharField(label='Bookmark Name')\n latitude = forms.FloatField(...
python
edit
1
0
bsd-3-clause
e822ee6fe844c18b2a459ed188f4fbae26c617e5
underbluewaters/marinemap,underbluewaters/marinemap,underbluewaters/marinemap
lingcod/bookmarks/forms.py
rejected_duplicate
Near-duplicate of sample 17477
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nfrom passgen import make_parser, sanitize_input\nimport unittest\n\n\nclass PassGenTestCase(unittest.TestCase):\n\n def setUp(self):\n self.parse_args = make_parser().parse_args\n\n de...
python
edit
1
2
mit
51346025b638159c69fe2c8da85170784d065d60
Videonauth/passgen
test_passgen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport warnings\nfrom collections import namedtuple\n\nfrom sentry.exceptions import InvalidConfiguration\n\n\nclass Version(namedtuple('Version', 'major minor patch')):\n def __str__(self):\n ...
python
edit
5
4
bsd-3-clause
fcc2a190a50327a2349dfbb8e93d3157a6c1f1e8
zenefits/sentry,BuildingLink/sentry,ifduyue/sentry,beeftornado/sentry,beeftornado/sentry,jean/sentry,jean/sentry,ifduyue/sentry,JackDanger/sentry,nicholasserra/sentry,gencer/sentry,fotinakis/sentry,mvaled/sentry,mvaled/sentry,daevaorn/sentry,jean/sentry,ifduyue/sentry,JamesMura/sentry,alexm92/sentry,daevaorn/sentry,fot...
src/sentry/utils/versioning.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nimport requests\n\nurl = 'http://ben-major.co.uk/labs/top40/api/singles/'\n\nresponse = requests.get(url)\n\nprint response.json()\n\n```\n\nApply this change: Implement basic printing of the singles chart" }, { "role"...
python
edit
1
2
mit
fbae1592e9a94a4b6faec0896abfc38acb06d5d2
kevgathuku/top40,andela-kndungu/top40
top40.py
rejected_duplicate
Near-duplicate of sample 23237
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nl = logging.getLogger('angr.states')\n\nclass PathGenerator(object):\n def __init__(self, project):\n self._project = project\n\n def blank_path(self, state=None, *args, **kwargs):\n '''\n blank_...
python
edit
1
2
bsd-2-clause
85db39e36c99e800e1008605213d1c25108b035d
angr/angr,GuardianRG/angr,iamahuman/angr,cureHsu/angr,tyb0807/angr,mingderwang/angr,fjferrer/angr,angr/angr,zhuyue1314/angr,axt/angr,cureHsu/angr,chubbymaggie/angr,schieb/angr,lowks/angr,fjferrer/angr,zhuyue1314/angr,schieb/angr,chubbymaggie/angr,GuardianRG/angr,axt/angr,mingderwang/angr,avain/angr,schieb/angr,angr/ang...
angr/paths.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom CITests import CITests\n\n# Libs in Application Examples\nappExamples = {\n#\"KundurSMIB\":\"/ApplicationExamples/KundurSMIB/package.mo\",\n#\"TwoAreas\":\"/ApplicationExamples/TwoAreas/package.mo\",\n#\"SevenBus\":\"/Appli...
python
edit
1
0
bsd-3-clause
2eb8570d52c15b1061f74fe23c1f361ae8ab6d7c
SmarTS-Lab/OpenIPSL,SmarTS-Lab/OpenIPSL,tinrabuzin/OpenIPSL,OpenIPSL/OpenIPSL
CI/syntaxCheck.py
rejected_duplicate
Near-duplicate of sample 3407
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import Http404\nfrom django.utils import translation\n\n\ndef handle_cms_response(response):\n if response.status_code == 404:\n raise Http404()\n response.raise_for_status()\n return response.json()\n\...
python
edit
1
3
mit
5256408a2a5d7a4c5562962a590487b39da3dcff
uktrade/directory-ui-supplier,uktrade/directory-ui-supplier,uktrade/directory-ui-supplier
core/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# standard library\nimport collections\n\n# django\nfrom django.utils.translation import ugettext_lazy as _\n\nParameterDefinition = collections.namedtuple(\n 'Parameter',\n [\n 'name',\n 'defa...
python
edit
1
0
mit
d60b16912cc3aa5c0a4f231b63b564683b2b8f64
magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3
parameters/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport zeroconf\nimport socket\n\n\nclass Bonjour(object):\n \"\"\"\n \"\"\"\n\n def __init__(self):\n \"\"\"\n \"\"\"\n\n self.zeroconf = zeroconf.Zeroconf()\n self.servers = {}\n\n def publish(self,...
python
edit
1
3
mit
5f30d91d35d090e28925613365d5d1f31f0259d2
ties/flask-daapserver,basilfx/flask-daapserver
daapserver/bonjour.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\" console_utils.py: various tools for printing into console \"\"\"\n\ndef cli_print(message, verbosity, threshold):\n \"\"\"Helper function to print console output\n\n Parameters\n ----------\n me...
python
edit
3
3
mit
6ae83f01eacceb140435e72a216fa88bd97f2b0c
ljvmiranda921/pyswarms,ljvmiranda921/pyswarms
pyswarms/utils/console_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport logging\n\n# Logging configuration\nlog = logging.getLogger(__name__) # noqa\nlog.addHandler(logging.NullHandler()) # noqa\n\nfrom netmiko.ssh_dispatcher import ConnectHandler\nfrom netmiko....
python
edit
1
0
mit
cf09237c9d889b83f76e22835cb62da3711b6342
ktbyers/netmiko,ktbyers/netmiko
netmiko/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.signals import Signal\n\nprocess_completed = Signal(providing_args=['result_text', 'result_data', 'files', 'profile','logs'])\nprocess_aborted = Signal(providing_args=['error_text','result_data','profile','logs'])\n\n```\n\...
python
edit
1
0
bsd-3-clause
77cdf4de05b3edfe3231ffd831af38b290b178a1
hydroshare/django_docker_processes,JeffHeard/django_docker_processes
signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# content of conftest.py\n\nimport pytest\n\ndef pytest_collect_file(parent, path):\n if path.ext == \".yml\" and path.basename.startswith(\"test\"):\n return YamlFile(path, parent)\n\nclass YamlFile(pytest.File):\n def collect...
python
edit
1
3
mit
eed21e06dbb61899e9c14352750258aa81cc5d3c
The-Compiler/pytest,pfctdayelise/pytest,malinoff/pytest,tomviner/pytest,hackebrot/pytest,rmfitzpatrick/pytest,nicoddemus/pytest,tomviner/pytest,RonnyPfannschmidt/pytest,skylarjhdownes/pytest,etataurov/pytest,hpk42/pytest,alfredodeza/pytest,nicoddemus/pytest,markshao/pytest,ddboline/pytest,hpk42/pytest,jaraco/pytest,The...
doc/en/example/nonpython/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import BlogPost\nfrom django import forms\n\nclass BlogPostForm(forms.ModelForm):\n class Meta:\n model = BlogPost\n exclude = ('user',)\n\n```\n\nApply this change: Add the form for Comment" }, { "role...
python
edit
1
0
mit
a3fce3124168cde5dec925c3346bab59f4e6d59c
andreagrandi/bloggato,andreagrandi/bloggato
blog/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make the quantum top-level a namespace package.\n\nChange-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d" }, { "role": "assistant", "content": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC\n# All R...
python
new_file
2
0
apache-2.0
f268b5e62ca8bbf1712225d4c8d6d38580f38fba
netscaler/neutron,mahak/neutron,miyakz1192/neutron,takeshineshiro/neutron,NeCTAR-RC/neutron,apporc/neutron,klmitch/neutron,JioCloud/neutron,skyddv/neutron,swdream/neutron,rossella/neutron,CiscoSystems/quantum,CiscoSystems/QL3Proto,aristanetworks/arista-ovs-quantum,psiwczak/quantum,eayunstack/neutron,liqin75/vse-vpnaas-...
quantum/__init__.py
rejected_duplicate
Near-duplicate of sample 18719
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__author__ = 'John Moylan'\n\nimport sys\n\nfrom paramiko import SSHClient, SSHConfig, AutoAddPolicy\n\nfrom pyvarnish.settings import SSH_CONFIG\n\n\nclass Varnish_admin():\n\n def __init__(self, server=''):\n ...
python
edit
2
3
bsd-3-clause
296005cae2af44e7e14a7e7ee9a99a2deab8c924
redsnapper8t8/pyvarnish
pyvarnish/remote.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nimport os\nimport re\n\nfrom .mistune import markdown\n\nHTML_START = '<!DOCTYPE html><html><head><meta charset=\"utf-8\"></head><body>'\nHTML_END = '</body></html>'\n\nclass CreateMinuteCommand(sublime_plugi...
python
edit
3
1
mit
95cb5fc25b3fb1470c4631b93fea11d6172240a4
Txarli/sublimetext-meeting-minutes,Txarli/sublimetext-meeting-minutes
MeetingMinutes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\nfrom ..menu_helpers import get_vue_js_router\n\nregister = template.Library()\n\n\n@register.simple_tag(takes_context=True)\ndef vue_js_router(cont...
python
edit
1
2
mit
3a8ea034e43985d4358b9f3e54c9bfc59ee6e99b
dreipol/djangocms-spa-vue-js
djangocms_spa_vue_js/templatetags/router_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nMONGO_HOST = 'localhost'\nMONGO_PORT = 27017\nMONGO_DATABASE = 'pupa'\n\nSCRAPELIB_RPM = 60\nSCRAPELIB_TIMEOUT = 60\nSCRAPELIB_RETRY_ATTEMPTS = 3\nSCRAPELIB_RETRY_WAIT_SECONDS = 20\n\nENABLE_ELASTICSEARCH = False\n\nBILL_FILTERS = {}\nLEGIS...
python
edit
1
0
bsd-3-clause
7a985d102a347e252b4e6be1776c6b6609fdcdea
opencivicdata/pupa,datamade/pupa,influence-usa/pupa,datamade/pupa,opencivicdata/pupa,mileswwatkins/pupa,mileswwatkins/pupa,influence-usa/pupa,rshorey/pupa,rshorey/pupa
pupa/core/default_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom .psparser import LIT\n\nimport six #Python 2+3 compatibility\n\n## PDFColorSpace\n##\nLITERAL_DEVICE_GRAY = LIT('DeviceGray')\nLITERAL_DEVICE_RGB = LIT('DeviceRGB')\nLITERAL_DEVICE_CMYK = LIT('DeviceCMYK')\n\n\nclass PDFColorSpace(o...
python
edit
3
1
mit
0ce9a29f83bb9c87df04f49b5e927d7a6aa4c53c
pdfminer/pdfminer.six,goulu/pdfminer
pdfminer/pdfcolor.py
rejected_duplicate
Near-duplicate of sample 3878
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for {{ project_name }} project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Djan...
python
edit
null
null
mit
3cfb623b16aa5e52f3617a8d250b58a74b30b65d
pinax/pinax-project-forums,pinax/pinax-project-forums
project_name/wsgi.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom .optimization import ParameterManager, minimize\nfrom .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral\n\n```\n\nApply this change: Make sure package works even if...
python
edit
7
0
mit
3e91ff11f93e491963f6e38965672a9694ea0786
matthias-k/optpy
optimize/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.conf import settings\n\nfrom raygun4py import raygunprovider\n\nclass Provider(object):\n\n def __init__(self):\n \tconfig = getattr(settings, 'RAYGUN4PY_CONFIG', {})\n \tapiKey...
python
edit
3
6
mit
33e610576462d017bf25a65f1e879e6340f2ca06
MindscapeHQ/raygun4py
python2/raygun4py/middleware/django.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom models.base_model import db\nfrom models.user_model import UserModel\nfrom models.waifu_model import WaifuModel\nfrom models.waifu_message_model import WaifuMessageModel\n\n\ndef create_tables():\n db.connect()\n db.create_tables...
python
edit
1
1
cc0-1.0
e99855e31c30d0b554d24b14d98ae8b76e1fc0a0
sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend
create_tables.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom registration.forms import RegistrationFormUniqueEmail\n\nfrom preferences.models import Preferences\n\nfrom opencivicdata.models.people_orgs import Person\n\n\nclass CustomModelFilter(forms.ModelChoiceField):\...
python
edit
3
1
mit
6200b0655f56ecfe85095d695c4914e390520536
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom django.config import settings\nfrom appconf import AppConf\n\nclass DJOAuthConf(AppConf):\n class Meta:\n prefix = 'djoauth'\n\n ACCESS_TOKEN_LENGTH = 30\n ACCESS_TOKEN_LIFETIME = 3600\n ACCESS_TOKENS_REFRESHABL...
python
edit
3
0
mit
8d18df92373c1fd4c2cfa2fb59f5f49a4f89b78f
vden/djoauth2-ng,Locu/djoauth2,seler/djoauth2,vden/djoauth2-ng,seler/djoauth2,Locu/djoauth2
djoauth2/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport foauth.providers\n\n\nclass Netflix(foauth.providers.OAuth1):\n # General info about the provider\n provider_url = 'https://www.netflix.com/'\n docs_url = 'http://developer.netflix.com/docs'\n\n # URLs to interact with th...
python
edit
1
1
bsd-3-clause
95f0ae5e04df6e5ce454b15551133caacfd44536
foauth/foauth.org,foauth/oauth-proxy,foauth/foauth.org,foauth/foauth.org
services/netflix.py
rejected_duplicate
Near-duplicate of sample 157
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\nimport unittest\nfrom pathlib import Path\n\nfrom pymatgen.util.testing import PymatgenTest\nfrom pymatgen.io.cp2k.outputs imp...
python
edit
1
1
mit
38ac22c8380e91777c22f7dcb9a5297e9737d522
davidwaroquiers/pymatgen,davidwaroquiers/pymatgen,gmatteo/pymatgen,richardtran415/pymatgen,davidwaroquiers/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,davidwaroquiers/pymatgen,gmatteo/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,richardtran415/pymatgen,vorwerkc/pymatgen,gVallverdu/pymatgen,vorwerkc/pymatgen,fraric...
pymatgen/io/cp2k/tests/test_outputs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\ntest/test_connection\n~~~~~~~~~~~~~~~~~~~~~\n\nTests for the SPDYConnection object.\n\"\"\"\nimport spdypy\nimport spdypy.connection\n\n\nclass TestSPDYConnection(object):\n def test_can_create_connection...
python
edit
1
1
mit
1e91b4ad94dd4a986adce22350cec8bd24fa4865
Lukasa/spdypy
test/test_connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom numpy import *\nfrom scipy import *\nfrom scipy.interpolate import interp1d\nfrom scipy.interpolate import pchip\nimport sys\nimport os\nimport argparse\nimport json\n\na = flipud(loadtxt(sys.argv[1]));\nb = f...
python
edit
15
0
mit
19de35d8124a67e459a69080156bd310bb3814ea
tdaede/awcy,tdaede/awcy,tdaede/awcy,tdaede/awcy,tdaede/awcy,tdaede/awcy
rate_delta_point.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom finny.command import Command\n\nclass GenerateStructure(Command):\n\n def __init__(self, name, path):\n self.name = name\n self.path = path\n\n def run(self):\n os.mkdir(self.path, 0755)\n\n \"\"\"\n You n...
python
edit
2
1
mit
085bc7787eac2d44fd4c19c8161709b20dc324be
hurrycane/finny
finny/commands/generate_structure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport sys\nsys.path.insert(0, '../')\n#needs_sphinx = '1.0'\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',\n 'sphinx.ext.intersphinx']\n\nintersphinx_mapping = {'python': ('https://docs....
python
edit
1
0
bsd-3-clause
73c72e3723c20019bb839ba7cd4494483fb65c0a
pika/pika,vitaly-krugl/pika
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom behave import *\n\n\n# Unique to Scenario: User logs out\n@when('I click on the logout link')\ndef impl(context):\n context.browser.find_link_by_text('Logout').first.click()\n\n@then('I am no longer authenticated')\ndef impl(context...
python
edit
5
1
bsd-3-clause
deb5775d0c8adad078ce5d0976f7f6f49963ca2e
f3r3nc/connect,nlhkabu/connect,nlhkabu/connect,f3r3nc/connect,f3r3nc/connect,nlhkabu/connect,f3r3nc/connect,nlhkabu/connect
accounts/features/steps/logout.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom cms.models.fields import PlaceholderField\nfrom managers import ChunkManager\n\n\nclass Chunk(models.Model):\n tags = models.CharField(max_length=200)\n code = PlaceholderField('chunk_placeholder', r...
python
edit
1
2
mit
6b38ca9283b3b367aa19a2722f9f6eea22c6c90b
devartis/django-cms-chunks
cms_chunks/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nExtended JSONPointer from python-json-pointer_\n==============================================\n\n.. _python-json-pointer: https://github.com/stefankoegl/python-json-pointer\n\"\"\"\n\nimport typing\n\nfrom jsonpointer import JsonPo...
python
edit
1
4
mit
9f95715cc7260d02d88781c208f6a6a167496015
vovanbo/aiohttp_json_api
aiohttp_json_api/jsonpointer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012-2014 Hewlett Packard Development Company, L.P.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You ma...
python
edit
1
2
apache-2.0
10e37d95dde00cd02d91998662a22f555837e877
hp-storage/python-3parclient,hpe-storage/python-3parclient
hp3parclient/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mapbox_vector_tile.encoder import on_invalid_geometry_make_valid\nfrom mapbox_vector_tile import encode as mvt_encode\n\n\ndef encode(fp, feature_layers, coord, bounds_merc):\n tile = mvt_encode(feature_layers, quantize_bounds=bound...
python
edit
1
1
mit
0da19042c74d2a85ef4652b36186a1ee6c4fc247
mapzen/tilequeue,tilezen/tilequeue
tilequeue/format/mvt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom textwrap import dedent\n\nfrom twisted.python.filepath import FilePath\nfrom twisted.trial.unittest import SynchronousTestCase\n\nfrom flocker import __version__ as version\nfrom flocker.common.version import get_installable_version\nf...
python
edit
1
1
apache-2.0
dd50a2b3fb157eaa3add329d90de3641ef9ea1ec
w4ngyi/flocker,mbrukman/flocker,w4ngyi/flocker,w4ngyi/flocker,AndyHuu/flocker,hackday-profilers/flocker,hackday-profilers/flocker,wallnerryan/flocker-profiles,hackday-profilers/flocker,mbrukman/flocker,mbrukman/flocker,AndyHuu/flocker,AndyHuu/flocker,wallnerryan/flocker-profiles,wallnerryan/flocker-profiles
flocker/docs/test/test_version_extensions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom http_client import HttpClient\n\n\"\"\"\n@breif Facebook messenger bot\n\"\"\"\nclass Bot():\n\n def __init__(self, token):\n self.api_token = token\n self.client = HttpClient() \n\n def send_message(self, message...
python
edit
1
2
mit
60430260f0bec7b9231c2dcb3ed3394dd81442b2
ben-cunningham/python-messenger-bot,ben-cunningham/pybot
fbmsgbot/bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport indra.tools.assemble_corpus as ac\n\ndef process_statements(stmts):\n stmts = ac.map_grounding(stmts)\n stmts = ac.map_sequence(stmts)\n stmts = ac.run_preassembly(stmts, return_toplevel=False)\n return stmts\n\n```\n\nAp...
python
edit
1
1
bsd-2-clause
464bc1b511415459e99700b94101776d00b23796
bgyori/indra,johnbachman/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra
indra/pre_assemble_for_db/pre_assemble_script.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nCreated on 2016-08-23\n@author: naoey\n\"\"\"\n\nclass SlashBotError(Exception):\n pass\n\n\nclass ConfigError(SlashBotError):\n def __init__(self, config_attr=None):\n if config_attr:\n su...
python
edit
1
2
mit
c60060f08700bfdbbcb566927624e2ec3af53145
naoey/slash-bot,naoey/slash-bot
slash_bot/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nfrom dtags.utils import halt, expand_path\n\nTAGS = os.path.expanduser('~/.dtags')\n\n\ndef load_tags():\n \"\"\"Load the tags from disk.\"\"\"\n if not os.path.exists(TAGS):\n try:\n with o...
python
edit
1
9
mit
971a180a5afab6ee53a9b15413341c649cda0a1c
joowani/dtags
dtags/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom base import BaseCSV, get_local_handles, ingest_feeds, create_seasons\nfrom overview import (ClubIngest, CountryIngest, CompetitionIngest, PlayerIngest, PersonIngest)\nfrom financial import (AcquisitionIngest, PlayerSalaryIngest, Partia...
python
edit
8
0
mit
fb61c3c64d2426e4e7a6e454cbf57b15e003ce66
soccermetrics/marcotti-mls
etl/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyQt4.QtGui import *\nfrom PyQt4 import uic\nimport os\nfrom os.path import join\nimport api\n\n\nclass MasterPage(QWizardPage):\n path = \"qtui/ui/page1_master.ui\"\n\n def __init__(self, project, parentW=None):\n super(M...
python
edit
5
2
mit
8964861c877797de7932978357ebe3c35eec6715
matcom/autoexam,matcom/autoexam,matcom/autoexam,matcom/autoexam,matcom/autoexam
qtui/master_page.py
rejected_lint
Too many lint violations: 5
true