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\nfrom __future__ import print_function\n\nimport os\n\nfrom flask.ext.script import Manager, Server\nfrom flask.ext.migrate import Migrate, MigrateCommand\n\nfrom app import create_app, db\n\n\napplication = create_a... | python | edit | 1 | 0 | mit | 593e826b24d83997a5be450be1401e16ec17c07c | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport yaml\nfrom time import gmtime, strftime\nfrom shutil import copy\n\nwith open('../config/betfair_config.yml', 'r') as f:\n doc = yaml.load(f)\n\ndata_dir = doc['default']['betfair']['data_dir']\ntodays_date = strftime('%Y-%-m-%d',... | python | edit | 1 | 0 | apache-2.0 | fb58117527c486401d07e046077151d3217e576f | cranburyattic/bf-app,cranburyattic/bf-app,cranburyattic/bf-app,cranburyattic/bf-app | python/copy-market-report.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jinja2 import Markup\nfrom flask_admin._compat import text_type\n\n\ndef null_formatter(view, value):\n \"\"\"\n Return `NULL` as the string for `None` value\n\n :param value:\n Value to check\n \"\"\"\n ... | python | edit | 1 | 3 | bsd-3-clause | c81b07f93253acc49cbc5028ec83e5334fb47ed9 | jschneier/flask-admin,jschneier/flask-admin,jschneier/flask-admin,jmagnusson/flask-admin,likaiguo/flask-admin,quokkaproject/flask-admin,flask-admin/flask-admin,lifei/flask-admin,likaiguo/flask-admin,ArtemSerga/flask-admin,iurisilvio/flask-admin,flask-admin/flask-admin,flask-admin/flask-admin,jschneier/flask-admin,jmagn... | flask_admin/model/typefmt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass NumberToWords(object):\n \"\"\"\n Class for converting positive integer values to a textual representation\n of the submitted number for value of 0 up to 999999999.\n \"\"\"\n\n MAX = 999999999\n SMALL_NUMBERS = ['',... | python | edit | 2 | 2 | mit | 3d3853d15e8a497bd104ae816498509cf8143662 | ianfieldhouse/number_to_words | number_to_words.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pickle\n\n\nclass Cache(dict):\n def __init__(self, django_folder, database, cache_path):\n self.filename = os.path.join(\n cache_path,\n \"{}_{}.pickle\".format(django_folder.replace(os.sep... | python | edit | 1 | 2 | apache-2.0 | a9405eaf838842688262689d665f30ae3cebfdea | 3YOURMIND/django-migration-linter | django_migration_linter/cache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.http import HttpResponse\n\ndef get_work(request):\n return HttpResponse('Not implemented')\n\ndef work_completed(request):\n return HttpResponse('Not implemented')\n\n```\n\nApply this... | python | edit | 1 | 1 | mit | 39603bde90ebad7e0d70e41403a9a971867dcbac | esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,dion... | backend/breach/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom os.path import join, dirname, pardir, abspath\nimport subprocess\n\n\nBOOTSTRAP = abspath(dirname(__file__))\nROOT = abspath(join(BOOTSTRAP, pardir))\n\n# Path where venv will be created. It's imported by bootstrapX.Y.... | python | edit | 2 | 1 | mit | 78066748ef61554acd05e8776161b0ac7eb654cc | henriquebastos/virtualenv-bootstrap,henriquebastos/virtualenv-bootstrap | bootstrap/hooks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom lxml.html import fromstring as lxml_from_string\nfrom unidecode import unidecode\n\n\nUNSUBSCRIBE_MARKERS = [\n\n # English\n \"unsub\", \"blacklist\", \"opt-out\", \"opt out\",\n\n # French\n \"desinscription\", \"desinscrire\", \... | python | edit | 1 | 7 | mit | 3a18c25ef019a9a54475419bfabc4b6e2776df9c | sylvinus/reclaim-my-gmail-inbox | lib/unsubscribe.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom ._events import _Events\nfrom ..error import InvalidTokenError\n\nimport time\n\nclass Events(_Events):\n POLL_INTERVAL = 1000\n\n def get_next(self, params):\n params = params.copy()\n if 'sync' not in params:\n ... | python | edit | 1 | 6 | mit | 50eba1720cd34684eaf0a931e28474ad987ea699 | asana/python-asana,asana/python-asana,Asana/python-asana | asana/resources/events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport glob\n\nfrom html2kirby import HTML2Kirby\n\nfiles = []\n\nfor f in glob.glob(\"extended_tests/*.html\"):\n html = f\n txt = f.replace(\".html\", \".txt\")\n\n files.append((html, txt))\n\n\n@pytest.mark.param... | python | edit | 1 | 1 | mit | e621b9f03b19e38dc6754dd1a4cb7b172e4891e7 | liip/html2kirby,liip/html2kirby | tests/test_extended_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport RPi.GPIO as GPIO\nimport time\n\nfrom socketIO_client import SocketIO, LoggingNamespace\nsocketIO = SocketIO('localhost:3000')\n\ndef onCommand(*args):\n print(args[0].split('+'))\n\nwhile (True):\n socketIO.on(\"commands\", on... | python | edit | 5 | 1 | mit | c2e6371f30b22c242fc1f4f60fdc3856cdb83514 | willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel | scripts/commandsocket.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\ntry:\n basestring\nexcept:\n basestring = str # Python3\n\nPY2 = sys.version_info[0] == 2\nif not PY2:\n text_type = str\n binary_type = bytes\n string_types = (str,)\n integer_types = (int,)\nelse:\n text_... | python | edit | 6 | 1 | mit | c790055fa7e6810703599bc0124507133b8a55fc | scuml/django-crispy-forms,VishvajitP/django-crispy-forms,saydulk/django-crispy-forms,alanwj/django-crispy-forms,schrd/django-crispy-forms,bouttier/django-crispy-forms,smirolo/django-crispy-forms,saydulk/django-crispy-forms,IanLee1521/django-crispy-forms,zixan/django-crispy-forms,Stranger6667/django-crispy-forms,RamezIs... | crispy_forms/compatibility.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\n\nfrom . import models\n\n\nclass AnimationPlugin(CMSPluginBase):\n m... | python | edit | 1 | 1 | bsd-3-clause | 2dece45476170e24e14903f19f9bf400c10ebf42 | narayanaditya95/djangocms-wow,narayanaditya95/djangocms-wow,narayanaditya95/djangocms-wow | djangocms_wow/cms_plugins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sqlalchemy.ext.declarative import declared_attr\nfrom blog.lib.database import db\n\n\nclass ModelMixin(object):\n \"\"\"A base mixin for all models.\"\"\"\n\n @declared_attr\n def __tablename__(cls):\n return cls.__nam... | python | edit | 1 | 3 | mit | 751f40ef23250cf9fad1374359393588edee477a | astex/living-with-django,astex/living-with-django,astex/living-with-django | back/blog/models/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom decimal import Decimal\nimport StringIO\n\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404\n\nfrom pdfdocument.utils import p... | python | edit | 3 | 1 | bsd-3-clause | a34c9628c3f383e7b6f5eb521a9493f2b51d8811 | stefanklug/plata,armicron/plata,armicron/plata,allink/plata,armicron/plata | plata/reporting/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport pandas as pd\n\nfrom anndata import AnnData\n\n\ndef test_uns_color_subset():\n # Tests for https://github.com/theislab/anndata/issues/257\n obs = pd.DataFrame(index=[f\"cell{i}\" for i in range(5)])\n ob... | python | edit | 1 | 2 | bsd-3-clause | 3171e7e355536f41a6c517ca7128a152c2577829 | theislab/anndata | anndata/tests/test_uns.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"Main executable for ShivyC compiler\n\nFor usage, run \"./shivyc.py --help\".\n\n\"\"\"\n\nimport argparse\n\ndef get_arguments():\n \"\"\"Set up the argument parser and return an object storing the\n a... | python | edit | 1 | 2 | mit | 99177cdc64bdec740557007800b610bff07ce46a | ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC | shivyc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .config import current_config\n\nfrom flask import Flask\nfrom flask import redirect\nfrom flask import url_for\nfrom flask.ext.babel import Babel\nfrom kqueen_ui.blueprints.registration.views import registration\nfrom kqueen_ui.bluepr... | python | edit | 3 | 1 | mit | f9ca473abf7aea3cc146badf2d45ae715f635aac | atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui | kqueen_ui/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nfrom setuptools.command import easy_install\n\nrequires = [\"dnslib\", \"dkimpy>=0.7.1\", \"pyyaml\", \"ddt\", \"authheaders\"]\n\nfor module in requires:\n easy_install.main( [\"-U\",module] )\n\n```\n\nApply ... | python | edit | 1 | 1 | mit | bfd75a927da2b46cb8630fab0cd3828ba71bf4ee | ValiMail/arc_test_suite | dependencies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nimport copy\n\nclass Message(object):\n def __init__(self, backend, caller=None, text=None):\n self._backend = backend\n self.caller = caller\n self.text = text\... | python | edit | 1 | 2 | bsd-3-clause | 667f92e8686fd1eb004a7c608acb45c70a9dd2f0 | lsgunth/rapidsms,rapidsms/rapidsms-core-dev,dimagi/rapidsms-core-dev,ken-muturi/rapidsms,ehealthafrica-ci/rapidsms,catalpainternational/rapidsms,eHealthAfrica/rapidsms,dimagi/rapidsms-core-dev,caktus/rapidsms,catalpainternational/rapidsms,rapidsms/rapidsms-core-dev,lsgunth/rapidsms,ehealthafrica-ci/rapidsms,peterayeni/... | lib/rapidsms/message.py | rejected_duplicate | Near-duplicate of sample 3261 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport warnings\n\nfrom .settings import * # noqa: F403,F401\n\n# Handle system warning as log messages\nwarnings.simplefilter(\"once\")\n\nfor handler in LOGGING.get(\"handlers\", []):\n LOGGING[\"handlers\"]... | python | edit | 7 | 0 | apache-2.0 | 9c40a87c5f7d261550c860a69e2679feda53d884 | pivotal-energy-solutions/django-datatable-view,pivotal-energy-solutions/django-datatable-view,pivotal-energy-solutions/django-datatable-view | demo_app/demo_app/settings_test.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 climate\n\nimport database\nimport plots\n\n\n@climate.annotate(\n root='plot data rooted at this path',\n pattern=('plot data from files matching this pattern', 'option'),\n)\ndef main(root, pattern='*... | python | edit | 3 | 4 | mit | 14d6955118893c532c1d9f8f6037d1da1b18dbbb | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | analysis/plot-skeleton.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport xbmc,xbmcaddon,xbmcgui,json,random\n\ndef getAllMovies():\n rpccmd = {'jsonrpc': '2.0', 'method': 'VideoLibrary.GetMovies', 'params': { 'properties': [ 'file' ] }, 'id': 'libMovies'}\n rpccmd = json.dumps(rpccmd)\n result = xbmc.... | python | edit | 3 | 1 | mit | af74ee7ee8644392eacca207b4344de2e08105d7 | nagilum/script.rndmov | addon.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef print_header():\n import sys\n from dxtbx.format.Registry import Registry\n \n # this will do the lookup for every frame - this is strictly not needed\n # if all frames are from the same instrument\n\n for arg in sys.a... | python | edit | 12 | 2 | bsd-3-clause | b32f4955665b8618a9623f6898a15d4da40dc58e | dials/dials,dials/dials,dials/dials,dials/dials,dials/dials | dxtbx/command_line/print_header.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.8.2\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\n... | python | edit | 1 | 0 | mit | 388149ead0ed3f4e5439301fa23e21050773e309 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/config/__init__.py | rejected_duplicate | Near-duplicate of sample 1349 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom django import forms\nfrom django.contrib.auth import forms as authforms\n\nfrom ..models import UserProfile\n\nlogger = logging.getLogger(__name__)\n\n\nclass LoginForm(forms.Form):\n nick = forms.CharField(label=\... | python | edit | 1 | 5 | mit | e67c57128f88b61eac08e488e54343d48f1454c7 | dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard | ddcz/forms/authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# License under the MIT License - see LICENSE\n\nimport boto.ec2\nimport os\nimport time\n\n\ndef launch(key_name=None, region='us-west-2', image_id='ami-5189a661',\n instance_type='t2.micro', security_groups='launch-wizard-1',\n ... | python | edit | 3 | 6 | mit | d791b593dbf3d6505bf9eac8766aaf0b7f22c721 | Astroua/aws_controller,Astroua/aws_controller | launch_instance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n@author: Seva Zhidkov\n@contact: <EMAIL>\n@license: The MIT license\n\nCopyright (C) 2015\n\"\"\"\n\nimport os\n\n\nclass Config:\n def __init__(self, prefix='SHELDON_'):\n \"\"\"\n Load c... | python | edit | 1 | 3 | mit | 2a0b1d070996bfb3d950d4fae70b264ddabc7d2f | lises/sheldon | sheldon/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tornado.ioloop\nimport tornado.web\nimport requests\n\nhost = 'localhost'\nwaybackPort = '8080'\narchiveConfigFile = '/Applications/WAIL.app/config/archive.json'\n\nclass MainHandler(tornado.web.RequestHandler):\n def get(self):\n... | python | edit | 2 | 2 | mit | 564d54c377bf6a8c16cae3681934cc7ba5007c76 | machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail | bundledApps/wailEndpoint.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render, render_to_response\nfrom django.template import RequestContext\n\nfrom new_buildings.models import Builder, ResidentalComplex, NewApartment\nfrom new_buildings.forms import SearchForm\nfrom feedback.mode... | python | edit | 1 | 1 | mit | 429f38497da0fd520e5bc5bd82e6d4ed5a405521 | Dybov/real_estate_agency,Dybov/real_estate_agency,Dybov/real_estate_agency | real_estate_agency/real_estate_agency/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This will make sure the app is always imported when\n# Django starts so that shared_task will use this app.\nfrom .celery import app as celery_app\n\n__version__ = \"dev\"\nGIT_REVISION = \"dev\"\n\n```\n\nApply this change: Update celery... | python | edit | 1 | 0 | mit | 7ad47fad53be18a07aede85c02e41176a96c5de2 | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | learnwithpeople/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom chainerx import _cuda\n\n\ntry:\n import cupy\nexcept Exception:\n cupy = None\n\n\nclass CupyTestMemoryHook(cupy.cuda.memory_hook.MemoryHook):\n\n name = 'CupyTestMemoryHook'\n\n def __init__(self):\n ... | python | edit | 1 | 1 | mit | f45fc8854647754b24df5f9601920368cd2d3c49 | wkentaro/chainer,hvy/chainer,niboshi/chainer,okuta/chainer,chainer/chainer,wkentaro/chainer,chainer/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,hvy/chainer,pfnet/chainer,hvy/chainer,chainer/chainer,keisuke-umezawa/chainer,okuta/chainer,chainer/chainer,tkerola/chainer,keisuke-umezawa/chainer,wkentaro/chainer... | tests/chainerx_tests/unit_tests/test_cuda.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test that the clang modules cache directory can be controlled.\"\"\"\n\nfrom __future__ import print_function\n\n\nimport unittest2\nimport os\nimport time\nimport platform\nimport shutil\n\nimport lldb\nfrom lldbsuite.test.decorators... | python | edit | 11 | 2 | apache-2.0 | cb9b1a2163f960e34721f74bad30622fda71e43b | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb | packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto.sns\nimport simplejson as json\nimport logging\nfrom memoized_property import memoized_property\nimport os\nfrom datalake_common.errors import InsufficientConfiguration\n\n\nclass SNSReporter(object):\n '''report ingestion ev... | python | edit | 1 | 2 | apache-2.0 | f5fd283497afb5030632108ce692e8acde526188 | planetlabs/datalake-ingester,planetlabs/atl,planetlabs/datalake,planetlabs/datalake,planetlabs/datalake,planetlabs/datalake | datalake_ingester/reporter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom citrination_client.views.descriptors.descriptor import MaterialDescriptor\n\n\nclass AlloyCompositionDescriptor(MaterialDescriptor):\n def __init__(self, key, balance_element, basis=100, threshold=None):\n self.options = dict... | python | edit | 1 | 1 | apache-2.0 | 2ebe4b4c281c6b604330b0ea250da41f0802717f | CitrineInformatics/python-citrination-client | citrination_client/views/descriptors/alloy_composition_descriptor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\nimport os\nfrom celery import Celery\n\n# set the default Django settings module for the 'celery' program.\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings')\n\napp... | python | edit | 1 | 2 | mit | 7debde34bd1c5fd903edf4428aa89060da6de037 | kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen | promgen/celery.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom subprocess import call\nfrom itertools import product, repeat\n\n# To be called from the OpenSpace main folder\nmodules = os.listdir(\"modules\")\nmodules.remove(\"base\")\n\n# Get 2**len(modules) combinatorical combinations... | python | edit | 2 | 0 | mit | eafd43442cc697bf2278f6df67c1577cc8f5bf56 | OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace | support/jenkins/buildAllModuleCombination.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\nfrom cyder.base.mixins import UsabilityFormMixin\nfrom cyder.base.eav.forms import get_eav_form\nfrom cyder.cydns.soa.models import SOA, SOAAV\n\n\nclass SOAForm(ModelForm, UsabilityFormMixin):\n class... | python | edit | 1 | 1 | bsd-3-clause | ffab98b03588cef69ab11a10a440d02952661edf | OSU-Net/cyder,OSU-Net/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,OSU-Net/cyder,drkitty/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,akeym/cyder,murrown/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,OSU-Net/cyder | cyder/cydns/soa/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nimport django\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom debug_toolbar.panels import DebugPanel\n\n\nclass VersionDebugPanel(DebugPanel):\n \"\"\"\n Panel that disp... | python | edit | 1 | 8 | bsd-3-clause | 411175d40b449a793528920c3745ca831f6f55e0 | stored/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,megcunningham/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,spookylukey/django-debug-toolbar,Endika/django-debug-toolbar,ChristosChristofidis/django-debug-toolbar,sidja/django-debug-toolbar,peap/django-debug-toolbar,ivelum/django-deb... | debug_toolbar/panels/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pcbnew\nimport sys\nimport os\n\npretties = []\nfor dirname, dirnames, filenames in os.walk(sys.argv[1]):\n # don't go into any .git directories.\n if '.git' in dirnames:\n dirnames.remove('.git')\n\n for filename in ... | python | edit | 1 | 0 | mit | 9b10f600b5611380f72fe2aeacfe2ee6f02e4e3a | monostable/haskell-kicad-data,monostable/haskell-kicad-data,kasbah/haskell-kicad-data | kicad_footprint_load.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nBROKER_URL = 'amqp://guest@localhost'\nCELERY_RESULT_BACKEND = 'amqp://guest@localhost'\nCELERY_EAGER_PROPAGATES_EXCEPTIONS = True\n\nSTORAGE_METHOD = 'disk'\nARCHIVE_DIRECTORY = 'archive/'\nRECORD_DIRECTORY = 'records'\n\nSTORE_HTTP_TRANSA... | python | edit | 1 | 0 | apache-2.0 | 3e5f277e72fe60921f2424f0587b99b21155b452 | icereval/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,alexgarciac/scrapi,erinspace/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,ostwald/scrapi,jeffreyliu3230/scrapi,fabianvf/scrapi,erinspace/scrapi | scrapi/settings/defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\npatches = [\n {\n \"op\": \"move\",\n \"from\": \"/ResourceTypes/AWS::Transfer::Server/Properties/Protocols/ItemType\",\n \"path\": \"/ResourceTypes/AWS::Transfer::Server/Properties/Protocols/PrimitiveItemType\",\n ... | python | edit | 1 | 0 | bsd-2-clause | ead9192b4c2acb21df917dfe116785343e9a59a6 | cloudtools/troposphere,cloudtools/troposphere | scripts/patches/transfer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n'''\nUpdate EVLA pipeline variables to the current system.\n'''\n\n\ndef update_paths(pipe_dict, ms_path, pipepath):\n\n pipe_dict['ms_active'] = ms_path\n pipe_dict['SDM_name'] = ms_path+\".ms\"\n pipe_dict['pipepath'] = pipepat... | python | edit | 1 | 1 | mit | 43f647f691f6c279d8e126c8e62e05af81baff38 | e-koch/canfar_scripts,e-koch/canfar_scripts | cal_pipe/update_pipeline_paths.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth import views\nfrom django.urls import path, re_path\n\nfrom accounts.forms import LoginForm, PasswordResetForm, SetPasswordForm\n\n\nurlpatterns = [\n path(\n \"login/\",\n views.LoginView.as_view(\... | python | edit | 1 | 0 | isc | 1b385ce127f0a1802b0effa0054b44f58b3317b0 | thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/accounts/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom Simulator import *\nimport XMLParser\nimport textToXML\n\ndef getHistoryFileName(xmlFileName):\n\ty = xmlFileName[:-3]\n\treturn 'history_' + y + 'txt'\n\ndef plotFromXML(fileName,simulationTime,chemicalList):\n\thistoryFile = getHisto... | python | edit | 2 | 5 | mit | 540c5f2969e75a0f461e9d46090cfe8d92c53b00 | aayushkapadia/chemical_reaction_simulator | Simulator/plot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nwagtail_mvc decorators\n\"\"\"\nfrom __future__ import unicode_literals\n\n\ndef wagtail_mvc_url(func):\n \"\"\"\n Decorates an existing method responsible for generating a url\n prepends the parent... | python | edit | 1 | 4 | mit | de962f504db139500573457264a3dd1e257e8cc0 | fatboystring/Wagtail-MVC,fatboystring/Wagtail-MVC | wagtail_mvc/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"A script to sum the rpkm values for all genes for each annotation.\"\"\"\n\nimport pandas as pd\nimport argparse\nimport sys\n\ndef main(args):\n rpkm_table =pd.read_table(args.rpkm_table, index_col=0)\n a... | python | edit | 1 | 2 | mit | 01c85f24d788c8f92ad4ee04192d963f74521eec | EnvGen/toolbox,EnvGen/toolbox | scripts/rpkm_annotations_table.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\nfrom django.contrib.auth.models import AbstractUser\nfrom django.utils.functional import cached_property\nfrom social.apps.django_app.default.models import UserSocialAuth\n\nfrom frigg.helpers import github\n\n\nclas... | python | edit | 1 | 2 | mit | a30be93bf4aeef78158898c07252fd29e0303a57 | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | frigg/authentication/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport itertools\n\nimport pytz\n\nfrom babel.dates import format_time\nfrom pylons import c\n\n\ndef pairwise(iterable):\n a, b = itertools.tee(iterable)\n next(b, None)\n return itertools.izip(a, b)\n\n\ndef pretty_time(dt):\n ... | python | edit | 1 | 3 | bsd-3-clause | f0246b9897d89c1ec6f2361bbb488c4e162e5c5e | madbook/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate | reddit_liveupdate/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\n\nDEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')\n\n# For choosing what the main landing page displays\nKICKOFF = 1\nBUILDSEASON = 2\nCOMPETITIONSEASON = 3\nOFFSEASON = 4\n\n# The CONFIG variables sh... | python | edit | 3 | 0 | mit | b71aac6f519dd254bf23a9c74899ca20485dd340 | phil-lopreiato/the-blue-alliance,josephbisch/the-blue-alliance,1fish2/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,josephbisch/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,josephbisch/th... | tba_config.py | rejected_duplicate | Near-duplicate of sample 668 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.migrations.operations.base import Operation\nfrom django.db import connection\n\nfrom psycopg2.extras import register_composite\n\nclass LoadSQLFromScript(Operation):\n def __init__(self, filename):\n self.filename ... | python | edit | 4 | 2 | bsd-3-clause | ca758b2813ae77b795c4318d7d5566cd47ab0ec7 | wlanslovenija/django-postgres | postgres/operations.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | python | edit | 1 | 0 | apache-2.0 | fb53f2ed0e6337d6f5766f47cb67c204c89c0568 | GAM-team/GAM,GAM-team/GAM | src/oauth2client/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom bs4 import BeautifulSoup\nimport json\nfrom dotenv import load_dotenv\nimport os\n\nload_dotenv(\".env\")\n\ns = requests.Session()\n\nr = s.get(\"https://kcls.bibliocommons.com/user/login\", verify=False)\n\npayload =... | python | edit | 2 | 0 | apache-2.0 | 83e820209f9980e6c9103908b14ff07fee23dc41 | mphuie/kcls-myaccount | getCheckedOut.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom .models import Switch\n\n\ndef is_active(label, user=None):\n defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {})\n\n globally_active = defaults[label].get(\n 'globally_active',\... | python | edit | 1 | 7 | bsd-2-clause | 7f51b7a74df8e2c8d6756b8c3e95f7fbf47b291b | potatolondon/django-hashbrown | hashbrown/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom importlib import import_module\n\nclass ApiBase(object):\n def __init__(self, api_key, product, version='v1', entity=None):\n self.product = product\n self.version = version\n self.entity = enti... | python | edit | 1 | 2 | mit | a5003b6f45d262923a1c00bd9a9c1addb3854178 | geelweb/laposte-python-sdk | lapostesdk/apis/apibase.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nsys.path.append('../audio2tokens')\nfrom audio2tokens import *\ndownload_dir='/home/michele/Downloads'\nfrom rhyme import get_score\nimport time\ndef retrieve_tokens(audiofile):\n\t#time.sleep(3)\n\taudio_path_raw = raw_audio(a... | python | edit | 5 | 2 | mit | 5c5e0c7809d8db77327dc259df0547579e515a54 | hajicj/HAMR_2016,hajicj/HAMR_2016,hajicj/HAMR_2016 | server-side/Judge.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urlparse\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sites.models import Site\n\nfrom us_ignite.profiles.models import Interest\n\n\nINTEREST_LIST = (\n ('SDN', 'sd... | python | edit | 4 | 5 | bsd-3-clause | 10426b049baeceb8dda1390650503e1d75ff8b64 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/common/management/commands/common_load_fixtures.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\nfrom app.protocols import ssh\n\ndef ssh_parameters_test():\n ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password')\n assert(ss.hostname and ss.port, ss.user... | python | edit | 1 | 4 | mit | 1f16d194ba78ec8ef50959dc37833ed8d5348c38 | rbagrov/xana | tests/ssh_parameters_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Synonym and related classes"
},
{
"role": "assistant",
"content": "from pywatson.util.map_initializable import MapInitializable\n\n\nclass SynSetSynonym(MapInitializable):\n def __init__(self, is_chosen, value, weight):\n ... | python | new_file | 1 | 2 | mit | 493ce497e5d84d8db9c37816aefea9099df42e90 | sherlocke/pywatson | pywatson/answer/synonym.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom conans import ConanFile\nfrom conans.tools import download, unzip\nimport os\n\nVERSION = \"0.0.7\"\n\n\nclass CMakeModuleCommonConan(ConanFile):\n name = \"cmake-module-common\"\n version = os.environ.get(\"CONAN_VERSION_OVERRID... | python | edit | 1 | 1 | mit | c13a12e6355423d6756b8b514942596c31b0e3a9 | polysquare/cmake-module-common | conanfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.plugins.attrib import attr\nfrom indra.sources.tas import process_from_web\n\n\n@attr('slow')\ndef test_processor():\n tp = process_from_web(affinity_class_limit=10)\n assert tp\n assert tp.statements\n num_stmts = len... | python | edit | 1 | 2 | bsd-2-clause | dd9c16c5317b80c30ccca377a4b0064ebbeb4874 | sorgerlab/indra,bgyori/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/belpy | indra/tests/test_tas.py | rejected_duplicate | Near-duplicate of sample 2417 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django_git.models import RepoInfo\nfrom tagging.models import Tag, TaggedItem\n\n\ndef enum_git_repo(tag_name=\"git\"):\n tag_filter = Tag.objects.filter(name=tag_name)\n if tag_filter.exists():\n tag = tag_filter[0]\n ... | python | edit | 3 | 5 | bsd-3-clause | c9ef00ff3225aa545cbb1a3da592c9af1bb0791e | weijia/django-git,weijia/django-git | django_git/management/commands/git_pull_utils/git_folder_enum.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n if \"--settings\" not in sys.argv:\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"pinry.settings.development\")\n from django.core.management... | python | edit | 1 | 0 | bsd-2-clause | 1cbe91b1f4e4ef126dfce3ecd56016f33e7ad836 | pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,pinry/pinry | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom archinfo.arch_soot import SootMethodDescriptor\n\n\n# TODO implement properly\n# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)\n# this will also need the current state to t... | python | edit | 1 | 3 | bsd-2-clause | e201f59f25b3f7822531bfbdc6300178e2d2e285 | iamahuman/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,angr/angr,schieb/angr,schieb/angr,iamahuman/angr | angr/engines/soot/static_dispatcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nEntry point for running the sqmpy application standalone\n\"\"\"\nimport os\nfrom gevent import monkey\nmonkey.patch_all()\nfrom sqmpy.factory import create_app\n\n# This line added to support heroku deployment\nport = int(os.enviro... | python | edit | 1 | 0 | bsd-3-clause | d7cb9bdd63b381b81bf89c5e3c1cc3031c5928d9 | mehdisadeghi/sqmpy,mehdisadeghi/sqmpy,mehdisadeghi/sqmpy,simphony/sqmpy,simphony/sqmpy,simphony/sqmpy | run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nfrom manager import Manager\n\nmanager = Manager()\n\n\n@manager.command\ndef build(threads=1):\n print(\"Starting a build with %d threads ...\" % threads)\n\n@manager.command\ndef clean():\n pass\n\nif __name_... | python | edit | 1 | 1 | mit | 03380a1042443465d6f1d74afb5fd120dbc3379b | tanayseven/personal_website,tanayseven/personal_website,tanayseven/personal_website,tanayseven/personal_website | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\n\nfrom datapackage_pipelines.utilities.extended_json import json\n\nfrom ..errors import SpecError\nfrom .dependency_resolver import resolve_dependencies\n\n\nclass HashCalculator(object):\n\n def __init__(self):\n ... | python | edit | 1 | 4 | mit | 2bfcbebe6535e2ea36cf969287e3ec7f5fe0cf86 | frictionlessdata/datapackage-pipelines,frictionlessdata/datapackage-pipelines,frictionlessdata/datapackage-pipelines | datapackage_pipelines/specs/hashers/hash_calculator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from _Cfilters import nullify_secondary_maxima\nexcept ImportError:\n import numpy as np\n # Because of the way C imports work, nullify_secondary_maxima\n # is *called*, as in nullify_secondary_maxima().\n # For the pu... | python | edit | 1 | 4 | bsd-3-clause | 2f8ae4d29bd95c298209a0cb93b5354c00186d6b | daniorerio/trackpy,daniorerio/trackpy | trackpy/C_fallback_python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.nnet import conv\nfrom theano.tensor.nnet import softmax\nfrom theano.tensor import shared_randomstreams\nfrom theano.tensor.signal import downsample\n\n\n\ncl... | python | edit | 7 | 1 | cc0-1.0 | 6d8f79d32194f5b956785a021ee6fad6093a03f1 | cn04/insanity | insanity/layers.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\n\ndef _eintr_retry_call(func, *args):\n\twhile True:\n\t\ttry:\n\t\t\treturn func(*args)\n\texcept OSError, e:\n\t\tif e.errno == errno.EINTR:\n\t\t\tcontinue\n\t\traise\n\ndef ct_query(filename):\n\tcmd = 'ctags -n -u --... | python | edit | 5 | 4 | bsd-3-clause | c3c5bf54dbaa6dd5279cd82f9886d0d83fd07bcd | pombreda/seascope,eaglexmw/seascope,eaglexmw/seascope,pombreda/seascope,eaglexmw/seascope,pombreda/seascope | src/view/CtagsManager.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route(\"/ping\")\ndef hello():\n return \"pong\"\n\nif __name__ == \"__main__\":\n app.run()\n```\n\nApply this change: Add bigger response payload option o... | python | edit | 1 | 1 | apache-2.0 | b56c2063dbb8ea6145048eb8a74bfd2693b2b6f4 | svanoort/python-client-benchmarks,svanoort/python-client-benchmarks | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, division, absolute_import, unicode_literals\nfrom fontTools.misc.py23 import *\nimport unittest\nimport fontTools.encodings.codecs # Not to be confused with \"import codecs\"\n\nclass ExtendedCodecsTes... | python | edit | 12 | 1 | mit | c9402c1685a3351a9a39fe433fa343b58f895960 | fonttools/fonttools,googlefonts/fonttools | Lib/fontTools/encodings/codecs_test.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport arrays\n\nArrayTest = arrays.ArrayTest\n\nclass PavaTest(unittest.TestCase):\n def test_general(self):\n pass\n\nif __name__ == \"__main__\":\n unittest.main()\n\n```\n\nApply this change: Create all.p... | python | edit | 1 | 0 | mit | c1f7544138990dc6dbb05090711d57e6fea36fb4 | laffra/pava,laffra/pava | pava/implementation/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport warnings\n\nfrom django.test.runner import DiscoverRunner\nfrom django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning\n\n\nclass DevilryTestRunner(DiscoverRunner):\n def setup_test_environment(self, *... | python | edit | 1 | 1 | bsd-3-clause | 0c0e81798b078547bc5931c26dd2b0ab6507db94 | devilry/devilry-django,devilry/devilry-django,devilry/devilry-django,devilry/devilry-django | devilry/project/common/devilry_test_runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ethan Zimmerman\n# Copyright (c) 2014 Ethan Zimmerman\n#\n# License: MIT\n#\n\n\"\"\"This module exports the RamlCop plugin class.\"\... | python | edit | 1 | 0 | mit | f1874e9af69b22fd3f17938ba673d955780b69a9 | thebinarypenguin/SublimeLinter-contrib-raml-cop | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file)\n\ngit-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@2214 af82e4... | python | new_file | 4 | 0 | bsd-3-clause | 477faabee7fc674f8ce0c04663b9eff3943e83fa | moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dokipen/trac,moreati/trac-gitsvn,dafrito/trac-mirror,moreati/trac-gitsvn,exocad/exotrac | trac/versioncontrol/web_ui/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ben Edwards\n# Copyright (c) 2015 Ben Edwards\n#\n# License: MIT\n#\n\n\"\"\"This module exports the PugLint plugin class.\"\"\"\n\nf... | python | edit | 2 | 0 | mit | 43efd1f110daa8f2f16475e4e6edbdf18ff28286 | benedfit/SublimeLinter-contrib-pug-lint,benedfit/SublimeLinter-contrib-jade-lint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework.serializers import ModelSerializer\nfrom .models import CountInstance\n\n\nclass CountInstanceSerializer(ModelSerializer):\n class Meta:\n model = CountInstance\n\n```\n\nApply this change: Update serializer to... | python | edit | 1 | 0 | mit | ca8e15d50b816c29fc2a0df27d0266826e38b5b8 | cellcounter/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter | cellcounter/statistics/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rq import Worker, Queue, Connection\nfrom rq.job import Job\n\nfrom cloudly.cache import redis\nfrom cloudly.memoized import Memoized\n\ndef enqueue(function, *args):\n return _get_queue().enqueue(function, *args)\n\n\ndef fetch_job... | python | edit | 1 | 2 | mit | 43e3df5a07caa1370e71858f593c9c8bd73d1e2f | ooda/cloudly,ooda/cloudly | cloudly/rqworker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom sorl.thumbnail import get_thumbnail\n\nfrom ajaxuploader.backends.local import LocalUploadBackend\n\nclass ThumbnailUploadBackend(LocalUploadBackend):\n def __init__(self, dimension):\n self._dimension = dimensio... | python | edit | 1 | 1 | bsd-3-clause | 0b4097394fd05da204624d1c6093176feb158bb1 | OnlyInAmerica/django-ajax-uploader,derek-adair/django-ajax-uploader,derek-adair/django-ajax-uploader,skoczen/django-ajax-uploader,brilliant-org/django-ajax-uploader,derek-adair/django-ajax-uploader,brilliant-org/django-ajax-uploader,skoczen/django-ajax-uploader,OnlyInAmerica/django-ajax-uploader,brilliant-org/django-aj... | ajaxuploader/backends/thumbnail.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n# included for ease of use with Python 2 (which has no statistics package)\n\ndef mean(values):\n return float(sum(values)) / len(values)\n\ndef median(values):\n middle = (len(values) - 1) // 2\n\n if len(valu... | python | edit | 1 | 3 | isc | bc593f1716a8e36e65cf75a58e524e77d38d5d9c | debrouwere/python-ballpark | notation/statistics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n 'color',\n 'BANNER',\n 'DEFAULT_DRIVER_CODE'\n 'die',\n 'verbose',\n 'use_colors',\n 'set_color_policy',\n]\n\nimport sys as _sys\nfrom . import color as _color\n\nBANNER = \"\"\"\\\n _ _... | python | edit | 2 | 1 | mit | 63f6e4d50116d5ca2bfc82c1c608e08040055b5e | jdevera/subdue | subdue/core/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2012 Nebula, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n#... | python | edit | 1 | 2 | apache-2.0 | 19634d62f5a9b2c1aa9f867c247f46ed7f19ac07 | rickerc/horizon_audit,rickerc/horizon_audit,rickerc/horizon_audit | openstack_dashboard/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Intel Corporation.\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://w... | python | edit | 1 | 1 | apache-2.0 | 3d0ecb4bfd92e96dd195142c3b31955d521dfaf1 | egafford/sahara,openstack/sahara,openstack/sahara,egafford/sahara,tellesnobrega/sahara,tellesnobrega/sahara | sahara/tests/unit/plugins/cdh/v5_5_0/test_plugin_utils_550.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Python Packages\r\nimport random\r\n\r\n# External Packages\r\nimport numpy as np\r\n\r\n\r\ndef sin_theta_sum(theta):\r\n return np.sin(theta)\r\n\r\n\r\ndef gen_random_value(count, rmin, rmax):\r\n value = 0\r\n for i in range(... | python | edit | 3 | 3 | mit | 4aa6987d3048d6de36ddc07b63a02a3ddf3ab410 | lemming52/white_knight | integration/integration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport zc.form.field\nimport zope.schema.interfaces\n\n\nclass DynamicCombination(zc.form.field.Combination):\n\n def __init__(self, type_field, type_interface, **kw):\n self.type_field = type_field\n self.type_field.__name... | python | edit | 1 | 5 | bsd-3-clause | 552caa1d1fefcc48107eae02091aaca4a39123b4 | ZeitOnline/zeit.content.cp,ZeitOnline/zeit.content.cp | src/zeit/content/cp/field.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# File: prime_factors.py\n# Purpose: Compute the prime factors of a given natural number.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Date: Monday 26 September 2016, 12:05 AM\n\n```\n\nApply this change: Set con... | python | edit | null | null | mit | a4c24372ffcbac656a9879cc2fd705d67a875a3e | amalshehu/exercism-python | prime-factors/prime_factors.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2009-2010, Luis Pedro Coelho <<EMAIL>>\n# vim: set ts=4 sts=4 sw=4 expandtab smartindent:\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and ... | python | edit | 3 | 0 | mit | 10be9375fb201d7a271babb81ac25c22c70f219b | luispedro/waldo,luispedro/waldo | template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\n\nfrom blanc_basic_assets.models import Image\nfrom django.apps import apps\nfrom django.core.files import File\nfrom django.core.management.base import BaseCommand\n\n\nIMAGE_LIST = [\n (1, 'remember.jpg'),\n (2, 'sam... | python | edit | 1 | 2 | bsd-3-clause | 2adf8e8bbf1d0f623e14b8490d511ac45cbb7430 | djangochurch/djangochurch-data | djangochurch_data/management/commands/djangochurchimages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django_digest.decorators import *\nfrom casexml.apps.phone import xml\nfrom casexml.apps.case.models import CommCareCase\nfrom casexml.apps.phone.restore import generate_restore_response\nfrom casexml.apps.phone.models import User\nfro... | python | edit | 3 | 1 | bsd-3-clause | e78910c8b9ecf48f96a693dae3c15afa32a12da1 | SEL-Columbia/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,di... | casexml/apps/phone/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nContains player and NPC-classes.\n\"\"\"\nimport logging\n\nfrom Item import Item\n\nclass Person(object):\n \"\"\"\n Base class for all characters in game.\n \"\"\"\n DEFAULT_HEALTH = 100\n\n d... | python | edit | 3 | 2 | apache-2.0 | 03ffbda9725d7cf37b2fe8df2cfe13b2096c81c1 | benedicteb/outcast | src/Person.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'sharvey'\n\nfrom classifiers import Classifier\nfrom corpus.mysql.reddit import RedditMySQLCorpus\nfrom ppm import Trie\n\n\nclass RedditPPM(Classifier):\n corpus = None\n trie = None\n user = None\n reddit = None\... | python | edit | 3 | 3 | mit | 897b637ca9de93b7107cd6d6ab76ed0cb485aba9 | worldwise001/stylometry | classifiers/ppmc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom datetime import datetime\n\nimport attr\nfrom jinja2 import Environment, FileSystemLoader, select_autoescape\n\n\n@attr.s\nclass Message:\n id = attr.ib()\n platform = attr.ib()\n user = attr.ib()\n text = attr.i... | python | edit | 1 | 1 | mit | 2279aa0c450d53b04f774d9441e4fc0647466581 | rougeth/bottery | bottery/message.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# IPython log file\nimport numpy as np\nfrom scipy import sparse\nfrom skimage import graph\nfrom skimage.graph import _mcp\n\n\nimage = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]])\nmcp = graph.MCP_Geometric(image)\nd... | python | edit | 1 | 0 | bsd-3-clause | 9c2075f13e2aa8ff7a5c4644208e8de17ebefbab | jni/useful-histories | finding-geodesic-basins-with-scipy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pychecker2.util import type_filter\n\nfrom compiler import ast\n\nclass File:\n def __init__(self, name):\n self.name = name\n self.parseTree = None\n self.scopes = {}\n self.root_scope = None\n se... | python | edit | 10 | 6 | bsd-3-clause | 2c5650ef41aaf8c116f3922be02e7c5e7a79524b | smspillaz/pychecker,smspillaz/pychecker,smspillaz/pychecker | pychecker/pychecker2/File.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\ndef test_isim():\n import os\n import shutil\n import tempfile\n import yaml\n from fusesoc.edatools import get_edatool\n from edalize_common import compare_files, files, param_gen, tests_dir, vpi\n\n (... | python | edit | 3 | 1 | bsd-2-clause | 78c5580d349d6bec0715a36c13437177a726f7ad | olofk/fusesoc,olofk/fusesoc,lowRISC/fusesoc,lowRISC/fusesoc | tests/test_isim.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2017 Google Inc.\n#\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport os\nimport subprocess\nimport sys\n\nsrc = open(sys.argv[1], 'r')\nd... | python | edit | 4 | 0 | bsd-3-clause | cfe848c3aa7e2365ec93f04edb2edf7357068a9a | aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,HalC... | gn/create_sksl_enums.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom Datasource import Datasource\nimport numpy as np\nimport h5py\n\nclass HDF5(Datasource):\n pass\n @classmethod\n def load_tile(ds, query):\n Sk,Sj,Si = query.all_scales\n path = query.OUTPUT.INFO.PATH.VALUE\n ... | python | edit | 3 | 1 | mit | 1b40a51e371d10cc37f4d8f8c7557dbc741d690f | Rhoana/butterfly,Rhoana/butterfly,Rhoana/butterfly2,Rhoana/butterfly,Rhoana/butterfly | butterfly/ImageLayer/HDF5.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, request\nfrom flask_restful import Resource, Api, reqparse\nfrom indra import reach\nfrom indra.statements import *\nimport json\n\napp = Flask(__name__)\napi = Api(app)\nparser = reqparse.RequestParser()\nparser.ad... | python | edit | 6 | 4 | bsd-2-clause | 360efe51bc45f189c235bed6b2b7bfdd4fd1bfbd | sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,johnbachman/indra,johnbachman/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra,bgyori/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/indra | flask-restful/api.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom twisted.internet import reactor, defer, protocol\nfrom twisted.web.client import RedirectAgent, Agent\n\nfrom ooni.settings import config\nfrom ooni.resources import inputs, geoip\n\nagent = RedirectAgent(Agent(reactor))\n... | python | edit | 3 | 3 | bsd-2-clause | 8545423373dee1f4b801375922b67bc2417cb426 | 0xPoly/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurra... | ooni/resources/update.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.