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": "Write python code for the following: Update dev branch to 0.16.0b"
},
{
"role": "assistant",
"content": "# This is the only location where the version will be written and changed.\n# Based on https://packaging.python.org/single_source_version/\n__version__ = '0.16.0... | python | new_file | 1 | 0 | mit | 415d0bc36e509303242d32c5fc2f994346cbdb3c | pastas/pasta,pastas/pastas | pastas/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright Datacratic 2016\n# Author: Jean Raby <<EMAIL>>\n\n# This script is called by runsv when the mldb service exits.\n# See http://smarden.org/runit/runsv.8.html for more details.\n# Two arguments are given to ... | python | edit | 3 | 0 | apache-2.0 | 1f1699bb7b8cf537b8d2e206ac0ff03b74d5b3a7 | mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb | container_files/init/mldb_finish.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n\nfrom sethji.model.sync import SyncAws\nfrom sethji.views.account import requires_login\nfrom flask import Blueprint, redirect, url_for, flash, request\n\n\nmod = Blueprint('sync', __name__, url_prefix='/sync')\... | python | edit | 1 | 1 | mit | b6052b35235a09f508aa75012badc830df8bcfa0 | rohit01/sethji,rohit01/sethji,rohit01/sethji | sethji/views/sync.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"SimPhoNy: Simulation framework for multi-scale phenomena in micro-\n and nanosystems.\n\nSimPhoNy is an EU-project funded by the 7th Framework Programme (Project\n number 604005) under the call NMP.2013.1.4-1:... | python | edit | 1 | 0 | bsd-2-clause | adb4e5bcf08dc8703cbd5dbd651e1fef3afbbbad | simphony/simphony-common | simphony/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n\nrun.py makes it easy to start Flask's built-in development webserver.\n\nTo start a development server, ensure all the necessary packages are\ninstalled: (I suggest setting up a Virtualenv for this)\n\n$ pip... | python | edit | 3 | 0 | bsd-2-clause | eac383015161f661de33a94dae958a21761071dc | nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,ZachAnders/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs | zeus/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.messages.storage.base import BaseStorage, Message\n\n\ndef get_login_url(url):\n \"\"\"Returns an expected login URL.\"\"\"\n return ('%s?next=%s' % (reverse('auth_logi... | python | edit | 1 | 2 | bsd-3-clause | 9f3f9229718694570d7b56fe6cd63478f59f0de5 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/common/tests/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom corvus.client import Corvus\n\ndef main():\n corvus = Corvus()\n corvus.init_drive()\n total_sectors = corvus.get_drive_capacity(1)\n with open(\"image.bin\", \"wb\") as f:\n for i in range(total_sectors)... | python | edit | 1 | 4 | bsd-3-clause | fa8e30c2b41e8078ca87a73cc90c2652c46b1ee0 | mnaberez/corvus | corvus/console.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .query import Q\nfrom .filter import F\nfrom .aggs import A\nfrom .function import SF\nfrom .search import Search\nfrom .field import *\nfrom .document import DocType\nfrom .mapping import Mapping\nfrom .index import Index\nfrom .analy... | python | edit | 16 | 0 | apache-2.0 | cdcecaad78b8acf1c067c5eb631e6c3ae7167c2c | sangheestyle/elasticsearch-dsl-py,3lnc/elasticsearch-dsl-py,elastic/elasticsearch-dsl-py,harshmaur/elasticsearch-dsl-py,solarissmoke/elasticsearch-dsl-py,Quiri/elasticsearch-dsl-py,harshit298/elasticsearch-dsl-py,f-santos/elasticsearch-dsl-py,reflection/elasticsearch-dsl-py,REVLWorld/elasticsearch-dsl-py,ziky90/elastic... | elasticsearch_dsl/__init__.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport factory\n\nfrom django.contrib.auth import get_user_model\n\n\nclass UserFactory(factory.DjangoModelFactory):\n FACTORY_FOR = get_user_model()\n name = factory.Sequence(lambda i: 'Test User {}'.format(i))\n email = factory.S... | python | edit | 1 | 2 | bsd-2-clause | 38221a3d8df945981f9595842871b5dae6a68c0f | incuna/django-user-management,incuna/django-user-management | user_management/models/tests/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef read_file(filename):\n # Open the file\n file_obj = open(filename)\n\n # Iterate over lines in the file\n for line in file_obj:\n\n # Split line by spaces (creates a list)\n # Alternatives: split(',')\n ... | python | edit | 2 | 3 | mit | a12ea60be17dabf837984e03162ebff152f0fd21 | dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops | examples/project_one/input.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models.signals import post_delete\nfrom django.dispatch import receiver\n\nfrom oscar.core.loading import get_model\n\nConditionalOffer = get_model('offer', 'ConditionalOffer')\nCondition = get_model('offer', 'Condition')\nBe... | python | edit | 1 | 5 | bsd-3-clause | b0231d8d8832559a2e5382c3e0ad47e6d6232761 | sasha0/django-oscar,sasha0/django-oscar,sasha0/django-oscar,solarissmoke/django-oscar,solarissmoke/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,sonofatailor/django-oscar,solari... | src/oscar/apps/offer/signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 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\nimport sys\n\nimport recipe_util # pylint: disable=F0401\n\n\n# This... | python | edit | 1 | 2 | bsd-3-clause | 8769224d8dbe73e177d19012d54c9bb7e114a3fa | sarvex/depot-tools,fracting/depot_tools,sarvex/depot-tools,azunite/chrome_build,disigma/depot_tools,duongbaoduy/gtools,fracting/depot_tools,hsharsha/depot_tools,Midrya/chromium,hsharsha/depot_tools,ajohnson23/depot_tools,gcodetogit/depot_tools,npe9/depot_tools,mlufei/depot_tools,primiano/depot_tools,chinmaygarde/depot_... | recipes/webrtc.py | rejected_duplicate | Near-duplicate of sample 15221 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom time import time, sleep\n\nfrom .net_utils import *\n\nlogger = logging.getLogger(__name__)\n\ndef target_scaner(interface, min_interval=30):\n old_peers = {}\n while True:\n begin_time = time()\n pe... | python | edit | 6 | 6 | mit | 3f88f20a8855dd38ef53b270621d15bf0df4d62c | ThomasLee969/scavenger | scavenger/main.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nraven\n~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\n__all__ = ('VERSION', 'Client', 'load')\n\ntry:\n VERSION = __import__('pkg_reso... | python | edit | 5 | 3 | bsd-3-clause | 54ab41cb8c30ddd46154f23e89947286222616e1 | getsentry/raven-python,icereval/raven-python,inspirehep/raven-python,inspirehep/raven-python,dbravender/raven-python,hzy/raven-python,getsentry/raven-python,jmagnusson/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,icereval/raven-python,ewdurbin/raven-python,smarkets/raven-python,johansteffner/raven-python,j... | raven/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom hades import constants\nfrom hades.common.cli import ArgumentParser, parser as common_parser\nfrom hades.config.generate import ConfigGenerator\nfrom hades.config.loader import load_config\n\n\ndef main():\n ... | python | edit | 1 | 4 | mit | f48cb4fd946c8fa4b6157b8e1ea9ad8b385bc67a | agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades | src/hades/bin/generate_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2015 Ericsson AB\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 ... | python | edit | 1 | 1 | apache-2.0 | b58caeae59a5ab363b4b6b40cbd19004b40dd206 | EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base | calvin/actorstore/systemactors/sensor/Distance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Download the helper library from https://www.twilio.com/docs/python/install\nfrom twilio.rest import Client\n\n# Your Account Sid and Auth Token from twilio.com/console\naccount_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'\nauth_token = 'yo... | python | edit | 2 | 0 | mit | 295200dba8569a7a667de46a13c6e36ca757f5d5 | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets | quickstart/python/understand/example-2/create_joke_intent.6.x.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\nfrom nose.tools import raises\n\nfrom spec_cleaner.fileutils import FileUtils\nfrom spec_cleaner import RpmException\n\nclass TestFileutils(unittest.TestCase):\n\n \"\"\"... | python | edit | 1 | 1 | bsd-3-clause | 39d377c462ac031203877a2c13df79be41c68585 | plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner | tests/fileutils-tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport json\nimport time\n\n#ndex_base_url = 'http://services.bigmech.ndexbio.org'\nndex_base_url = 'http://52.37.175.128'\n\ndef send_request(url_suffix, params):\n res = requests.post(ndex_base_url + url_suffix, data=j... | python | edit | 3 | 6 | bsd-2-clause | 779639680e02fb4de920a95558eceecc2a55ab46 | jmuhlich/indra,johnbachman/belpy,sorgerlab/indra,jmuhlich/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,pvtodorov/indra,jmuhlich/ind... | indra/bel/ndex_client.py | rejected_duplicate | Near-duplicate of sample 14005 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom config import settings\n\nimport os\nimport re\nimport string\nimport pytz\n\n\ndef clear_screen():\n # Clear screen\n os.system(['clear', 'cls'][os.name == 'nt'])\n\n\ndef print_obj(obj):... | python | edit | 2 | 4 | mit | 3df59e18a98be4da2ca2ed2d40a869d65696fe9b | lesh1k/VKStalk | src/helpers/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom configparser import ConfigParser\nfrom googletrans import Translator\nimport pyowm\nimport logging\nimport re\n\nlogging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)\nlogger = logging.g... | python | edit | 1 | 2 | mit | e7962ec34a86fe464862ab81ec8cc8da14a732f6 | iGene/igene_bot | models/weather.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport sys\nimport hashlib\nimport base64\n\ndef print_error(*args, **kwargs):\n print(*args, file=sys.stderr, **kwargs)\n\ndef to_unicode(content):\n # TODO: considering using the 'six' library ... | python | edit | 3 | 5 | mit | 50926966919fa5cf140e3f30815f86c93189cc49 | percy/python-percy-client | percy/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport schedule, time, os, sys, urllib2, base64\nfrom datetime import datetime\ndef check_connection():\n\tsys.stdout.write(datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\") + \" Connection\")\n\thostname = \"google.com\"\n\tresponse = os.syst... | python | edit | 4 | 2 | mit | 6cdb6ada40f28ecc7629ecdb5dd67c06f6013e88 | danic85/router_monitor | router_monitor.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django\n\nif django.get_version().startswith(\"1.8\"):\n from django_makemessages_xgettext import django18_makemessagesxgettext\n Command = django18_makemessagesxgettext.Command\n\nelse:\n from django_makemessages_xgettext i... | python | edit | 1 | 0 | bsd-3-clause | 3db5c62d116399a0b26e8c68d3e4274d5a6bd17b | resulto-admin/django-makemessages-xgettext | django_makemessages_xgettext/management/commands/makemessagesxgettext.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n#script containing all pertinent tasks to prepare for software termination.\n#successful completion of this process at last runtime, will skip extra validation\n#steps on next run\n\nfrom json import dumps\n\ndef ... | python | edit | 1 | 1 | mit | 92d0a09cfb232270d04f82eccc451ee63bd7901a | SirRujak/SirBot | dev/TOPSECRET/SirBot/lib/sirbot/shutdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .measurements import Measurement\nfrom .sinks.base import MeasurementNotifierSink\n\nclass Vehicle(object):\n\n def __init__(self, source=None):\n self.sources = set()\n self.sinks = set()\n self.measurements = ... | python | edit | 1 | 3 | bsd-3-clause | 24e2e391dece37c245d8a459456f3e30cd2346a8 | openxc/openxc-python,openxc/openxc-python,openxc/openxc-python | openxc/vehicle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division\n\ndef run():\n from dials.util.config import CompletionGenerator\n gen = CompletionGenerator()\n gen.generate()\n\ntry:\n run()\nexcept Exception, e:\n pass\n\n```\n\nApply this change: Delete *.pyc fil... | python | edit | 5 | 1 | bsd-3-clause | b154eef7d36359d0fbcc11a165371d3a54f40682 | dials/dials,dials/dials,dials/dials,dials/dials,dials/dials | libtbx_refresh.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 absolute_import, division, print_function, \\\n unicode_literals\n\nfrom typing import Iterable, List, Optional\n\nimport filters as f\n\nfrom iota import Transaction, TransactionHash\nfrom iota.com... | python | edit | 5 | 3 | mit | 6932164f20ced80ff6d08402b84aba954a983e2d | iotaledger/iota.lib.py | iota/commands/extended/get_transaction_objects.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 's7a'\n\n# All imports\nfrom nltk.tree import Tree\n\n\n# The infix coordination class\nclass InfixCoordination:\n\n # Constructor for the infix coordination\n def __init__(self):\n self.has_infix_coordination = Fa... | python | edit | 3 | 7 | mit | 411813bafe4b2af57aa7695f035e3e02b20ae85e | Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify | src/syntax/infix_coordination.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\n\nclass BinaryHeap(object):\n def __init__(self):\n # Put single zero as the 1st element, so that \n # integer ... | python | edit | 1 | 3 | bsd-2-clause | e72156f50b0bab241b90b0f0c53414529740acd6 | bowen0701/algorithms_data_structures | ds_binary_heap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nNeuPy is the Artificial Neural Network library implemented in Python.\n\"\"\"\n\n\n__version__ = '0.2.2'\n\n```\n\nApply this change: Set up version 0.3.0 dev 1."
},
{
"role": "assistant",
"content": "\"\"\"\nNeuPy is th... | python | edit | 1 | 0 | mit | 0261930771864cc4cdba58ece3959020fb499cd1 | itdxer/neupy,itdxer/neupy,itdxer/neupy,itdxer/neupy | neupy/__init__.py | rejected_duplicate | Near-duplicate of sample 1417 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n import hiredis\n HIREDIS_AVAILABLE = True\nexcept ImportError:\n HIREDIS_AVAILABLE = False\n\n\ndef from_url(url, db=None, **kwargs):\n \"\"\"\n Returns an active Redis client generated from the given database URL.\n\n... | python | edit | 2 | 1 | mit | 89454b1e83e01a4d523b776f74429a81467762da | MegaByte875/redis-py,fengshao0907/redis-py,sigma-random/redis-py,sunminghong/redis-py,garnertb/redis-py,softliumin/redis-py,sirk390/redis-py,barseghyanartur/redis-py,zhangyancoder/redis-py,LTD-Beget/redis-py,boyxuper/redis-py,barseghyanartur/redis-py,dmugtasimov/redis-py,LTD-Beget/redis-py,yuruidong/redis-py,sigma-rand... | redis/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\nfrom catkin_pkg.packages import find_packages\nfrom catkin_pkg.python_setup import generate_distutils_setup\n\nd = generate_distutils_setup(\n packages=['trollius', 'pulsar'],\n ... | python | edit | 1 | 0 | apache-2.0 | 59536a70ef39e34a5aea57131492a475e05cd227 | EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes | lg_cms_director/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport datetime\nimport unittest\nfrom unittest.mock import patch, call\n\nfrom billybot.billybot import MessageTriage\n\n\nclass TestMessageTriage(unittest.TestCase):\n\n\n def setUp(self):\n self.thread1 = MessageTr... | python | edit | 4 | 1 | mit | cc4a17db1e4ba81019ed312cbe324874430b9814 | mosegontar/billybot | billybot/tests/test_billybot.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\nimport os\nos.environ[\"KIVY_NO_ARGS\"] = \"1\"\n\nimport click\n\nfrom {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}\n\n\n@click.command()\n@click.option(\n '-l', '--... | python | edit | null | null | mit | 30907bbfc1b6d38034867070075a28fd3c5d3c6b | hackebrot/cookiedozer,hackebrot/cookiedozer | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/cli.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom .sugar import sg_to_gu\n\n__all__ = [\n u'calculate_brew_house_yield',\n]\n\n\ndef calculate_brew_house_yield(wort_volume, sg, grain_additions):\n \"\"\"\n Calculate Brew House Yield\n\n :param fl... | python | edit | 1 | 3 | mit | 3486d3cb7122ba59c64d9af5b6eb6b12bc97e193 | chrisgilmerproj/brewday,chrisgilmerproj/brewday | brew/utilities/efficiency.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom thinglang.utils.type_descriptors import ValueType\nfrom thinglang.lexer.symbols import LexicalSymbol\n\n\nclass LexicalQuote(LexicalSymbol): # \"\n EMITTABLE = False\n\n @classmethod\n def next_operator_set(cls, current, orig... | python | edit | 1 | 2 | mit | e65a8c057d9dbd156222542a0e544d294292de00 | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | thinglang/lexer/symbols/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom distutils.core import Command\nfrom numpy.distutils.misc_util import get_cmd\n\nclass install_clib(Command):\n description = \"Command to install installable C libraries\"\n\n user_options = []\n\n def initialize_op... | python | edit | 1 | 2 | bsd-3-clause | e559c897cec534c58ab7940e2623a1decfb4958a | jorisvandenbossche/numpy,MichaelAquilina/numpy,b-carter/numpy,sonnyhu/numpy,GrimDerp/numpy,dch312/numpy,githubmlai/numpy,astrofrog/numpy,brandon-rhodes/numpy,joferkington/numpy,CMartelLML/numpy,rajathkumarmp/numpy,ahaldane/numpy,MaPePeR/numpy,empeeu/numpy,pelson/numpy,nguyentu1602/numpy,jakirkham/numpy,jakirkham/numpy,... | numpy/distutils/command/install_clib.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom thinglang.lexer.symbols.logic import LexicalEquality\nfrom thinglang.parser.tokens import BaseToken\n\n\nclass Conditional(BaseToken):\n\n ADVANCE = False\n COMPARATORS = {\n LexicalEquality: lambda lhs, rhs: lhs == rhs\n ... | python | edit | 3 | 1 | mit | 1d96f8a1456d902fe5a9e6ce5410a41b1468a810 | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | thinglang/parser/tokens/logic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport os\n\nfrom mopidy.models import Playlist, Track\nfrom mopidy.backends.gstreamer import GStreamerBackend\n\nfrom tests.backends.base import (BasePlaybackControllerTest,\n BaseCurrentPla... | python | edit | 3 | 1 | apache-2.0 | 0d9085b0335fe52a8d9682d18c64b540e5a5e71e | vrs01/mopidy,jcass77/mopidy,kingosticks/mopidy,bacontext/mopidy,mokieyue/mopidy,jodal/mopidy,liamw9534/mopidy,mopidy/mopidy,liamw9534/mopidy,diandiankan/mopidy,jodal/mopidy,mokieyue/mopidy,pacificIT/mopidy,glogiotatidis/mopidy,quartz55/mopidy,adamcik/mopidy,jmarsik/mopidy,jcass77/mopidy,abarisain/mopidy,bencevans/mopid... | tests/backends/gstreamer_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# NOTE: This example uses the next generation Twilio helper library - for more\n# information on how to download and install this version, visit\n# https://www.twilio.com/docs/libraries/python\nfrom twilio.rest import Client\nfrom datetime ... | python | edit | 1 | 0 | mit | 1f4d1fb8e8923609aae8e90d186d4e0e3ca40329 | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snip... | notifications/rest/bindings/list-binding/list-binding.6.x.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom mappyfile.pprint import PrettyPrinter\n\ndef test_print_map():\n mf = {}\n pp = PrettyPrinter() # expected\n txt = pp.pprint(mf)\n assert(expected == txt)\n\ndef run_tests(): \n #pytest.main([\"test... | python | edit | 3 | 1 | mit | 1862317c3b463704c8264f71007e7b910772b44e | Jenselme/mappyfile,geographika/mappyfile,geographika/mappyfile | tests/test_pprint.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport uuid\n\nimport diesel\n\nfrom diesel.util.queue import Fanout\n\nclass FanoutHarness(object):\n def setup(self):\n self.fan = Fanout()\n self.subscriber_data = {}\n for x in xrange(10):\n diesel.for... | python | edit | 4 | 3 | bsd-3-clause | 5606e8d56b7f6441eeb121795b0f400d65858b3b | dieseldev/diesel | tests/integration/test_fanout.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom taggit.models import Tag, TaggedItem\n\n\nclass TaggedItemInline(admin.StackedInline):\n model = TaggedItem\n\nclass TagAdmin(admin.ModelAdmin):\n inlines = [\n TaggedItemInline\n ]\n... | python | edit | 1 | 0 | bsd-3-clause | 76deb311dbb981501a1fa2686ec2cf4c92d7b83b | theatlantic/django-taggit,theatlantic/django-taggit2,theatlantic/django-taggit2,theatlantic/django-taggit,decibyte/django-taggit,decibyte/django-taggit | taggit/admin.py | rejected_duplicate | Near-duplicate of sample 16529 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# © 2011 SimpleGeo, Inc. All rights reserved.\n# Author: Paul Lathrop <<EMAIL>>\n#\n\n\"\"\"Utility functions for AWS-related tasks.\"\"\"\n\nfrom getpass import getpass\n\nimport boto.pyami.config as boto_config... | python | edit | 3 | 4 | bsd-2-clause | 207bb83a7a41a36dbe27cb4b75f93fe0ae3a5625 | simplegeo/clusto-sgext | sgext/util/aws.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom yowsup.structs import ProtocolEntity, ProtocolTreeNode\nfrom .ack import AckProtocolEntity\nclass OutgoingAckProtocolEntity(AckProtocolEntity):\n\n '''\n <ack type=\"{{delivery | read}}\" class=\"{{message | receipt | ?}}\" id=\"... | python | edit | 4 | 3 | mit | 20a92ff1ffe143193d95235c7a5ea8e9edb0df64 | ongair/yowsup,biji/yowsup | yowsup/layers/protocol_acks/protocolentities/ack_outgoing.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nimport itertools as it\nfrom sklearn.externals import joblib\n\ndef simulate_loads(nfrag, ngt, q):\n loads = [1] * nfrag\n active = set(range(nfrag))\n for k in range(1, len(loads)):\n i0, i1 = random.sample(a... | python | edit | 1 | 3 | bsd-3-clause | fc0ee0d418496f0ec8da01e8bd8e2d12024accaa | jni/gala-scripts | simulate_loads.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 Rackspace US, Inc\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 ... | python | edit | 1 | 1 | apache-2.0 | 293f44e211e4f26a0b7eca842dd2af515957a4bd | openstack/octavia,openstack/octavia,openstack/octavia | octavia/certificates/generator/cert_gen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under an MIT open source license - see LICENSE\n\n\n'''\nTest function for Wavelet\n'''\n\nfrom unittest import TestCase\n\nimport numpy as np\nimport numpy.testing as npt\n\nfrom ..statistics import wt2D, Wavelet_Distance\nfrom ... | python | edit | 1 | 1 | mit | bdae1f203f3d5d600dd62470dea3d2ddb3048b9d | e-koch/TurbuStat,Astroua/TurbuStat | turbustat/tests/test_wavelet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom simplekeys.verifier import verify_request\nfrom graphene_django.views import GraphQLView\nfrom django.conf import settings\n\n\nclass KeyedGraphQLView(GraphQLView):\n graphiql_template = \"graphene/graphiql-keyed.html\"\n\n def g... | python | edit | 1 | 3 | mit | 44d103359cff312865f409ff34f528f63e441ef4 | openstates/openstates.org,openstates/openstates.org,openstates/openstates.org,openstates/openstates.org | graphapi/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n\n#\n# Show the USB camera\n#\n\n\n#\n# External dependencies\n#\nimport sys\nfrom PySide import QtGui\nimport VisionToolkit as vtk\n\n\n#\n# Main application\n#\nif __name__ == '__main__' :\n\n application = Qt... | python | edit | 1 | 0 | mit | f872bd95e9a26b326ea49922a373f90d73d0df2f | microy/StereoVision,microy/VisionToolkit,microy/StereoVision,microy/PyStereoVisionToolkit,microy/PyStereoVisionToolkit,microy/VisionToolkit | show_usbcamera.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nimport unittest\n\nfrom faker import Factory\nfrom .. import string_types\n\n\nclass TestJaJP(unittest.TestCase):\n \"\"\" Tests phone_number in the ja_JP locale \"\"\"\n\n ... | python | edit | 1 | 2 | mit | fc508462e3fa9b03f0ee55df21c44863fbd8bae0 | joke2k/faker,danhuss/faker,joke2k/faker | tests/providers/phone_number.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom rmc.config.flask_base import *\nimport rmc.shared.secrets as s\n\nJS_DIR = 'js'\nDEBUG = False\nENV = 'prod'\nGA_PROPERTY_ID = 'UA-35073503-1'\nLOG_DIR = '/home/rmc/logs'\nLOG_PATH = os.path.join(LOG_DIR, 'server/server.lo... | python | edit | 2 | 0 | mit | e28988724edcf2c4d6c0545eb9b8dba50169dc28 | shakilkanji/rmc,MichalKononenko/rmc,rageandqq/rmc,UWFlow/rmc,JGulbronson/rmc,UWFlow/rmc,MichalKononenko/rmc,sachdevs/rmc,MichalKononenko/rmc,sachdevs/rmc,UWFlow/rmc,sachdevs/rmc,ccqi/rmc,ccqi/rmc,duaayousif/rmc,JGulbronson/rmc,JGulbronson/rmc,MichalKononenko/rmc,duaayousif/rmc,ccqi/rmc,shakilkanji/rmc,JGulbronson/rmc,M... | config/flask_prod.py | rejected_duplicate | Near-duplicate of sample 11916 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import permissions\n\n\nclass IsSameUserOrAdmin(permissions.BasePermission):\n \"\"\"\n Custom permissions to only allow same user or admins to view user details.\n \"\"\"\n def has_object_permission(self, re... | python | edit | 1 | 2 | unlicense | 9ff64fa4fe884b8c255737c38e9e6d108f16aec9 | rcutmore/vinotes-api,rcutmore/vinotes-api | vinotes/apps/api/permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom isort.pylama_isort import Linter\n\n\nclass TestLinter:\n instance = Linter()\n\n def test_allow(self):\n assert not self.instance.allow(\"test_case.pyc\")\n assert not self.instance.allow(\"test_case.c... | python | edit | 1 | 1 | mit | 48081a925d5b69e18a1f04c74cbe98b590e77c5b | PyCQA/isort,PyCQA/isort | tests/unit/test_pylama_isort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models, migrations\nfrom django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor\nfrom django.db.migrations.state import StateApps\nfrom typing import Text\n\ndef remove_speci... | python | edit | 1 | 0 | apache-2.0 | 0b3a414be19546df348ebca148362bf370c61c15 | showell/zulip,andersk/zulip,tommyip/zulip,hackerkid/zulip,timabbott/zulip,synicalsyntax/zulip,brainwane/zulip,zulip/zulip,shubhamdhama/zulip,shubhamdhama/zulip,brainwane/zulip,jackrzhang/zulip,eeshangarg/zulip,rishig/zulip,rishig/zulip,eeshangarg/zulip,brainwane/zulip,rishig/zulip,zulip/zulip,rishig/zulip,eeshangarg/zu... | zerver/migrations/0127_disallow_chars_in_stream_and_user_name.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = \"0.9\"\n\ndefault_app_config = 'channels.apps.ChannelsConfig'\nDEFAULT_CHANNEL_LAYER = 'default'\n\nfrom .asgi import channel_layers # NOQA isort:skip\nfrom .channel import Channel, Group # NOQA isort:skip\n\n```\n\nApply t... | python | edit | 1 | 0 | bsd-3-clause | ca0d9e9651e51797ad317e54c58a174bcb351610 | raphael-boucher/channels,Coread/channels,Coread/channels,django/channels,Krukov/channels,andrewgodwin/channels,Krukov/channels,andrewgodwin/django-channels,raiderrobert/channels,linuxlewis/channels | channels/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom civis import APIClient\nfrom civis.futures import CivisFuture\n\n\ndef run_job(job_id, api_key=None):\n \"\"\"Run a job.\n\n Parameters\n ----------\n job_id : str or int\n The ID of the job.\n api_key : str, opti... | python | edit | 1 | 1 | bsd-3-clause | 289be31dff1bbff200054e5acffc4d6640caaa97 | civisanalytics/civis-python | civis/utils/_jobs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom bs4 import BeautifulSoup\nfrom source.models.rt_rating import RTRating\n\n\nclass RottenTomatoesService:\n\n __URL = 'http://www.rottentomatoes.com/m/'\n __SEPERATOR = '_'\n\n def __init__(self, title):\n ... | python | edit | 1 | 3 | mit | 450cbc7d0cb9a2477b80e94c874de1da4a00e431 | jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu | source/services/rotten_tomatoes_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom firecares.firestation.models import FireDepartment\n\n\nclass Command(BaseCommand):\n \"\"\"\n This command is used to export data that department heat maps visualize.\n \"\... | python | edit | 1 | 2 | mit | b7bb933b23b5b86a2555e5fdd8919f852960a4cb | FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares | firecares/firestation/management/commands/export-building-fires.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n@author: Seva Zhidkov\n@contact: <EMAIL>\n@license: The MIT license\n\nCopyright (C) 2015\n\"\"\"\n\nfrom sheldon.adapter import *\nfrom sheldon.config import *\nfrom sheldon.exceptions import *\nfrom shel... | python | edit | 8 | 3 | mit | f2000016a9e2acd4cad28b1ea301620723140a4e | lises/sheldon | sheldon/bot.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 Cisco Systems\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 | e1dc2c3e2515daf3aae51242221fab4fbd5c553f | noironetworks/aci-integration-module,noironetworks/aci-integration-module | aim/db/migration/alembic_migrations/versions/72fa5bce100b_tree_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n\n\nimport hashlib\n\nfrom django.utils.http import urlencode, urlquote\n\nfrom .. import register\n\n\n@register.simple_tag()\ndef get_gravatar_url(user, size, rating='g', default='identicon'):\n url = \"http://w... | python | edit | 1 | 1 | mit | ec244cc9c56fec571502529ef24af2ca18d9f5f5 | alesdotio/Spirit,a-olszewski/Spirit,raybesiga/Spirit,a-olszewski/Spirit,dvreed/Spirit,ramaseshan/Spirit,adiyengar/Spirit,battlecat/Spirit,ramaseshan/Spirit,gogobook/Spirit,dvreed/Spirit,nitely/Spirit,mastak/Spirit,battlecat/Spirit,nitely/Spirit,a-olszewski/Spirit,alesdotio/Spirit,mastak/Spirit,alesdotio/Spirit,gogobook... | spirit/templatetags/tags/utils/gravatar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Show a command to edit fred files\"\"\"\n\nimport os\nimport sys\n\n\nfrom dotsite.paths import makepath, pwd\n\n\ndef get_freds(paths):\n if not paths:\n paths = ['.']\n result = set()\n for path in paths:\n pa... | python | edit | 2 | 9 | mit | 390851ce7c606e803094487e6278ea5620d26f3c | jalanb/jab,jalanb/dotjab,jalanb/jab,jalanb/dotjab | src/python/vff.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom problems.models import UserSolution\n\nfrom .views import download_protected_file\n\nurlpatterns = patterns('',\n url(_(r'solutio... | python | edit | 1 | 0 | mit | 8e3beda427e2edc2bc7b8f7f96f8ef1c7dd571c7 | matus-stehlik/roots,tbabej/roots,tbabej/roots,matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots,rtrembecky/roots,tbabej/roots,rtrembecky/roots | downloads/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n'''\nUpdate EVLA pipeline variables to the current system.\n'''\n\n\ndef update_paths(pipe_dict, ms_path, pipepath):\n\n pipe_dict['ms_active'] = ms_path\n pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'\n pipe_dict['pipepath... | python | edit | 5 | 1 | mit | 08d83313d2e077e760adc9a4bfd7c181d9f8a60a | e-koch/canfar_scripts,e-koch/canfar_scripts | cal_pipe/update_pipeline_paths.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\n\nfrom travispy import travispy\nfrom travispy import TravisPy\n\n\ndef main():\n\n restarted = []\n building = []\n\n for domain in [travispy.PUBLIC, travispy.PRIVATE]:\n print \"Enumer... | python | edit | 14 | 11 | mit | a93b8986f1cd2c64b75abd9bf695ff6e44a85b29 | dgnorth/drift,dgnorth/drift,dgnorth/drift | scripts/travis_build_dependent_projects.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright (c) Jupyter Development Team.\nDistributed under the terms of the Modified BSD License.\n\"\"\"\n\nimport os\nfrom jinja2 import FileSystemLoader\nfrom notebook.base.handlers import IPythonHandler, FileFindHandler\nfrom no... | python | edit | 1 | 1 | bsd-3-clause | cc08888a527dac321f88cbe9da27508aee62e51e | eskirk/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,charnpreetsingh... | examples/lab/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Admin interface for fluidreview\"\"\"\nfrom django.contrib import admin\n\nfrom bootcamp.utils import get_field_names\nfrom fluidreview.models import WebhookRequest, OAuthToken\n\n\nclass WebhookRequestAdmin(admin.ModelAdmin):\n \"... | python | edit | 1 | 1 | bsd-3-clause | e53d324f2ac4874c1f56bbf00dfee47c6b059e5d | mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce | fluidreview/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSQLALCHEMY_DATABASE_URI = \"postgres://@/mailflow\"\nSECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'\n\nINBOX_LOGIN_LENGTH = 16\nINBOX_PASSWORD_LENGTH = 16\nINBOX_PAGE_SIZE = 50\n\nINBOX_HOST = 'mailflow.openpz.org'\nINBOX_PORT ... | python | edit | 1 | 0 | apache-2.0 | 5dece3e052a1bebda6b1e1af63855399435f2e49 | zzzombat/mailflow,zzzombat/mailflow | src/mailflow/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport torch\nfrom torch import Tensor\nimport syft as sy\n\n\ndef test_virtual_grid(workers):\n \"\"\"This tests our ability to simplify tuple types.\n\n This test is pretty simple since tuples just serialize to\n t... | python | edit | 7 | 1 | apache-2.0 | 678ddb9813edbc8a0013e8cf9ae5ff17cf3c72f7 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | test/test_grid.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from .secrets import *\nexcept ImportError:\n import sys\n sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.')\n\nfrom .base import *\n\n#\n# Put production server environment specific over... | python | edit | 4 | 0 | bsd-3-clause | fd6e6f07c1119142456c607c7bc10528c9214cc2 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | bluebottle/settings/production.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nimport logbook\n\nfrom ..app import build_app\nfrom ..bootstrapping import ensure_project_bootstrapped\n\n_logger = logbook.Logger(__name__)\n\n\n@click.command()\n@click.option('-p', '--port', type=int, default=5000)\n@click.... | python | edit | 1 | 1 | bsd-3-clause | 3e56590159d5685c668e6d6dfcea3164e82f87f5 | getweber/weber-cli | cob/cli/testserver_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on Apr 25, 2015\n\n@author: Sherry\n'''\n\nfrom json import dumps\n\nfrom twitterDataAcquisition import TwitterDataAcquisition\n\ndef main():\n twitterData = TwitterDataAcquisition()\n \n #jsonFile = (\"twitter_dat... | python | edit | 4 | 1 | apache-2.0 | 49cd32a7d1b3f70da19ed6f90d930646914d9756 | WenTr/TrendingApps | testTwitterAPI.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass BaseTool (object):\n draw_locks = False\n def update_cursor(self, mouse):\n mouse.set_cursor(None)\n\nclass DrawTool (BaseTool):\n def __init__(self, block_class):\n self.block_class = block_class\n\n def app... | python | edit | 1 | 2 | mit | 1a88833845776d7592bbdef33571cd2da836cb91 | vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah | ookoobah/tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Apache 2.0 license to source file\n\nAs per OpenStack licensing guide lines [1]:\n[H102 H103] Newly contributed Source Code should be licensed under\nthe Apache 2.0 license.\n[H104] Files with no code shouldn't contain any license header... | python | new_file | 1 | 0 | apache-2.0 | 7a6cd5ebe2e2fc357bc4f58409ca177f36814859 | openstack/python-glanceclient,openstack/python-glanceclient | glanceclient/common/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom .models import Conference, ConferenceVenue, Room\n\n\nclass ConferenceSerializer(serializers.HyperlinkedModelSerializer):\n status = serializers.CharField(source='get_status_display')\n\n ... | python | edit | 1 | 0 | mit | 8b321c2aa37d57cc3cfc092ab2d887ce685284b6 | praba230890/junction,nava45/junction,ChillarAnand/junction,farhaanbukhsh/junction,praba230890/junction,praba230890/junction,ChillarAnand/junction,farhaanbukhsh/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,nava45/junction,ChillarAnand/junction,praba230890/junction,pythonindia/junction,pytho... | junction/conferences/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_script import Manager\nfrom config.config import app\n\nmanager = Manager(app)\n\n@manager.command\ndef run_local():\n app.run(debug=True)\n\n@manager.command\ndef run_test():\n # To-Do\n pass\n\n@manager.command\ndef ru... | python | edit | 1 | 1 | mit | dd64801ffa4949f0458eec2721a333a480a8fc3c | tforrest/soda-automation,tforrest/soda-automation | app/runserver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom colors import Colors\nfrom line import Line\nimport re\n\nprefixes = [\n (\"Start\", \"\", Colors.GREEN_FG),\n (\"Pass\", \"\", Colors.GREEN_FG),\n (\"Debug\", \"\", Colors.BLUE_FG),\n (\"Err... | python | edit | 1 | 6 | mit | 31f39a8bef65a3ea47c8f2c080b4f0ec769dbfb1 | JBarberU/strawberry_py | util/meta_line.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\n\nif not ((2, 7, 5) <= sys.version_info < (3, 0)):\n sys.stderr.write(\n 'Python version \"%s\" is not supported. Required version 2.7.5+, Python 3 is not supported\\n' % sys.version\n )\n... | python | edit | 36 | 0 | mit | 0d7db5b134aaed2721dff8f7be300878fffa0c44 | genestack/python-client | genestack_client/__init__.py | rejected_lint | Too many lint violations: 36 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tempfile\nimport shutil\nimport os\n\nfrom voltgrid import ConfigManager\n\n\ndef test_config_manager():\n c = ConfigManager('voltgrid.conf.example')\n c.write_envs()\n\n\ndef test_config_is_empty():\n with tempfile.NamedTem... | python | edit | 5 | 1 | bsd-3-clause | 853bfc4d010f6c80bef6878a356df73a60f09596 | voltgrid/voltgrid-pie | test_config.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nfrom .views import HomePageView\n\n\nurlpatterns = [\n url(r'^$', HomePageView.as_view(), name='home'),\n url(r'^admin/', include(admin.site.urls)),\n]\n\n... | python | edit | 1 | 0 | bsd-3-clause | 2b477a2f4cbbcb1ac25c48ace0597d3d5713cafd | tastybrew/tastytaps,tastybrew/tastytaps | tastytaps/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\nfrom django.views.generic import ListView\n\nfrom .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin\n\n\nclass BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView):\n \"\"\"\n Defines a... | python | edit | 1 | 2 | mit | 954030c1c7e048e00bda0fe129434b2e9391befd | code-kitchen/django-utensils,code-kitchen/django-utensils,code-kitchen/django-utensils | utensils/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\nimport unittest\nimport sys\n\nfrom oscrypto import trust_list\nfrom asn1crypto.x509 import Certificate\n\nif sys.version_info < (3,):\n ... | python | edit | 1 | 2 | mit | 6f6199240009ac91da7e663030125df439d8fe7e | wbond/oscrypto | tests/test_trust_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\n\ndef insert_metric_ids(db, metric_ids):\n for metric_id in metric_ids:\n db.execute(\n \"INSERT INTO metric_names ('name') VALUES (?)\"... | python | edit | 1 | 3 | mit | ac5b065e948a923f71b5f3bc9e98bcb8791a46c9 | Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt | git_code_debt/write_logic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nA regression test for computing three kinds of spectrogram.\n\nJust to ensure we didn't break anything.\n\"\"\"\n\nimport numpy as np\nimport os\nfrom tfr.files import load_wav\nfrom tfr.spectrogram_features import spectrogram_featu... | python | edit | 1 | 2 | mit | 9a746c3ea33057efaf01cb8b700d4ea5d38863bf | bzamecnik/tfr,bzamecnik/tfr | tests/regression_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n# REDIS\nREDIS_HOST = '127.0.0.1'\nREDIS_PORT = 6379\n\nHOST = os.environ.get('HOST', 'http://localhost:9000')\nTHUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001')\n\n```\n\nApply this change: Change redis url and re... | python | edit | 1 | 0 | mit | 1aaa2034020297fe78c2a0e12b713b835e13a156 | heynemann/thumborizeme,heynemann/thumborizeme,heynemann/thumborizeme | thumborizeme/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom autosklearn.pipeline.components.regression.random_forest import RandomForest\nfrom autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit\n\nimport sklearn.metrics\n\n\nclass RandomForestComp... | python | edit | 1 | 2 | bsd-3-clause | 850d5be6b5a53bafd0197e1454da2583abb6db77 | automl/auto-sklearn,automl/auto-sklearn | test/test_pipeline/components/regression/test_random_forests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom django.db.models import Prefetch\n\nfrom mla_game.apps.transcript.tasks import update_transcript_stats\n\nfrom ...models import (\n Transcript, TranscriptPhraseVote, TranscriptPhr... | python | edit | 1 | 4 | mit | cd70e1150d3822a0f158e06c382ad8841760040e | WGBH/FixIt,WGBH/FixIt,WGBH/FixIt | mla_game/apps/transcript/management/commands/update_stats_for_all_eligible_transcripts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template.response import SimpleTemplateResponse\nfrom django.utils.translation import gettext_lazy as _\n\nfrom debug_toolbar.panels import Panel\n\n\nclass RedirectsPanel(Panel):\n \"\"\"\n Panel that intercepts redirects... | python | edit | 1 | 3 | bsd-3-clause | af173cbf4ca75c0c1dae459d2da8a1ebf54d0e50 | tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,spookylukey/django-debug-toolbar,jazzband/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,django-debug-tool... | debug_toolbar/panels/redirects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef compfeats(url):\n print 'Feats called: ', url\n return url\n\ndef nfold(imgs, feats):\n print 'nfold called: ', imgs, feats\n\nimgs = ['images/img1.png','images/img2.png']\nfeats = [Compute('featurecomputation',compfeats,url=im... | python | edit | 3 | 1 | mit | ca8b4640a858936f1f1cfdbed8e5ef1e771fe310 | luispedro/jug,luispedro/jug,unode/jug,unode/jug | jugfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAPI Builder\nBuild dynamic API based on the provided SQLAlchemy model\n\"\"\"\nfrom managers import AlchemyModelManager\nfrom viewsets import AlchemyModelViewSet\nfrom rest_framework_nested import routers\n\n\nclass APIModelBuilder(... | python | edit | 1 | 4 | mit | 94737c504ffdf55ddc8a0a24561f52fc531b6047 | dealertrack/djangorest-alchemy,pombredanne/djangorest-alchemy | djangorest_alchemy/apibuilder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tempfile, os\n\nimport nose.tools as nt\n\nip = get_ipython()\nip.magic('load_ext storemagic')\n\ndef test_store_restore():\n ip.user_ns['foo'] = 78\n ip.magic('alias bar echo \"hello\"')\n tmpd = tempfile.mkdtemp()\n ip.... | python | edit | 2 | 1 | bsd-3-clause | 707f09d7d8f2c1e3ad37947a3084acb90faf84cf | ipython/ipython,ipython/ipython | IPython/extensions/tests/test_storemagic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .views import node\n\n\n# Alias the project serializer\nserialize_node = node._view_project\n\n```\n\nApply this change: Add aliases for MFR-related utilites"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\... | python | edit | 1 | 0 | apache-2.0 | 617437824c875f368e8244bc6d9373217f15cb7d | revanthkolli/osf.io,Johnetordoff/osf.io,chrisseto/osf.io,felliott/osf.io,barbour-em/osf.io,emetsger/osf.io,njantrania/osf.io,danielneis/osf.io,caseyrygt/osf.io,emetsger/osf.io,crcresearch/osf.io,danielneis/osf.io,caseyrygt/osf.io,zachjanicki/osf.io,crcresearch/osf.io,brianjgeiger/osf.io,jmcarp/osf.io,leb2dg/osf.io,jinl... | website/project/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Machine detail plugin to allow easy VNC or SSH connections.\"\"\"\n\n\nimport sal.plugin\nfrom server.models import Machine, SalSetting\nfrom server.utils import get_setting\n\n\nclass RemoteConnection(sal.plugin.DetailPlugin):\n\n ... | python | edit | 3 | 4 | apache-2.0 | f72b7ec93401bc817245c49790303fd925adb2c4 | salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal | server/plugins/remoteconnection/machine_detail_remote_connection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport warnings\n\nfrom chainer import testing\nfrom chainer.training import extensions\n\n\nclass TestPlotReport(unittest.TestCase):\n\n def test_available(self):\n try:\n import matplotlib # NOQA\n ... | python | edit | 1 | 3 | mit | c9abba3a9ca6ccf1a9bed5fad5cda12557b3266c | hvy/chainer,jnishi/chainer,niboshi/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,chainer/chainer,jnishi/chainer,niboshi/chainer,okuta/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,okuta/chainer,okuta/chainer,chainer/chainer,hvy/chainer,ktnyt/chainer,ktnyt/chainer,wkentaro/chainer,jnishi/ch... | tests/chainer_tests/training_tests/extensions_tests/test_plot_report.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Module grouping session scoped PyTest fixtures.\"\"\"\n\nimport pytest\nfrom _pytest.monkeypatch import MonkeyPatch\n\nimport pydov\n\n\ndef pytest_runtest_setup():\n pydov.hooks = []\n\n\n@pytest.fixture(scope='module')\ndef monke... | python | edit | 1 | 1 | mit | 57ab42c16ddc8591153980b2f3bb8c4ba6090160 | DOV-Vlaanderen/pydov | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDEBUG = True\nSECRET_KEY = 'no'\n\nSITES_FILE = 'sites.yaml'\nFREEZER_DESTINATION = '../build'\nFREEZER_REMOVE_EXTRA_FILES = True\nFLATPAGES_AUTO_RELOAD = True\n```\n\nApply this change: Switch assets to debug by default."
},
{
"rol... | python | edit | 1 | 0 | mit | 852989f9899593148d8f16b49142979c6ee509f2 | Opendatal/offenerhaushalt.de,Opendatal/offenerhaushalt.de,Opendatal/offenerhaushalt.de | offenerhaushalt/default_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nREST_FRAMEWORK = {\n 'DEFAULT_THROTTLE_CLASSES': (\n 'rest_framework.throttling.AnonRateThrottle',\n ),\n 'DEFAULT_THROTTLE_RATES': {\n 'anon': '5000/day',\n }\n}\n\n```\n\nApply this change: Set drf to onyl render... | python | edit | 1 | 0 | mit | b9f40dd83a603f7457588190bd7d968e30fa74a7 | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | frigg/settings/rest_framework.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_socketio import SocketIO\n\n\n## Instanciate Flask (Static files and REST API)\napp = Flask(__name__)\n## Instanciate SocketIO (Websockets, used for events) on top of it\nsocketio = SocketIO(app)\n\n\n@so... | python | edit | 3 | 1 | mit | 0036095ed79c3ea6b14732555dbed9a987172366 | j-be/ue4-socketio-crash | ue-crash-dummy.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.