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__author__ = 'brock'\n\n\"\"\"\nTaken from: https://gist.github.com/1094140\n\"\"\"\n\nfrom functools import wraps\nfrom flask import request, current_app\n\n\ndef jsonp(func):\n \"\"\"Wraps JSONified output for JSONP requests.\"\"\"\n ... | python | edit | 1 | 3 | bsd-3-clause | 2faca854148a0661946ac944e4b8aa0684c773f6 | Sendhub/flashk_util | request.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom .all_changes import AllChanges\nfrom .show_change import ShowChange\nfrom .changes_for_date import ChangesForDate\nfrom .changes_for_class import ChangesForClass\n\nall_routes = [\n (r'/', AllChanges),\n (r'/ch... | python | edit | 1 | 0 | bsd-3-clause | 6c351939243f758119ed91de299d6d37dc305359 | p22co/edaemon,paulsnar/edaemon,p22co/edaemon,p22co/edaemon,paulsnar/edaemon,paulsnar/edaemon | application/main/routes/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport bcrypt\n\nfrom sqlalchemy.schema import Column\nfrom sqlalchemy.types import Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\n\n__all__ = ['Base', 'Account']\n\nBase = declarative_base()\n\nMAX_STR_LEN = 256\... | python | edit | 3 | 2 | bsd-3-clause | 091b1f5eb7c999a8d9b2448c1ca75941d2efb926 | EclecticIQ/OpenTAXII,Intelworks/OpenTAXII,EclecticIQ/OpenTAXII,Intelworks/OpenTAXII | opentaxii/auth/sqldb/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\nimport sys\nimport subprocess\n\n\nclass BmiIlamb(object):\n _command = 'ilamb-run'\n _args = None\n _env = None\n\n def __init__(self):\n self._time = self.get_start_time()\n\n @property\n d... | python | edit | 3 | 2 | mit | 2bc2f7e077ad46903688aababa51d37853746231 | permamodel/bmi-ilamb | bmi_ilamb/bmi_ilamb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport requests\n\nclass Cache:\n extensions = [\"gif\", \"jpeg\", \"jpg\", \"png\"]\n\n def __init__(self, directory):\n self.directory = directory\n if not os.path.isdir(directory):\n os.mkdir(dir... | python | edit | 1 | 3 | isc | 9d0ba593ae5f7e23a1bd32573ad8e80dac6eb845 | helderm/stalkr,helderm/stalkr,helderm/stalkr,helderm/stalkr | stalkr/cache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Akanda, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#... | python | edit | 1 | 2 | apache-2.0 | 7439a2c4b73707dc301117d3d8d368cfc31bc774 | openstack/akanda-rug,openstack/akanda-rug,stackforge/akanda-rug,stackforge/akanda-rug | akanda/rug/api/keystone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 Luke San Antonio Bialecki\n# All rights reserved.\n\nfrom sqlalchemy.sql import and_\n\nfrom .models import Pass\n\n\ndef query_user_passes(session, user_id, verified=None):\n if verified:\n # Only verified pa... | python | edit | 1 | 4 | mit | 0bbe6a915f8c289a9960f3cba9354955a19854f4 | lukesanantonio/inpassing-backend,lukesanantonio/inpassing-backend | inpassing/pass_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, division, absolute_import\n\nimport sys\nimport os\nimport base64\n\n# See https://iterm2.com/images.html\nIMAGE_CODE = '\\033]1337;File={file};inline={inline};size={size}:{base64_img}\\a'\n\ndef image... | python | edit | 1 | 2 | mit | 5c5956dc11bbe9e65f6b9403cf0dbe5470eab257 | asmeurer/iterm2-tools | iterm2_tools/images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport six\n\nfrom .base import Property\nfrom . import vmath\n\n\nclass Vector(Prope... | python | edit | 1 | 7 | mit | dba22abf151ddee20aeb886e2bca6401a17d7cea | aranzgeo/properties,3ptscience/properties | properties/spatial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Author: Qiming Sun <<EMAIL>>\n#\n\n'''\nThe default XC functional library (libxc) supports the energy and nuclear\ngradients for range separated functionals. Nuclear Hessian and TDDFT gradients\nneed xcfun libra... | python | edit | 1 | 0 | apache-2.0 | 644896c856b1e6ad20a3790234439b8ac8403917 | sunqm/pyscf,sunqm/pyscf,sunqm/pyscf,sunqm/pyscf | examples/dft/12-camb3lyp.py | rejected_duplicate | Near-duplicate of sample 11111 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns\nfrom django.conf.urls import url\nfrom django.views.generic.base import RedirectView\nfrom django.core.urlresolvers import reverse_lazy\nfrom django.contrib.contenttypes.models import ContentType\nfrom... | python | edit | 1 | 2 | bsd-3-clause | eba55b9b4eb59af9a56965086aae240c6615ba1f | stefantsov/blackbox3,stefantsov/blackbox3,stefantsov/blackbox3 | author/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Implement an algorithm that will check whether a given grid of numbers represents a valid Sudoku puzzle\n\ndef check_rows(grid):\n\ti = 0\n\twhile i < len(grid):\n\t\tj = 0\n\t\tref_check = {}\n\t\twhile j < len(grid[i]):\n\t\t\tif grid[i... | python | edit | 1 | 7 | mit | ca9c4f7c3f1f7690395948b9dcdfd917cc33bfa8 | derekmpham/interview-prep,derekmpham/interview-prep | array/sudoku-check.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom threadless_router.router import Router\n\nfrom decisiontree.models import Session\n\nfrom celery.task import Task\nfrom celery.registry import tasks\n\nimport logging\nlogger = logging.getLogger()\n\nlogging.getLogger().setLevel(loggin... | python | edit | 1 | 2 | bsd-3-clause | 3974d63721c49564be638c9912ee3e940ca2695d | caktus/rapidsms-decisiontree-app,eHealthAfrica/rapidsms-decisiontree-app,ehealthafrica-ci/rapidsms-decisiontree-app,eHealthAfrica/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app,ehealthafrica-ci/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app | decisiontree/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TestSwiftFoundationValueTypes.py\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors\n# Licensed under Apache License v2.0 with Runtime Library Excep... | python | edit | 1 | 0 | apache-2.0 | 76be04b7474d9a12d45256c3f31719e3b2ac425d | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/test/lang/swift/foundation_value_types/data/TestSwiftFoundationTypeData.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.http import HttpResponse\nfrom django.contrib.admin.sites import AdminSite\nfrom django.contrib.auth.models import User\nfrom billjobs.admin import UserAdmin\n\nclass MockRequest(object):\n ... | python | edit | 1 | 1 | mit | 934ec1300e70be518021d5851bdc380fef844393 | ioO/billjobs | billjobs/tests/tests_export_account_email.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport subprocess\n\n\n# Compile examples and export them as images\n#\n# Dependencies:\n# * LaTeX distribution (MiKTeX or TeXLive)\n# * ImageMagick\n#\n# Known issue: ImageMagick's \"convert\" clashes... | python | edit | 1 | 0 | mit | 35aec417f31fce87ff31f255b0781352def48217 | mp4096/blockschaltbilder | examples/generate_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tastypie import fields\nfrom tastypie.resources import ModelResource\nfrom tastypie.authentication import ApiKeyAuthentication\nfrom tastypie.authorization import Authorization\nfrom subscription.models import Subscription, MessageSet\... | python | edit | 1 | 0 | bsd-3-clause | cb8fe795aff58078a16ae1fac655c04762145abd | praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control | subscription/api.py | rejected_duplicate | Near-duplicate of sample 360 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom requests.compat import basestring\n\n\nclass ODataPathParser(object):\n @staticmethod\n def parse_path_string(string):\n pass\n\n @staticmethod\n def from_method(method_name, method_parameters):\n url = \"\"\n... | python | edit | 1 | 6 | mit | b35befc9677541295609f4e55eea6fc2c4d7ab08 | vgrem/SharePointOnline-REST-Python-Client,vgrem/Office365-REST-Python-Client | office365/runtime/odata/odata_path_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\n\n\ndef select_for(data_type):\n \"\"\"The storage class for each datatype is defined in a settings file. This\n will look up the appropriate sto... | python | edit | 1 | 1 | cc0-1.0 | ebd829a4939a524283d5603ed86a916c7bf88bb9 | cmc333333/regulations-core,18F/regulations-core,eregs/regulations-core | regcore/db/storage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nGRAPHITE_API = os.environ.get('GRAPHITE_API')\nGRAPHITE_USER = os.environ.get('GRAPHITE_USER')\nGRAPHITE_PASS = os.environ.get('GRAPHITE_PASS')\nGRAPHITE_FROM = os.getenv('GRAPHITE_FROM', '-10minute')\nJENKINS_API = os.environ.... | python | edit | 1 | 0 | mit | 15c51102f8e9f37bb08f9f6c04c7da2d75250cd2 | arachnys/cabot,reddit/cabot,cmclaughlin/cabot,cmclaughlin/cabot,bonniejools/cabot,dever860/cabot,lghamie/cabot,jdycar/cabot,jdycar/cabot,movermeyer/cabot,xinity/cabot,lghamie/cabot,dever860/cabot,lghamie/cabot,dever860/cabot,cmclaughlin/cabot,arachnys/cabot,maks-us/cabot,mcansky/cabotapp,xinity/cabot,cmclaughlin/cabot,... | cabot/cabot_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cmd2 import Cmd, options, make_option\nimport h5_wrapper\nimport sys\nimport os\n\nclass CmdApp(Cmd):\n\n def do_ls(self, args, opts=None):\n for g in self.explorer.list_groups():\n print(g+\"/\")\n \n ... | python | edit | 5 | 6 | mit | b5601797b0e734514e5958be64576abe9fe684d7 | ksunden/h5cli | src/cli.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest_cram\n\npytest_plugins = \"pytester\"\n\n\ndef test_version():\n assert pytest_cram.__version__\n\n\ndef test_cramignore(testdir):\n testdir.makeini(\"\"\"\n [pytest]\n cramignore =\n sub/a*.t\n ... | python | edit | 1 | 1 | mit | c01b01bd8ab640f74da0796ac1b6f05f5dc3ebc1 | tbekolay/pytest-cram,tbekolay/pytest-cram | pytest_cram/tests/test_options.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Increment version because bad release"
},
{
"role": "assistant",
"content": "version_info = (0, 5, 2)\nversion = '.'.join(map(str, version_info))\n"
}
] | python | new_file | 1 | 0 | mit | 8753b17e4583ca84249234fa09c5669df7a9d6ff | johnwlockwood/txnats | txnats/_meta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pyinfra\n# File: pyinfra/modules/pip.py\n# Desc: manage virtualenvs\n\n'''\nManage Python virtual environments\n'''\n\nfrom __future__ import unicode_literals\n\nfrom pyinfra.api import operation\nfrom pyinfra.modules import files\n\n\n@o... | python | edit | 1 | 8 | mit | b0c27402da5522db7d8e1b65c81a28b3a19500b0 | Fizzadar/pyinfra,Fizzadar/pyinfra | pyinfra/modules/virtualenv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport django\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.contrib.staticfi... | python | edit | 1 | 0 | bsd-3-clause | 63f650855dfc707c6850add17d9171ba003bebcb | MarcJoan/django-ckeditor,gushedaoren/django-ckeditor,luzfcb/django-ckeditor,luzfcb/django-ckeditor,luzfcb/django-ckeditor,gushedaoren/django-ckeditor,zatarus/django-ckeditor,zatarus/django-ckeditor,Josephpaik/django-ckeditor,MarcJoan/django-ckeditor,gushedaoren/django-ckeditor,zatarus/django-ckeditor,MarcJoan/django-ck... | ckeditor_demo/urls.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 openslides.default.settings\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Global settings file.\n\n :copyright: 2011, 2012 by OpenSlides team, see AUTHORS.\n :license: GNU GPL, see... | python | edit | 3 | 0 | mit | 412e672ea12c691b423acfa1b67a7a2626d91b0d | emanuelschuetze/OpenSlides,jwinzer/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,boehlke/OpenSlides,boehlke/OpenSlides,CatoTH/OpenSlides,normanjaeckel/OpenSlides,normanjaeckel/OpenSlides,ostcar/OpenSlides,jwinzer/OpenSlides,rolandgeider/OpenSlides,rolandgeider/OpenSlides,emanuelschuetze/OpenSlides,jwinzer/OpenSlides,... | openslides/default.settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom werkzeug.routing import BaseConverter\nfrom flask import render_template, request, abort\nimport requests\n\nfrom ide import app\nfrom ide.projects import get_all_projects, Project\n\nMCLABAAS_URL = 'http://localhost:424... | python | edit | 1 | 2 | apache-2.0 | 8e0f2271b19504886728ccf5d060778c027c79ca | Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide,Sable/mclab-ide | ide/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport libtaxii\n\nproject = u'libtaxii'\ncopyright = u'2014, The MITRE Corporation'\nversion = libtaxii.__version__\nrelease = version\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.doctest',\n 'sphinx.ext.if... | python | edit | 1 | 0 | bsd-3-clause | 70c61b734940aed0ed4a491bc1169e1320d02998 | Intelworks/libtaxii,stkyle/libtaxii,TAXIIProject/libtaxii | docs/conf.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 Tests for the :mod:`retdec.test` module.\n\n :copyright: © 2015 by Petr Zemek <<EMAIL>> and contributors\n :license: MIT, see the ``LICENSE`` file for more details\n\"\"\"\n\nfrom retdec.exceptions import AuthenticationErr... | python | edit | 1 | 1 | mit | 07598bf67c3771391a5f3e287aab4b2c49180a05 | s3rvac/retdec-python | tests/test_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.views.generic import DetailView, ListView\n\nfrom .models import District\n\n\nclass DistrictListView(ListView):\n queryset = District.objec... | python | edit | 1 | 0 | mit | ac5b9765d69139915f06bd52d96b1abaa3d41331 | texastribune/scuole,texastribune/scuole,texastribune/scuole,texastribune/scuole | scuole/districts/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nTEST_TOKEN = 'azGDORePK8gMaC0QOYAMyEEuzJnyUi'\nTEST_USER = 'uQiRzpo4DXghDmr9QzzfQu27cmVRsG'\nTEST_GROUP = ''\nTEST_BAD_USER = '1234'\nTEST_DEVICES = ['droid2', 'iPhone']\nTEST_TITLE = 'Backup finished - SQL1'\nTEST_MESSAGE = 'Backup of data... | python | edit | 1 | 0 | mit | 543509e991f88ecad7e5ed69db6d3b175fe44351 | scolby33/pushover_complete | tests/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import models\nfrom django.db.models.signals import post_save\nfrom django.contrib.sites.models import Site\n... | python | edit | 1 | 2 | bsd-2-clause | 3f29248fc8159030417750e900a0e4c940883b4e | overshard/timestrap,overshard/timestrap,muhleder/timestrap,cdubz/timestrap,muhleder/timestrap,overshard/timestrap,cdubz/timestrap,muhleder/timestrap,cdubz/timestrap | conf/models.py | accepted | null | 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\"); 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/l... | python | edit | 1 | 1 | apache-2.0 | 924be2b545a4d00b9eacc5aa1c974e8ebf407c2f | stackforge/python-openstacksdk,openstack-infra/shade,openstack/python-openstacksdk,openstack/python-openstacksdk,openstack-infra/shade,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,jsmartin/shade,jsmartin/shade | shade/tests/unit/test_shade.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import OrderedDict\n\nfrom graphql.type.definition import GraphQLObjectType\nfrom marshmallow import Schema, SchemaOpts\n\nfrom polygraph.utils.trim_docstring import trim_docstring\n\n\nclass ObjectTypeOpts(SchemaOpts):\n ... | python | edit | 1 | 2 | mit | c9631819179eb99728c0ad7f3d6b46aef6dea079 | polygraph-python/polygraph | polygraph/types/object_type.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport argparse\nimport logging\nimport sys\n\n\nfrom . import __version__\nfrom .shell import Shell\n\ntry:\n raw_input\nexcept NameError:\n raw_input = input\n\n\nclass CLI(object):\n def ... | python | edit | 1 | 8 | apache-2.0 | b9b4089fcd7f26ebf339c568ba6454d538a1813e | harlowja/zk_shell,harlowja/zk_shell,rgs1/zk_shell,rgs1/zk_shell | zk_shell/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import unicode_literals\n\n\nclass Align:\n\n class __AlignData(object):\n\n @property\n def align_code(self):\n ... | python | edit | 1 | 1 | mit | 5536a2f330861631e411a064c9544ab732f0917a | thombashi/DataProperty | dataproperty/_align.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import Filth\n\n\nclass NamedEntityFilth(Filth):\n \"\"\"\n Named entity filth. Upon initialisation provide a label for named entity (e.g. name, org)\n \"\"\"\n type = 'named_entity'\n\n def __init__(self, *args, l... | python | edit | 1 | 1 | mit | 45ee26fae4a8d31b66e3307c0ab4aed21678b4b6 | deanmalmgren/scrubadub,datascopeanalytics/scrubadub,deanmalmgren/scrubadub,datascopeanalytics/scrubadub | scrubadub/filth/named_entity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom feincms.content.medialibrary.models import MediaFileContent\nfrom feincms.content.richtext.models import RichTextContent\nfrom feincms.content.section.models import SectionContent\n\n\nclass JsonRichTextContent(RichTextContent):\n c... | python | edit | 1 | 2 | bsd-2-clause | 623b170985a69a713db2d3c4887ed3b2ed8dc368 | incuna/feincms-extensions,incuna/feincms-extensions | feincms_extensions/content_types.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import absolute_import, print_function\n\n# Standard library\nfrom os import walk\nfrom os.path import exists, isdir, join\n\n# Local library\nfrom .util import is_py_file\nfrom .diff import diff_fil... | python | edit | 1 | 9 | bsd-2-clause | 18fec1124bb86f90183350e7b9c86eb946a01884 | punchagan/what-changed | whatchanged/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pprint\nimport maec.bindings.maec_bundle as maec_bundle_binding\nfrom maec.bundle.bundle import Bundle\n# Matching properties dictionary\nmatch_on_dictionary = {'FileObjectType': ['file_name'],\n 'WindowsRegistr... | python | edit | 5 | 0 | bsd-3-clause | 6c0e6e79c05b95001ad4c7c1f6ab3b505ffbd6a5 | MAECProject/python-maec | examples/comparator_example.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.conf.urls.defaults import patterns, include, url\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.conf import settings\n\nurlpatterns = patterns('',\n url(r'^api/', ... | python | edit | 1 | 0 | bsd-3-clause | a73dd1859dd21ede778a5404ca073ade0d5ef17c | niwinz/Green-Mine,niwinz/Green-Mine,niwinz/Green-Mine,niwinz/Green-Mine | src/greenmine/urls/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\n\nclass LoginLibrary:\n\n def __init__(self):\n self._sut_path = os.path.join(os.path.dirname(__file__),\n '..', 'sut', 'login.py')\n self._status = ''\n\n de... | python | edit | 1 | 2 | apache-2.0 | ffce8ea9bda95945e335fef75ba93b1066c795ac | Senseg/robotframework,userzimmermann/robotframework-python3,Senseg/robotframework,userzimmermann/robotframework-python3,Senseg/robotframework,userzimmermann/robotframework-python3,userzimmermann/robotframework-python3,userzimmermann/robotframework-python3,Senseg/robotframework,Senseg/robotframework | doc/quickstart/testlibs/LoginLibrary.py | rejected_duplicate | Near-duplicate of sample 17653 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWTForms Extended Widgets\n########################\n\nThis package aims to one day eventually contain advanced widgets for all the\ncommon web UI frameworks.\n\nCurrently this module contains widgets for:\n \n - Boostrap\n\n\"\"\"\n... | python | edit | 2 | 0 | mit | 2a08a8a6d5cdac0ddcbaf34977c119c5b75bbe8d | nickw444/wtforms-webwidgets | wtforms_webwidgets/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom os.path import dirname, abspath\nimport sys\n\nfrom django.conf import settings\n\nif not settings.configured:\n from django import VERSION\n settings_dict = dict(\n INSTALLED_APPS=(\n '... | python | edit | 1 | 3 | mit | 3c833053f6da71d1eed6d1a0720a1a8cb1997de7 | extertioner/django-localeurl,gonnado/django-localeurl,carljm/django-localeurl | runtests.py | rejected_duplicate | Near-duplicate of sample 11670 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates.\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport spe... | python | edit | 1 | 1 | apache-2.0 | 8244b6196ce84949e60174f844f80357c8a23478 | facebook/wangle,facebook/wangle,facebook/wangle | build/fbcode_builder/specs/fbthrift.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals\n\n\nPROGRAM_NAME = \"sqlitebiter\"\nMAX_VERBOSITY_LEVEL = 2\n\nIPYNB_FORMAT_NAME_LIST = [\"ipynb\"... | python | edit | 1 | 0 | mit | ea3f4934ffa8b88d8716f6550134c37e300c4003 | thombashi/sqlitebiter,thombashi/sqlitebiter | sqlitebiter/_const.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"\nA minimal front end to the Docutils Publisher, producing HTML.\n\"\"\"\n\nimport locale\n\nfrom docutils.core import publish_cmdline, default_description\nfrom docutils.parsers.rst import directives\nfrom d... | python | edit | 1 | 0 | mit | 989abb47041e6a172765453c750c31144a92def5 | rst2pdf/rst2pdf,rst2pdf/rst2pdf | doc/rst2html-manual.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ..models import Block\nfrom django.template import Library\n\nregister = Library()\n\n@register.simple_tag\ndef show_block(name):\n try:\n return Block.objects.get(name=name).content\n except Block.DoesNotExist:\n r... | python | edit | 1 | 10 | bsd-3-clause | 18818a8dfebcc44f9e8b582c15d6185f9a7a0c45 | adieu/allbuttonspressed,adieu/allbuttonspressed | minicms/templatetags/cms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport sys\ntry:\n from StringIO import StringIO\nexcept ImportError:\n from io import StringIO # NOQA\n\nfrom flake8.mccabe import get_code_complexity\n\n\n_GLOBAL = \"\"\"\\\n\nfor i in range(10):\n pass\n\nd... | python | edit | 1 | 1 | mit | df6375c952f0681a3f66596ca77701db8a193b6b | wdv4758h/flake8,lericson/flake8 | flake8/tests/test_mccabe.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright (c) 2010 rPath, Inc.\n#\n# All Rights Reserved\n#\n\nfrom django.http import HttpResponse\nfrom django_restapi import resource\n\nfrom mint.django_rest.deco import requires\nfrom mint.django_rest.rbuilder.inventory import mod... | python | edit | 1 | 2 | apache-2.0 | 1b63781465abcc19df053a283148ea48436b8152 | sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint | mint/django_rest/rbuilder/inventory/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom machete.issues.models import Issue\n\nimport unittest\nclass CreateTest(unittest.TestCase):\n pass\n\n\n\n```\n\nApply this change: Add Unit-Tests Around Issue and Severity Creation and Association"
},
{
"role": "assistant... | python | edit | 3 | 1 | bsd-3-clause | 3db1ba530ea21baac3f42f56a2a49e85d8d9d18f | rustyrazorblade/machete,rustyrazorblade/machete,rustyrazorblade/machete | machete/issues/tests/test_create.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport factory\nimport random\n\nfrom .models import Location, Region\n\n\nclass RegionFactory(factory.Factory):\n FACTORY_FOR = Region\n\n name = factory.Sequence(lambda n: \"Region_%s\" % n)\n slug = factory.La... | python | edit | 1 | 0 | mit | 4e6ee7ed1d0e6cc105dad537dc79e12bdcbe9a40 | sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/ritmserdtsa | geozones/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Monary - Copyright 2011-2013 David J. C. Beach\n# Please see the included LICENSE.TXT and NOTICE.TXT for licensing information.\n\nimport os\nfrom os import listdir\nfrom os.path import isfile, join\nfrom inspect import getmembers, isfunc... | python | edit | 2 | 9 | apache-2.0 | 2efff9eb852ec2a8f38b4c21ecc6e62898891901 | ksuarz/monary,ksuarz/mongo-monary-driver,ksuarz/monary,ksuarz/monary,ksuarz/mongo-monary-driver,ksuarz/monary,ksuarz/monary,ksuarz/monary | test/run_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Midokura SARL\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the ... | python | edit | 1 | 1 | apache-2.0 | 658587192ad4dbd56a655015bb4225cb965e60fa | openstack/neutron-fwaas,openstack/neutron-fwaas | neutron_fwaas/tests/tempest_plugin/plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\nfrom .pipeline import *\n\n\n# Debug Settings\nDEBUG = True\n\nTEMPLATE_DEBUG = True\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static_final')\n\n# TMP Dir for Choropleth Screenshots\nIMAGE_EXPORT_TMP_DIR = os.path.join('... | python | edit | 10 | 0 | bsd-3-clause | 473e0536f388846fccf48ad75100f9e09b574610 | unt-libraries/texas-choropleth,damonkelley/texas-choropleth,unt-libraries/texas-choropleth,unt-libraries/texas-choropleth,unt-libraries/texas-choropleth,damonkelley/texas-choropleth,damonkelley/texas-choropleth,damonkelley/texas-choropleth | src/texas_choropleth/settings/local.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom rest_framework import serializers\n\nfrom message.models import Message\n\n\nclass MessageSerializer(serializers.ModelSerializer):\n class Meta:\n model = Message\n\n\nclass MapMessageSerializer(ser... | python | edit | 1 | 0 | mit | f2703d18fc758033e7df582772b3abb973497562 | sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/flowofkindness | message/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\r\nThis action removes all the zip files from CloudBolt /tmp/systemd-private* directory.\r\n\"\"\"\r\nfrom common.methods import set_progress\r\nimport glob\r\nimport os\r\n\r\ndef run(job, *args, **kwargs):\r\n \r\n zip_file_l... | python | edit | 5 | 3 | apache-2.0 | 03d4c298add892e603e48ca35b1a5070f407d6ff | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | actions/cloudbolt_plugins/recurring_jobs/remove_.zip_from_tmp.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# General utility library\nfrom re import match\nimport inspect\nimport sys\nimport ctypes\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef comma_sep_list(lst):\n \"\"\"Set up string or list to URL list parameter format\"... | python | edit | 2 | 5 | unlicense | 617919d11722e2cc191f3dcecabfbe08f5d93caf | CodingAnarchy/Amon | lib/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import Flask\nfrom flask_split import split\nfrom redis import Redis\n\n\nclass TestCase(object):\n def setup_method(self, method):\n self.redis = Redis()\n self.redis.flushall()\n ... | python | edit | 1 | 1 | mit | e98134e112482cd6f3f01148994b331c9cb6f6ba | jpvanhal/flask-split,jpvanhal/flask-split,jpvanhal/flask-split | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom channels import Group\nfrom channels.auth import channel_session_user, channel_session_user_from_http\n\nfrom django.dispatch import receiver\nfrom django.db.models.signals import post_save\n\nfrom event.models import Ev... | python | edit | 1 | 2 | mit | db32e404651533acb857c59a565f539805011c7f | FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack | user/consumers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cherrypy\nimport webob\nfrom turbogears import expose\n\n\nclass Controller(object):\n\n def __init__(self, wsroot):\n self._wsroot = wsroot\n\n @expose()\n def default(self, *args, **kw):\n req = webob.Request... | python | edit | 1 | 1 | mit | 392ef4148f477105610bb95d62e6f5685ed38501 | stackforge/wsme | wsme/tg1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests for riak contacts backend and collection.\n\"\"\"\n\nfrom twisted.trial.unittest import TestCase\nfrom zope.interface.verify import verifyObject\n\nfrom go_api.collections import ICollection\n\nfrom go_contacts.backends.riak i... | python | edit | 1 | 1 | bsd-3-clause | f7f1960176c32569397441229a0a3bcac926cd82 | praekelt/go-contacts-api,praekelt/go-contacts-api | go_contacts/backends/tests/test_riak.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom spec import Spec, eq_, skip, ok_, raises\n\nfrom invoke.parser import Argument\n\n\nclass Argument_(Spec):\n def may_take_names_list(self):\n names = ('--foo', '-f')\n a = Argument(names=names)\n for name in nam... | python | edit | 4 | 2 | bsd-2-clause | 7e6a8de053383a322ecc2416dc1a2700ac5fed29 | mattrobenolt/invoke,singingwolfboy/invoke,frol/invoke,pyinvoke/invoke,pfmoore/invoke,tyewang/invoke,frol/invoke,pyinvoke/invoke,mattrobenolt/invoke,pfmoore/invoke,kejbaly2/invoke,mkusz/invoke,mkusz/invoke,kejbaly2/invoke,sophacles/invoke,alex/invoke | tests/argument.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom cStringIO import StringIO\nfrom nose.tools import *\n\nfrom parse import EeyoreLexer\n\ndef _lex( string ):\n return list( EeyoreLexer.Lexer( StringIO( string ) ) )\n\ndef _assert_token( token, text, tp, line = None, col = None ):... | python | edit | 8 | 3 | mit | a3811c7ba8ac59853002e392d29ab4b3800bf096 | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper | src/test/testlexer.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport unittest\nimport numpy as np\nfrom corfunc import porod, guinier, fitguinier\n\n\nclass TestStringMethods(unittest.TestCase):\n def test_porod(self):\n self.assertEqual(porod(1, 1, 0), 1)\n\n def tes... | python | edit | 1 | 1 | mit | c9340c70bd6d974e98244a1c3208c3a061aec9bb | rprospero/corfunc-py | tests/cortests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom freezegun import freeze_time\nfrom jinja2 import Environment, exceptions\nimport pytest\n\n\n@pytest.fixture(scope='session')\ndef environment():\n return Environment(extensions=['jinja2_time.TimeExtension... | python | edit | 1 | 1 | mit | 1d7cd9fd4bd52cc5917373ff543c5cdb2b22e9bb | hackebrot/jinja2-time | tests/test_now.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.core.urlresolvers import reverse\n\nfrom jmbo.admin import ModelBaseAdmin\n\nfrom jmbo_twitter import models\n\n\nclass FeedAdmin(ModelBaseAdmin):\n inlines = []\n list_display = ('title',... | python | edit | 1 | 2 | bsd-3-clause | 7356dd66137cbb606c3026802ff42ab666af6c08 | praekelt/jmbo-twitter,praekelt/jmbo-twitter,praekelt/jmbo-twitter | jmbo_twitter/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 Managed I.T.\n#\n# Author: Kiall Mac Innes <<EMAIL>>\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 th... | python | edit | 1 | 1 | apache-2.0 | e0eeba656b42ddd2d79bd0f31ad36d64a70dfda0 | kiall/designate-py3,openstack/designate,tonyli71/designate,cneill/designate,cneill/designate-testing,richm/designate,muraliselva10/designate,NeCTAR-RC/designate,muraliselva10/designate,kiall/designate-py3,melodous/designate,cneill/designate,kiall/designate-py3,ionrock/designate,melodous/designate,tonyli71/designate,ram... | moniker/backend/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ncollect_ignore = []\n\ntry:\n import asyncio\nexcept ImportError:\n collect_ignore.append('test_asyncio.py')\n\n```\n\nApply this change: Exclude asyncio tests from 3.4"
},
{
"role": "assistant",
"content": "from sys impor... | python | edit | 1 | 0 | mit | 532c80a61bb428fa9b2d73cfd227dc6e95a77c00 | jfhbrook/pyee | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nimport time\nimport unittest\n\n\nclass ReplyTestCase(unittest.TestCase):\n\n def test_base_reply(self):\n from wechatpy.replies import TextReply\n... | python | edit | 1 | 1 | mit | d5458286244d2ba14fe0af33a9e8fdc9ab728669 | cloverstd/wechatpy,wechatpy/wechatpy,cysnake4713/wechatpy,tdautc19841202/wechatpy,zaihui/wechatpy,hunter007/wechatpy,Luckyseal/wechatpy,cysnake4713/wechatpy,navcat/wechatpy,Luckyseal/wechatpy,mruse/wechatpy,chenjiancan/wechatpy,mruse/wechatpy,zhaoqz/wechatpy,zhaoqz/wechatpy,EaseCloud/wechatpy,zaihui/wechatpy,tdautc1984... | tests/test_replies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import gettext_lazy as _\nfrom django.urls import reverse\n\n\nclass DocumentConfig(AppConfig):\n name = 'froide.document'\n verbose_name = _('Document')\n\n def read... | python | edit | 1 | 2 | mit | dd9344755c2bb573b77788b5ad6afa06576d0ae1 | stefanw/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide | froide/document/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom django.conf import settings\nfrom django.core.management.base import NoArgsCommand\n\nfrom mailer.engine import send_all\n\n\n# allow a sysadmin to pause the sending of mail temporarily.\nPAUSE_SEND = getattr(settings... | python | edit | 1 | 3 | mit | 1f3577ab890d1b4ba2382e4b5be2500e7e610fbe | DarkHorseComics/django-mailer | mailer/management/commands/send_mail.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass CampaignConfig(AppConfig):\n name = \"froide.campaign\"\n verbose_name = _(\"Campaign\")\n\n def ready(self):\n from froide... | python | edit | 1 | 1 | mit | dedb1736e333ec98c79bc4f8b494869e9e9be4da | fin/froide,fin/froide,fin/froide,fin/froide | froide/campaign/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom drupdates.utils import *\nfrom drupdates.repos import *\n\n'''\nNote: you need an ssh key set up with Stash to make this script work\n'''\n\nclass repolist(repoTool):\n\n def __init__(self):\n currentDir = os.path.dirname(os.path.r... | python | edit | 7 | 3 | mit | c017d8fa711724fc7acb7e90b85f208be074d1ec | jalama/drupdates | drupdates/plugins/repolist/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom installer_config.models import EnvironmentProfile\nfrom installer_config.models import UserChoice, Step\n\n\n# class PackageAdmin(admin.ModelAdmin):\n# model = Package\n# list_display = ('id', ... | python | edit | 1 | 0 | mit | 508965ffac8b370cbc831b394b8939c26793f58c | alibulota/Package_Installer,alibulota/Package_Installer,ezPy-co/ezpy,ezPy-co/ezpy | installer/installer_config/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Change to account for the move of the breakrule call"
},
{
"role": "assistant",
"content": "from tms.workday import WorkDay\nfrom tms.scraper import scraper\nfrom tms.workweek import WorkWeek\nfrom tms.breakrule import BreakRule"... | python | new_file | 6 | 0 | mit | d4ef63250075dbbefbeed4bb37e8679f1ae2495f | marmstr93ng/TimeManagementSystem,marmstr93ng/TimeManagementSystem | tms/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Tweepy\n# Copyright 2009-2010 Joshua Roesslein\n# See LICENSE for details.\n\nfrom __future__ import print_function\n\nimport six\n\nclass TweepError(Exception):\n \"\"\"Tweepy exception\"\"\"\n\n def __init__(self, reason, response... | python | edit | 1 | 4 | mit | f76086c1900bce156291e2180827570477342f70 | svven/tweepy,tweepy/tweepy | tweepy/error.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, abort, request\nfrom config import parse\nfrom bson.json_util import dumps\n\nconfig = parse('config.yml')\n\napp = Flask(__name__)\n\n#TODO: add more depth here\n@app.route('/health')\ndef get_health():\n return... | python | edit | 1 | 3 | mit | 44ea85224eec34376194349d01938aa7fc3cf3d1 | Daerdemandt/dota2league-tracker | dota2league-tracker/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\n\nimport io\n\nfrom hypothesis import given\nfrom hypothesis.strategies import lists, integers\n\nfrom sensibility import Program, vocabulary\n#semicolon = vocabulary.to_index(';')\n\n\n@give... | python | edit | 1 | 1 | apache-2.0 | 9ad4944b8c37902e80c684f8484105ff952f3dba | naturalness/sensibility,naturalness/sensibility,naturalness/sensibility,naturalness/sensibility | tests/test_program.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015, Matt Layman\n\ntry:\n from unittest import mock\nexcept ImportError:\n import mock\n\nfrom tap.plugins import pytest\nfrom tap.tests import TestCase\nfrom tap.tracker import Tracker\n\n\nclass TestPytestPlugin(Te... | python | edit | 1 | 1 | bsd-2-clause | d81a6930d21262464ee06ae8afb51b65920f378c | mblayman/tappy,python-tap/tappy,Mark-E-Hamilton/tappy | tap/tests/test_pytest_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase, mock\n\nfrom invoke.runner import Result\n\nfrom semantic_release.git_helpers import commit_new_version, get_commit_log\n\n\nclass GetCommitLogTest(TestCase):\n def test_first_commit_is_not_initial_commit(s... | python | edit | 1 | 1 | mit | 8354cfd953bb09723abcff7fefe620fc4aa6b855 | relekang/python-semantic-release,relekang/python-semantic-release,wlonk/python-semantic-release,riddlesio/python-semantic-release,jvrsantacruz/python-semantic-release | tests/test_git_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n ydf/templating\n ~~~~~~~~~~~~~~\n\n Contains functions to be exported into the Jinja2 environment and accessible from templates.\n\"\"\"\n\nimport jinja2\nimport os\n\nfrom ydf import instructions, __version__\n\n\nDEFAULT... | python | edit | 1 | 1 | apache-2.0 | 0ab7d60f02abe3bd4509c3377ebc6cb11f0a5e0f | ahawker/ydf | ydf/templating.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis migration subscribes each user to USER_SUBSCRIPTIONS_AVAILABLE if a subscription\ndoes not already exist.\n\"\"\"\n\nimport logging\nimport sys\n\nfrom website.app import init_app\nfrom website import models\nfrom website.notif... | python | edit | 1 | 6 | apache-2.0 | 3b2dab6b7c7a2e0f155825d2819c14de20135fd1 | caneruguz/osf.io,alexschiller/osf.io,rdhyee/osf.io,SSJohns/osf.io,DanielSBrown/osf.io,HalcyonChimera/osf.io,chrisseto/osf.io,mfraezz/osf.io,aaxelb/osf.io,mattclark/osf.io,baylee-d/osf.io,CenterForOpenScience/osf.io,samchrisinger/osf.io,cslzchen/osf.io,laurenrevere/osf.io,chennan47/osf.io,caseyrollins/osf.io,mfraezz/osf... | scripts/add_global_subscriptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import defaultdict\nfrom django.http import QueryDict\nfrom google.appengine.ext import db\nfrom google.appengine.ext.db import djangoforms\nfrom charter.models import Chart, ChartDataSet, DataRow\nfrom charter.form_utils i... | python | edit | 6 | 1 | bsd-3-clause | 6b4df3c1784cf2933933fc757c9a097909709ea1 | justinabrahms/permachart,justinabrahms/permachart | permachart/charter/forms.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2012 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"\nVerifies that the 'Profile' attribute in VCLin... | python | edit | 1 | 1 | bsd-3-clause | be1199ac1f6c086c17c4c39d54ca1e160d0508cf | csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp | test/win/gyptest-link-pdb.py | rejected_duplicate | Near-duplicate of sample 5602 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup, Extension\n\nmodule1 = Extension('foolib',\n define_macros = [('MAJOR_VERSION', '1'),\n ('MINOR_VERSION', '0')],\n sources = ['fooli... | python | edit | 1 | 0 | apache-2.0 | 4018f7414ca88cc51cf05591f9aec44e5d4b4944 | tomkraljevic/polyglot-to-cxx-examples,tomkraljevic/polyglot-to-cxx-examples,tomkraljevic/polyglot-to-cxx-examples | python/foolib/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom ... import load as load_spacy\n\n\ndef test_issue913(en_tokenizer):\n '''Test that spaCy doesn't hang on many periods.'''\n string = '0'\n for i in range(1, 100):\n string += '.%d' % i\n doc = en_token... | python | edit | 4 | 2 | mit | 1dca7eeb036423d1d5889e5ec084f9f91f90eb74 | honnibal/spaCy,raphael0202/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,recognai/spaCy,G... | spacy/tests/regression/test_issue957.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport sys\n\nPY3 = sys.version_info[0] == 3\nPY2 = sys.version_info[0] == 2\n\nif PY3:\n import builtins\n from queue import Queue, Empty\n from itertools import ... | python | edit | 14 | 7 | bsd-3-clause | 956d68b6e29b1e319d043945393db3825b5167d1 | blaze/dask,blaze/dask,mrocklin/dask,gameduell/dask,wiso/dask,mraspaud/dask,PhE/dask,cowlicks/dask,wiso/dask,dask/dask,PhE/dask,ContinuumIO/dask,jakirkham/dask,mraspaud/dask,jakirkham/dask,pombredanne/dask,jayhetee/dask,jayhetee/dask,ssanderson/dask,dask/dask,mikegraham/dask,clarkfitzg/dask,jcrist/dask,pombredanne/dask,... | dask/compatibility.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tip.algorithms.sorting.mergesort import mergesort\n\n\nclass TestMergesort():\n \"\"\"Test class for Merge Sort algorithm.\"\"\"\n\n def test_mergesort_basic(self):\n \"\"\"Test basic sorting.\"\"\"\n unsorted_list ... | python | edit | 1 | 1 | unlicense | bcccd3aec5fdf64d2730d895ee7fbfc740fd9809 | davidgasquez/tip | tests/test_sorting.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport aiohttp\n\nimport pytest\n\nfrom bottery.platform.telegram.api import TelegramAPI\n\n\ndef test_platform_telegram_api_non_existent_method():\n api = TelegramAPI('token', aiohttp.ClientSession)\n with pytest.raises(AttributeErro... | python | edit | 1 | 1 | mit | dffa52e4c72d274dcefdc4c6bbe44b30ed541f89 | rougeth/bottery | tests/test_platform_telegram.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom thefuck.rules.git_push import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.fixture\ndef stderr():\n return '''fatal: The current branch master has no upstream branch.\nTo push the current branc... | python | edit | 1 | 1 | mit | 934eeaf4fcee84f22c4f58bdebc1d99ca5e7a31d | nvbn/thefuck,nvbn/thefuck,Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,SimenB/thefuck,Clpsplug/thefuck,scorphus/thefuck,scorphus/thefuck,mlk/thefuck | tests/rules/test_git_push.py | rejected_duplicate | Near-duplicate of sample 640 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\n\nimport os\n\n\napp = Flask(__name__)\napp.debug = True\n\n# Secret Key setting based on debug setting\nif app.debug:\n app.secret_key = \"T3st_s3cret_k3y!~$@\"\nelse:\n app.secret_key = os.urandom(30)\n\n\n@... | python | edit | 1 | 3 | apache-2.0 | 5b162e1f6f1512e72257e1e5fa01435f4529537f | bunseokbot/proxy_register,bunseokbot/proxy_register | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyglet\n\n\ndef draw_card():\n pyglet.graphics.draw(4, pyglet.gl.GL_QUADS,\n ('v2i',\n (10, 15,\n 10, 35,\n 20, 35,\n ... | python | edit | 1 | 2 | mit | 48402464f8e1feb9b50c0c98003bc808a7c33ed9 | SingingTree/CardMatchPyglet | card_match.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tornado.ioloop\nimport tornado.web\nfrom tornado.websocket import WebSocketHandler\nfrom tornado import template\n\n\nclass MainHandler(tornado.web.RequestHandler):\n\n DEMO_TURN = {\n 'player_id': 'abc',\n 'player_t... | python | edit | 1 | 1 | apache-2.0 | 18e6f40dcd6cf675f26197d6beb8a3f3d9064b1e | ohmygourd/dewbrick,ohmygourd/dewbrick,ohmygourd/dewbrick | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Rover:\n\n compass = ['N', 'E', 'S', 'W']\n\n def __init__(self, x=0, y=0, direction='N'):\n self.x = x\n self.y = y\n self.direction = direction\n\n @property\n def position(self):\n return sel... | python | edit | 1 | 4 | mit | b18cea920e5deea57adabd98872f0a6fa0490e33 | authentik8/rover | rover.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom jmbo.models import Image, ModelBase\nfrom link.models import Link\n\nfrom banner.styles import BANNER_STYLE_CLASSES\n\n\nclass Banner(ModelBase):\... | python | edit | 1 | 0 | bsd-3-clause | f8d793eef586f2097a9a80e79c497204d2f6ffa0 | praekelt/jmbo-banner,praekelt/jmbo-banner | banner/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# First bug quest tile.\nfrom weatbag import words\nimport weatbag\n\nclass Tile:\n def __init__(self):\n self.bug_is_here = True\n self.first_visit = True\n self.hasnt_gone_south = True\n pass\n\n def desc... | python | edit | 5 | 5 | mit | 2e8956d6401daef2793724dfb981e6b41d685457 | jantuomi/weatbag,takluyver/weatbag | weatbag/tiles/s1e1.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef selection_sort(nums):\n \"\"\"Selection Sort algortihm.\n\n Time complexity: O(n^2).\n Space complexity: O(1).\... | python | edit | 1 | 4 | bsd-2-clause | e0ba0ea428fb4691b43d9be91b22105ce5aa0dc6 | bowen0701/algorithms_data_structures | alg_selection_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef lazyproperty(fn):\n @property\n def _lazyproperty(self):\n attr = \"_\" + fn.__name__\n if not hasattr(self, attr):\n setattr(self, attr, fn(self))\n return getattr(self, attr)\n\n return _lazypr... | python | edit | 1 | 2 | mit | c3eac81cffbfbb2cc00629d6c773e7b2e985d071 | msanders/cider | cider/_lib.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.