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\"\"\"\nPython testing for humans.\n\nUsage: pspec [<path>...]\n\nOptions:\n -h --help show this\n\"\"\"\n\nfrom attest.hook import AssertImportHook\nfrom docopt import docopt\nimport os\nimport sys\nfrom .collectors import PSpecTests\n... | python | edit | 1 | 5 | bsd-3-clause | 28bc35bc8ed2646faf0d6662b54a5324c0fd1e31 | bfirsh/pspec | pspec/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport ssl\nimport urllib2\n\nif len(sys.argv) < 3 or len(sys.argv) > 4:\n exit(\"Usage: %s <HOST> <PORT> [CA_FILE]\" % sys.argv[0])\n\nhost = sys.argv[1]\nport = sys.argv[2]\ncafile = sys.argv[3] if len(sys.argv) > 3 else No... | python | edit | 1 | 0 | mit | ff800f11b948808e4574ec3a893ed4e259707dcf | ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls | stubs/python2-urllib2/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright [2009-2019] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License ... | python | edit | 6 | 1 | apache-2.0 | 4f1354f6e917a4a90a56f3c2545aa678809334c3 | Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production | scripts/release/rethreshold_family.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <<EMAIL>>\n\nfrom dotenv import load_dotenv, get_key, set_key, unset_key\n\nfrom cfn_detect import load_cfn_outputs\n\ndef load_envs(path):\n \"\"\"Recursively ... | python | edit | 8 | 2 | mit | 8bb60a82f903126068434df3a464cdde5d894d0c | serverless/serverless-helpers-py | serverless_helpers/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fuelclient.commands import base\nfrom fuelclient.commands import environment as env_commands\nfrom fuelclient.common import data_utils\n\n\nclass EnvClone(env_commands.EnvMixIn, base.BaseShowCommand):\n \"\"\"Clone environment and t... | python | edit | 1 | 1 | apache-2.0 | 8dadb34bdfe6d85d3016a59a9441ed8a552d1149 | stackforge/fuel-octane,Mirantis/octane,Mirantis/octane,stackforge/fuel-octane | octane_fuelclient/octaneclient/commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix sdk module all declaration"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\nfrom ddsc.sdk.client import Client\n__all__ = ['Client']\n"
}
] | python | new_file | 1 | 0 | mit | d0cc528f7e69422515ae1507b01266b1686d1452 | Duke-GCB/DukeDSClient,Duke-GCB/DukeDSClient | ddsc/sdk/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom types import TracebackType\nfrom typing import \\\n Callable, Tuple, Dict, Any, Iterable, Sequence, Mapping, Optional, Type\n\nfrom werkzeug.wrappers import Request\n\n# (name, value)\nHeader = Tuple[str, str]\n\nWSGIEnvironment = D... | python | edit | 1 | 0 | mit | e538f2862a875afc58071a9fc6419e4290f8b00d | srittau/rouver | rouver/types.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os;\nimport glob;\nimport re as regex;\n\ntestDirectory = \"./test/\";\n\ndef readMarkupFile(markupFilename):\n f = open(markupFilename, 'r');\n markup = f.read();\n return markup;\n\ndef runNode(sourceFile... | python | edit | 2 | 2 | mit | e69962de56cb5eaa12f908a74edca4c225dcee9c | iFixit/node-markup,iFixit/node-markup,iFixit/node-markup | run-tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nimport os, shutil\n\ndef print_warning(message, *args, **kwargs):\n import colortext\n if args or kwargs: message = message.format(*args, **kwargs)\n colortext.write(message, color='red')\n\ndef print_erro... | python | edit | 1 | 3 | mit | e22360f13fd3b582e7b0898549f656a76a038306 | Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab | scripting.py | rejected_duplicate | Near-duplicate of sample 15543 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\n\n# The URL for the page where the parking lots are listed\ndata_url = \"http://example.com\"\n\n# Name of the city, just in case it contains umlauts which this filename shouldn't\ncity_name = \"Sample City\"\... | python | edit | 3 | 3 | mit | ccda4cd859b512d8694eba4261439bb52574f099 | Mic92/ParkAPI,Mic92/ParkAPI,offenesdresden/ParkAPI,offenesdresden/ParkAPI | cities/Sample_City.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport urllib\n\n\n# -----------------------------\n# RENAME THIS FILE TO config.py\n# -----------------------------\n\n\n# Flask debug mode. Always set False on production\nDEBUG = True\n\n\n# URL where the app is ... | python | edit | 1 | 0 | mit | fca9028a189b55e2c6b6775999e98c9d453477be | raquo/hnapp,raquo/hnapp,raquo/hnapp | config.sample.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\n\nfrom boarbot.common.log import LOGGER\n\nclass GroupsParserException(Exception): pass\n\nclass GroupsParser(argparse.ArgumentParser):\n def exit(self, status=0, message=None):\n LOGGER.warn('GroupsParser.exit ca... | python | edit | 1 | 1 | mit | 5e4b9c8c056f16613440c92945fe25e75c952b79 | fsufitch/discord-boar-bot,fsufitch/discord-boar-bot | src/boarbot/modules/groups/cmd.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 | 1 | 0 | mit | 3e20365624f02b70d8332ba7ff7da23961337f86 | 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-3/create_joke_samples.6.x.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom blox.file import File\nfrom pytest import raises_regexp\n\n\nclass TestFile(object):\n def test_mode(self, tmpfile):\n raises_regexp(ValueError, 'invalid mode', File, tmpfile, 'foo')\n assert... | python | edit | 1 | 1 | mit | c362d5477eb2bcd8720149c84e2a0f8578975fb7 | aldanor/blox | tests/test_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Wrapper to run setup.py using setuptools.\"\"\"\n\nif __name__ == '__main__':\n execfile('se... | python | edit | 1 | 0 | bsd-3-clause | 9144e6011df4aebd74db152dad2bb07a8eebf6ee | FrancoisRheaultUS/dipy,FrancoisRheaultUS/dipy | setup_egg.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport synthetic_data_experiments as sde\nimport logging\n\nif __name__ == \"__main__\":\n args = sde.get_integrous_arguments_values()\n\n\n```\n\nApply this change: Set resu dir and data dir"
},
{
"role": "assistant",
"conte... | python | edit | 4 | 0 | mit | f800d11aa5a198fcb2193773b30e4e066a226321 | chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan | code/handle-output.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom models.basemodel import BaseModel\nfrom peewee import CharField, DateTimeField\n\nALLOWED_VERDICTS = (\n 'NOT_AN_EXPL',\n 'VIOLATION',\n 'NOT_IMPRESSED',\n 'GOOD',\n 'EXACT',\n)\n\n\nclass ScoreFeedback(BaseModel):\n ... | python | edit | 1 | 0 | mit | 27557975023003e2d56943221f422a148cb0efa2 | hatbot-team/hatbot,hatbot-team/hatbot,hatbot-team/hatbot,hatbot-team/hatbot | models/scorefeedback.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\nfrom __future__ import print_function\nimport os\nimport sys\nimport argparse\nimport logging\n\n```\n\nApply this change: Add OAuth authentication and config settings load/save"
},
{
"role": "assistant",
... | python | edit | 8 | 4 | mit | 7d130a447786c61c7bfbe6bfe2d87b2c28e32eb6 | petarov/shut-up-bird | shut-up-bird.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom celery.loaders.djangoapp import Loader as DjangoLoader\nfrom celery.loaders.default import Loader as DefaultLoader\nfrom django.conf import settings\nfrom django.core.management import setup_environ\n\n\"\"\"\n.. class:: Loa... | python | edit | 1 | 0 | bsd-3-clause | 58ce11d293d19247e2765176983edc5e552bdfd5 | frac/celery,cbrepo/celery,cbrepo/celery,mitsuhiko/celery,ask/celery,frac/celery,ask/celery,WoLpH/celery,mitsuhiko/celery,WoLpH/celery | celery/loaders/__init__.py | rejected_duplicate | Near-duplicate of sample 22934 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport unittest\nfrom flask_app import app\nfrom config import configobj\n\nclass TestCase(unittest.TestCase):\n def setUp(self):\n super(TestCase, self).setUp()\n self.app = app.app.test_client()\n ... | python | edit | 4 | 1 | mit | f2a31c4a203d06fd83086f3789e52be94320c691 | getslash/mailboxer,getslash/mailboxer,getslash/mailboxer,vmalloc/mailboxer,vmalloc/mailboxer,vmalloc/mailboxer | tests/test_utils/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom framework.routing import Rule\n\n\nclass RuleTestCase(unittest.TestCase):\n\n def _make_rule(self, **kwargs):\n def vf():\n return {}\n\n return Rule(\n kwargs.get('routes', ['/',... | python | edit | 1 | 1 | apache-2.0 | 7f9c9b947948654d7557aa0fcfbb1c015521da9b | caneruguz/osf.io,brandonPurvis/osf.io,rdhyee/osf.io,KAsante95/osf.io,pattisdr/osf.io,KAsante95/osf.io,barbour-em/osf.io,HarryRybacki/osf.io,mluke93/osf.io,aaxelb/osf.io,jinluyuan/osf.io,ZobairAlijan/osf.io,wearpants/osf.io,sbt9uc/osf.io,ticklemepierce/osf.io,jnayak1/osf.io,caseyrygt/osf.io,kwierman/osf.io,adlius/osf.io... | tests/modular_templates/routing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2015, 2016 OpenMarket Ltd\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 Licen... | python | edit | 1 | 1 | apache-2.0 | 507b8bb0910ef6fae9c7d9cb1405a33c4e4b6e8e | matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse | synapse/config/password.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Formatters for creating documents.\n\nA formatter is an object which accepts an output stream (usually a file or\nstandard output) and then provides a structured way for writing to that stream.\nAll formatters should provide 'title', ... | python | edit | 1 | 1 | mit | 389679c0fc575bb03bfa4e625de16eb7ed9c3a04 | testing-cabal/testdoc | testdoc/formatter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom local_settings import *\n\nDEBUG = False\n\nALLOWED_HOSTS = ['uchicagohvz.org']\n\nADMINS = (\n ('Administrator', '<EMAIL>'),\n)\nSERVER_EMAIL = '<EMAIL>'\n\n# Database\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.... | python | edit | 2 | 0 | mit | 20ed56d04f029fa4121b23db94dda19167fd054e | kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz | uchicagohvz/production_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport pytest\n\n\ndef test_qtwebenginewidgets():\n \"\"\"Test the qtpy.QtWebSockets namespace\"\"\"\n from qtpy import QtWebEngineWidgets\n\n assert QtWebEngineWidgets.QWebEnginePage is no... | python | edit | 3 | 1 | mit | dc09143973640b2873dae7434ce654535fbfdd8c | goanpeca/qtpy,goanpeca/qtpy,davvid/qtpy,spyder-ide/qtpy,davvid/qtpy | qtpy/tests/test_qtwebenginewidgets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Access ADCs vias SysFS interface.\"\"\"\n\nimport glob\n\n\nclass ADC(object):\n\n def __init__(self, num, base_filename='/sys/devices/ocp.*/helper.*/AIN'):\n self.num = num\n # Need to read a glob here, since numberi... | python | edit | 1 | 5 | mit | c1928c65c308410205ff89a4be8910cd54614be0 | IEEERobotics/pybbb | bbb/adc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport subprocess\nimport sys\n\n\ndef main():\n ip = '127.0.0.1'\n port = 5000\n workers_count = 4\n if len(sys.argv) > 1:\n for arg in sys.argv[1:]:\n if ':' in arg:\n i... | python | edit | 1 | 6 | mit | 30b6d886670b7ba65aee9b130ec50d577c778649 | bondarevts/flucalc,bondarevts/flucalc,bondarevts/flucalc | run_server.py | rejected_duplicate | Near-duplicate of sample 15494 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets Authors.\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 Li... | python | edit | 1 | 1 | apache-2.0 | 722b588629fa0986e8d7c06ff135d81c08ad8fab | tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets | tensorflow_datasets/object_detection/waymo_open_dataset_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.7\n\nimport sys\n\ndel __builtins__.__dict__['__import__']\ndel __builtins__.__dict__['reload']\n\nflag = \"eval_is_fun\"\n\nclass UnbufferedStream(object):\n def __init__(self, stream):\n self.stream = stream\n... | python | edit | 5 | 3 | mit | 730aaf64635268df8d3c5cd3e1d5e2448644c907 | james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF | problem-static/Intro-Eval_50/admin/eval.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose import *\n\nimport gutenberweb\n\ndef test_foo():\n print \"BAR\"\n\n\nif __name__ == \"__main__\":\n main()\n\n```\n\nApply this change: Add proper tests for gutenbergweb"
},
{
"role": "assistant",
"content": "i... | python | edit | 4 | 10 | bsd-3-clause | 35a7e3e892135d805dfe73b8ce66f986651354f5 | pv/mgutenberg,pv/mgutenberg | tests/test_gutenbergweb.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe L{Image<image.Image>} class provides the interface which should be used\nby users at the application level. The image provides a coordinate map,\nand the data itself.\n\n\nClass structure::\n\n Application Level\n\nTODO: I thi... | python | edit | 6 | 0 | bsd-3-clause | 4b687d702face412330580ed88f71c897dfa5e6a | bthirion/nipy,arokem/nipy,alexis-roche/register,alexis-roche/nireg,alexis-roche/register,arokem/nipy,nipy/nipy-labs,arokem/nipy,alexis-roche/niseg,alexis-roche/nipy,alexis-roche/nipy,alexis-roche/nireg,nipy/nireg,alexis-roche/register,bthirion/nipy,arokem/nipy,alexis-roche/niseg,nipy/nireg,bthirion/nipy,alexis-roche/ni... | nipy/core/image/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom vext.cmdline import do_check\n\n\nclass TestVextCommandLineHelpers(unittest.TestCase):\n def test_do_check(self):\n # Stub check: verifies no exceptions are thrown.\n do_check([\"*\"])\n\n\nif __name... | python | edit | 1 | 1 | mit | 3d83904e409eecfd44b0c0ca053f78da5c9c89a4 | stuaxo/vext | tests/test-vext-cmdline.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom bs4 import BeautifulSoup \n\nURL = 'https://finance.yahoo.com/quote/'\nCONF_FILE = \"ticker-updates.conf\"\n\n\ndef get_securities_list():\n with open(CONF_FILE, \"r\") as conf_file:\n securities = conf_file.rea... | python | edit | 1 | 2 | mit | f758513880cca46937833779ddf099b2ac88afc9 | daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various | utilities/ticker-update.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\nfrom builtins import dict, str\nimport os\nimport glob\nfrom indra import sparser\n\nbase_folder = os.path.join(os.environ['HOME'],\n 'data/... | python | edit | 4 | 2 | bsd-2-clause | 2995accb21d9b8c45792d12402470cfcf322d6a1 | johnbachman/belpy,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy | models/phase3_eval/process_sparser.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# modified from http://www.zopyx.com/blog/a-python-decorator-for-measuring-the-execution-time-of-methods\nimport time\n\nfrom django.conf import settings\n\nfrom slowpoke.models import *\n\n\nclass time_my_test(object):\n\n def __init__(... | python | edit | 4 | 1 | bsd-3-clause | 13c6748313e1114853a45e25bcc8135a8b5f5240 | adamfast/django-slowpoke | slowpoke/decorator.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom reversion import revisions\n\nfrom wafer.pages.models import Page\n\n\nclass PageSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = Page\n exclude = ('_content_re... | python | edit | 1 | 1 | isc | 3ffaf00e18208a1877c3d2286ba284071d5d3e09 | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/pages/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nyes_re = re.compile(\"(\\s|^)(Yes|YES|yes)(\\s|[,.]|$)\")\nno_re = re.compile(\"(\\s|^)(No|NO|no)(\\s|[,.]|$)\")\n\n\ndef has_a_yes(message):\n \"\"\"\n Returns True if it matches the yes regex\n \"\"\"\n return yes... | python | edit | 3 | 6 | mit | 6d52364c44cf7244b920d04fe6f5917cd99b7377 | iwi/linkatos,iwi/linkatos | linkatos/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2017-2019 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test deprecation... | python | edit | 1 | 1 | mit | e811b1ca77f7b8ae090be369fd89d4fe8c7c3f6e | Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc | test/functional/rpc_deprecated.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom pynoaa import PyNOAA\n\nnoaa = PyNOAA(\"KEQrNcMDIrZMyWtDslGKEkgETXbgIvjZ\")\n@pytest.mark.parametrize('startdate,locationid',(\n ['1994-05-20',None],\n [None,['FIPS:36','FIPS:37']],\n))\ndef test_datasets(startdate... | python | edit | 1 | 1 | mit | 3570f3a1681cf2b5ad1ba31026ae9d13fcc3e9c2 | lincis/pynoaa | test_base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"patch hash column\n\nRevision ID: 51775a13339d\nRevises: 016f138b2da8\nCreate Date: 2016-06-17 13:46:10.921685\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '51775a13339d'\ndown_revision = '187eade64ef0'\n\nfrom al... | python | edit | 1 | 1 | apache-2.0 | 3a7f9520fce968d8292581caf6b94a6ce833b335 | dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes | migrations/versions/51775a13339d_patch_hash_column.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom runner.koan import *\n\n\nclass AboutDecoratingWithFunctions(Koan):\n def addcowbell(fn):\n fn.wow_factor = 'COWBELL BABY!'\n return fn\n\n @addcowbell\n def medi... | python | edit | 3 | 1 | mit | 1fd73a2c07ce66a8dba0ef08210612a2535538ea | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | jesusmtnez/python/koans/koans/about_decorating_with_functions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom distutils import ccompiler\n\n\ndef test_set_include_dirs(tmp_path):\n \"\"\"\n Extensions should build even if set_include_dirs is invoked.\n In particular, compiler-specific paths should not be overridden.\n \"\"\"\n ... | python | edit | 1 | 2 | mit | dc1130766d356e1e9a613ba924e4af942631428c | pypa/setuptools,pypa/setuptools,pypa/setuptools | distutils/tests/test_ccompiler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2011 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\n\"\"\"Set of utilities to add commands to a buildbot factory.\n\nThis... | python | edit | 1 | 1 | bsd-3-clause | ce86f13553e97e3e86f8c07bf09228895aacd3c5 | eunchong/build,eunchong/build,eunchong/build,eunchong/build | scripts/master/factory/syzygy_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom invoke import task, Collection\n\n@task\ndef dummy(c):\n pass\n\nns = Collection(dummy, subcollection=Collection())\n\n```\n\nApply this change: Fix a dumb test fixture mistake"
},
{
"role": "assistant",
"content": "from... | python | edit | 1 | 1 | bsd-2-clause | 3310d8a83871fc0644045295db60cb3bbfe7f141 | pyinvoke/invoke,pyinvoke/invoke | tests/_support/empty_subcollection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDEBUG = True\n\nDATABASE_ENGINE = 'sqlite3'\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n }\n}\n\nSECRET_KEY = '123'\n\nINSTALLED_APPS = [\n 'django.contrib.auth',\n... | python | edit | 1 | 0 | bsd-3-clause | 7ecec2d2b516d9ae22a3a0f652424045d547d811 | felixxm/django-object-tools,praekelt/django-object-tools,shubhamdipt/django-object-tools,shubhamdipt/django-object-tools,praekelt/django-object-tools,sky-chen/django-object-tools,felixxm/django-object-tools,sky-chen/django-object-tools | test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\nimport cronjobs\n\nimport commonware.log\nlog = commonware.log.getLogger('comrade.cron')\n\nclass Command(BaseCommand):\n help = 'Run a ... | python | edit | 3 | 5 | mit | 742ce33b0acc576aab72d625d2accc86a53b4023 | bueda/django-comrade | comrade/cronjobs/management/commands/cron.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDEBUG = True\nSTOPS = [\n {'line_name':'12', 'stop_id':'14657', 'stop_name':'Folsom St & 3rd St'},\n {'line_name':'10', 'stop_id':'13009', 'stop_name':'2nd St & Harrison St'},\n {'line_name':'8X', 'stop_id':'13723', 'stop_name':'Br... | python | edit | 2 | 0 | mit | c94b8ce6bc451fbc0740120e0cf6e6680e97f69c | albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo | src/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .delphi_epidata import Epidata\n\nname = 'delphi_epidata'\n__version__ = '0.0.12'\n\n```\n\nApply this change: Set self-reported python client version to 0.1.0"
},
{
"role": "assistant",
"content": "from .delphi_epidata imp... | python | edit | 3 | 0 | mit | 97f59c20ca5bcb2388cada55044e0ab5bdc79669 | cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata | src/client/packaging/pypi/delphi_epidata/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import NamedTuple\nfrom lexos.models.filemanager_model import FileManagerModel\nfrom lexos.receivers.base_receiver import BaseReceiver\n\n\nclass KMeansOption(NamedTuple):\n \"\"\"The typed tuple to hold kmeans options.\"\"\"... | python | edit | 1 | 2 | mit | 35296b1c87a86a87fbcf317e26a497fc91c287c7 | WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos | lexos/receivers/kmeans_receiver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nimport asyncio\nimport os\nimport signal\nimport sys\n\n#Set up Client State\nCLIENT_TOKEN=os.environ['TOKEN']\n\n#Create Discord client\nclient = discord.Client()\n\n#Handle shutdown gracefully\ndef sigterm_handler(signum, ... | python | edit | 1 | 5 | mit | b64e7714e581cfc0c0a0d0f055b22c5edca27e24 | gryffon/SusumuTakuan,gryffon/SusumuTakuan | susumutakuan.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nletters = 'bcdfghjklmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ'\n\nphrase = input()\noutput = ''\nvowels = ''\n\nphrase = phrase.replace(' ', '')\n\nfor char in phrase:\n if char in letters:\n output += char\n else:\n vowels += cha... | python | edit | 1 | 0 | mit | 8f280cece4d59e36ebfeb5486f25c7ac92718c13 | DoublePlusGood23/lc-president-challenge | third_problem.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tsparser import config\nfrom tsparser.parser import BaseParser, ParseException\nfrom tsparser.parser.gps import GPSParser\nfrom tsparser.parser.imu import IMUParser\nfrom tsparser.sender import Sender\n\n\ndef parse(input_file=None):\n... | python | edit | 1 | 4 | mit | 551dddbb80d512ec49d8a422b52c24e98c97b38c | m4tx/techswarm-receiver | tsparser/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import timedelta\n\nfrom django.conf import settings as django_settings\n\ndefault = {\n 'FULLCALENDAR_FIRST_WEEKDAY': 0,\n 'FULLCALENDAR_OCCURRENCE_DURATION': timedelta(hours=1),\n 'FULLCALENDAR_SITE_COLORS': {}\n}\n... | python | edit | 1 | 0 | mit | 6d7e597ce216093d52ecdcb7db5c087dc6040bb1 | jonge-democraten/mezzanine-fullcalendar | fullcalendar/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\ndef config():\n return {\n 'is-oracle': True,\n 'version': 'oracle-java8',\n }\n\n\n```\n\nApply this change: Switch from dictionary to namedtuple"
},
{
"role": "assistant",
"conten... | python | edit | 1 | 1 | mit | 7674437d752be0791688533dd1409fa083672bb2 | hatchery/Genepool2,hatchery/genepool | genes/java/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nSTATICFILES_DIRS = (\n root('static'),\n)\n\n\nOFFLINE_OUTPUT_DIR = '/tmp/'\n\nINSTALLED_APPS += (\n 'django_nose',\n)\n\nNOSE_ARGS = [\n '--exclude-dir=regulations/uit... | python | edit | 5 | 0 | cc0-1.0 | d23a68d464c62cdefb76dbe5855110374680ae61 | willbarton/regulations-site,ascott1/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,18F/regulations-site,grapesmoker/regulations-site,adderall/regulations-site,ascott1/regulations-site,grapesmoker/regulations-site,EricSchles/regulations-site,EricSchles/regulations-site,grapesmoker/regul... | regulations/settings/dev.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# (c) 2012, Michael DeHaan <<EMAIL>>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Found... | python | edit | 1 | 3 | mit | 91a77b860387ebed146b9e4e604d007bfabf0b9e | thaim/ansible,thaim/ansible | lib/ansible/plugins/action/normal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport h2o\n\nfrom h2o.tree import H2OTree\nfrom h2o.estimators import H2OIsolationForestEstimator\nfrom tests import pyunit_utils\n\n\ndef check_tree(tree, tree_number, tree_class = None):\n assert tree is not None\n assert len(tree)... | python | edit | 1 | 1 | apache-2.0 | 1657e46cd5c2a81df4cbb73b292b0bf9072d5c51 | h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3 | h2o-py/tests/testdir_tree/pyunit_tree_irf.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.db import migrations\nimport uuid\nfrom cla_common.constants import RESEARCH_CONTACT_VIA\n\n\ndef create_default_contact_for_research_methods(apps, schema_edito... | python | edit | 1 | 2 | mit | fc7f51877b6b991ad5a25afb755dd7a35e91dfea | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/legalaid/migrations/0022_default_contact_for_research_methods.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\nclass ProposalConfig(AppConfig):\n name = \"proposal\"\n\n def ready(self):\n # Register tasks with Celery:\n from . import tasks\n\n```\n\nApply this change: Set up the proposal task... | python | edit | 1 | 1 | mit | 4f2fa4e43b314c9d05e0b9b9e73641463c16a9cb | cityofsomerville/citydash,codeforboston/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,cityofsomerville/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/citydash,codeforboston/cornerwise,cityofsomerville/cornerwise,cityofsomerville/cornerwise | server/proposal/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__version__ = '$Id$'\n\nimport family\n\n# The Wikia Search family\n# user-config.py: usernames['wikia']['wikia'] = 'User name'\n\nclass Family(family.Family):\n def __init__(self):\n family.Family.__in... | python | edit | 1 | 1 | mit | 31ea46e1ece2174bd5d16e2234576c4ca28a054d | azatoth/pywikipedia | pywikibot/families/wikia_family.py | rejected_duplicate | Near-duplicate of sample 3352 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport os\nimport shutil\nimport subprocess\nimport tempfile\nfrom string import Template\n\nfrom .artifact import Artifact\n\nLOG = logging.getLogger(__name... | python | edit | 1 | 3 | bsd-3-clause | e0db9a970c6ea778419cc1f20ca66adedffb7aae | hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2 | utils/mwm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom surveyextractor import QualtricsExtractor\nimport getopt\nimport sys\n\n### Script for scheduling regular EdxQualtrics updates\n### Usage for cron should be \"cronRefreshEdxQualtrics.py -m -s -r\"\n\n# Append directory for dependencies... | python | edit | 1 | 0 | bsd-3-clause | c7d9287b770a0033cb54f9c1f9ac5f8beb25d528 | paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation | scripts/cronRefreshEdxQualtrics.py | rejected_duplicate | Near-duplicate of sample 11223 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import http\nfrom django.views.generic import DetailView\n\nclass JSONResponseDetailView(DetailView):\n def render_to_json_response(self, context):\n \"Returns a JSON response containing 'context' as payload\"\n ... | python | edit | 1 | 2 | mit | c55bf8d153c47500615b8ded3c95957be8ee70a3 | okfse/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,okfse/froide,catcosmo/froide,ryankanno/froide,fin/froide,LilithWittmann/froide,okfse/froide,ryankanno/froide,ryankanno/froide,LilithWittmann/froide,fin/froide,CodeforHawaii/froide,LilithWittmann/froide... | froide/helper/json_view.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .models import Channel\n\n\ndef channel_context(request):\n return {'opps_menu': Channel.objects.all()}\n\n```\n\nApply this change: Apply filter channel published on menu list (channel context processors)"
... | python | edit | 1 | 1 | mit | 899e3c9f81a43dcb94e290ce0a86f128bd94effd | YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,opps/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,opps/opps | opps/channel/context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\n\nfrom commit import Commitment\n\nwhatthecommit = 'http://whatthecommit.com/'\nrandomMessages = Commitment()\n\nclass CommitmentToClipboardCommand(sublime_plugin.WindowCommand):\n def run(self):\n ... | python | edit | 5 | 2 | mit | 41ea0dd8c48ef8a336422482e9bbd1911bb7e168 | janraasch/sublimetext-commitment,janraasch/sublimetext-commitment | Commitment.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .util import get_settings, load_local_settings, load_secret_key\nfrom . import base\n\nsettings = get_settings(base)\nload_local_settings(settings, \"local_settings\")\nload_secret_key(settings)\n\nif not settings[\"DEBUG\"] and settin... | python | edit | 1 | 0 | mit | 2cde35bb6f948f861026921daf7fe24b353af273 | vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi | kerrokantasi/settings/__init__.py | rejected_duplicate | Near-duplicate of sample 4509 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport dumper.utils\n\n\ndef invalidate_paths(paths):\n '''\n Invalidate all pages for a certain path.\n '''\n for path in paths:\n for key in all_cache_keys_from_path(path):\n dumper.utils.cache.delete(key)\n\... | python | edit | 1 | 3 | mit | bca6f6041e9f49d1d25d7a9c4cb88080d88c45b1 | saulshanabrook/django-dumper | dumper/invalidation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport greenado\n\nfrom greenado.testing import gen_test\nfrom tornado.testing import AsyncTestCase\n\nfrom tornado import gen\n\n@gen.coroutine\ndef coroutine():\n raise gen.Return(1234)\n\n\nclass GreenadoTests(AsyncTestCase):\n \... | python | edit | 1 | 1 | apache-2.0 | 8fd65190a2a68a7afeab91b0a02c83309f72ccd6 | virtuald/greenado,virtuald/greenado | tests/test_testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport functools\nimport os\nimport signal\nimport sys\n\nimport docker_utils\n\n\ndef handler(name, signum, frame):\n print('Should kill', name)\n try:\n docker_utils.client.remove_container(name, forc... | python | edit | 1 | 4 | mit | 38eb6221ca41446c0c4fb1510354bdc4f00ba5f1 | waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode | serfnode/build/handler/launcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom control_milight.utils import process_automatic_trigger\nimport serial\nimport time\n\nclass Command(BaseCommand):\n args = ''\n help = 'Listen for 433MHz radio me... | python | edit | 4 | 6 | bsd-3-clause | b0806c0b8b950a3007107cc58fb21e504cf09427 | ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display | homedisplay/control_milight/management/commands/listen_433.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport re\nfrom django.core.urlresolvers import reverse\nfrom django.conf import settings\n\n\ndef reverse_no_i18n(viewname, *args, **kwargs):\n result = reverse(viewname, *args, **kwargs)\n m = re.match(r'(/[^/]*)(/.... | python | edit | 1 | 5 | mit | f1b22cfcca8470a59a7bab261bbd2a46a7c2a2ed | socib/django-socib-cms,socib/django-socib-cms | socib_cms/cmsutils/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\n\nfrom framework.exceptions import HTTPError\n\nfrom website.project.decorators import _inject_nodes\nfrom website.archiver import ARCHIVER_UNCAUGHT_ERROR\nfrom website.archiver import utils\n\ndef fail_archive_on_error(fu... | python | edit | 1 | 2 | apache-2.0 | d2fb1f22be6c6434873f2bcafb6b8a9b714acde9 | amyshi188/osf.io,caneruguz/osf.io,TomHeatwole/osf.io,SSJohns/osf.io,mluke93/osf.io,DanielSBrown/osf.io,Nesiehr/osf.io,jeffreyliu3230/osf.io,chrisseto/osf.io,acshi/osf.io,mattclark/osf.io,billyhunt/osf.io,caneruguz/osf.io,cosenal/osf.io,SSJohns/osf.io,njantrania/osf.io,mattclark/osf.io,alexschiller/osf.io,samchrisinger/... | website/archiver/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User, Group\nfrom django.dispatch import receiver\nfrom django.db.models.signals import post_save\nfrom django.conf import settings\nfrom rest_framework.authtoken.models import Token\n\n\n@receiver(pos... | python | edit | 1 | 2 | bsd-3-clause | 54c81494cbbe9a20db50596e68c57e1caa624043 | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | src-django/authentication/signals/user_post_save.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on 1 jun. 2013\n\n@author: sander\n'''\nfrom .container_node import ContainerNode\n\n\nclass DDTContainerNode(ContainerNode):\n pass\n\n```\n\nApply this change: Add a bit of docs"
},
{
"role": "assistant",
"cont... | python | edit | 1 | 0 | bsd-3-clause | d636d8e74514bbda29170b18ef3de90dfbd96397 | steffann/pylisp | pylisp/application/lispd/address_tree/ddt_container_node.py | rejected_duplicate | Near-duplicate of sample 22981 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Search router.\"\"\"\nfrom rest_framework.routers import DefaultRouter, Route\n\n\nclass SearchRouter(DefaultRouter):\n \"\"\"Custom router for search endpoints.\n\n Search endpoints don't follow REST principles and thus don't n... | python | edit | 1 | 0 | apache-2.0 | d8cb4384f32f4d0e20f3212a36cc01915260f7a8 | genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio | tests/routers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom graphene.storage.id_store import *\n\n\nclass GeneralStoreManager:\n \"\"\"\n Handles the creation/deletion of nodes to the NodeStore with ID recycling\n \"\"\"\n\n def __init__(self, store):\n \"\"\"\n Create... | python | edit | 4 | 2 | apache-2.0 | 4eb4a2eaa42cd71bf4427bdaaa1e853975432691 | PHB-CS123/graphene,PHB-CS123/graphene,PHB-CS123/graphene | graphene/storage/intermediate/general_store_manager.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom greta.models import Repository\nfrom competition.models import Team\n\nfrom .models import TeamClient, TeamSubmission\n\n\nclass TeamSerializer(serializers.ModelSerializer):\n\n class Meta:\n ... | python | edit | 1 | 2 | bsd-3-clause | 6a8c8bc0e407327e5c0e4cae3d4d6ace179a6940 | siggame/webserver,siggame/webserver,siggame/webserver | webserver/codemanagement/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pkgutil\nimport importlib\nimport pyvisa\n\ninstrument_map = {}\nfor loader, name, is_pkg in pkgutil.iter_modules(__path__):\n\tmodule = importlib.import_module('auspex.instruments.' + name)\n\tif hasattr(module, \"__all__\"):\n\t\tg... | python | edit | 2 | 3 | apache-2.0 | da05fe2d41a077276946c5d6c86995c60315e093 | BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex | src/auspex/instruments/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python3\n\nimport sys\nimport os\nimport math\nfrom astropy.io import fits\n\ninputFolder = sys.argv[1]\noutputFolder = sys.argv[2]\neLo = int(sys.argv[3])\neHi = int(sys.argv[4])\nbinSize = int(sys.argv[5])\n\n\nfnames = os.lis... | python | edit | 1 | 0 | mit | 694df5ba69e4e7123009605e59c2b5417a3b52c5 | fauzanzaid/IUCAA-GRB-detection-Feature-extraction | tools/fitsevt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport io\nimport unittest.mock\nimport contextlib\nimport textwrap\n\nfrom jacquard.cli import main\nfrom jacquard.storage.dummy import DummyStore\n\ndef test_smoke_cli_help():\n try:\n output = io.StringIO()\n with contex... | python | edit | 1 | 2 | mit | 56d3db6aae71c88ff8b55bb1d173abc025be7e8c | prophile/jacquard,prophile/jacquard | jacquard/tests/test_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport builtins\n\nfrom cpp.cpprenderer import EeyCppRenderer\nfrom environment import EeyEnvironment\nfrom values import *\n\ndef parse_tree_string_to_values( string ):\n\treturn eval( string )\n\ndef non_empty_line( ln ):\n\treturn ( ln... | python | edit | 4 | 2 | mit | e9df15b0f084ed9e026a5de129b109a3c546f99c | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper | src/libeeyore/parse_tree_to_cpp.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport time\n\nfrom guild.actor import *\nfrom guild.components import Backplane, PublishTo, SubscribeTo, Printer\n\n\nclass Producer(Actor):\n @process_method\n def process(self):\n self.output(\"hello\")\... | python | edit | 10 | 1 | apache-2.0 | 6e660da290db674eebb0c353662e5400bc735397 | sparkslabs/guild,sparkslabs/guild,sparkslabs/guild | examples/backplane_demo.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\nimport sys\n\n\nclass ProgressBar(object):\n def __init__(self, filename, fmt):\n self.filename = filename\n self.fmt = fmt\n self.progress = 0\n self.total = 0\n ... | python | edit | 1 | 4 | bsd-3-clause | 1d52996a88eb5aed643fe61ee959bd88373401b3 | jhaals/filebutler-upload | filebutler_upload/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom redash.models import db\nfrom playhouse.migrate import PostgresqlMigrator, migrate\n\nif __name__ == '__main__':\n migrator = PostgresqlMigrator(db.database)\n\n with db.database.transaction():\n # Change the uniqueness co... | python | edit | 3 | 0 | bsd-2-clause | 07f96a22afe2d010809d03077d9cdd5ecb43d017 | akariv/redash,chriszs/redash,jmvasquez/redashtest,pubnative/redash,akariv/redash,amino-data/redash,ninneko/redash,ninneko/redash,denisov-vlad/redash,EverlyWell/redash,ninneko/redash,amino-data/redash,44px/redash,moritz9/redash,guaguadev/redash,moritz9/redash,guaguadev/redash,chriszs/redash,pubnative/redash,44px/redash,... | migrations/0020_change_ds_name_to_non_uniqe.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom core.observables import Observable\n\n\nclass MacAddress(Observable):\n regex = r'(?P<search>(([0-9A-Fa-f]{1,2}[.:-]?){5,7}([0-9A-Fa-f]{1,2})))'\n\n exclude_fields = Observa... | python | edit | 2 | 2 | apache-2.0 | 169dda227f85f77ac52a4295e8fb7acd1b3184f5 | yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti | core/observables/mac_address.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nclass Engine:\n\n def __init__(self,\n response_pairs,\n knowledge={}):\n self.response_pairs = response_pairs\n self.knowledge = knowledge\n\n def chat(self, ... | python | edit | 1 | 4 | mit | 355372ff51a84c0a6d7d86c0ef1fb12def341436 | carrotflakes/invada | invada/engine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom surveyextractor import QualtricsExtractor\nimport getopt, sys\n\n# Script for scheduling regular EdxQualtrics updates\n# Usage for cron should be \"cronRefreshEdxQualtrics.py -m -s -r\"\n\nqe = QualtricsExtractor()\nopts, args = getopt... | python | edit | 1 | 0 | bsd-3-clause | 196b9547b4dbcbfbf4891c7fd3ea3b9944018430 | paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation | scripts/cronRefreshEdxQualtrics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCopyright 2015 by Tobias Houska\nThis file is part of Statistical Parameter Estimation Tool (SPOTPY).\n\n:author: Tobias Houska\n\nThis example implements the Rosenbrock function into SPOT. \n'''\nfrom __future__ import absolute_impor... | python | edit | 2 | 1 | mit | e2c92e8b6e8fb10addc73986914014b278598470 | bees4ever/spotpy,bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy,thouska/spotpy,thouska/spotpy | spotpy/examples/spot_setup_standardnormal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom app import db\n\nclass Digit(db.Model):\n id = db.Column(db.INTEGER, primary_key=True)\n label = db.Column(db.INTEGER)\n tsne_x = db.Column(db.REAL)\n tsne_y = db.Column(db.REAL)\n tsne_z = db.Column(db.REAL)\n array ... | python | edit | 1 | 4 | mit | 0b77e09ac16006d1baa6a5f4093b51c1a13863e9 | starcalibre/MNIST3D,starcalibre/MNIST3D,starcalibre/MNIST3D | app/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import sitemaps\nfrom firecares.firestation.models import FireDepartment\nfrom django.db.models import Max\nfrom django.core.urlresolvers import reverse\n\n\nclass BaseSitemap(sitemaps.Sitemap):\n protocol = 'https'\n... | python | edit | 1 | 3 | mit | bbe835c8aa561d8db58e116f0e55a5b19c4f9ca4 | FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares | firecares/sitemaps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nSplatalogue Catalog Query Tool\n-----------------------------------\n\n:Author: Adam Ginsburg (<EMAIL>)\n\n:Originally contributed by:\n\n Magnus Vilhelm Persson (... | python | edit | 4 | 0 | bsd-3-clause | 1b2fa45766b1ea5945f246d74bc4adf0114abe84 | imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery | astroquery/splatalogue/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nApplication configuration\n\"\"\"\n\nimport os\nfrom os.path import dirname, join\n\n\n# get settings from environment, or credstash if running in AWS\nenv = os.environ\nif env.get('SETTINGS') == 'AWS':\n ... | python | edit | 1 | 0 | mit | c973385f877d940231deb8d81e929647eadc280a | crossgovernmentservices/csd-notes,crossgovernmentservices/csd-notes,crossgovernmentservices/csd-notes | app/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom .core import istask, get\nfrom .context import set_options\n\ntry:\n from .imperative import do, value\nexcept ImportError:\n pass\n\n__version__ = '0.7.3'\n\n``... | python | edit | null | null | bsd-3-clause | d9f623baaa8e1d1075f9132108ed7bb11eea39b0 | vikhyat/dask,cowlicks/dask,ContinuumIO/dask,blaze/dask,ContinuumIO/dask,mraspaud/dask,mrocklin/dask,cpcloud/dask,jakirkham/dask,chrisbarber/dask,jakirkham/dask,blaze/dask,mikegraham/dask,pombredanne/dask,gameduell/dask,pombredanne/dask,dask/dask,dask/dask,vikhyat/dask,mrocklin/dask,jcrist/dask,mraspaud/dask,jcrist/dask | dask/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sqlite3\n\n\nCREATE_SONG_QUEUE = '''\nCREATE TABLE IF NOT EXISTS \njukebox_song_queue (\n spotify_uri TEXT,\n has_played INTEGER DEFAULT 0\n);\n'''\n\n\nif __name__ == '__main__':\n\n conn = sqlite3.connect('jukebox.db')\n ... | python | edit | 1 | 0 | mit | e4ad2863236cd36e5860f1d17a06ca05e30216d5 | projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox | make_database.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404\n\nfrom .models import Post\n\n\nclass PostGetMixin:\n date_field = 'pub_date'\n month_url_kwarg = 'month'\n year_url_kwarg = 'year'\n\n errors = {\n 'url_kwargs':\n ... | python | edit | 4 | 6 | bsd-2-clause | 81de62d46d7daefb2e1eef0d0cc4f5ca5c8aef2f | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | blog/utils.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nMAST Query Tool\n===============\n\nThis module contains various methods for querying the MAST Portal.\n\"\"\"\n\nfrom astropy import config as _config\n\n\nclass Conf... | python | edit | 1 | 0 | bsd-3-clause | cc7e3e5ef9d9c59b6b1ac80826445839ede73092 | imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery | astroquery/mast/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport numpy as np\nfrom numpy.testing import assert_allclose, assert_equal\n\nfrom ....tests.helper import pytest\n\nfrom ..make_kernel import make_kernel\n\ntry:\n import... | python | edit | 2 | 1 | bsd-3-clause | 58d7592c603509f2bb625e4e2e5cb31ada4a8194 | AustereCuriosity/astropy,astropy/astropy,lpsinger/astropy,MSeifert04/astropy,larrybradley/astropy,StuartLittlefair/astropy,dhomeier/astropy,kelle/astropy,joergdietrich/astropy,mhvk/astropy,kelle/astropy,joergdietrich/astropy,StuartLittlefair/astropy,tbabej/astropy,dhomeier/astropy,StuartLittlefair/astropy,mhvk/astropy,... | astropy/nddata/convolution/tests/test_make_kernel.py | rejected_duplicate | Near-duplicate of sample 630 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom boto import ec2, utils\nimport credstash\n\n\nclass AWSIntanceEnv(object):\n\n def __init__(self):\n metadata = utils.get_instance_metadata()\n self.instance_id = metadata['instance-id']\n self.region = metadata... | python | edit | 1 | 2 | mit | 5eb2c6f7e1bf0cc1b73b167a08085fccf77974fe | crossgovernmentservices/csd-notes,crossgovernmentservices/csd-notes,crossgovernmentservices/csd-notes | app/config/aws.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom uuid import uuid4\n\nfrom changes.config import db\nfrom changes.models import Author\nfrom changes.testutils import APITestCase\n\n\nclass AuthorBuildListTest(APITestCase):\n def test_simple(self):\n fake_author_id = uuid4()... | python | edit | 1 | 1 | apache-2.0 | 4d40e9db4bd6b58787557e8d5547f69eb67c9b96 | wfxiang08/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes | tests/changes/api/test_author_build_index.py | rejected_duplicate | Near-duplicate of sample 16174 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.utils import simplejson\n\nfrom javascript_settings.configuration_builder import \\\n DEFAULT_CONFIGURATION_BUILDER\n\nregister = template.Library()\n\n\n@register.tag(name='javascript_settings')\... | python | edit | 1 | 1 | mit | 8e58d7cccb837254cc433c7533bff119cc19645d | pozytywnie/django-javascript-settings | javascript_settings/templatetags/javascript_settings_tags.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.