messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns('',\n url(r'^', include('statuses.urls')),\n url(r'^admin/', include(admin.site.urls)),\n)\n\n```\n\nApply this change: Ch...
python
edit
1
0
mit
e45f23bbdce002cfbf644f2c91f319127f64b90c
matthewlane/mesa,matthewlane/mesa,matthewlane/mesa,matthewlane/mesa
mesa/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom unittest import TestCase\n\nfrom dnsimple2.client import DNSimple\nfrom dnsimple2.resources import (\n AccountResource,\n DomainResource\n)\nfrom dnsimple2.tests.utils import get_test_domain_name\n\n\nclass BaseService...
python
edit
1
1
mit
691bee381bda822a059c5d9fa790feabc7e00a8d
indradhanush/dnsimple2-python
dnsimple2/tests/services/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os, sys\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"settings\")\n\nfrom django.core.management import call_command\n\nif __name__ == \"__main__\":\n args = sys.argv[1:]\n call_command(\"test\...
python
edit
1
0
bsd-3-clause
9b83a9dbfe1cc3dc4e8da3df71b6c414e304f53f
niwinz/djorm-ext-pguuid
testing/runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom algoliasearch_django import AlgoliaIndex\n\n\nclass ChartIndex(AlgoliaIndex):\n fields = [\n 'title',\n 'arrangers'\n ]\n settings = {\n 'searchableAttributes': [\n 'title',\n 'arrang...
python
edit
1
0
bsd-2-clause
1bda8188458b81866c5938529ba85b3913caedc0
barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api
project/api/indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils import translation\n\nfrom celery.task import task\nfrom haystack import site\n\n@task\ndef delayed_update(instance_pk, model):\n \"\"\" Only index stuff that is known to be public \"\"...
python
edit
1
2
mit
f68139ce9114f260487048716d7430fcb1b3173b
catcosmo/froide,okfse/froide,ryankanno/froide,LilithWittmann/froide,CodeforHawaii/froide,ryankanno/froide,LilithWittmann/froide,LilithWittmann/froide,catcosmo/froide,ryankanno/froide,CodeforHawaii/froide,catcosmo/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,CodeforHawaii/froide,ryankanno/froide,okfs...
froide/helper/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2011 Seppo Yli-Olli\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.apa...
python
edit
2
5
apache-2.0
59c698e5db5c7fb2d537398cdad93215714b21f0
nanonyme/SimpleLoop,nanonyme/SimpleLoop
SimpleLoop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom testcontainers.core.generic import DbContainer\n\n\nclass OracleDbContainer(DbContainer):\n \"\"\"\n Oracle database container.\n\n Example\n -------\n ::\n\n with OracleDbContainer():\n e = sqlalchemy....
python
edit
1
1
apache-2.0
6b5461955e196ee4a12b708fb6f9bef750d468ad
SergeyPirogov/testcontainers-python
testcontainers/oracle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\n\nclass myElsClient:\n \"\"\"A class that implements a Python interface to api.elsevier.com\"\"\"\n\n # local variables\n __base_url = \"http://api.elsevier.com/\"\n \n def __init__(self, apiKey):\n ...
python
edit
3
1
bsd-3-clause
c65ed9ec976c440b46dedc514daf883bba940282
ElsevierDev/elsapy
myElsClient.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ncommands = {}\n\ndef add_cmd(name, alias=None, owner=False, admin=False):\n def real_command(func):\n commands[name] = func\n if alias:\n commands[alias] = func\n\n return real_command\n\n\ndef call_command(bo...
python
edit
2
5
mit
b9a16863a1baca989ccec66a88b4218aad676160
wolfy1339/Python-IRC-Bot
utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\n# Flask\nSECRET_KEY = os.urandom(32)\n\n# SQLAlchemy (DB)\nSQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'\n\n# Heartbeat\nHEARTBEAT_SECRET = (\n r'6\\x1eg\\xd4\\x19...
python
edit
1
0
mit
f4c8462d1197fe657c9556515bde6eafeabce5ca
Storj/downstream-node,Storj/downstream-node
downstream_node/config/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _ # noqa\n\nfrom horizon import exceptions\nfrom openstack_dashboard import api\n\n\ndef get_interfaces_data(self):\n try:\n router_id = self.kwargs['router_id']\n port...
python
edit
1
4
apache-2.0
473aee0eda226acc6ae959a3ef39656dce6031b5
dreamhost/akanda-horizon,dreamhost/akanda-horizon
akanda/horizon/routers/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import url\n\nfrom tastypie.resources import ModelResource\nfrom tastypie.constants import ALL\nfrom jmbo.api import ModelBaseResource\n\nfrom music.models import Track\n\n\nclass TrackResource(ModelBaseResour...
python
edit
3
1
bsd-3-clause
2565724364eac8a548be2f59173e2f0630fa2f5d
praekelt/jmbo-music,praekelt/jmbo-music
music/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom ..templatetags import explorer\n\n\nclass HighlightTestCase(TestCase):\n\n def test_highlight_returns_text_when_empty_word(self):\n\n expected = 'foo bar baz'\n assert explorer.highl...
python
edit
1
1
bsd-3-clause
22aaf754eb04e9f345c55f73ffb0f549d83c68df
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
apps/explorer/tests/test_templatetags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom zttf.utils import fixed_version, binary_search_parameters\n\n\nclass TestUtils(unittest.TestCase):\n def test_fixed_version(self):\n cases = [\n (0x00005000, 0.5),\n (0x00010000, 1.0),...
python
edit
1
2
apache-2.0
dd3cc71bb09ab2fb265b3f4bdda69cb1880842c6
zathras777/zttf
tests/utils_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test harness for all working end points" }, { "role": "assistant", "content": "import EmpireAPIWrapper\n\napi = EmpireAPIWrapper.empireAPI('10.15.20.157', uname='empireadmin', passwd='Password123!')\n# api = EmpireAPIWrapper.empi...
python
new_file
1
0
apache-2.0
ffb93d2a33d847d5aade8f69db87991b17698613
radioboyQ/EmpireAPIWrapper
tests/main_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pages.models import Page, Language, Content\nfrom pages.utils import auto_render\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django import forms\nfrom django.http import Http404\nimport settings\n\n@a...
python
edit
5
4
bsd-3-clause
f46526a5a42ec324de4925a208c23a46c48658c9
pombreda/django-page-cms,google-code-export/django-page-cms,pombreda/django-page-cms,google-code-export/django-page-cms,google-code-export/django-page-cms,Alwnikrotikz/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,Alwnikrotikz/django-page-cms,PiRSquared17/django-page-cms,pombreda/django-page-cm...
pages/views.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom errno import EROFS\n\nfrom fuse import FuseOSError\n\nfrom gitfs import FuseMethodNotImplemented\n\nfrom .view import View\n\n\nclass ReadOnlyView(View):\n def getxattr(self, path, fh):\n raise FuseMethodNotImpleme...
python
edit
3
1
apache-2.0
265ed91b7e7f204926e7c5f9d2fbe76f447f7955
PressLabs/gitfs,bussiere/gitfs,rowhit/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs
gitfs/views/read_only.py
rejected_duplicate
Near-duplicate of sample 13930
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.words.protocols import irc\n\n\nclass HeufyBotConnection(irc.IRC):\n def __init__(self, protocol):\n self.protocol = protocol\n self.nickname = \"PyHeufyBot\" #TODO This will be set by a configuration at some p...
python
edit
4
1
mit
b6027aceae21769c2f3dc7baccd5960e83ed9a90
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
heufybot/connection.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport sys\n__future_module__ = True\n\nif sys.version_info[0] < 3:\n from dummy_thread import *\nelse:\n raise ImportError('This package should not be accessible on Python 3. '\n ...
python
edit
3
0
mit
bbc6ce8225cf54e56331ec75fa2de007d02162af
QuLogic/python-future,QuLogic/python-future,PythonCharmers/python-future,michaelpacer/python-future,michaelpacer/python-future,PythonCharmers/python-future
src/_thread/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all___ = [\n 'YubicoError',\n 'StatusCodeError',\n 'InvalidClientIdError',\n 'InvalidValidationResponse',\n 'SignatureVerificationError'\n]\n\n\nclass YubicoError(Exception):\n \"\"\" Base class for Yubico related except...
python
edit
1
1
bsd-3-clause
4f7382303d56871b2b174e291b47b238777f5d32
Kami/python-yubico-client
yubico/yubico_exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport socket\nimport sys\n\n\ndef host(name):\n \"\"\"Check if host name is equal to the given name\"\"\"\n return socket.gethostname() == name\n\ndef arg(name, expected_value=None):\n \"\"\"\n Check if c...
python
edit
1
5
mit
cbbfa328f3f5998c2d3bc78315f9ecfc3fee9aad
piotrekw/pirx
pirx/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n banana.maya.MFileIO\n ~~~~~~~~~~~~~~~~~~~\n \n Monkey patching of the `~maya.OpenMaya.MFileIO` class.\n \n :copyright: Copyright 2014 by Christopher Crouzet.\n :license: MIT, see LICENSE for details.\n\"\"\"\n\...
python
edit
1
5
mit
16c68198d353735343321b7b9558370247ad1b5e
christophercrouzet/banana.maya,christophercrouzet/bana
banana/maya/extensions/OpenMaya/MFileIO.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nDeploy builds to a Rancher orchestrated stack using rancher-compose\n\"\"\"\nimport os\n\nimport drone\nimport subprocess\n\n\ndef main():\n \"\"\"The main entrypoint for the plugin.\"\"\"\n payload = dr...
python
edit
1
3
apache-2.0
9e17cda40ddefaa5c2b905b3ffdfadf485461eaa
dangerfarms/drone-rancher
plugin/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Markup\nfrom flask import render_template\n\nfrom application.page.models import Page\n\ndef find_subpages(pages, parent):\n\tsubpages = []\n\n\tfor page in pages:\n\t\tprefix = '/'.join(page.path.split('/')[:-1])\n\t\tif ...
python
edit
1
3
mit
5055e3b911afe52f70f60915254d27bfc0c2b645
viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct
application/navigation/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom haas.utils import uncamelcase\nfrom .i_plugin import IPlugin\n\n\nclass BasePlugin(IPlugin):\n\n name = None\n enabled = False\n enabling_option = None\n\n def __init__(self, name=None):\n if name is None:\n ...
python
edit
1
2
bsd-3-clause
2fb3a72885d279f7a79e10f00d71991144748f1c
sjagoe/haas,scalative/haas,sjagoe/haas,itziakos/haas,scalative/haas,itziakos/haas
haas/plugins/base_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail\nfrom ..views import (\n ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,\n ManageProjectDocumentList, ManageProjectDocumentDetail)\nfrom django...
python
edit
1
0
bsd-3-clause
cd959b5216a0bc1cdc89c963022f312d0ea65e8a
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/projects/urls/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport pytest\n\nboto = pytest.importorskip('boto')\nfrom simplekv.net.botostore import BotoStore\n\nfrom basic_store import BasicStore\nfrom url_store import UrlStore\nfrom bucket_manager import boto_credentials, b...
python
edit
1
1
mit
4b9789350a01fee5c341ac8a5612c7dae123fddd
fmarczin/simplekv,karteek/simplekv,fmarczin/simplekv,mbr/simplekv,mbr/simplekv,karteek/simplekv
tests/test_boto_store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nfrom numpy.testing import assert_approx_equal, assert_allclose, assert_array_less\nfrom nose.tools import raises, assert_true, assert_equal\nfrom UliEngineering.Physics.NTC import *\nfrom Uli...
python
edit
16
1
apache-2.0
9fc92a176fbc9425229d02a032d3494566139e6a
ulikoehler/UliEngineering
tests/Physics/TestNTC.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport random\n\n__metaclass__ = type\n\nclass Generator:\n def __init__(self, data):\n if isinstance(data, str):\n data = data.split('\\n')\n self.clusters = []\n for item in data:\n if item....
python
edit
1
8
mit
acf9e2d1f879758412154fe8008371b387f4d2bc
lethosor/py-namegen
namegen/name.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Crypto.Cipher import AES\n\nclass Cryptor(object):\n\n\tdef __init__(self, key, iv):\n\t\t#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes\n\t\tself.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) ...
python
edit
2
1
bsd-2-clause
ff35b4353fbb47c602d3561c5e6e84201355df14
tzwenn/PyOpenAirMirror,tzwenn/PyOpenAirMirror
Cryptor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pickle\n\n\ndef load_data(path):\n \"\"\"\n Load Dataset from File\n \"\"\"\n input_file = os.path.join(path)\n with open(input_file, \"r\") as f:\n data = f.read()\n\n return data\n\n\ndef preproc...
python
edit
1
3
mit
c6ba057d2e8a1b75edb49ce3c007676f4fe46a16
spencer2211/deep-learning
tv-script-generation/helper.py
rejected_duplicate
Near-duplicate of sample 2351
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom .oauth import OAuth2Test\n\n\nclass AsanaOAuth2Test(OAuth2Test):\n backend_path = 'social_core.backends.asana.AsanaOAuth2'\n user_data_url = 'https://app.asana.com/api/1.0/users/me'\n expected_username = '<EMAIL...
python
edit
1
1
bsd-3-clause
f9903bc92bf02eeaa18e1a2843d288e909b71c33
tobias47n9e/social-core,python-social-auth/social-core,python-social-auth/social-core
social_core/tests/backends/test_asana.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 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 may obt...
python
edit
1
1
apache-2.0
05e86efadfd0a05bac660e2ce47a5502b5bbdddb
vedujoshi/tempest,Tesora/tesora-tempest,openstack/tempest,openstack/tempest,vedujoshi/tempest,masayukig/tempest,masayukig/tempest,Juniper/tempest,cisco-openstack/tempest,sebrandon1/tempest,sebrandon1/tempest,cisco-openstack/tempest,Tesora/tesora-tempest,Juniper/tempest
tempest/tests/fake_auth_provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport requests\nimport json\nfrom flask import Flask, jsonify, abort, make_response, request\n\nFLICKR_BASE = \"http://api.flickr.com/services/rest/\"\n\napp = Flask(__name__)\n\nif __name__ == '__main__':\n port = int(os.env...
python
edit
7
0
mit
df0aa97de17be8b8b4d906bddf61272927009eb9
kyleconroy/quivr
web.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"AWS Spinnaker Application.\"\"\"\nfrom pprint import pformat\nfrom foremast.app.base import BaseApp\nfrom foremast.utils import wait_for_task\n\n\nclass SpinnakerApp(BaseApp):\n \"\"\"Create AWS Spinnaker Application.\"\"\"\n\n ...
python
edit
1
1
apache-2.0
ebe21ef2014b9b6c6d77c1254a87546d5096642f
gogoair/foremast,gogoair/foremast
src/foremast/app/aws.py
rejected_duplicate
Near-duplicate of sample 13702
true
[ { "role": "user", "content": "Here is the current file:\n```python\nINFO = {\n 'name': 'Mayavi',\n 'version': '3.4.1',\n 'install_requires': [\n 'AppTools >= 3.4.1.dev',\n 'Traits >= 3.6.0.dev',\n ],\n}\n\n```\n\nApply this change: MISC: Add back the extra requires for the [app]" ...
python
edit
1
0
bsd-3-clause
4a95e49570a26f1295a2dad9d6d71ad9a887f1b1
liulion/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,liulion/mayavi
setup_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Main Module of PDF Splitter\"\"\"\nimport argparse\nimport os\n\nfrom PyPDF2 import PdfFileWriter\n\nfrom Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages\n\nparser = \\\n argparse.ArgumentParser(\n ...
python
edit
1
1
mit
41e0ea623baaff22ed5f436ad563edf52b762bcc
shunghsiyu/pdf-processor
Main.py
rejected_duplicate
Near-duplicate of sample 13639
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import current_app as app, Response\nfrom flask.ext import restful\n\nfrom shiva.decorators import allow_origins\n\n\nclass Resource(restful.Resource):\n def __new__(cls, *args, **kwargs):\n if app.config.get('CORS_ENAB...
python
edit
1
2
mit
ac923a58ffa7c437985e68d98e7dd0e4e67df39c
tooxie/shiva-server,maurodelazeri/shiva-server,maurodelazeri/shiva-server,tooxie/shiva-server
shiva/http.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport keras\nfrom DatasetHandler.CreateDataset import *\nfrom ModelHandler.CreateModel.functions_for_vgg16 import *\nimport time\n\n#d = load_8376_resized_150x150(desired_number=10)\n#d.statistics()\n\nstart = time.time()\nprint time.ctime...
python
edit
6
0
mit
84741b8f6c7aec220b8644d92535e1a805c65b08
previtus/MGR-Project-Code,previtus/MGR-Project-Code,previtus/MGR-Project-Code
run_example.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\nfrom django.contrib.auth.models import User\nfrom imagerprofile.models import ImagerProfile\n\n\n@receiver(post_save, sender=User)\ndef add_profile(sender...
python
edit
1
2
mit
d4580c01fc6adc078b382281a23022537c87940a
nbeck90/django-imager,nbeck90/django-imager
imager/imagerprofile/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom pyfiglet import Figlet\nfrom optparse import OptionParser\n\ndef draw_text(f, font, text): \n f.setFont(font=font)\n print f.renderText(text)\n\ndef main(args):\n parser = OptionParser()\n ...
python
edit
5
4
mit
52d8ace9c944dda105dc95ab0baff4a41b4b48c3
shiva/asciiart
scripts/art.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom troposphere import (\n Parameter,\n Ref,\n)\n\nfrom troposphere.ecs import (\n Cluster,\n)\n\nfrom .template import template\n\n\ncontainer_instance_type = Ref(template.add_parameter(Parameter(\n \"ContainerInstanceType\",\...
python
edit
1
0
mit
389fd283c0e05a7c3ccdc871b2423a1d0f3b2280
tobiasmcnulty/aws-container-basics,caktus/aws-web-stacks
stack/cluster.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom info import __doc__\nfrom numpy.version import version as __version__\n\nimport multiarray\nimport umath\nimport numerictypes as nt\nmultiarray.set_typeDict(nt.sctypeDict)\nimport _sort\nfrom numeric import *\nfrom fromnumeric import...
python
edit
22
1
bsd-3-clause
5b87029e229fa3dcf0e81231899c36bd52a7616c
dato-code/numpy,jorisvandenbossche/numpy,mathdd/numpy,stefanv/numpy,sinhrks/numpy,stuarteberg/numpy,rajathkumarmp/numpy,madphysicist/numpy,skwbc/numpy,rudimeier/numpy,abalkin/numpy,brandon-rhodes/numpy,Linkid/numpy,shoyer/numpy,pizzathief/numpy,rherault-insa/numpy,pbrod/numpy,mingwpy/numpy,MaPePeR/numpy,argriffing/nump...
numpy/core/__init__.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Write python code for the following: Divide collocations package into submodules" }, { "role": "assistant", "content": "\"\"\"\nThis module contains classes to find collocations between datasets. They are\ninspired by the implemented CollocatedDataset classes in atm...
python
new_file
3
0
mit
83361d2e5cd1cbada31da7350c653133ae9a185f
atmtools/typhon,atmtools/typhon
typhon/spareice/collocations/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import annotations\n\nfrom collections.abc import Iterable, Mapping\nfrom typing import Any, Callable, Dict, Tuple\n\nfrom typing_extensions import TypeAlias\nfrom werkzeug.wrappers import Request\n\n# (name, value)\nHeader:...
python
edit
1
0
mit
a7d8d2f95acbf801c0cc8b0f2a8cc008f6cb34c0
srittau/rouver
rouver/types.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n\nThis script downloads and updates the module builder.\n\n\"\"\"\n\n\n# Dont checkout all files\nIGNORE_FILES = [\n \"__init__.py\",\n \".gitignore\",\n \"LICENSE\",\n \"README.md\",\n \"config.ini\",\n \"Source/c...
python
edit
1
0
mit
56300ddbac1a47f9b2c9f7946c8810e55e19bb07
eswartz/RenderPipeline,eswartz/RenderPipeline,eswartz/RenderPipeline
Code/Native/update_module_builder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Provide the SubmissionListingMixin class.\"\"\"\nfrom ....const import API_PATH\nfrom ..generator import ListingGenerator\nfrom .base import BaseListingMixin\nfrom .gilded import GildedListingMixin\n\n\nclass SubmissionListingMixin(Ba...
python
edit
1
1
bsd-2-clause
7b4b5bc95f0a498ab83422192410f9213bfdb251
darthkedrik/praw,leviroth/praw,praw-dev/praw,gschizas/praw,13steinj/praw,nmtake/praw,13steinj/praw,gschizas/praw,nmtake/praw,praw-dev/praw,darthkedrik/praw,leviroth/praw
praw/models/listing/mixins/submission.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass OrganizationMixin(object):\n \"\"\"\n Adds a generic ``organization`` property to the class\n\n This requires that the class mixing it in adds an\n ``ORGANIZATION_NAME`` property of the main level agency or\n department...
python
edit
2
1
apache-2.0
716f6d2f8ed4e2845746bcb803092806dd8f50b7
texastribune/tx_salaries,texastribune/tx_salaries
tx_salaries/utils/transformers/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app.questionnaire_state.item import Item\n\n\nclass Answer(Item):\n def __init__(self, id):\n super().__init__(id=id)\n # typed value\n self.value = None\n # actual user input\n self.input = None\n...
python
edit
1
7
mit
27360cf049446c5a619b7280dbdd7c3f49c45ad8
ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner
app/questionnaire_state/answer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom mopidy.frontends.base import BaseFrontend\nfrom mopidy.frontends.mpd.dispatcher import MpdDispatcher\nfrom mopidy.frontends.mpd.thread import MpdThread\nfrom mopidy.utils.process import unpickle_connection\n\nlogger =...
python
edit
1
2
apache-2.0
af0f80d2385001b52560cb0ec9d31e85c4a891bf
ali/mopidy,quartz55/mopidy,priestd09/mopidy,rawdlite/mopidy,quartz55/mopidy,vrs01/mopidy,mokieyue/mopidy,mopidy/mopidy,jcass77/mopidy,pacificIT/mopidy,bencevans/mopidy,ali/mopidy,hkariti/mopidy,bencevans/mopidy,pacificIT/mopidy,kingosticks/mopidy,jcass77/mopidy,quartz55/mopidy,jodal/mopidy,glogiotatidis/mopidy,diandian...
mopidy/frontends/mpd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add structure and methods to double linked list." }, { "role": "assistant", "content": "class Node(object):\n def __init__(self, val, prev=None, next_=None):\n self.val = val\n self.prev = prev\n self.next...
python
new_file
1
2
mit
4a0d781c64da4a0ad211e5fb211dc317a4e3f4c5
sjschmidt44/python_data_structures
data_structures/doubly_linked_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom botfriend.bot import TextGeneratorBot\n\nclass ExampleBot(TextGeneratorBot):\n\n def generate_text(self):\n \"\"\"Tell a joke about numbers.\"\"\"\n num = random.randint(1,10)\n arguments = dict(\...
python
edit
1
1
mit
243feb2fe194ad00f59c6ff22ac41989fe0978d1
leonardr/botfriend
bots.sample/number-jokes/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom in_place import InPlace\nfrom test_in_place_util import UNICODE, pylistdir\n\ndef test_py3_textstr(tmpdir):\n \"\"\" Assert that `InPlace` works with text strings in Python 3 \"\"\"\n assert pylistdir...
python
edit
1
1
mit
c136ee96237a05cb717c777dd33b9a3dff9b0015
jwodder/inplace
test/test_py3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######\n# Create a backup of J2EE Security Roles\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License: ...
python
edit
2
0
apache-2.0
3a70e339637285355e594f9bec15481eae631a63
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/config/j2ee/RoleBackup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pipenv.patched import pew\n\nif __name__ == '__main__':\n pew.pew.pew()\n\n```\n\nApply this change: Add vendor and patch directories to pew path\n\n- Fixes #1661" }, { "role": "assistant", "content": "from pipenv.patche...
python
edit
1
0
mit
d01adfce91927c57258f1e13ed34e4e600e40048
kennethreitz/pipenv
pipenv/pew/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#--coding:utf-8--\n#StartPage.py\n#Create/Edit file:'../cfg/StartPage.json'\nimport os\nimport re\nimport sys\nimport json\nfrom __common__code__ import CreateFile\nfrom __tmpl__ import Prompt\n\nclass PromptClass(Prompt.ErrPrompt):\n de...
python
edit
2
5
mit
a7bea68d4e904a27c53d08d37093ac5ed2c033f0
nday-dev/Spider-Framework
utilities/StartPages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\nfrom __future__ import absolute_import, print_function, division\n\nimport os\nimport subprocess\n\nfrom pebble_tool.exceptions import ToolError\nfrom pebble_tool.util.versions import version_to_key\n\n\ndef check_npm():\...
python
edit
1
5
mit
d75d26bc51ed35eec362660e29bda58a91cd418b
pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool
pebble_tool/util/npm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nfrom fullcalendar.models import Occurrence\n\nregister = template.Library()\n\n@register.inclusion_tag('events/agenda_tag.html')\ndef show_agenda(*args, **kwargs):\n qs = Occurrence.objects.upcoming()\n\n ...
python
edit
1
2
mit
d190e4466a28714bf0e04869dc11a940526031b1
jonge-democraten/mezzanine-fullcalendar
fullcalendar/templatetags/fullcalendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache....
python
edit
1
1
apache-2.0
8a61bd499e9a3cc538d7d83719c6d4231753925b
google/megalista,google/megalista
megalista_dataflow/uploaders/uploaders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport gevent.monkey\ngevent.monkey.patch_all()\n\nimport logging\nhandler = logging.StreamHandler()\nlog_format = '{levelname}:etiquette.{module}.{funcName}: {message}'\nhandler.setFormatter(logging.Formatter(log_format, style='{'))\nloggi...
python
edit
1
0
bsd-3-clause
0c9582598d172585466f89434035cf3e3cafcf61
voussoir/etiquette,voussoir/etiquette,voussoir/etiquette
frontends/etiquette_flask/etiquette_flask_launch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015 Ansible, Inc\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundati...
python
edit
1
0
mit
52716c4dc7d95820d2640ba7c9e75fb00f786e85
thaim/ansible,thaim/ansible
lib/ansible/utils/module_docs_fragments/validate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import migrations\n\nfrom nodeconductor.quotas import models as quotas_models\n\nfrom .. import m...
python
edit
4
3
mit
003d3921bb6c801c5a2efdede20ed70ee07edf3d
opennode/nodeconductor-openstack
src/nodeconductor_openstack/openstack/migrations/0031_tenant_backup_storage.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.conf import settings\nfrom django.test.simple import DjangoTestSuiteRunner\n\nUSAGE = \"\"\"\\\nCustom test runner to allow testing of celery delayed tasks.\n\"\"\"\n\n\nclass CeleryTest...
python
edit
1
1
bsd-3-clause
bebde48483e1397a2f45a81c72cc3c79ee7bd150
georgewhewell/django-celery,planorama/django-celery,axiom-data-science/django-celery,axiom-data-science/django-celery,ask/django-celery,kanemra/django-celery,CloudNcodeInc/django-celery,celery/django-celery,georgewhewell/django-celery,kanemra/django-celery,tkanemoto/django-celery,tkanemoto/django-celery,iris-edu-int/dj...
djcelery/contrib/test_runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom uuidfield.fields import UUIDField\nfrom storybase.fields import ShortTextField\n\nclass Organization(models.Model):\n \"\"\" An organization or a community g...
python
edit
1
1
mit
b678d2da0845ae7f567eb6c4cd55471974d5b5e1
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
apps/storybase_user/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom python_cowbull_game.GameController import GameController\nfrom python_cowbull_game.GameMode import GameMode\n\n\nclass ExtGameController(GameController):\n additional_modes = [\n GameMode(mode=\"SuperTough\", priority=6, digi...
python
edit
3
1
apache-2.0
a8244c25c5cc7e2279723538daa9889a1d327cae
dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server
extensions/ExtGameController.py
rejected_duplicate
Near-duplicate of sample 12702
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.module_loading import import_string\nfrom django.conf import settings\n\nfrom wagtail.wagtailembeds.finders.oembed import oembed\nfrom wagtail.wagtailembeds.finders.embedly import embedly\n\n\nMOVED_FINDERS = {\n 'wagta...
python
edit
1
4
bsd-3-clause
878975b1b82d22bba0ac23cf162eb68b46e76f0a
takeflight/wagtail,mikedingjan/wagtail,JoshBarr/wagtail,gasman/wagtail,chrxr/wagtail,FlipperPA/wagtail,JoshBarr/wagtail,inonit/wagtail,wagtail/wagtail,nilnvoid/wagtail,mikedingjan/wagtail,gasman/wagtail,timorieber/wagtail,torchbox/wagtail,jnns/wagtail,hamsterbacke23/wagtail,nealtodd/wagtail,iansprice/wagtail,timorieber...
wagtail/wagtailembeds/finders/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pmxbot import logging\nfrom pmxbot import util\nfrom pmxbot import rss\nfrom pmxbot import storage\nstorage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')\n\n```\n\nApply this change: Update migration script so it only runs...
python
edit
1
2
bsd-3-clause
c09f346f7a2be5bdfd5dca8821ab260494a652af
jamwt/diesel-pmxbot,jamwt/diesel-pmxbot
routines/migrate-all.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto3\nimport botocore\nfrom flask import (\n abort,\n current_app,\n flash,\n make_response,\n redirect,\n request,\n Response,\n url_for,\n)\nfrom flask_login import current_user\nfrom . import passthrough_b...
python
edit
4
8
mit
793baa838b7bc7bfed3eb74a69c297645b4c5da6
iandees/bucket-protection,iandees/bucket-protection
app/passthrough/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport logging\n\nimport simpledaemon\n\nclass clio_daemon(simpledaemon.Daemon):\n default_conf = 'clio_daemon.conf'\n section = 'clio'\n\n def run(self):\n import eventlet\n from clio.store import app\n logg...
python
edit
1
1
apache-2.0
3daa15b0ccb3fc4891daf55724cbeaa705f923e5
geodelic/clio,geodelic/clio
scripts/clio_daemon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom subprocess import Popen, PIPE\nimport json\nimport platform\n\n# Remove \"sys.exit\" after feedstock creation when running\n# on linux-anvil-cos7-x86_64 image\nif platform.system() == \"Linux\":\n import sys\n sys.exit(0)\n\nif p...
python
edit
1
0
bsd-3-clause
867195ef9331ec9740efbd6d1dc35c501b373437
ReimarBauer/staged-recipes,stuertz/staged-recipes,igortg/staged-recipes,conda-forge/staged-recipes,stuertz/staged-recipes,kwilcox/staged-recipes,scopatz/staged-recipes,mariusvniekerk/staged-recipes,ocefpaf/staged-recipes,igortg/staged-recipes,johanneskoester/staged-recipes,conda-forge/staged-recipes,kwilcox/staged-reci...
recipes/kaleido-core/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Generate fixtures.\"\"\"\n\nimport os\nimport json\nimport numpy as np\nfrom scipy import special\n\n\n# Get the file path:\nFILE = os.path.realpath(__file__)\n\n# Extract the directory in which this file reside...
python
edit
1
1
apache-2.0
b3cc4e19ea207870b65f60e0ff4a5bc221ca493b
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/logit/test/fixtures/python/runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport autocomplete_light\nfrom models import User\n\n\nclass UserAutocomplete(autocomplete_light.AutocompleteModelBase):\n search_fields = ['username']\n\n def choices_for_request(self, *args, **kwargs):\n qs = super(UserAutoc...
python
edit
1
1
mit
0d6805bf6dce4b652f1b4f4556696c7521820790
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
feder/users/autocomplete_light_registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\n# Update to the latest version\nfor line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():\n print line.strip()\n \n# Move the old version over\nfor line in os.popen('cp sync oldsy...
python
edit
5
0
mit
556e3ca6d3650b1cf6e80ded98ae6d59fefa5025
brotherlogic/discogssyncer,brotherlogic/discogssyncer
BuildAndRun.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.contrib.admin.views.decorators import staff_member_required\n\nfrom winthrop.people.views import ViafAutoSuggest\n\n\nurlpatterns = [\n url(r'^autocomplete/viaf/suggest/$', staff_member_requi...
python
edit
1
0
apache-2.0
cdb546a9db593d79c2b9935b746e9862a2b1221c
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
winthrop/people/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Import blockmodels file\nimport BlockModels\nimport webapp2, jinja2, os\nfrom datetime import *\n\njinja_environment = jinja2.Environment(autoescape=True,\n loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templa...
python
edit
7
1
mit
d57d572d91a5df06bbab97864c6187c7423c0135
shickey/BearStatus,shickey/BearStatus,shickey/BearStatus
main.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\nfrom twisted.internet import reactor, defer\nfrom twisted.internet.protocol import ClientCreator\nfrom twisted.protocols import amp\nfrom twisted.python import usage\n\nfrom diceserver import RollDice,...
python
edit
6
1
mit
d19f054cdc68d0060731d6c742886f94ac41f3ab
dripton/ampchat
diceclient.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom itertools import imap\nfrom collections import Counter\n\n\nclass Room:\n pass\n\ndef parse_room(s):\n last_dash = s.rfind(\"-\")\n after_name = s[last_dash+1:]\n bracket = after_name.find(\"[\")\n room = Roo...
python
edit
8
2
mit
6c7c69fccd924ab65219c7f28dbdef66bec7181a
amalloy/advent-of-code-2016
4/src.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\n\n\ndef flatten(l, ltypes=collections.Sequence):\n l = list(l)\n while l:\n if isinstance(l[0], str):\n yield l.pop(0)\n continue\n while l and isinstance(l[0], ltypes):\n ...
python
edit
1
6
mit
306dc0d7e96d91b417a702230a9d34fa1dbcc289
numberoverzero/origami
util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3.6\nimport argparse\nimport asyncio\nimport logging\nimport sys\nfrom pathlib import Path\nfrom MoMMI.logsetup import setup_logs\n\n# Do this BEFORE we import master, because it does a lot of event loop stuff.\nif sys....
python
edit
1
4
mit
8589af4b858acace99cc856ce118f73568fb96b1
PJB3005/MoMMI,PJB3005/MoMMI,PJB3005/MoMMI
main.py
rejected_duplicate
Near-duplicate of sample 12021
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ibmcnx.filehandle\n\nemp1 = ibmcnx.filehandle.Ibmcnxfile()\n\nemp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )\n#emp1.writeToFile(\"Test2\")\n#emp1.writeToFile(\"Test3\")\nemp1.closeFile()\n\n```\n\nApply this change: 4: Cr...
python
edit
2
0
apache-2.0
3f160ac663ff37b5b8b16ebe630536521969d079
stoeps13/ibmcnx2,stoeps13/ibmcnx2
text.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datalogger import api\nfrom datalogger import analysis\nfrom datalogger import acquisition\nfrom datalogger import analysis_window, acquisition_window\n#from datalogger.api import workspace as workspace\nfrom datalogger.api import work...
python
edit
7
0
bsd-3-clause
cd5c50c94f2240c3d4996e38cc1712e5f397120f
torebutlin/cued_datalogger
datalogger/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from ordereddict import OrderedDict\nexcept:\n from sleekxmpp.thirdparty.ordereddict import OrderedDict\n\n```\n\nApply this change: Fix thirdparty imports for Python3" }, { "role": "assistant", "content": "try:\n ...
python
edit
3
0
mit
493df570353fbeff288d6ee61fb0842622443967
destroy/SleekXMPP-gevent
sleekxmpp/thirdparty/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# bdateutil\n# -----------\n# Adds business day logic and improved data type flexibility to\n# python-dateutil.\n#\n# Author: ryanss <<EMAIL>>\n# Website: https://github.com/ryanss/bdateutil\n# License: MIT (see LICENSE file)\n\n__v...
python
edit
1
0
mit
53dc5e1029ea905f6e5da86592b33911309d1acd
pganssle/bdateutil
bdateutil/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ee\nimport os\nimport csv\nimport logging\n\ndef copy(source, destination):\n with open(source, 'r') as f:\n reader = csv.reader(f)\n for line in reader:\n name = line[0]\n gme_id = line[1]\n ...
python
edit
1
3
apache-2.0
4d7c1fec37943558ccc8bf6a17860b2a86fe1941
tracek/gee_asset_manager
gee_asset_manager/batch_copy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom . import views\n\napp_name = 'event'\nurlpatterns = [\n url(r'^$', views.IndexView.as_view(), name='index'),\n url(r'^artist/$', views.ArtistView.as_view(), name='artist'),\n url(r'^artist/(...
python
edit
1
0
mit
ceb3a49fc3e3ca149d203e8489bd4b17b286d6c3
FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack
event/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport json\nfrom decimal import Decimal\n\nfrom django.core.serializers.python import Deserializer as PythonDeserializer\nfrom django.core.serializers.json import Serializer as JSONSerializer\nfrom django.core.serializers...
python
edit
4
9
bsd-3-clause
cf4b58ff5afa6c7c8649e89b430b5386fabdc02c
rescale/django-money,tsouvarev/django-money,iXioN/django-money,iXioN/django-money,recklessromeo/django-money,recklessromeo/django-money,tsouvarev/django-money,AlexRiina/django-money
djmoney/serializers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template\n\nfrom . import aflafrettir\n\n@aflafrettir.route('/')\ndef index():\n return render_template('aflafrettir/index.html')\n\n@talks.route('/user/<username>')\ndef user(username):\n return render_template('a...
python
edit
1
1
mit
621a97a0904e085c33ef78d68cd733af0d816aee
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
app/aflafrettir/routes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nimport i18n\nfrom i18n.models import TranslatableModel\n\n\nclass Document(TranslatableModel):\n untranslated_charfield = models.CharField(max_length=50, blank=True)\n charfield = i18n.LocalizedCharField(...
python
edit
1
1
bsd-3-clause
28a8de1c23aeb23800bf55bd3045ead082950c81
jonasundderwolf/django-localizedfields,jonasundderwolf/django-localizedfields
example/models.py
rejected_duplicate
Near-duplicate of sample 2199
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\nimport aiohttp\nimport logging\nlog = logging.getLogger(__name__)\n\n\n@asyncio.coroutine\ndef http_get_auth_request(auth_string,\n url,\n content_type=\"application/json\",\...
python
edit
1
2
mit
9719a31459e033cc84a5a522e4fc618aa11b45fe
marvinpinto/charlesbot,marvinpinto/charlesbot
charlesbot/util/http.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n\ndef view():\n pass\n\nurlpatterns = patterns(\n \"\",\n url(\"^$\", view, name=\"index\"),\n url(\"^(?P<url_title>[^/]+)/$\", view, name=\"detail\"),\n)\n\n```\n\nApply this change...
python
edit
1
0
bsd-3-clause
9e745b0e5ac673d04d978887654627b686813d93
danielsamuels/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,jamesfoley/cms,jamesfoley/cms,lewiscollard/cms,danielsamuels/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,danielsamuels/cms,dan-gamble/cms
cms/apps/pages/tests/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__author__ = \"\"\"Chris Tabor (<EMAIL>)\"\"\"\n\nif __name__ == '__main__':\n from os import getcwd\n from os import sys\n sys.path.append(getcwd())\n\nfrom MOAL.helpers.display import Section\n\nDEBUG =...
python
edit
1
0
apache-2.0
9ba0620230e370f9de8dec6e2bdd3eebeb3a986a
christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL
__TEMPLATE__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nlong_desc = '''\nThis package contains the aafigure Sphinx extension.\n\nAllow embeded ASCII art figure to be rendered as nice images.\n'''\n\nrequires = ['Sphinx>=0....
python
edit
1
0
bsd-2-clause
3b2390691544ac8f5bbe7cbfd3b105c2f327d8be
sphinx-contrib/spelling,sphinx-contrib/spelling
aafig/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.template import Library\n\nfrom sentry.utils.assets import get_asset_url\n\nregister = Library()\n\n\n@register.simple_tag\ndef asset_url(module, path):\n \"\"\"\n Returns a versio...
python
edit
1
1
bsd-3-clause
36edb0e161fd3c65d2957b7b319b67975e846e7e
mvaled/sentry,looker/sentry,JamesMura/sentry,zenefits/sentry,BuildingLink/sentry,gencer/sentry,ifduyue/sentry,BuildingLink/sentry,fotinakis/sentry,mitsuhiko/sentry,zenefits/sentry,fotinakis/sentry,gencer/sentry,looker/sentry,beeftornado/sentry,gencer/sentry,mitsuhiko/sentry,BayanGroup/sentry,fotinakis/sentry,daevaorn/s...
src/sentry/templatetags/sentry_assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyramid.view import (\n view_config,\n view_defaults,\n )\n\nfrom pyramid.security import (\n remember,\n forget,\n )\n\n@view_defaults(accept='application/json', renderer='json', context='..tr...
python
edit
1
2
isc
517668eeb493bcd72838716258d40abd4a73e039
cdunklau/alexandria,bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria
alexandria/views/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cell import Actor, Agent\nfrom cell.actors import Server\n\nfrom kombu import Connection\nfrom kombu.log import setup_logging \n\nconnection = Connection()\n\n\nclass GreetingActor(Server):\n default_routing_key = 'GreetingActor'\n\...
python
edit
4
1
bsd-3-clause
a24c657ca84e553a39e23d201d605d84d828c322
celery/cell,celery/cell
examples/hello.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom operator import itemgetter\n\nimport logging\n\nfrom django.http import Http404\nfrom django.template.response import TemplateResponse\nfrom django.views.generic.bas...
python
edit
1
5
cc0-1.0
ddec6067054cc4408ac174e3ea4ffeca2a962201
18F/regulations-site,18F/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site,18F/regulations-site,18F/regulations-site
regulations/views/notice_home.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = (0, 2, 1, '', 0)\n\ndef get_version():\n version = '%d.%d.%d' % __version__[0:3]\n if __version__[3]:\n version = '%s-%s%s' % (version, __version__[3],\n (__version__[4] and str(__version...
python
edit
1
4
bsd-3-clause
7a1ddf38db725f0696482a271c32fa297d629316
jszakmeister/trac-backlog,jszakmeister/trac-backlog
backlog/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nModule that contains the command line app.\n\nWhy does this file exist, and why not put this in __main__?\n\n You might be tempted to import things from __main__ later, but that will cause\n problems: the code will get executed tw...
python
edit
1
2
bsd-2-clause
a0af5dc1478fe8b639cc5a37898ad180f1f20a89
accraze/python-twelve-tone
src/twelve_tone/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the LICENSE.txt file for details.\nfrom __future__ im...
python
edit
1
2
bsd-3-clause
dc50a4ec058f9893e87a069bc64e4715ecfa0bea
sjagoe/usagi
haas_rest_test/plugins/assertions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom guardian.compat import get_user_model\nfrom guardian.compat import mock\nfrom guardian.compat import unittest\nfrom guardian.management import create_an...
python
edit
1
1
bsd-2-clause
137271045313a12bbe9388ab1ac6c8cb786b32b7
benkonrath/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian
guardian/testapp/tests/test_management.py
accepted
null
true