messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext import commands\n\n\nclass CustomContext(commands.Context):\n async def error(self, title: str, description: str = None):\n em = discord.Embed(\n title=f\":no_entry_sign: {title}\",\n ... | python | edit | 1 | 2 | mit | d7087cb309c028bdd56cf4c605d7c60eac3d4c0c | Naught0/qtbot | utils/custom_context.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pythonwarrior.config import Config\nimport time\n\n\nclass UI(object):\n @staticmethod\n def puts(msg):\n if Config.out_stream:\n return Config.out_stream.write(msg + \"\\n\")\n\n @staticmethod\n def puts_... | python | edit | 1 | 5 | mit | ab15e817d4248f982502440007c7562779cc644b | arbylee/python-warrior | pythonwarrior/ui.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlalchemy as sa\nfrom database import Base\n\n\nclass Song(Base):\n __tablename__ = 'songs'\n song_hash = sa.Column(sa.String(40), primary_key=True)\n filename = sa.Column(sa.Text, nullable=False)\n play_count = sa.Colum... | python | edit | 1 | 1 | mit | adb458132b4e633052c9e46e1dc4e67306f9fc6d | tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay | tikplay/database/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n@author: Ferdinand E. Silva\n@email: <EMAIL>\n@website: http://ferdinandsilva.com\n\"\"\"\nimport os\n\n\nclass qqFileUploader(object):\n\n def __init__(self, allowedExtensions=None, sizeLimit=1024):\n self.allowedExtensio... | python | edit | 1 | 4 | mit | 02de17ee721d40ddcce9598d8a2ed82930240eda | SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,SimonWaldherr/uploader | server/python_django/file_uploader/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\r\n\r\ndef im3DNORM(img,normind,varargin=None):\r\n '''\r\n % IMAGE3DNORM computes the desired image norm\r\n % IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm\r\n % defined in NORMI... | python | edit | 3 | 4 | bsd-3-clause | 76f1dee56778fd3ee793604c66d010d900f4440c | CERN/TIGRE,CERN/TIGRE,CERN/TIGRE,CERN/TIGRE | Python/tigre/utilities/im3Dnorm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCustom types.\n\n\"\"\"\nfrom six import text_type\n\nfrom sqlalchemy.types import TypeDecorator, Unicode\n\n\nclass EnumType(TypeDecorator):\n \"\"\"\n SQLAlchemy enum type that persists the enum name (not value).\n\n Note... | python | edit | 1 | 3 | apache-2.0 | 89593cc22f8de4bdb6d605b2e4d6e04b0d1fcd61 | globality-corp/microcosm-postgres,globality-corp/microcosm-postgres | microcosm_postgres/types.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom flask import Flask\nfrom flask_selfdoc import Autodoc\n\n\nclass TestErrorHandling(unittest.TestCase):\n def test_app_not_initialized(self):\n app = Flask(__name__)\n autodoc = Autodoc()\n wit... | python | edit | 1 | 1 | mit | afec7b3844493f97d6ba287e1c7b10d272c6f205 | jwg4/flask-autodoc,jwg4/flask-autodoc | tests/test_error_handling.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport src\nimport resources.Constants as const\n\n\nclass TestAssignments(unittest.TestCase):\n\n string_file = ''\n int_file = ''\n\n @classmethod\n def setUpClass(cls):\n cls.string_file = src.main(\".... | python | edit | 1 | 1 | bsd-3-clause | ea453e4c050771ee96bd99f15e4f42449f28c7f2 | sky-uk/bslint | tests/TestAssignmentRegex.py | rejected_duplicate | Near-duplicate of sample 3265 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom friendlyurls.models import *\n\nclass UrlMappingAdmin(admin.ModelAdmin):\n list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')\nadmin.site.register(UrlMapping, UrlMappingAdmin)\... | python | edit | 3 | 0 | bsd-3-clause | 627d79ae4950338c8a5a0d75bae244c9c0374d4a | tachang/django_friendlyurls | friendlyurls/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport time\nimport subprocess\n\nfrom sniffer.api import select_runnable, file_validator, runnable\ntry:\n from pync import Notifier\nexcept ImportError:\n notify = None\nelse:\n notify = Notifier.notify\n\n\nwatch_path... | python | edit | 1 | 8 | mit | af413ab076bb74e93499455bc2fb761e4ec56702 | jacebrowning/mine | scent.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scannerpy import Database, DeviceType, Job\nfrom scannerpy.stdlib import pipelines\nimport subprocess\nimport cv2\nimport sys\nimport os.path\nsys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')\nimport util\n\nwith Dat... | python | edit | 5 | 0 | apache-2.0 | eaa99e12ef4b868e825ffe01f4eb9319e439827b | scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner | examples/face_detection/face_detect.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .service import PluginService\n\n__meta__ = {\n \"name\": \"Plugin Manager\",\n \"class\": PluginService,\n \"deps\": [\"messaging\", \"simpledb\", \"appmanager\"],\n \"config\": [\n {\n \"name\": \"plugin... | python | edit | 1 | 0 | mit | 421fd2d6fc0ffeaf35a99d426c7a1f9914e1da4e | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | weaveserver/services/plugins/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.7\n\ndel __builtins__.__dict__['__import__']\ndel __builtins__.__dict__['reload']\n\nflag = \"eval_is_fun\"\n\ndef main():\n print \"Hi, welcome to the flag database. We are under construction right now, so you cannot ... | python | edit | 5 | 3 | mit | e99a4aa3fab84e112f5d82eafe9012f7e2be9447 | james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF | problem-static/Intro-Eval_50/admin/eval.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sqlalchemy import UniqueConstraint\nfrom infosystem.common.subsystem import entity\nfrom infosystem.database import db\n\n\nclass Policy(entity.Entity, db.Model):\n\n attributes = ['id', 'capability_id', 'role_id', 'bypass']\n do... | python | edit | 1 | 1 | apache-2.0 | 4393740af93ae0ac1927e68c422e24735b0216c1 | samueldmq/infosystem | infosystem/subsystem/policy/entity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework.views import APIView\nfrom rest_framework import parsers\nfrom rest_framework import renderers\nfrom rest_framework.response import Response\nfrom rest_framework.authtoken.models import Token\nfrom rest_framework.authtok... | python | edit | 1 | 1 | bsd-2-clause | d0126b7e31c69ea7dd5cda4b9a3e931f5b8a8fbf | kennydude/django-rest-framework,mgaitan/django-rest-framework,wedaly/django-rest-framework,arpheno/django-rest-framework,callorico/django-rest-framework,johnraz/django-rest-framework,nryoung/django-rest-framework,krinart/django-rest-framework,gregmuellegger/django-rest-framework,akalipetis/django-rest-framework,tigeran... | rest_framework/authtoken/views.py | accepted | null | 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\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **options):\n pars... | python | edit | 3 | 3 | bsd-3-clause | bdeb60d5e82e5eaaaaf805286bae29e9112af307 | 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 | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 Nebula, Inc.\n# Copyright 2013 IBM Corp.\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# a copy of the L... | python | edit | 1 | 1 | apache-2.0 | e73795b8ad016bba5b1ab5118a5153085a1e99b0 | mahak/nova,mahak/nova,klmitch/nova,klmitch/nova,klmitch/nova,rahulunair/nova,mahak/nova,rahulunair/nova,openstack/nova,openstack/nova,rahulunair/nova,openstack/nova,klmitch/nova | nova/tests/functional/api_sample_tests/test_servers_ips.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlite3 as sql\nimport os\nimport sys\nimport logging\nimport benchmark\n\n# bmVerify(['final_r7', 'final_r8'], filepath=\"/home/ysun/disambig/newcode/all/\", outdir = \"/home/ayu/results_v2/\")\n \n# Text Files\ntxt_file = '... | python | edit | 3 | 0 | bsd-2-clause | 859a82df7804f181ffc12052a4af59ab52a44560 | yngcan/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor | test/goldstandard/benchmark_confirm.py | rejected_duplicate | Near-duplicate of sample 3454 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom readKanjiFile import *\n\ndef main():\n testDict = readKanjiFile('kanjiTestFile.txt')\n\n print('There are {} entries in this dictionary.'.format(len(testDict)))\n for entry in list(testDict.items())[0:15]:\n print(entr... | python | edit | 3 | 2 | mit | c671301e29e41b0ea7988bad0a5ff4793890ea64 | WilliamRayJohnson/kanjiStudier | readKanjiFileTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nclass Channel(object):\n def __init__(self, name, branch, position, cate... | python | edit | 1 | 1 | bsd-3-clause | 943d66dc04ec74a27ae12c46ae1559e585faa716 | eunchong/build,eunchong/build,eunchong/build,eunchong/build | scripts/master/factory/dart/channels.py | rejected_duplicate | Near-duplicate of sample 3077 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport bsddb3\nfrom xclib.utf8 import utf8, unutf8\n\ndef perform(args):\n domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)\n if args.get:\n print(unutf8(domain_db[utf8(args.get)]))\n elif args.put:\n ... | python | edit | 1 | 8 | mit | 4e5ef4a04fd0b3b354b187ee6e8e8ef27337ad6f | jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth | xclib/dbmops.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('interfaces', parent_package, top_path)\n\n config.add_data_dir('tests')\n config.add_data_dir(... | python | edit | 1 | 1 | bsd-3-clause | 166c1a4dde981d5bd7d20a00c8329d7bbb4a3c00 | arokem/nipype,gerddie/nipype,iglpdc/nipype,pearsonlab/nipype,carlohamalainen/nipype,Leoniela/nipype,glatard/nipype,dgellis90/nipype,satra/NiPypeold,glatard/nipype,mick-d/nipype,carolFrohlich/nipype,blakedewey/nipype,dgellis90/nipype,pearsonlab/nipype,mick-d/nipype_source,FCP-INDI/nipype,dgellis90/nipype,carolFrohlich/n... | nipype/interfaces/setup.py | rejected_duplicate | Near-duplicate of sample 879 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\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.apache.org/licen... | python | edit | 1 | 1 | apache-2.0 | 84a2ece10b0e246564fd539eed119f46d44ca74d | prestodb/presto-admin,prestodb/presto-admin | tests/no_hadoop_bare_image_provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = False\nALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']\nADMINS = (('David Downes', '<EMAIL>'),)\n\nMIDDLEWARE_CLASSES += [\n 'core.middleware.IpRestrictionMiddleware',\n]\n\nINSTALLED_APPS +... | python | edit | 6 | 0 | mit | 778f5b8f905195a54a09f1e9cc8768e5cabc4dcd | uktrade/navigator,dahfool/navigator,dahfool/navigator,uktrade/navigator,uktrade/navigator,dahfool/navigator,dahfool/navigator,uktrade/navigator | navigator/settings/prod.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTeardown the CloudBolt resources (container_orchestrator, environment)\nassociated with this Kubernetes cluster.\n\"\"\"\nfrom common.methods import set_progress\nfrom containerorchestrators.kuberneteshandler.models import Kubernete... | python | edit | 6 | 1 | apache-2.0 | 56ac100c8ca357a5600db7a16859cca1483ccb13 | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | blueprints/multi_node_kubernetes_cluster/teardown_kubernetes_cluster/teardown_kubernetes_cluster.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sixquiprend.sixquiprend import app, db\n\nclass ChosenCard(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete=\"CASCADE\"))\n game_id = db.Column(db.In... | python | edit | 3 | 1 | mit | d1d7684edb6d687206deea75d2ba13194046e376 | nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend | sixquiprend/models/chosen_card.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\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# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | python | edit | 1 | 2 | apache-2.0 | 53171f75a64a26dcec91facbdec95b2ed7f74338 | SauloAislan/ironic,dims/ironic,NaohiroTamura/ironic,hpproliant/ironic,bacaldwell/ironic,naterh/ironic,redhat-openstack/ironic,NaohiroTamura/ironic,ionutbalutoiu/ironic,SauloAislan/ironic,dims/ironic,openstack/ironic,Tan0/ironic,openstack/ironic,pshchelo/ironic,debayanray/ironic_backup,ionutbalutoiu/ironic,devananda/iro... | ironic/drivers/drac.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Command Line Interface.\"\"\"\n\nimport argparse\nimport sys\n\ndef main(argv):\n \"\"\"Entry point for the pic2map.py script.\"\"\"\n args = parse_arguments(argv)\n print args\n\ndef parse_arguments(... | python | edit | 2 | 1 | mit | 85405d242b41b9dd721131c6e3046c47fe86847d | jcollado/pic2map,jcollado/pic2map,jcollado/pic2map | pic2map/cli.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\nfrom shutil import copy\nimport subprocess\n\n\nBOOTSTRAP = abspath(dirname(__file__))\nROOT = abspath(join(BOOTSTRAP, pardir))\n\n# Path where venv will be created. It's ... | python | edit | 2 | 1 | mit | f1d2bb08dfde9402b7fc858d57130b43e3f1cd4d | henriquebastos/virtualenv-bootstrap,henriquebastos/virtualenv-bootstrap | bootstrap/hooks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-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... | python | edit | 1 | 1 | bsd-3-clause | a5bc36df3435258fad9700c150985998e9663ff9 | itziakos/haas,scalative/haas,sjagoe/haas,sjagoe/haas,scalative/haas,itziakos/haas | haas/tests/test_coverage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport map\nimport curses\n\n# Set up Curses screen\nscreen = curses.initscr()\n\ncurses.noecho()\nscreen.keypad(True)\ncurses.cbreak()\ncurses.halfdelay(5) # Wait for half a second for input before continuing\ncurses.start_color()\n\nc... | python | edit | 1 | 0 | mit | 8e72ef3fa525c961786e9b60c039c847bc2c710f | cferwin/CA-Sandbox | caSandbox.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom telemetry import test\nfrom telemetry.page import page_measurement\n... | python | edit | 1 | 1 | bsd-3-clause | bf38a26ea239ce70fd4fc3748912b243fb1f7d88 | krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,Chilledheart/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium... | tools/perf/benchmarks/pica.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyramid.response import Response\nfrom pi_director.models.models import (\n DBSession,\n MyModel,\n )\nfrom pi_director.models.UserModel import UserModel\n\n\ndef authorize_user(email):\n user=DBSession.query(UserModel).fil... | python | edit | 5 | 3 | mit | 49bf8bd8137928a1dc5165f38f8abfe423f5e7f0 | selfcommit/pi_director,PeterGrace/pi_director,selfcommit/pi_director,PeterGrace/pi_director,PeterGrace/pi_director,selfcommit/pi_director | pi_director/controllers/user_controls.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport yaml\n\n\nl = logging.getLogger(__name__)\n\n\ndef _replace_with_type(type_, replace_type, data):\n if isinstance(data, type_):\n return replace_type(data)\n return data\n\n\nclass Config(dict):\n\n ... | python | edit | 1 | 4 | mit | 5b155b6e6b09874d7783135528d39ab7bbc61fdb | FichteFoll/TelegramIRCImageProxy,codetalkio/TelegramIRCImageProxy,FichteFoll/CodetalkIRCBot | config/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django_jinja.base import Library\nimport jinja2\n\nregister = Library()\n\n@register.filter\n@jinja2.contextfilter\ndef datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):\n return value.strftime(format... | python | edit | 1 | 1 | bsd-3-clause | 445db7dedb7c60edc03caa1969dca4253e2b9048 | glogiotatidis/django-jinja,akx/django-jinja,akx/django-jinja,niwinz/django-jinja,niwinz/django-jinja,akx/django-jinja,niwinz/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja | example_project/example_project/web/templatetags/testags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# libgreader\n# Copyright (C) 2012 Matt Behrens <<EMAIL>>\n# Python library for the Google Reader API\n\n__author__ = \"Matt Behrens <<EMAIL>>\"\n__version__ = \"0.8.0\"\n__copyright__ = \"Copyright (C) 2012 Ma... | python | edit | 10 | 0 | mit | 3e02a38a9ae52603f620a7969ce532b61de531d7 | smurfix/librssreader,askedrelic/libgreader | libgreader/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nBROKER_URL = 'amqp://couchbase:<EMAIL>:5672/broker'\nCELERY_RESULT_BACKEND = 'amqp'\nCELERY_RESULT_EXCHANGE = 'perf_results'\nCELERY_RESULT_PERSISTENT = False\n\n```\n\nApply this change: Use broker IP instead of domain name\n\nChange-Id: I... | python | edit | 1 | 0 | apache-2.0 | 2f72f75da7ba03e331927c5ab0a5702c150b2f9a | couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner | perfrunner/celeryremote.py | rejected_duplicate | Near-duplicate of sample 1939 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom sqlalchemy import Column, ForeignKey, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import relationship\nfrom sqlalchemy import create_engine\n\nBase = declarative_base()\n\n\... | python | edit | 3 | 1 | mit | 0a02b896c7f8499504a855652de22bab10824c69 | gsbullmer/restaurant-menu-directory,gsbullmer/restaurant-menu-directory | database_setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom cookiecutter import generate\nfrom cookiecutter import exceptions\n\n\n@pytest.mark.usefixtures('clean_system')\ndef test_pre_gen_hook(tmpdir):\n context = {\n 'cookiecutter': {\n ... | python | edit | 1 | 1 | bsd-3-clause | b94f849fe28918a343a142da57b6055064d5b194 | dajose/cookiecutter,pjbull/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,michaeljoseph/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,Springerle/cookiecutter,dajose/cookiecutter,audreyr/cookiecutter,stevepiercy/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,pjbull/cookiecutter,will... | tests/test_abort_generate_on_hook_error.py | rejected_duplicate | Near-duplicate of sample 6756 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom psautohint import autohint\nfrom psautohint import psautohint\n\nbaseDir = \"tests/data/source-code-pro\"\nmasters = (\"Black\", \"Bold\", \"ExtraLight\", \"Light\", \"Medium\", \"Regular\", \"Semibold\")\n\nglyphList = None\n\nfonts =... | python | edit | 1 | 0 | apache-2.0 | 1f66670b94d2eca70ecf8e26b21f8b28986154b9 | khaledhosny/psautohint,khaledhosny/psautohint | test-mm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric import api as __api\n\n# Setup some default values.\n__api.env.deploy_user = 'webapps'\n\nfrom denim.paths import (cd_deploy, cd_package, deploy_path, package_path)\nfrom denim import (scm, service, system, virtualenv, webserver... | python | edit | 4 | 1 | bsd-2-clause | 14329daf571400812594c0388eac87538cd10079 | timsavage/denim | denim/api.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nfrom dataactcore.models.errorInterface import ErrorInterface\nfrom dataactcore.models.jobTrackerInterface import JobTrackerInterface\nfrom dataactcore.models.userInterface import UserInterface\nfrom dataactcore.models.valid... | python | edit | 1 | 1 | cc0-1.0 | 7f6da4dee6464e48a0e6b491f3f740a750e86ed2 | fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,fedspendingtransparency/data-act-broker-backend | dataactcore/scripts/resetAlembicVersion.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n#from .binding.base import BindingMetaclass\nfrom .package_checks import check_all\n\n\nclass ChannelsConfig(AppConfig):\n\n name = \"channels\"\n verbose_name = \"Channels\"\n\n def ready(self)... | python | edit | 1 | 1 | bsd-3-clause | 3d8d82be3528cc0150dac0c8ade1f6c306b412e4 | andrewgodwin/channels,andrewgodwin/django-channels,django/channels | channels/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef split_path(path):\n \"\"\"\n Split a url path into its sub-paths.\n\n A url's sub-paths consist of all substrings ending in / and starting at\n the start of the url.\n \"\"\"\n paths = ['/']\n path = ... | python | edit | 1 | 3 | bsd-2-clause | 7fc576f3dd4d8d7dbe64dbecfc6dcc9ac9ad6b12 | meshy/django-conman,meshy/django-conman | conman/routes/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nMemoryDebugger extension\n\nSee documentation in docs/topics/extensions.rst\n\"\"\"\n\nimport gc\n\nfrom scrapy import signals\nfrom scrapy.exceptions import NotConfigured\nfrom scrapy.utils.trackref import live_refs\n\n\nclass Memo... | python | edit | 1 | 3 | bsd-3-clause | 26538b01b5865c4b5f68fc0ea0f22268d4768376 | olorz/scrapy,OpenWhere/scrapy,cursesun/scrapy,pablohoffman/scrapy,avtoritet/scrapy,nikgr95/scrapy,eLRuLL/scrapy,rolando-contrib/scrapy,amboxer21/scrapy,aivarsk/scrapy,zjuwangg/scrapy,dacjames/scrapy,cursesun/scrapy,TarasRudnyk/scrapy,Digenis/scrapy,bmess/scrapy,agreen/scrapy,CENDARI/scrapy,redapple/scrapy,shaform/scrap... | scrapy/contrib/memdebug.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nautomatically maintains the latest git tag + revision info in a python file\n\n\"\"\"\n\nimport imp\nimport os\nimport subprocess\n\n\ndef get_project_version(version_file):\n version_file = os.path.join(os.path.dirname(os.path.r... | python | edit | 1 | 8 | apache-2.0 | 5bb4c61e9950de4c8c000a4ab02b0c901e0b06ff | aiven/aiven-client | version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom binascii import hexlify\nimport os\n\n\ndef generate_api_token():\n key = hexlify(os.urandom(30)).decode()\n dashes_key = \"\"\n for idx, char in enumerate(key):\n if idx % 15 == 0 and idx != len(key)-1:\n da... | python | edit | 6 | 4 | mit | 15c773250b52a03196a023e286f4f3a2405ba94e | uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi | backend/uclapi/dashboard/app_helpers.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\ndef getContainerDetails(container):\n ip = 'N/A'\n if container.state().network != None and container.state().network.get('eth0') != None:\n if len(container.state().network.get('eth0')['addresses']) > 0:\n ip = ... | python | edit | 1 | 7 | apache-2.0 | 1f61ece6f6b0950706ebef159665eafbfeeaa1fd | AdaptiveScale/lxdui,AdaptiveScale/lxdui,AdaptiveScale/lxdui,AdaptiveScale/lxdui | app/api/utils/containerMapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport sdv\n\nproject = u'stix-validator'\ncopyright = u'2015, The MITRE Corporation'\nversion = sdv.__version__\nrelease = version\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinxcontrib.napoleon',\n]\n\ntemplates_pat... | python | edit | 1 | 0 | bsd-3-clause | e799c94932aa3a9284d99739502645abc47aa8b4 | STIXProject/stix-validator,pombredanne/stix-validator | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport ConfigParser\nimport json\nimport os\nimport unittest\n\nfrom webserver import Httpd\nfrom network import get_lan_ip\n\nfrom selenium import webdriver\n\nclass WebDriverBaseTest(unittest.TestCase):\n\n @classmethod\n def setU... | python | edit | 5 | 2 | bsd-3-clause | 80002186ecec3a50d13d04e8467d8d7456d189b5 | YongseopKim/crosswalk-test-suite,kangxu/crosswalk-test-suite,jacky-young/crosswalk-test-suite,kangxu/crosswalk-test-suite,ibelem/crosswalk-test-suite,XiaosongWei/crosswalk-test-suite,kangxu/crosswalk-test-suite,xiaojunwu/crosswalk-test-suite,Shao-Feng/crosswalk-test-suite,XiaosongWei/crosswalk-test-suite,crosswalk-proj... | webdriver/webdriver-w3c-tests/base_test.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases import GroupEndpoint\nfrom sentry.api.serializers import serialize\nfrom sentry.api.paginator import DateTimePaginator\nfrom sentry.mode... | python | edit | 1 | 2 | bsd-3-clause | e2282e8832bcf1f2621dc56488fec5eb9f1b1acc | looker/sentry,zenefits/sentry,zenefits/sentry,zenefits/sentry,jean/sentry,mvaled/sentry,ifduyue/sentry,beeftornado/sentry,beeftornado/sentry,JamesMura/sentry,fotinakis/sentry,looker/sentry,alexm92/sentry,beeftornado/sentry,looker/sentry,alexm92/sentry,JamesMura/sentry,JackDanger/sentry,mvaled/sentry,jean/sentry,JackDan... | src/sentry/api/endpoints/group_events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*\nimport json\nfrom django import forms\nfrom django.template.loader import render_to_string\n\nfrom .models import Field, Option, FieldOption\n\n\nclass JSONField(forms.TextInput):\n model = ... | python | edit | 1 | 5 | mit | d641d7d843899258d88da0d1dffaa762c1378712 | williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps | opps/fields/widgets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom qtpy.uic import loadUi\n\ndef load_ui(ui_filename, baseinstance):\n ui_filename = os.path.split(ui_filename)[-1]\n\n # directory containing this file\n filename = __file__\n if not os.path.isdir(filename):\n ... | python | edit | 1 | 1 | mit | ebfeba2704dc73c136fa2ed217ef4337265b92dd | neutrons/FastGR,neutrons/FastGR,neutrons/FastGR | addie/utilities/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nVERSION = (0, 1, 4)\n\n__version__ = \".\".join(map(str, VERSION))\n__status__ = \"Development\"\n__description__ = u\"Poll App for Opps CMS\"\n\n__author__ = u\"Bruno Cezar Rocha\"\n__credi... | python | edit | 1 | 0 | mit | ea57d89c1acc82a473a648f1c53430fadc27f7b2 | opps/opps-polls,opps/opps-polls | opps/polls/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom socketIO_client import SocketIO, LoggingNamespace\n\n\ndef on_bbb_response(*args):\n print('on_bbb_response', args)\n\n\ndef on_chat_message_response(*args):\n print(args)\n\nwith SocketIO('http://192.1... | python | edit | 1 | 1 | mit | e2bee28d9b9f5034fe1c92b94e08fd73d2050b30 | yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat | PythonClient/index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass OstinatoBlogConfig(AppConfig):\n name = 'ostinato.blog'\n label = 'ost_blog'\n verbose_name = 'Ostinato Blog Engine'\n\n\n```\n\nApply this change: Correct app label of ostinato_blog"
... | python | edit | 1 | 0 | mit | 631665a8aeee54d5094480ddf4140a61dce4a960 | andrewebdev/django-ostinato,andrewebdev/django-ostinato,andrewebdev/django-ostinato | ostinato/blog/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom addons.base.models import BaseNodeSettings, BaseStorageAddon\n\nlogger = logging.getLogger(__name__)\n\nclass NodeSettings(BaseStorageAddon, BaseNodeSettings):\n pass\n\n```\n\nApply this change: Add required overr... | python | edit | 1 | 0 | apache-2.0 | 7643635278fc1c92289e8fdd456614ce85a2c2f3 | felliott/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,cslzchen/osf.io,monikagrabowska/osf.io,caneruguz/osf.io,Nesiehr/osf.io,alexschiller/osf.io,aaxelb/osf.io,caseyrollins/osf.io,Johnetordoff/osf.io,caneruguz/osf.io,mluo613/osf.io,chrisseto/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,monikagrabowska/osf.io,... | addons/osfstorage/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nThis module contains the Remote extension to :class:`Table <agate.table.Table>`.\n\"\"\"\n\nimport agate\nimport requests\nimport six\n\ndef from_url(cls, url, callback=agate.Table.from_csv, binary=False, **... | python | edit | 1 | 4 | mit | 3875b14e6c94c4a6a7ad47a3eb55cae62096d0e4 | wireservice/agate-remote | agateremote/table_remote.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import scoped_session, sessionmaker\nfrom sqlalchemy.ext.declarative import declarative_base\n\n# Database\nengine = create_engine('sqlite:///files/chats.db', convert_unicode=True)\n... | python | edit | 3 | 1 | mit | 9262dad14237d57a3817a199f9a8b04371de9607 | ArionMiles/MIS-Bot | mis_bot/scraper/database.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncio\nimport uuid\nimport json\n\nimport requests\nfrom requests.exceptions import HTTPError\n\nfrom pyeventstore.events import (get_all_events,\n start_subscription,\n ... | python | edit | 4 | 2 | mit | a04116d32931c5e85de417b5da048c91d495261b | cjlarose/pyeventstore | pyeventstore/client.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\n\n#uses beautiful soup to parse html file\n#finds the correct span tag\n#Gets the percentage of ink left in the printer\nsoup = BeautifulSoup(open(\"test/test.html\"))\nres = soup.find('span',{'class':'hpCons... | python | edit | 1 | 0 | mit | 44226dabb65cb06522c128539660e407e53ca602 | tfahl/printfo,tfahl/printfo | parseHTML.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom TwircBot import TwircBot as tw\n\nbot = tw(\"config/sampleConfig.sample\")\nbot.print_config()\nbot.connect()\n\n```\n\nApply this change: Modify runTwirc.py to accept system arguments"
},
{
"role": "assistant",
"content": ... | python | edit | 1 | 0 | mit | 98dafbc7578209b9768e6ca6ccfa7854f70deb16 | johnmarcampbell/twircBot | runTwircBot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom local_settings import *\n\nALLOWED_HOSTS = ['uchicagohvz.org']\n\n# Database\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or... | python | edit | 6 | 0 | mit | 36fe90ca170525cabc4f2a496a12a28c86b7e82d | kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz | uchicagohvz/production_settings.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass TestModel(models.Model):\n\n name = models.CharField(max_length=63, unique=True, verbose_name='Name')\n image = models.ImageField(verbose_name='Image')\n\n```\n\nApply this change: Test compatib... | python | edit | 1 | 0 | mit | bbd3b1939712d9784fe61884d9b06faa95c36006 | dessibelle/sorl-thumbnail-serializer-field | tests/test_project/test_app/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\nif sys.version_info < (3, 8):\n try:\n import pickle5 as pickle # noqa: F401\n from pickle5 import Pickler # noqa: F401\n except ImportError:\n import pickle # noqa: F401\n from pickle im... | python | edit | 1 | 0 | bsd-2-clause | 2b603ebe92e308aa78928772e8681f3cc46775cb | numba/numba,IntelLabs/numba,stuartarchibald/numba,stonebig/numba,seibert/numba,cpcloud/numba,stonebig/numba,cpcloud/numba,numba/numba,IntelLabs/numba,stuartarchibald/numba,seibert/numba,cpcloud/numba,numba/numba,IntelLabs/numba,cpcloud/numba,seibert/numba,cpcloud/numba,stonebig/numba,stonebig/numba,stuartarchibald/numb... | numba/cloudpickle/compat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd.module_interface import Command, ICommand, IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass UserhostCommand(ModuleData, Command)... | python | edit | 1 | 5 | bsd-3-clause | f820ef6cef8037942d18dcc912fb6de093ecc8de | ElementalAlchemist/txircd,Heufneutje/txircd | txircd/modules/rfc/cmd_userhost.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom functools import partial\n\nfrom problems.models import UserSolution\n\nfrom .views import download_protected_file\n\nurlpatterns = patterns('',\n url(r'solutions/(?P<path>.*)$', partial(d... | python | edit | 3 | 0 | mit | 59ce3ca9c1572dcf71aa5de5cdb354def594a36c | matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots,tbabej/roots,rtrembecky/roots,tbabej/roots,tbabej/roots,rtrembecky/roots,matus-stehlik/roots | downloads/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom transformations.BackTranslation import BackTranslation\nfrom transformations.ButterFingersPerturbation import ButterFingersPerturbation\nfrom transformations.ChangeNamedEntities import ChangeNamedEntities\nfrom transformations.Sentence... | python | edit | 1 | 2 | mit | f868b126b3bd81ec900f378ff1fa8bd29ab8ea4c | GEM-benchmark/NL-Augmenter | transformations/Transformations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom _botan import *\n\ninit = LibraryInitializer()\n\ndef Filter(name, key = None, iv = None, dir = None):\n if key != None and iv != None and dir != None:\n return make_filter(name, key, iv, dir)\n elif key != None and dir !=... | python | edit | 8 | 7 | bsd-2-clause | 8cd2c9a4b9cf69a97e758d1e6416d2efbbf7028a | randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster1... | misc/python/botan/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Write python code for the following: Copy over tests from aospy-obj-lib"
},
{
"role": "assistant",
"content": "import numpy as np\nimport pytest\nimport xray\n\nfrom aospy_user import SpharmInterface\n\n\n@pytest.fixture\ndef compute_vrtdiv(u, v):\n sphint = Spha... | python | new_file | 1 | 1 | apache-2.0 | 7e166ba983bd1470f6eac6776107a64539c38581 | spencerahill/animal-spharm | animal_spharm/test/test_animal_spharm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Testing qball \n\n\"\"\"\n\nimport numpy as np\n\nimport dipy.core.qball as qball\n\nfrom nose.tools import assert_true, assert_false, \\\n assert_equal, assert_raises\n\nfrom numpy.testing import assert_array_equal, assert_array... | python | edit | 5 | 1 | bsd-3-clause | 6cb9008ee2ed49d9630735378bd84727aef3caef | villalonreina/dipy,samuelstjean/dipy,jyeatman/dipy,sinkpoint/dipy,mdesco/dipy,Messaoud-Boudjada/dipy,maurozucchelli/dipy,villalonreina/dipy,nilgoyyou/dipy,beni55/dipy,demianw/dipy,FrancoisRheaultUS/dipy,rfdougherty/dipy,JohnGriffiths/dipy,mdesco/dipy,Messaoud-Boudjada/dipy,JohnGriffiths/dipy,samuelstjean/dipy,samuelstj... | dipy/core/tests/test_qball.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.core.management.base import BaseCommand\n\nfrom ...settings import get_user_model\nfrom ...sync import sync_customer\n\nUser = get_user_model()\n\n\nclass Comma... | python | edit | 1 | 2 | bsd-3-clause | f0b705f1fde5ac33a58ccd56ed67bfcbecf0daf3 | andrewyoung1991/dj-stripe,areski/dj-stripe,benmurden/dj-stripe,koobs/dj-stripe,areski/dj-stripe,tkwon/dj-stripe,kavdev/dj-stripe,aliev/dj-stripe,ctrengove/dj-stripe,cjrh/dj-stripe,StErMi/dj-stripe,mthornhill/dj-stripe,ctrengove/dj-stripe,cjrh/dj-stripe,iddqd1/dj-stripe,dj-stripe/dj-stripe,maxmalynowsky/django-stripe-re... | djstripe/management/commands/djstripe_sync_customers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom app import app, \\\n cors_header\nfrom flask import request, \\\n make_response, \\\n send_from_directory\nimport json\nimport os\n\n\n@app.route('/', methods=['GET'])\n@cors_header\ndef... | python | edit | 5 | 2 | mit | 46ab8d71824f80ba5d02349a9f89328e5c47f434 | taeram/gipsy | app/views.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import timedelta\nfrom datetime import datetime\n\nfrom django import template\n\nfrom github2.client import Github\n\nfrom package.models import Package, Commit\n\nregister = template.Library()\n\ngithub = Github()\n\n@regist... | python | edit | 1 | 5 | mit | 3439eb09916212cd71650aecc49ae1c22f650274 | nanuxbe/djangopackages,QLGu/djangopackages,cartwheelweb/packaginator,nanuxbe/djangopackages,nanuxbe/djangopackages,miketheman/opencomparison,QLGu/djangopackages,benracine/opencomparison,cartwheelweb/packaginator,audreyr/opencomparison,pydanny/djangopackages,miketheman/opencomparison,QLGu/djangopackages,benracine/openco... | apps/package/templatetags/package_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport collections\nimport math\nimport unittest\n\nimport raco.fakedb\nimport raco.myrial.interpreter as interpreter\nimport raco.myrial.parser as parser\nfrom raco.myrialang import compile_to_json\n\nclass MyrialTestCase(unittest.TestCa... | python | edit | 4 | 2 | bsd-3-clause | bf17a86bccf25ead90d11dd15a900cb784d9cb9f | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco | raco/myrial/myrial_test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.conf import settings\n\nclass Category(models.Model):\n\tuser = models.ForeignKey(settings.AUTH_USER_MODEL)\n\tname = models.CharField(max_length=21)\n\trow_number = models.IntegerField(default=0)\n... | python | edit | 1 | 1 | mit | b034eeda25fcf55e7da018f3c91a23a5e252ae2f | GSC-RNSIT/bookmark-manager,rohithpr/bookmark-manager,rohithpr/bookmark-manager,GSC-RNSIT/bookmark-manager | bm/app/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('numpy', parent_package, top_path)\n\n config.add_subpackage('compat')\n ... | python | edit | 1 | 1 | bsd-3-clause | 2bdc5c33b1e9eb394eb62533f4ae4df081ea1452 | seberg/numpy,mhvk/numpy,mattip/numpy,endolith/numpy,seberg/numpy,mattip/numpy,numpy/numpy,simongibbons/numpy,simongibbons/numpy,charris/numpy,endolith/numpy,charris/numpy,rgommers/numpy,rgommers/numpy,simongibbons/numpy,anntzer/numpy,pdebuyl/numpy,jakirkham/numpy,endolith/numpy,mattip/numpy,anntzer/numpy,jakirkham/nump... | numpy/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nGoogle.com testing example\n'''\n\nfrom seleniumbase import BaseCase\nfrom google_objects import HomePage, ResultsPage\n\n\nclass GoogleTests(BaseCase):\n\n def test_google_dot_com(self):\n self.open('http://www.google.com')\... | python | edit | 1 | 1 | mit | 5edddcc85b0e21bb576b71db63d082c8ace5cf70 | seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase | examples/boilerplates/samples/google_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDEBUG = True\n\nADMINS = (\n ('Zaphod Beeblebrox', '<EMAIL>'),\n)\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = '^lkajsdlfkjaoif09ijoi23092309i02[93ip2j3[r29u3[0923jorij'\n\nDATABASES = {\n 'defau... | python | edit | 1 | 0 | mit | dbe622d2297d62f61adf34e17de7c84d0cffbeaf | colbypalmer/cp-project-template,colbypalmer/cp-project-template,colbypalmer/cp-project-template | project/project/local_settings_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import (HttpResponse,\n HttpResponseNotFound)\nfrom django.contrib.gis.measure import D\nfrom working_waterfronts.working_waterfronts_api.models import PointOfInterest\nfrom working_waterfronts.worki... | python | edit | 3 | 3 | apache-2.0 | 92c58061d4460addbe75081090371814e1a5f580 | osu-cass/working-waterfronts-api,osu-cass/working-waterfronts-api,osu-cass/working-waterfronts-api | working_waterfronts/working_waterfronts_api/views/pointsofinterest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCreated on Feb 28, 2018\n\n@author: StarlitGhost\n\"\"\"\n\nfrom twisted.plugin import IPlugin\nfrom desertbot.moduleinterface import IModule, BotModule\nfrom zope.interface import implementer\n\n\n@implementer(IPlugin, IModule)\ncl... | python | edit | 1 | 2 | mit | 7b88a2e65b0010ceef49fdbce61949ee10420cd8 | DesertBot/DesertBot | desertbot/modules/utils/CommandHandler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport logging\n\nfrom flask import Blueprint, current_app, request\n\napi_v1_blueprint = Blueprint(\"api_v1\", __name__, url_prefix='/api/v1')\n\nlog = logging.getLogger('api')\n\n\n@api_v1_blueprint.after_request\... | python | edit | 4 | 3 | mit | 50fc79e1231eeb59f66a79c29abe2b843e6fd893 | joshfriend/atlas,joshfriend/atlas | atlas/api/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nflickrKey = \"\"\nflickrSecret = \"\"\n\nrecaptchaEnabled = False\nrecaptchaKey = \"\"\nrecaptchaSecret = \"\"\n\n\n```\n\nApply this change: Add default for debug in conf template"
},
{
"role": "assistant",
"content": "\nflic... | python | edit | 1 | 0 | bsd-3-clause | 4b065401e3679d479163bd825c0a3526f0ba1bdf | TimSC/auxgis | conf-template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport json\n\ndef render(json_data, env='', sls='', **kws):\n if not isinstance(json_data, basestring):\n json_data = json_data.read()\n\n if json_data.startswith('#!'):\n json_da... | python | edit | 2 | 4 | apache-2.0 | 5b8da0d318d7b37b3f1a3d868980507b15aa4213 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/renderers/json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport psutil\nimport os\nimport time\n\ndef create_bar(filled):\n low = '.'\n high = '|'\n if filled > 1:\n low = str(int(filled))\n high = str(int(filled + 1))\n filled = filled - int(f... | python | edit | 1 | 4 | mit | 2c87cc9a864cbcd0ff0668a348fda1ba82b8a74c | wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar | gensysinfo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"View overrides for demo mode.\n\"\"\"\n\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth import login\nfrom django.http import HttpResponseRedirect\n\n\ndef login_demo_account(request):\n new_user = authentic... | python | edit | 1 | 1 | mit | 3b75a6f3654e8f325060779ca56b6df93fe0cabe | churchlab/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone | genome_designer/main/demo_view_overrides.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport py.code\nimport pytest\n\n\ndef pytest_namespace():\n return {'raises_regexp': raises_regexp}\n\n\nclass raises_regexp(object):\n def __init__(self, expected_exception, regexp):\n self.exception = expected_exc... | python | edit | 1 | 4 | mit | b6f3c619e8c3fa375ac9b66e7ce555c77f02f152 | kissgyorgy/pytest-raisesregexp | pytest_raisesregexp/plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Copyright 2013 Rackspace Australia\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# a copy of the License a... | python | edit | 2 | 7 | apache-2.0 | 3ad64c06f917efdaa94ad5debc23941f4d95105a | rcbau/fuzzy-happiness | fuzzy_happiness/attributes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\nclass millipede:\n def __init__(self, size, comment=None):\n self._millipede = \"\"\n if comment:\n self._millipede = comment + \"\\n\\n\"\n\n self._millipede += \" ╚⊙ ⊙╝ \\n... | python | edit | 1 | 8 | bsd-3-clause | dbbd6e1e87964db6b2279a661a63751da31213e5 | evadot/millipede-python,getmillipede/millipede-python,moul/millipede-python,EasonYi/millipede-python,EasonYi/millipede-python,evadot/millipede-python,moul/millipede-python,getmillipede/millipede-python | millipede.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom simpy import Simulation, InterruptedException\n\ndef test_simple_process():\n def pem(ctx, result):\n while True:\n result.append(ctx.now)\n yield ctx.wait(1)\n\n result = []\n Simulation(pem, resu... | python | edit | 1 | 2 | mit | 8233abab6084db39df064b87d256fd0caffecb89 | Uzere/uSim | simpy/test/test_simulation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ndef fib(number: int) -> int:\n '''\n >>> fib(10)\n 55\n '''\n if number < 2:\n return number\n else:\n return fib(number-1) + fib(number-2)\n\n\ndef hello()... | python | edit | 1 | 2 | bsd-2-clause | 69cf5602ba9dd9d7e0a89c169682ac72e2e18a67 | wdv4758h/python-everywhere,wdv4758h/python-everywhere,wdv4758h/python-everywhere | everywhere/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nimport logging\nimport time\n\nif not os.path.exists(os.path.expanduser(\"~/.chatserver\")):\n os.makedirs(os.path.expanduser(\"~/.chatserver\"))\nlogging.basicConfig(filename=os.path.expanduser(\"~/.chatserver/cha... | python | edit | 1 | 0 | bsd-3-clause | a51f5e108f6fb81fce5d99b53888f2a2954fb9a6 | jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat | server_app/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.contrib.messages.utils import get_level_tags\n\n\nLEVEL_TAGS = get_level_tags()\n\nregister = template.Library()\n\n\n@register.simple_tag()\ndef get_message_tags(message):\n \"\"\"\n Returns t... | python | edit | 1 | 3 | mit | 2cb03ff8c3d21f36b95103eaf9ae0fb3e43077bd | foraliving/foraliving,druss16/danslist,grahamu/pinax-theme-bootstrap,foraliving/foraliving,grahamu/pinax-theme-bootstrap,druss16/danslist,jacobwegner/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,druss16/danslist,grahamu/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,foraliving/foraliving | pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib import quote\n\nfrom pylons import c, g\n\nfrom r2.lib.pages import Ads as BaseAds\nfrom r2.models.subreddit import DefaultSR\n\n\nclass Ads(BaseAds):\n def __init__(self):\n BaseAds.__init__(self)\n\n url_key =... | python | edit | 1 | 3 | bsd-3-clause | 1b0edd2eeb722397e9c6c7da04ab6cbd3865a476 | madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk | reddit_adzerk/adzerkads.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import FileImport\nfrom .importers import ImportFailure\nfrom django.db import transaction\nimport celery\n\n\nassuming_failure_message = '{0} did not return True. Assuming failure.'\n\n\nprocessing_status = 'processing'\nproce... | python | edit | 4 | 4 | mit | d20f9d5e56c4f430f6ca7b4ab03a279e34bbbd45 | monokrome/django-drift | importer/tasks.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: utf-8 -*-\n\nfrom __future__ import absolute_import, unicode_literals\n\n\nfrom flask import Flask\n\nfrom .middleware.me import me\nfrom .middleware import github, keybase, medium\nfrom .cache import ca... | python | edit | 1 | 4 | mit | ad558a5acc93e1e5206ed27b2dc679089b277890 | lord63/me-api | me_api/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\n# metadata set at startup\nRE.md['owner'] = 'xf11id'\nRE.md['beamline_id'] = 'CHX'\n# removing 'custom' as it is raising an exception in 0.3.2\n# gs.RE.md['custom'] = {}\n\n\n\ndef print_scanid(name, doc):\n if name == ... | python | edit | 7 | 2 | bsd-2-clause | bd3d97cefe61886ab8c2fa24eecd624ca1c6f751 | NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd | profile_collection/startup/90-settings.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom imgaug.augmenters.arithmetic import *\nfrom imgaug.augmenters.blur import *\nfrom imgaug.augmenters.color import *\nfrom imgaug.augmenters.contrast import GammaContrast, SigmoidContrast, LogContr... | python | edit | 12 | 0 | mit | 3973e0d2591b2554e96da0a22b2d723a71d2423e | aleju/ImageAugmenter,aleju/imgaug,aleju/imgaug | imgaug/augmenters/__init__.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom lemon import extradmin as admin\nfrom lemon.dashboard import views\nfrom lemon.dashboard.base import dashboard, Widget\n\n\nclass DashboardAdmin(admin.AppAdmin):\n\n instance = dashboard\n\n @p... | python | edit | 5 | 1 | bsd-3-clause | a284a69432b2e0052fd2da4121cf4512fc9423da | trilan/lemon,trilan/lemon,trilan/lemon | lemon/dashboard/admin.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nhas_qt = True\n\ntry:\n from matplotlib.backends.qt_compat import QtGui, QtCore, QtWidgets\nexcept ImportError:\n try:\n from matplotlib.backends.qt4_compat import QtGui, QtCore\n QtWidgets = QtGui\n except ImportErro... | python | edit | 1 | 1 | bsd-3-clause | 42b330e5629b25db45e7a0f3f08bdb21e608b106 | ClinicalGraphics/scikit-image,bsipocz/scikit-image,rjeli/scikit-image,juliusbierk/scikit-image,vighneshbirodkar/scikit-image,pratapvardhan/scikit-image,juliusbierk/scikit-image,keflavich/scikit-image,warmspringwinds/scikit-image,Britefury/scikit-image,oew1v07/scikit-image,bennlich/scikit-image,ClinicalGraphics/scikit-i... | skimage/viewer/qt.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.