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\"\"\"\nRun all migrations\n\"\"\"\nimport imp\nimport os\nimport sys\nimport pymongo\nfrom os.path import join\nimport logging\nfrom backdrop.core.database import Database\n\nlogging.basicConfig(level=logging.DEBUG)\nlog = logging.getLogge... | python | edit | 3 | 4 | mit | a319691a057423a610d91521e2f569250117db09 | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | run_migrations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom corehq.util.log import with_progress_bar\nfrom corehq.util.couch import iter_update, DocUpdate\nfrom django.core.management.base import BaseCommand\nfrom ... | python | edit | 1 | 1 | bsd-3-clause | d608ba0892da052f2515d6796e88013c0730dc0b | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/ex-submodules/auditcare/management/commands/gdpr_scrub_user_auditcare.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom TensorMesh import TensorMesh\nfrom CylMesh import CylMesh\nfrom Cyl1DMesh import Cyl1DMesh\nfrom LogicallyRectMesh import LogicallyRectMesh\nfrom TreeMesh import TreeMesh\n\n```\n\nApply this change: Add BaseMesh to the init file."
}... | python | edit | 8 | 0 | mit | c39163bd6e91ca17f123c5919885b90105efc7c4 | simpeg/discretize,simpeg/simpeg,simpeg/discretize,simpeg/discretize | SimPEG/Mesh/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"AWS Spinnaker Application.\"\"\"\nfrom pprint import pformat\n\nfrom foremast.app import base\nfrom foremast.utils import wait_for_task\n\n\nclass SpinnakerApp(base.BaseApp):\n \"\"\"Create AWS Spinnaker Application.\"\"\"\n\n p... | python | edit | 1 | 1 | apache-2.0 | 60759f310f0354d4940c66f826e899bf4c2b76b4 | gogoair/foremast,gogoair/foremast | src/foremast/app/aws.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport requests\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import connection\nfrom requests.exceptions import MissingSchema\n\nfrom bluebottle.clients import properties\n\n\nclass PayoutValidatio... | python | edit | 5 | 6 | bsd-3-clause | b9c175059f0f2f3321ffd495fd46c6f5770afd22 | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/payouts_dorado/adapters.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 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 logging\nimport unittest\n\nfrom telemetry import decorators\nfrom... | python | edit | 1 | 2 | bsd-3-clause | 19a96cb5b687e580bd3bda348a47255394da7826 | dushu1203/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,dednal/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,jaruba/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,... | tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py | rejected_duplicate | Near-duplicate of sample 12619 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport varnish\nimport logging\nfrom django.conf import settings\n\n#STUB config options here\nVARNISH_HOST = settings.VARNISH_HOST\nVARNISH_PORT = settings.VARNISH_PORT\n\nVARNISH_DEBUG = settings.DEBUG\n\nVARNISH_SITE_DOMAIN = \".*\"\n\nc... | python | edit | 1 | 2 | mit | 8aa0813402f5083cb230ba3d457b76dafc371fe5 | RealGeeks/django-cache-purge-hooks,RealGeeks/django-cache-purge-hooks | cache_purge_hooks/backends/varnishbackend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.validators import MinValueValidator\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Duration(models.Model):\n conference = models.ForeignKey(\n \"conferences.Confe... | python | edit | 1 | 1 | mit | 568dce643d9e88ebd9e5b395accb3027e02febb7 | patrick91/pycon,patrick91/pycon | backend/conferences/models/duration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom api.test import BaseTestCase\n\n\nclass TestLogin(BaseTestCase):\n\n @unittest.skip(\"\")\n def test_login(self):\n login_credentials = {\n \"password\": \"qwerty@123\",\n \"usernam... | python | edit | 1 | 1 | mit | ad042127cadc2fd779bdea4d6853102b5d8d0ad0 | EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list | api/tests/test_login.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport nose\nfrom lib.wordfilter import Wordfilter\n\n# Run with `python -m test.wordfilter_test`\nclass Wordfilter_test:\n def setup(self):\n self.wordfilter = Wordfilter()\n\n def teardown(self):\n self.wordfilter = []\n\n def te... | python | edit | 1 | 1 | mit | a9052428e1eee8ec566bd496e1247dae0873d9c9 | dariusk/wordfilter,dariusk/wordfilter,mwatson/wordfilter,hugovk/wordfilter,mwatson/wordfilter,dariusk/wordfilter,hugovk/wordfilter,mwatson/wordfilter,hugovk/wordfilter,dariusk/wordfilter,hugovk/wordfilter,mwatson/wordfilter | test/wordfilter_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates.\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport spe... | python | edit | 1 | 1 | mit | 1082db1f71ed3e84fd4068d3834ce72e744cdcca | facebook/wangle,facebook/wangle,facebook/wangle | build/fbcode_builder/specs/fbthrift.py | rejected_duplicate | Near-duplicate of sample 4388 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nimport cytoolz\n\nfrom ...gold import iob_to_biluo\n\n\ndef iob2json(input_data, n_sents=10, *args, **kwargs):\n \"\"\"\n Convert IOB files into JSON format for use with train... | python | edit | 1 | 9 | mit | 0a6072621570464522cbfa6d939dffccc0fa6503 | explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,honnibal/spaCy | spacy/cli/converters/iob2json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens... | python | edit | 10 | 0 | apache-2.0 | fb837585264e6abe4b0488e3a9dd5c5507e69bf6 | aam-at/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,aldian/tensorflow,sarvex/tensorflow,aldian/tensorflow,davidzchen/tensorflow,ten... | tensorflow/python/distribute/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nimport csv\nimport os\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.utils.text import slugify\n\nfr... | python | edit | 1 | 2 | mit | 35fe7bb6411c8009253bf66fb7739a5d49a7028d | texastribune/scuole,texastribune/scuole,texastribune/scuole,texastribune/scuole | scuole/counties/management/commands/bootstrapcounties.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging, gensim, bz2\nfrom knub.thesis.util.memory import limit_memory\n\nlogging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)\n\ndef main():\n logging.info(\"Starting Wikipedia LDA\")\n #... | python | edit | 2 | 1 | apache-2.0 | 581f16e30aeb465f80fd28a77404b0375bd197d4 | knub/master-thesis,knub/master-thesis,knub/master-thesis,knub/master-thesis | code/python/knub/thesis/topic_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom nimp.commands._cis_command import *\nfrom nimp.utilities.wwise import *\n\n#-------------------------------------------------------------------------------\nclass BuildWwiseBanksCommand(CisCommand):\n abst... | python | edit | 6 | 1 | mit | d8af86a0fedb8e7225e5ad97f69cd40c9c2abd8f | dontnod/nimp | nimp/commands/cis_wwise_build_banks.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom django.core.management import execute_manager\ntry:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py... | python | edit | 2 | 0 | mit | 4e2cbe770161e9d88acb68e95698b4ec184be7e0 | charettes/django-dynamic-choices,charettes/django-dynamic-choices,charettes/django-dynamic-choices | tests/testapp/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, division, unicode_literals\n\nfrom ..libs import *\nfrom .base import Widget\n\n\nclass ProgressBar(Widget):\n def __init__(self, max=None, value=None, **style):\n super(Prog... | python | edit | 4 | 3 | bsd-3-clause | 388d6feb2703b1badb3cb194b58deff831681a0a | pybee-attic/toga-cocoa,pybee/toga-cocoa | toga_cocoa/widgets/progressbar.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nfrom ava.util import time_uuid, base_path, defines, misc\n\n\nclass TestTimeUUID(object):\n\n def test_uuids_should... | python | edit | 1 | 2 | apache-2.0 | 69ade2e8dfcaac3769d0b75929eb89cf3e775a74 | eavatar/eavatar-me,eavatar/eavatar-me,eavatar/eavatar-me,eavatar/eavatar-me | tests/unit/test_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, request\nfrom .chain import DocumentChain\nfrom .storage import DiskStorage\n\napp = Flask(__name__)\nchain = DocumentChain(DiskStorage('data/'))\n\n@app.route('/entries', methods=['GET', 'POST'])\ndef entr... | python | edit | 1 | 4 | mit | 99c0804edebd94e0054e324833028ba450806f7f | LandRegistry-Attic/concept-system-of-record,LandRegistry-Attic/concept-system-of-record,LandRegistry-Attic/concept-system-of-record | documentchain/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nImport Sheffield\n\"\"\"\nfrom data_collection.management.commands import BaseShpShpImporter\n\nclass Command(BaseShpShpImporter):\n \"\"\"\n Imports the Polling Station data from Sheffield\n \"\"\"\n council_id = 'E... | python | edit | 1 | 3 | bsd-3-clause | d000a2e3991c54b319bc7166d9d178b739170a46 | DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations | polling_stations/apps/data_collection/management/commands/import_sheffield.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint\nfrom flask import render_template\nfrom flask import request\n\nspring_evals_bp = Blueprint('spring_evals_bp', __name__)\n\n@spring_evals_bp.route('/spring_evals/')\ndef display_spring_evals():\n # get user d... | python | edit | 1 | 1 | mit | 299fadcde71558bc1e77ba396cc544619373c2b1 | RamZallan/conditional,ComputerScienceHouse/conditional,RamZallan/conditional,ComputerScienceHouse/conditional,RamZallan/conditional,ComputerScienceHouse/conditional | conditional/blueprints/spring_evals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections.abc import Iterable\n\nfrom .inspection import InspectionMixin\n\n\nclass SerializeMixin(InspectionMixin):\n \"\"\"Mixin to make model serializable.\"\"\"\n\n __abstract__ = True\n\n def to_dict(self,nested = False... | python | edit | 1 | 11 | mit | 8194f327032c064fe71ba3dc918e28ee2a586b12 | absent1706/sqlalchemy-mixins | sqlalchemy_mixins/serialize.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\":mod:`settei.version` --- Version data\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. versionadded:: 0.2.0\n\n\"\"\"\n\n#: (:class:`typing.Tuple`\\ [:class:`int`, :class:`int`, :class:`int`])\n#: The triple of version numbers e.g. `... | python | edit | 1 | 0 | apache-2.0 | 4f351f34f3a0d5d2870639bb972d41b459595704 | spoqa/settei | settei/version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import List\n\n\nfrom ..library.sqrt import fsqrt\nfrom ..library.number_theory.primes import is_prime, prime_sieve\n\n\ndef is_circular_prime(n: int, sieve: List[int]) -> bool:\n for i in range(len(str(n))):\n if not ... | python | edit | 1 | 3 | mit | c1330851105df14367bec5ed87fc3c45b71932fd | cryvate/project-euler,cryvate/project-euler | project_euler/solutions/problem_35.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2020 The StackStorm 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 | 5a6c8b1c9c13078462bec7ba254c6a6f95dd3c42 | nzlosh/st2,StackStorm/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2,nzlosh/st2 | contrib/linux/tests/test_action_dig.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Peter Brittain'\n\nfrom .version import version\n__version__ = version\n\n```\n\nApply this change: Patch up version for direct running of code in repo."
},
{
"role": "assistant",
"content": "__author__ = 'Peter Br... | python | edit | 1 | 0 | apache-2.0 | 0ba7c20f3ddea73f8d1f92c66b3ab0abf1ea8861 | peterbrittain/asciimatics,peterbrittain/asciimatics | asciimatics/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom __future__ import absolute_import\nimport re\n\nfrom telemetry.testi... | python | edit | 1 | 4 | bsd-3-clause | a0aab3a12cae251cbdef3f1da4aadcad930ef975 | catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult | telemetry/telemetry/internal/backends/chrome_inspector/inspector_console_unittest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\"\nIntroduction Adventure\n\nAuthor: Ignacio Avas (<EMAIL>)\n\"\"\"\nimport codecs\nimport io\nimport sys\nimport unittest\nfrom story.adventures import AdventureVerificationError, BaseAdventure\nfrom story.translation import gettext... | python | edit | 1 | 2 | mit | 0feb1810b1e3ca61ef15deb71aec9fd1eab3f2da | sophilabs/py101 | py101/introduction/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Helpers for capturing requests exceptions.\"\"\"\n\nfrom functools import wraps\n\nfrom requests import RequestException, exceptions\n\nfrom via.exceptions import BadURL, UnhandledException, UpstreamServiceError\n\nREQUESTS_BAD_URL = ... | python | edit | 1 | 4 | bsd-2-clause | 4f24071185140ef98167e470dbac97dcdfc65b90 | hypothesis/via,hypothesis/via,hypothesis/via | via/requests_tools/error_handling.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom wagtail.wagtailcore.fields import RichTextField\nfrom longclaw.longclawproducts.models import ProductVariantBase\n\nclass ProductVariant(ProductVariantBase):\n\n # Enter your custom product variant fiel... | python | edit | 3 | 0 | mit | 7ab465aaaf69ba114b3411204dd773781a147c41 | JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw | longclaw/project_template/products/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom froide.settings import Base, ThemeBase, HerokuPostmark, HerokuPostmarkS3 # noqa\n\n\nclass CustomThemeBase(ThemeBase):\n FROIDE_THEME = 'froide_theme.theme'\n\n SITE_NAME = \"My Froide\"\n SITE_EMAIL ... | python | edit | 1 | 1 | mit | daca2bb7810b4c8eaf9f6a0598d8c6b41e0f2e10 | CodeforHawaii/uipa_org,CodeforHawaii/uipa_org,CodeforHawaii/uipa_org,okfde/froide-theme | froide_theme/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef get_users_at(timestamp, last_output=None, now=None):\n \"\"\"\n Return a set of strings corresponding to which users were logged in from\n which addresses at a given timestamp.\n\n Optional argument last_output is the output... | python | edit | 1 | 3 | mit | 8c159ee5fa6aa1d10cef2268a373b90f6cb72896 | walles/px,walles/px | px/px_loginhistory.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport deoplete.util\n\nfrom .base import Base\n\nclass Source(Base):\n def __init__(self, vim):\n Base.__init__(self, vim)\n\n self.name = 'go'\n self.mark = '[go]'\n self.filetypes = ['go']\n self.min... | python | edit | 1 | 3 | mit | 3203d685479ba3803a81bd2101afa7f5bced754d | zchee/deoplete-go,zchee/deoplete-go | rplugin/python3/deoplete/sources/go.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport sys\nimport textwrap\n\n\ntry:\n import gi\n gi.require_version('Gst', '1.0')\n gi.require_version('GstPbutils', '1.0')\n from gi.repository impo... | python | edit | 1 | 0 | apache-2.0 | 6cbfe86677b108181deb756ecf8276fe9521f691 | tkem/mopidy,adamcik/mopidy,vrs01/mopidy,ZenithDK/mopidy,vrs01/mopidy,tkem/mopidy,mokieyue/mopidy,kingosticks/mopidy,jodal/mopidy,tkem/mopidy,kingosticks/mopidy,jodal/mopidy,mopidy/mopidy,kingosticks/mopidy,mokieyue/mopidy,adamcik/mopidy,vrs01/mopidy,mokieyue/mopidy,jcass77/mopidy,mopidy/mopidy,adamcik/mopidy,tkem/mopid... | mopidy/internal/gi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe :mod:`pambox.speech` module gather speech intelligibility\nmodels.\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom .sepsm import Sepsm\nfrom .mrsepsm import MrSepsm\nfrom .sii import Sii\nfrom .material import Material\n... | python | edit | 1 | 0 | bsd-3-clause | a4c247f5243c8ee637f1507fb9dc0281541af3b1 | achabotl/pambox | pambox/speech/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom web3 import HTTPProvider, Web3\nfrom web3.middleware import geth_poa_middleware\n\nfrom .utils import Singleton\n\n\nclass Web3Service(metaclass=Singleton):\n \"\"\"Creates a `web3` instance based... | python | edit | 1 | 3 | mit | cb73b357d50603a1bce1184b28266fb55a4fd4ae | artemistomaras/django-ethereum-events,artemistomaras/django-ethereum-events | django_ethereum_events/web3_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport mock\nimport re\nimport unittest\n\nfrom cumulusci.core.config import BaseGlobalConfig\nfrom cumulusci.core.config import BaseProjectConfig\nfrom cumulusci.core.config import TaskConfig\nfrom cumulusci.core.config import OrgConfig\nf... | python | edit | 1 | 1 | bsd-3-clause | ca6a8f554dcde5e570a61459da63ff9037dfceae | SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI | cumulusci/tasks/tests/test_apexdoc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# THIRD PARTY\nfrom djangae.fields import CharField\nfrom django.db import models\n\n\nclass Secret(models.Model):\n created = models.DateTimeField(auto_now_add=True)\n url_slug = CharField(primary_key=True)\n secret = CharField()\... | python | edit | 4 | 2 | mit | e655bbd79c97473003f179a3df165e6e548f121e | adamalton/letsencrypt-appengine | letsencryptae/models.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack.fields import NgramField\n\n\ntry:\n from .elasticsearch import SuggestField\nexcept ImportError:\n class SuggestField(NgramField):\n pass\n\n\nclass SearchQuerySetWrapper(object):\n \"\"\"\n Decorates a Sea... | python | edit | 1 | 4 | mit | fb22d49ca3ef41a22a5bb68261c77f24d6d39f7b | fin/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide | froide/helper/search.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport unittest\nimport tempfile\n\nimport demoapp\nimport demoapp_factories\n\nclass DemoAppTestCase(unittest.TestCase):\n\n def setUp(self):\n demoapp.app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'\n demoa... | python | edit | 1 | 1 | mit | af3525bf174d0774b61464f9cc8ab8441babc7ae | FactoryBoy/factory_boy | examples/flask_alchemy/test_demoapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subprocess import check_call\n\nfrom blackbelt.handle_github import get_current_branch\nfrom blackbelt.messages import post_message\n\n\ndef deploy_staging():\n branch_name = get_current_branch()\n\n post_message(\"Deploying bran... | python | edit | 1 | 1 | mit | 1f1e1a78f56e890777ca6f88cc30be7710275aea | apiaryio/black-belt | blackbelt/deployment.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass InvalidPidFileError(Exception):\n \"\"\" An exception when an invalid PID file is read.\"\"\"\n\nclass PidFileExistsError(Exception):\n \"\"\" An exception when a PID file already exists.\"\"\"\n\n```\n\nApply this change: Add a... | python | edit | 1 | 0 | mit | 1ed49dae9d88e1e277a0eef879dec53ed925417a | chriscannon/highlander | highlander/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef horizontal_bar(sorted_streaks, sort):\n \"\"\"\n Render a horizontal bar chart of streaks.\n\n Values have already been sorted by sort.\n \"\"\"\n # Only extract th... | python | edit | 1 | 4 | mit | 847e864df300304ac43e995a577eaa93ae452024 | jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,supermitch/streak-podium,jollyra/hubot-streak-podium,supermitch/streak-podium,jollyra/hubot-commit-streak | streak-podium/render.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport multiprocessing\n\nfrom spotify import Link\n\nfrom mopidy.backends.base import BaseLibraryController\nfrom mopidy.backends.libspotify import ENCODING\nfrom mopidy.backends.libspotify.translator import LibspotifyTrans... | python | edit | 1 | 6 | apache-2.0 | 26e947c91980cf6ccb83a99cbb5c6fefb0837d4f | dbrgn/mopidy,jcass77/mopidy,pacificIT/mopidy,ali/mopidy,bacontext/mopidy,bencevans/mopidy,ali/mopidy,dbrgn/mopidy,bacontext/mopidy,kingosticks/mopidy,mokieyue/mopidy,SuperStarPL/mopidy,hkariti/mopidy,abarisain/mopidy,jmarsik/mopidy,liamw9534/mopidy,pacificIT/mopidy,vrs01/mopidy,abarisain/mopidy,glogiotatidis/mopidy,wou... | mopidy/backends/libspotify/library.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import TLObject, GzipPacked\nfrom ..extensions import BinaryWriter\n\n\nclass MessageContainer(TLObject):\n constructor_id = 0x73f1f8dc\n\n def __init__(self, messages):\n super().__init__()\n self.content_related... | python | edit | 1 | 2 | mit | 8a605f21e6c11b8176214ce7082c892566a6b34e | LonamiWebs/Telethon,andr-04/Telethon,LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon | telethon/tl/message_container.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport signal\n\n\nclass Timeout(Exception):\n \"\"\"Context manager which wraps code in a timeout.\n If the timeout is exceeded, the context manager will be raised.\n Example usage:\n try:\n with Timeout(5):\n time.slee... | python | edit | 1 | 2 | mit | 2bf0872a176fd8b97a31a15bd3feb49d7f8cf7d7 | HubbeKing/Hubbot_Twisted | hubbot/Utils/timeout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport io\nimport string\nimport random\n\nfrom boggle.boggle import list_words\n\n\ndef main():\n with io.open(\"/usr/share/dict/words\", encoding='latin-1') as word_file:\n english_words = ... | python | edit | 1 | 5 | mit | 864d23ab3996e471b659ded6cfc13447b2497107 | adamtheturtle/boggle-solver | example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pickle as pkl\nfrom gso import load_up_answers, load_up_questions\n\n#for result in load_up_questions(\"How to write a bubble sort\", \"python\"):\n #print result\n #break\n\n#question_url = 'https://stackoverflow.co... | python | edit | 2 | 1 | mit | 56e11c3df02874867626551534693b488db82fb7 | mdtmc/gso | example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-------------------------------------------------------------------------------\n#\n# This file is part of pygimplib.\n#\n# Copyright (C) 2014, 2015 khalim19 <<EMAIL>>\n#\n# pygimplib is free software: you can redistribute it and/or modify... | python | edit | 1 | 0 | bsd-3-clause | 454c3228db731280eeed8d22c6811c2810018222 | khalim19/gimp-plugin-export-layers,khalim19/gimp-plugin-export-layers | export_layers/pygimplib/lib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\n\ndef setUp():\n log = logging.getLogger('elasticsearch.trace')\n log.setLevel(logging.CRITICAL)\n\n```\n\nApply this change: Use a better method for silencing 'no handlers found' error"
},
{
"role": "assista... | python | edit | 1 | 1 | mit | 1b07cb1ec2fbe48af4f38a225c2237846ce8b314 | storborg/pyramid_es | pyramid_es/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import with_statement\n\nfrom fabric.api import local, cd, env, run\nfrom fabric.colors import green\n\nenv.use_ssh_config = True\nenv.user = 'ubuntu'\nenv.hosts = [ 'dhlab-backend' ]\n\nPRODUCTION_DIR = 'backend'\nSUPERVIS... | python | edit | 4 | 1 | mit | 3c0fa80bcdd5a493e7415a49566b4eb7524c534b | DHLabs/keep,9929105/KEEP,DHLabs/keep,9929105/KEEP,DHLabs/keep,9929105/KEEP | fabfile.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim: ft=python:sw=4:ts=4:sts=4:et:\nimport json\n\nfrom silver.models import Plan\n\nfrom django.test.client import Client\nfrom django.test import TestCase\n\n\nclass PlansSpecificationTestCase(TestCase):\n de... | python | edit | 4 | 1 | apache-2.0 | a99378deee9a802bf107d11e79d2df2f77481495 | PressLabs/silver,PressLabs/silver,PressLabs/silver | silver/tests/spec/test_plan.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport shutil\n\ndef main():\n cwd = os.getcwd()\n if not cwd.endswith(os.path.join('FRENSIE', 'scripts')):\n print 'This script must be run in \\\"FRENSIE/scipts\\\"'\n print 'Your CWD is', cwd\n retur... | python | edit | 4 | 2 | bsd-3-clause | 624d6e4fc5455720badf4315e06f423eb60411ab | lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123,lkersting/SCR-2123 | scripts/init_tree.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numpy import *\nfrom numpy.testing import *\n\nfrom scipy.weave import inline_tools\n\nclass TestInline(TestCase):\n \"\"\" These are long running tests...\n\n I'd like to benchmark these things somehow.\n \"\"\"\n @de... | python | edit | 8 | 1 | bsd-3-clause | 644df0955d1a924b72ffdceaea9d8da14100dae0 | scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor | scipy/weave/tests/test_inline_tools.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\r\nimport signal\r\nimport sys\r\nimport logging as log\r\n\r\nfrom firesimgui import FireSimGUI\r\nfrom lib.arguments import parse_args\r\n\r\ndef sig_handler(app, sig, frame):\r\n log.info(\"Firesim received signal %d.... | python | edit | 1 | 2 | mit | 423ea9128f01eb74790a3bb5a876c066acc9c2c1 | Openlights/firesim | firesim.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\r\n#-------------------------------------------------------------------------\r\n# Copyright (c) Microsoft. All rights reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you... | python | edit | 1 | 0 | apache-2.0 | 87955b791e702b67afb61eae0cc7abfbde338993 | Habatchii/PTVS,DEVSENSE/PTVS,denfromufa/PTVS,alanch-ms/PTVS,zooba/PTVS,MetSystem/PTVS,xNUTs/PTVS,Habatchii/PTVS,DinoV/PTVS,crwilcox/PTVS,bolabola/PTVS,DEVSENSE/PTVS,bolabola/PTVS,bolabola/PTVS,int19h/PTVS,crwilcox/PTVS,dut3062796s/PTVS,zooba/PTVS,juanyaw/PTVS,Microsoft/PTVS,Habatchii/PTVS,msunardi/PTVS,msunardi/PTVS,Me... | Python/Product/PythonTools/ptvsd/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy,copy\nfrom geometry_msgs.msg import Twist\nfrom std_srvs.srv import Trigger, TriggerResponse\nfrom pimouse_ros.msg import LightSensorValues\n\nclass WallStop():\n def __init__(self):\n self.cmd_... | python | edit | 4 | 3 | mit | ddb3bcf4e5d5eb5dc4f8bb74313f333e54c385d6 | citueda/pimouse_run_corridor,citueda/pimouse_run_corridor | scripts/wall_stop.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\n\nimport os\nimport re\nimport sys\nfrom mutagen.easyid3 import EasyID3\n\nreplaceChars = (\n (\" \", \"-\"),\n (\"(\", \"\"),\n (\")\", \"\"),\n (\",\", \"\"),\n (\".\", \"\"),\n (\"'\", \"\"),\n (\"?\", \"... | python | edit | 1 | 3 | mit | 421b2d75f04717dd8acb461bd698ca8355e70480 | bamos/python-scripts,bamos/python-scripts | python2.7/music-organizer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\ndef register_asheesh():\n return requests.post(\n 'http://localhost:3000/register',\n {'rawHostname': 'asheesh',\n 'email': '<EMAIL>',\n 'pubkey': open('snakeoil-sample-certs/ssl-cert-snak... | python | edit | 1 | 1 | apache-2.0 | 89e22a252adf6494cf59ae2289eb3f9bb1e2a893 | sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats | sandcats/trivial_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport mock\nimport unittest\n\nfrom mock import patch\n\nfrom svc_monitor.svc_monitor import SvcMonitor\nfrom pysandesh.sandesh_base import Sandesh\n\nclass Arguments(object):\n def __init__(self):\n self.disc_ser... | python | edit | 1 | 1 | apache-2.0 | f361ee6fb384a3500892a619279e229373a1b35f | hthompson6/contrail-controller,tcpcloud/contrail-controller,rombie/contrail-controller,Juniper/contrail-dev-controller,vpramo/contrail-controller,facetothefate/contrail-controller,eonpatapon/contrail-controller,facetothefate/contrail-controller,numansiddique/contrail-controller,tcpcloud/contrail-controller,tcpcloud/con... | src/config/svc-monitor/svc_monitor/tests/test_init.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import *\n\nenv.hosts = [\n '<EMAIL>'\n]\n\nenv.target_directory = './happyman'\n\ndef init():\n run('git clone -q https://github.com/skyshaper/happyman.git ' + env.target_directory)\n with cd(env.target_directory):... | python | edit | 18 | 1 | mit | 4148c03ce666f12b8b04be7103ae6a969dd0c022 | skyshaper/happyman,skyshaper/happyman,skyshaper/happyman | fabfile.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom tsa.lib import tabular, html\n\nxlsx_filepath = '%s/ohio/sb5-b.xlsx' % os.getenv('CORPORA', '.')\nlabel_keys = ['For', 'Against', 'Neutral', 'Broken Link', 'Not Applicable']\n\n\ndef read(limit=None):\... | python | edit | 1 | 5 | mit | 9da50045cc9d67df8d8d075a6e2a2dc7e9f137ee | chbrown/tsa,chbrown/tsa,chbrown/tsa | tsa/data/sb5b/tweets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# way 93671417\nassert_has_feature(\n 16, 10486, 25367, 'transit',\n { 'kind': 'monorail' })\n\n```\n\nApply this change: Add test for funicular feature"
},
{
"role": "assistant",
"content": "# way 93671417\nassert_has_fea... | python | edit | 3 | 0 | mit | 09e0073a2aec6abc32a639fb2791af19e17eed1c | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/588-funicular-monorail.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Test for one implementation of the interface\nfrom lexicon.providers.nfsn import Provider\nfrom integration_tests import IntegrationTests\nfrom unittest import TestCase\nimport pytest\n\nimport os\n\n\"\"\"\nSome small info about running ... | python | edit | 3 | 2 | mit | b442190966a818338e0e294a6835b30a10753708 | AnalogJ/lexicon,AnalogJ/lexicon | tests/providers/test_nfsn.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport unittest\n\n\ndef suite():\n test_dir = os.path.dirname(__file__)\n return unittest.TestLoader().discover(test_dir, )\n\ntest_suite = suite()\n\n\nif __name__ == '__main__':\n unittest.main(defaultTest='suite')\n\... | python | edit | 1 | 1 | bsd-2-clause | c916ea93fc4bcd0383ae7a95ae73f2418e122e1f | marinkaz/orange3,marinkaz/orange3,qPCR4vir/orange3,qusp/orange3,cheral/orange3,kwikadi/orange3,cheral/orange3,cheral/orange3,marinkaz/orange3,marinkaz/orange3,kwikadi/orange3,qusp/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,marinkaz/orange3,... | Orange/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Factory boy factories for the Box addon.\"\"\"\nimport mock\nfrom datetime import datetime\nfrom dateutil.relativedelta import relativedelta\n\nfrom factory import SubFactory, Sequence\nfrom tests.factories im... | python | edit | 1 | 0 | apache-2.0 | 78c3589bbb80607321cf2b3e30699cde7df08ed8 | SSJohns/osf.io,caseyrollins/osf.io,jnayak1/osf.io,acshi/osf.io,felliott/osf.io,monikagrabowska/osf.io,TomBaxter/osf.io,RomanZWang/osf.io,leb2dg/osf.io,wearpants/osf.io,emetsger/osf.io,acshi/osf.io,chennan47/osf.io,zamattiac/osf.io,mluo613/osf.io,alexschiller/osf.io,chennan47/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io... | website/addons/s3/tests/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Leetcode 5. Longest Palindromic Substring\nMedium\n\nGiven a string s, find the longest palindromic substring in s. \nYou may assume that the maximum length of s is 1000.\n\nExample 1:\nInput: \"babad\"\nOutput: \"bab\"\nNote: \"aba\"... | python | edit | 1 | 5 | bsd-2-clause | f7d3fa716cd73c5a066aa0e40c337b50880befea | bowen0701/algorithms_data_structures | lc005_longest_palindromic_substring.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib\nimport datetime\nimport multiprocessing\n\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.sites.models import Site\nfrom django.core.management.base import BaseCommand, Com... | python | edit | 4 | 5 | mit | 4923c2e25cc7547e3b1e1b0ade35a03a931e3f84 | theju/urlscript | core/management/commands/run_urlscript.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\nimport BaseHTTPServer\n\nServerClass = BaseHTTPServer.HTTPServer\nRequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler\n\nSERVER_NAME = ''\nSERVER_PORT = 9000\n\nclass JsonPostResponder(RequestHandlerClass):\... | python | edit | 2 | 1 | mit | eab249a092da21d47b07fd9918d4b28dcbc6089b | jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle | server/dummy/dummy_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom rest_framework import serializers\n\nfrom apps.broadcasts.models import Broadcast, Series\nfrom apps.games.models import Game\n\n\nclass BroadcastSerializer(serializers.ModelSerializer):\n class Meta:\n ... | python | edit | 1 | 0 | apache-2.0 | 817d9c78f939de2b01ff518356ed0414178aaa6d | bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv | avalonstar/apps/api/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\n\nfrom flask import render_template, session, request\n\nfrom app import app\nimport config\nfrom app import request_logger\nfrom app import questions\n\n@app.route('/', methods=['GET', 'POST'])\ndef q():\n # NOTE: this wi... | python | edit | 4 | 6 | mit | fad3aa04d54d8804984a9c66bfde79f0f5cd8871 | felixbade/visa | app/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\nimport time\n\nfrom web.core.context import Context\nfrom web.ext.analytics import AnalyticsExtension\n\n\ndef test_analytics_extension():\n\tctx = Context(response=Context(headers=dict()))\n\text = AnalyticsExtension()... | python | edit | 1 | 2 | mit | 35a5e8717df9a5bcb60593700aa7e2f291816b0f | marrow/WebCore,marrow/WebCore | test/test_extensions/test_analytics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime_plugin\nfrom php_coverage.finder import CoverageFinder\n\n\nclass CoverageCommand(sublime_plugin.TextCommand):\n\n \"\"\"\n Base class for a text command which has a coverage file.\n \"\"\"\n\n def __init__(self, ... | python | edit | 1 | 2 | mit | c788398c2c89a7afcbbf899e7ed4d51fccf114b5 | bradfeehan/SublimePHPCoverage,bradfeehan/SublimePHPCoverage | php_coverage/command.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jtapi import *\nimport os\nimport sys\nimport re\nimport numpy as np\nfrom scipy import misc\n\n\nmfilename = re.search('(.*).py', os.path.basename(__file__)).group(1)\n\n#########\n# input #\n#########\n\nprint('jt - %s:' % mfilename)... | python | edit | 3 | 0 | mit | 1275fec0e485deef75a4e12956acb919a9fb7439 | brainy-minds/Jterator,brainy-minds/Jterator,brainy-minds/Jterator,brainy-minds/Jterator | tests/modules/myInitialPythonModule.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Standard library imports\nimport json\n\n# Our setup file\nwith open('../../pixie/setup.json') as file:\n setup_file = json.load(file)\n\n# Our user agent\nuser_agent = \"Pixie (https://github.com/GetRektByMe/Pixie)\"\n\n\n# A function... | python | edit | 1 | 3 | mit | 92d5e7078c86b50c0682e70e115271355442cea2 | GetRektByMe/Pixie | pixie/utils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\nimport redis\n\n\ndef connect_to_redis(*args, **kwargs):\n client = redis.Redis(*args, unix_socket_path='redis/redis.sock', **kwargs)\n\n while True:\n try:\n assert client.ping()\n except (redi... | python | edit | 1 | 3 | mit | 6deebdc7e5c93d5f61cad97870cea7fb445bb860 | onitu/onitu,onitu/onitu,onitu/onitu | onitu/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom girder.models.file import File\nfrom girder.models.model_base import Model\nfrom girder.utility import assetstore_utilities\nfrom girder.utility.model_importer import ModelImporter\nfrom girder.utility.abstract_assetstor... | python | edit | 1 | 1 | apache-2.0 | a013cdbe690271c4ec9bc172c994ff5f6e5808c4 | data-exp-lab/girder,girder/girder,manthey/girder,kotfic/girder,Xarthisius/girder,jbeezley/girder,girder/girder,manthey/girder,kotfic/girder,RafaelPalomar/girder,girder/girder,data-exp-lab/girder,girder/girder,manthey/girder,Xarthisius/girder,RafaelPalomar/girder,RafaelPalomar/girder,RafaelPalomar/girder,Kitware/girder,... | test/test_assetstore_model_override.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\n\ndef input_file(filename):\n \"\"\"\n Read a file and return list of usernames.\n\n Assumes one username per line and ignores blank lines.\n \"\"\"\n with open(filename, 'r') as f:\n return list(lin... | python | edit | 1 | 3 | mit | 2049dbe3f672041b7b0e93b0b444a6ebb47f723a | jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,supermitch/streak-podium,supermitch/streak-podium,jollyra/hubot-streak-podium,jollyra/hubot-commit-streak | streak-podium/read.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport logging\nfrom socket import gethostname\n\nfrom .compat import json, text_type\n\n\nclass JSONFormatter(logging.Formatter):\n \"\"\"\n Formatter to convert LogRecord into JSON.\n Thanks to: https://github.co... | python | edit | 1 | 10 | mit | 4d410dec85fc944717a6537e9eef2585a53159b6 | albertomr86/python-logging-rabbitmq | python_logging_rabbitmq/formatters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\n\nfrom project import db, bcrypt\n\n\nclass User(db.Model):\n\n __tablename__ = \"users\"\n\n id = db.Column(db.Integer, primary_key=True)\n email = db.Column(db.String, unique=True, nullable=False)\n password =... | python | edit | 1 | 1 | mit | 01a832d1c761eda01ad94f29709c8e76bd7e82fe | dylanshine/streamschool,dylanshine/streamschool | project/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nfrom url_cleaner import removeBlackListedParameters\n\n\nwhile True:\n line = sys.stdin.readline().strip()\n urlList = line.split(' ')\n urlInput = urlList[0]\n newUrl = removeBlackListedParamete... | python | edit | 3 | 1 | mit | bce093df2bbcf12d8eec8f812408a0ea88521d10 | Ladoo/url_cleaner | squid_url_cleaner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf8\nfrom __future__ import (absolute_import, print_function, division, unicode_literals)\n\n# REV - This has no effect - http://stackoverflow.com/q/18558666/656912\ndef pytest_report_header(config):\n ... | python | edit | 1 | 1 | bsd-3-clause | d773b01721ab090021139fb9a9397cddd89bd487 | orome/crypto-enigma-py | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom json import loads\nfrom os import close, unlink\nfrom tempfile import mkstemp\nfrom unittest import TestCase\nfrom cunhajacaiu import app\n\n\nclass FlaskTestCase(TestCase):\n\n def setUp(self):\n\n # set a test db\n s... | python | edit | 1 | 1 | mit | e71e42ec8b7ee80937a983a80db61f4e450fb764 | cuducos/cunhajacaiu,cuducos/cunhajacaiu,cuducos/cunhajacaiu | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright 2015 BMC Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://w... | python | edit | 1 | 1 | apache-2.0 | 29baa0a57fe49c790d4ef5dcdde1e744fc83efde | boundary/pulse-api-cli,jdgwartney/boundary-api-cli,boundary/boundary-api-cli,jdgwartney/pulse-api-cli,boundary/pulse-api-cli,jdgwartney/pulse-api-cli,jdgwartney/boundary-api-cli,boundary/boundary-api-cli | boundary/alarm_create.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#from phonenumber_field.serializerfields import PhoneNumberField\nfrom rest_framework import serializers\nfrom drf_extra_fields.geo_fields import PointField\n\nfrom .models import User\n\n\nclass UserSerializer(serializers.ModelSerializer):... | python | edit | 1 | 0 | mit | 8d7b2597e73ca82e016e635fe0db840070b7bd7a | Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend | semillas_backend/users/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport glob\nimport os\nimport unittest\n\n\ndef build_test_suite():\n suite = unittest.TestSuite()\n\n for test_case in glob.glob('tests/test_*.py'):\n modname = os.path.splitext(test_case)[0]\n modname = modname.replac... | python | edit | 1 | 2 | bsd-3-clause | 5bc3e6a3fb112b529f738142850860dd98a9d428 | jorgecarleitao/pyglet-gui | tests/runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport signal\nimport sys\n\nimport click\nimport gevent\n\nimport pyinfra\n\nfrom .legacy import run_main_with_legacy_arguments\nfrom .main import cli, main\n\n\n# Set CLI mode\npyinfra.is_cli = True\n\n# Don't write out deploy.... | python | edit | 1 | 2 | mit | 85b94f0d9caef0b1d22763371b1279ae2f433944 | Fizzadar/pyinfra,Fizzadar/pyinfra | pyinfra_cli/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n pytest_pipeline.utils\n ~~~~~~~~~~~~~~~~~~~~~\n\n General utilities.\n\n :copyright: (c) 2014 Wibowo Arindrarto <<EMAIL>>\n :license: BSD\n\n\"\"\"\n\nimport gzip\nimport hashlib\nimport os\n... | python | edit | 1 | 4 | bsd-3-clause | 90132a3e4f9a0a251d9d1738703e6e927a0e23af | bow/pytest-pipeline | pytest_pipeline/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport os\nimport gzip\nimport bs4\nimport logging\nfrom classes import (\n NbaTeam\n)\n\nclass MockRequests:\n def get(self, url):\n pass\n\nclass TestNbaTeamPage(unittest.TestCase):\n # read html file and ... | python | edit | 4 | 1 | mit | bc16915aa3c4a7cef456da4193bdcdc34117eab0 | arosenberg01/asdata | tests/test_classes.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import uuid\n\n\ndef task_crud(self, shotgun, trigger_poll=lambda: None):\n\n name = uuid(8)\n a = shotgun.create('Task', {'content': name})\n trigger_poll()\n b = self.cached.find_one('Task', [('id', 'is', a['id'])], ['c... | python | edit | 1 | 1 | bsd-3-clause | c2731d22adbf2abc29d73f5759d5d9f0fa124f5f | westernx/sgcache,westernx/sgcache | tests/fixtures.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django_snooze import apis\n\n\nclass APITestCase(TestCase):\n def setUp(self):\n \"\"\"Sets up an API object to play with.\n\n :returns: None\n\n \"\"\"\n self.api = apis... | python | edit | 1 | 2 | bsd-3-clause | d4412f8573dbfc1b06f2a298cc5c3042c6c468e6 | ainmosni/django-snooze,ainmosni/django-snooze | tests/test_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Settings file for the Django project used for tests.\"\"\"\n\nimport os\n\nfrom django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS\n\n\nPROJECT_NAME = 'project'\n\n# Base paths.\nROOT = os.path.abspath(os.path.dirname(__fi... | python | edit | 1 | 0 | mit | ecb3e8e9bea6388d2368fefdd24037f933a78dfe | poswald/django-endless-pagination,poswald/django-endless-pagination,catalpainternational/django-endless-pagination,igorkramaric/django-endless-pagination,poswald/django-endless-pagination,kjefes/django-endless-pagination,igorkramaric/django-endless-pagination,catalpainternational/django-endless-pagination,catalpaintern... | tests/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport requests.utils\n\nfrom . import __name__, __version__\n\nOCSPDASH_API_VERSION = 'v0'\n\nOCSPDASH_DIRECTORY = os.path.join(os.path.expanduser('~'), '.ocspdash')\n\nif not os.path.exists(OCSPDASH_DIRECTORY):\n os.makedi... | python | edit | 1 | 0 | mit | 1b75e25746305ec47a72874e854744c395cceec6 | scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash | src/ocspdash/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport builtins\n\n# setup xonsh ctx and execer\nbuiltins.__xonsh_ctx__ = {}\nfrom xonsh.execer import Execer\nbuiltins.__xonsh_execer__ = Execer(xonsh_ctx=builtins.__xonsh_ctx__)\nfrom xonsh.shell import Shell\nbuiltins.__xonsh_shell__ = S... | python | edit | 1 | 0 | bsd-3-clause | cffaea8986aa300a632d3a0d39219431efe80f9e | ergs/rever,scopatz/rever | rever/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom unittest.mock import patch, call\nfrom crc import main\n\n\nclass CliTests(unittest.TestCase):\n\n def test_cli_no_arguments_provided(self):\n expected_exit_code = -1\n argv = []\n with patch('s... | python | edit | 1 | 1 | bsd-2-clause | 4a9f0f909abb955ca579b3abec7c6ffef83429af | Nicoretti/crc | cli_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# See also examples/example_track/track_meta.py for a longer, commented example\ntrack = dict(\n author_username='ryanholbrook',\n course_name='computer_vision',\n course_url='https://www.kaggle.com/ryanholbrook/computer-vision'\n)... | python | edit | 1 | 0 | apache-2.0 | d4dd06558287c655477ce9da9542f748d0261695 | Kaggle/learntools,Kaggle/learntools | notebooks/computer_vision/track_meta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom ..models import Game\n\n\nclass QuerySetTests(TestCase):\n\n def test_get_by_name(self):\n\n gta_v = Game.objects.create(name='GTA V')\n Game.objects.create(name='Grand Theft Auto V'... | python | edit | 1 | 1 | mit | 255ef7b16258c67586d14e6c8d8d531a3553cd3e | sergei-maertens/discord-bot,sergei-maertens/discord-bot,sergei-maertens/discord-bot | bot/games/tests/test_game_queryset.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nfrom threading import Thread\nfrom flask import Flask\nimport pandas as pd\nsys.path.insert(0, \"../financialScraper\")\nfrom financialScraper import getqf\nfrom sqlalchemy import create_engine\n\napp = Flask(__name__... | python | edit | 7 | 1 | mit | c03b731d9fcd64a0989c6b73245578eafc099b4f | caseymacphee/green_quote,caseymacphee/green_quote | greenquote.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom sqlalchemy.orm import joinedload\n\nfrom changes.api.base import APIView\nfrom changes.api.auth import get_current_user\nfrom changes.models import Author, Build\n\n... | python | edit | 1 | 4 | apache-2.0 | 2e63438deb6f733e7e905f4ea299aa0bdce88b3c | wfxiang08/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes | changes/api/author_build_index.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.