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\nversion = '0.1.0'\n\nwith open('requirements.txt', 'r') as f:\n install_requires = [x.strip() for x in f.readlines()]\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='bodylabs-rigger',\n version=version,\n author... | python | edit | 1 | 0 | bsd-2-clause | 75c1e7ffbc938a4543094360df4ddc1e0262ce5f | bodylabs/rigger,kaiserk/rigger | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nimport contractions.views\n\nurlpatterns = patterns('',\n # Examples:\n... | python | edit | 1 | 0 | bsd-2-clause | 5bb90727efb62525995caad3b52fd588d8b08298 | dreinhold/pregnancy,dreinhold/pregnancy,dreinhold/pregnancy | pregnancy/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nsetup.py\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='SATOSA',\n version='3.4.8',\n description='Protocol proxy (SAML/OIDC).',\n author='DIRG',\n author_email='<EMAIL>',\n license='Apach... | python | edit | 1 | 0 | apache-2.0 | 4dc51fbc78800db0c3ba750ee92bac1ed49a944d | SUNET/SATOSA,its-dirg/SATOSA,irtnog/SATOSA,SUNET/SATOSA,irtnog/SATOSA | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='weaveserver',\n version='0.8',\n author='Srivatsan Iyer',\n author_email='<EMAIL>',\n packages=find_packages(),\n license='MIT',\n description='Library to in... | python | edit | 1 | 0 | mit | 09f5d2997408ba338edf83101834fd15151e135e | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom setuptools import setup\n\nINSTALL_REQUIRES = ['requests >=1.0.3', 'boto >=2.1.1', 'six >=1.2.0', 'urllib3 >= 1.0.2']\nif sys.version_info < (2, 7, 0):\n INSTALL_REQUIRES.append('argparse>=1.1')\n\n\ndef read(... | python | edit | 1 | 1 | apache-2.0 | 69c14597c676236b64398dc3cbe83d42ec4e3a9b | tanishgupta1/qds-sdk-py-1,prakharjain09/qds-sdk-py,adeshr/qds-sdk-py,msumit/qds-sdk-py,rohitpruthi95/qds-sdk-py,vrajat/qds-sdk-py,qubole/qds-sdk-py,jainavi/qds-sdk-py,yogesh2021/qds-sdk-py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='property-caching',\n version='1.0.1',\n description='Property caching',\n author='Yola',\n author_email='<EMAIL>',\n license='MIT (Expat)',\n url='https://github.com/yola/p... | python | edit | 1 | 0 | mit | 888cdf6797690fe202b03ac0fc2ba46d5df3c6d5 | yola/property-caching | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pytest\n\n\ndef pytest_addoption(parser):\n group = parser.getgroup('cookies')\n group.addoption(\n '--foo',\n action='store',\n dest='dest_foo',\n default=2015,\n h... | python | edit | 1 | 2 | mit | 9fa76b8e9d7fb9309a49d46b9bbd43e9b65418ad | hackebrot/pytest-cookies | pytest_cookies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"\nChange the size of an ECS service.\n\nThis is used to schedule our service applications: by setting the desired\nsize to 0/greater-than-0, Amazon will do the work of spinning up or s... | python | edit | 1 | 1 | mit | ee0c852d494a0952d51b7f5ddde77ec2b46deca3 | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | lambdas/update_ecs_service_size.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nraven\n~~~~~\n\n:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\n__all__ = ('VERSION', 'Client', 'load')\n\ntry:\n VERSION = __import__('pkg_resources... | python | edit | 7 | 0 | bsd-3-clause | ba1bfc262e023a01d6e201d48d234640a443ed96 | hzy/raven-python,akheron/raven-python,akalipetis/raven-python,nikolas/raven-python,arthurlogilab/raven-python,inspirehep/raven-python,recht/raven-python,akheron/raven-python,arthurlogilab/raven-python,arthurlogilab/raven-python,lepture/raven-python,percipient/raven-python,collective/mr.poe,Goldmund-Wyldebeast-Wunderlie... | raven/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='simplecrypto',\n version=open('CHANGES.txt').read().split()[0],\n author='Lucas Boppre Niehues',\n author_email='<EMAIL>',\n packages=['simplecrypto'],\n url='http://pypi.... | python | edit | 1 | 0 | mit | aea05ee76193ac0abe2f6673910917bf13a3b339 | boppreh/simplecrypto | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nUnit test test case mixin class.\n\nThis mixin class is intended for use with a subclass of either\n`unittest.TestCase` or `django.test.TestCase`. It includes several\nconvenience `_assert...` methods.\n\"\"\"\n\n\nimport vesper.uti... | python | edit | 1 | 3 | mit | dfe84075109620481cac493c1d0dba69d9ca19df | HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper | vesper/tests/test_case_mixin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.http import HttpResponse\nfrom django.utils.importlib import import_module\n\ndef warmup(request):\n \"\"\"\n Provides default procedure for handling warmup requests on App Engine.\n Ju... | python | edit | 1 | 4 | bsd-3-clause | eec004dd34ffc977e29481c94345e20cae867238 | adieu/djangoappengine | views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf8\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\nif sys.version_info < (2, 7):\n tests_require = ['unittest2', 'mock']\n test_suite = 'unittest2.collector'\nelse:\n tests_require = ['... | python | edit | 1 | 1 | mit | ebe9d80277b2b03a50b0fe69836bf28a13edbbd9 | karteek/simplekv,fmarczin/simplekv,mbr/simplekv,karteek/simplekv,mbr/simplekv,fmarczin/simplekv | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom .game_manager import GameManager\nfrom .robot_controller import RobotController\nfrom .snake_board import SnakeBoard\nfrom .snake_robot import SnakeRobot\nfrom .snake_beacon import SnakeBeacon\n\ndef launch_robot(robot_module, myrobo... | python | edit | 3 | 2 | mit | a3b22d074ace7d44ee9c863c56f0c24354bc6a99 | virtuald/RobotSnake,virtuald/RobotSnake | snake/launcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\n__version__ = \"1.0.0\"\n\npackageDir = os.path.dirname(__file__)\nRESOURCE_DIR = os.path.join(os.path.abspath(packageDir), \"resources\")\nif not os.path.isdir(RESOURCE_DIR):\n RESOURCE_DIR = os.path.join(os.pat... | python | edit | 1 | 0 | mit | 2082a4ba334a14bf95e9ad9deecc2c703e0f1aa5 | AWFeldick/Rotostitch | rotostitch/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es)\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... | python | edit | 1 | 3 | apache-2.0 | d4aab57bf6173334fa2dbd82eef74b786473ef3d | WebSpider/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,damienmarie-alation/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,bernii/djangosaml2,damienmarie-alation/djangosaml2,knaperek/djangosaml2,WebSpider/djangosaml2,writepython/djangosaml2,MiguelSR/djangosaml2,knaperek/djangosaml2,azavea/django... | djangosaml2/templatetags/idplist.py | rejected_duplicate | Near-duplicate of sample 8975 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport rave.events\nimport rave.modularity\nimport rave.backends\nimport rave.resources\nimport rave.rendering\n\n\ndef init_game(game):\n rave.events.emit('game.init', game)\n\n with game.env:\n rave.modularity.load_all()\n ... | python | edit | 1 | 4 | bsd-2-clause | d83ed858dab0991e4829a7f249260ae1f1140b41 | rave-engine/rave | rave/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twilio.rest import TwilioRestClient\nimport project.utils.reminders\n\nACCOUNT_SID = \"AC6a9746370384b26236aae71013aa35b2\"\nAUTH_TOKEN = \"38b0bcc37788e553978c840929d54aa2\"\n\ndef send_reminder(text, phone):\n client = TwilioRestC... | python | edit | 1 | 2 | apache-2.0 | 527c414da01dd40425086253dec2007c54e30675 | tjcsl/mhacksiv | send_reminders.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\n\nfrom model_utils.models import TimeFramedModel\nfrom tag... | python | edit | 1 | 1 | bsd-3-clause | e7865a22eb2e7433f3c36cd571aae3ac65436423 | jbittel/django-signage,jbittel/django-signage,jbittel/django-signage | signage/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Build the actual C2W2C model"
},
{
"role": "assistant",
"content": "\nfrom models import C2W, LanguageModel, W2C\nfrom util import load_training_data\nfrom keras.models import Model\nfrom keras.layers import TimeDistributed, Inpu... | python | new_file | 6 | 0 | mit | c3520c1c1802f903af829da5470fa14d1a1d5354 | milankinen/c2w2c,milankinen/c2w2c | src/c2w2c.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom sense_hat import SenseHat\nfrom pymongo import MongoClient\nimport time\n\n\nDELAY = 1 # in seconds\n\nsense = SenseHat()\nclient = MongoClient(\"mongodb://10.0.1.25:27017\")\ndb = client.g2x\n\nwhile True:\... | python | edit | 1 | 0 | bsd-3-clause | a9b56fe98a0df71881c41a2524bdb5abc4b0de50 | gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2 | services/imu-logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2008 Google 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://www.apache.... | python | edit | 1 | 2 | apache-2.0 | 0236ad9090f7b218fc7515fdc8d919b2fc048a72 | GoogleCloudPlatform/appengine-sharded-counters-python | simple_counter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# python3\n# Copyright 2018 DeepMind Technologies Limited. 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 ... | python | edit | 12 | 0 | apache-2.0 | a37ef5af5a28207d21b11f08990e233a34afa768 | deepmind/acme,deepmind/acme | acme/utils/loggers/__init__.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys, os\n\n# Add param submodule to sys.path\ncwd = os.path.abspath(os.path.split(__file__)[0])\nsys.path.insert(0, os.path.join(cwd, '..', 'param'))\n\nfrom .views import * # pyflakes:ignore (API import)\nfrom .dataviews import * # ... | python | edit | 12 | 3 | bsd-3-clause | cf52a7c83e1479a99e95ab2125958a67febfccf5 | mjabri/holoviews,basnijholt/holoviews,ioam/holoviews,mjabri/holoviews,ioam/holoviews,vascotenner/holoviews,vascotenner/holoviews,ioam/holoviews,basnijholt/holoviews,basnijholt/holoviews,vascotenner/holoviews,mjabri/holoviews | dataviews/__init__.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module contains the SESBackend class, which is what you'll want to set in\nyour settings.py::\n\n EMAIL_BACKEND = 'seacucumber.backend.SESBackend'\n\"\"\"\nfrom django.core.mail.backends.base import BaseEmailBackend\nfrom se... | python | edit | 1 | 2 | mit | 1ef1d7a973ce44943fc59315d1f962ed59f06e33 | makielab/sea-cucumber,duointeractive/sea-cucumber | seacucumber/backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add core view hangler class"
},
{
"role": "assistant",
"content": "from django.http import HttpResponse, HttpResponseNotFound, Http404\nfrom django.shortcuts import render, redirect\nfrom django.middleware.csrf import get_token\n... | python | new_file | null | null | mit | 25e5b38b09a21cd6e6fbf4ba141bc35bb34cb77e | Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation | Core/views.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: latin-1\n\n\"\"\"\npax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node.\n\"\"\"\n\nfrom mininet.node import Node\nfrom mininet.log import info, warn\n\nclass PaxNode( Node ):\n \"... | python | edit | 4 | 2 | apache-2.0 | 4c987cd45080cb6a1a449fa708a567c40ba8c94f | niksu/pax,TMVector/pax,niksu/pax,niksu/pax,TMVector/pax | examples/pax_mininet_node.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date as vanilla_date\n\n\ndef ordinal(n):\n suffix = \"th\"\n if n % 10 == 1:\n suffix = \"st\"\n if n % 10 == 2:\n suffix = \"nd\"\n if n % 10 == 3:\n suffix = \"rd\"\n if 10 < n % 1... | python | edit | 1 | 3 | apache-2.0 | b7b1ae11378b37350a3fcd9d989be58f655ec986 | jwg4/qual,jwg4/calexicon | calexicon/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('learn',parent_package,top_path)\n\n config.add_subpackage('datasets')\n config.add_subpackage('c... | python | edit | 1 | 1 | bsd-3-clause | da93d78d141e0e07581b2a00cd6a4fb4058dcf56 | jayflo/scikit-learn,toastedcornflakes/scikit-learn,Aasmi/scikit-learn,kjung/scikit-learn,macks22/scikit-learn,trungnt13/scikit-learn,sgenoud/scikit-learn,ldirer/scikit-learn,aetilley/scikit-learn,elkingtonmcb/scikit-learn,IshankGulati/scikit-learn,zhenv5/scikit-learn,fzalkow/scikit-learn,petosegan/scikit-learn,mojoboss... | scikits/learn/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom Decode import Decoder\nimport Frames\n\nclass TestDecoder(unittest.TestCase):\n \"\"\"\n \"\"\"\n def setUp(self):\n self.decoder = Decoder()\n\n def test_decoder_get_frame_class(self):\n comm... | python | edit | 1 | 1 | mit | 3252a1e0f5b2991179d3fabe66f34a19f7cd85c9 | phan91/STOMP_agilis | src/DecodeTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport asyncio, signal, os\nfrom blink import blink\nimport ipc.coordinator\n\nloop = asyncio.get_event_loop()\n\ndef my_interrupt_handler():\n print('Stopping')\n for task in asyncio.Task.all_tasks():\n ... | python | edit | 1 | 2 | mit | fb0b129216bd98a90cdee623157df5c7e4a742fb | fayoh/KSP-Control | blinkenlights/blinkenlights.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom utils import Reader\nimport code\nimport sys\n\nauthor_dict = dict()\n\n\ndef extract_authors(tweets):\n # code.interact(local=dict(globals(), **locals()))\n\n for t in tweets:\n if t.is_post():\n act... | python | edit | 4 | 4 | apache-2.0 | 3ccaf18243232d756ed139d9f84a6b3903af15f7 | chuajiesheng/twitter-sentiment-analysis | exploratory_analysis/author_scan.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nInternal utils\n\"\"\"\nimport django\n\n\ndef add_media(dest, media):\n \"\"\"\n Optimized version of django.forms.Media.__add__() that doesn't create new objects.\n\n Only required for Django < 2.0\n \"\"\"\n if dja... | python | edit | 1 | 2 | bsd-3-clause | 9d651a1cdb92d7d8ba039fce97a11de085b54990 | chrisglass/django_polymorphic,chrisglass/django_polymorphic | polymorphic/formsets/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nModule for making various web calls. Primarily designed for webhooks and the\nlike, but also useful for basic http testing.\n'''\nfrom __future__ import absolute_import\n\n# Import salt libs\nimport salt.utils.... | python | edit | 5 | 3 | apache-2.0 | 4712e870bec7c678f88af3d7b54fcf7c8b040795 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/modules/http.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFile Converter Plugin\n\"\"\"\n\nimport logging\nfrom sas.sasgui.guiframe.plugin_base import PluginBase\nfrom sas.sasgui.perspectives.file_converter.converter_panel import ConverterWindow\n\nlogger = logging.getLogger(__name__)\n\nc... | python | edit | 1 | 4 | bsd-3-clause | 94e3572a4049b0eb0ff0d762a3bce5248a5bd507 | SasView/sasview,SasView/sasview,lewisodriscoll/sasview,SasView/sasview,SasView/sasview,SasView/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,SasView/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview | src/sas/sasgui/perspectives/file_converter/file_converter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nREST_FRAMEWORK = {\n 'DEFAULT_RENDERER_CLASSES': (\n # 'djangorestframework_camel_case.render.CamelCaseJSONRenderer', # Any other renders,\n 'rest_framework.renderers.JSONRenderer',\n # 'rest_framework.renderers.Bro... | python | edit | 1 | 0 | apache-2.0 | edd534103ca404bdeadf3225ea381acc8c555ced | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon/polyaxon/config_settings/rest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom fabric.api import local, settings, abort, run, cd, env, put, sudo\nfrom fabric.contrib.console import confirm\n\nimport time\nDEPLOY_WAIT_TIME = 15\n\ntimestamp=\"release-%s\" % int(time.time() * 1000)\n\nenv.user = 'deplo... | python | edit | 2 | 1 | mit | 2883d803609554e38f96f920f1ef41b54b6ec4c2 | UCDavisLibrary/scribeAPI,UCDavisLibrary/scribeAPI,UCDavisLibrary/scribeAPI,UCDavisLibrary/scribeAPI,UCDavisLibrary/scribeAPI | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils import dir_util\nimport pytest\nimport os\n\n\n@pytest.fixture(scope=\"class\")\ndef datadir(tmpdir_factory, request):\n \"\"\"\n Fixture responsible for searching a folder with the same name of test\n module and, if... | python | edit | 1 | 2 | mit | e994aa4c4389177aedca8192a41d27bdbb81458e | ZedThree/fort_depend.py,ZedThree/fort_depend.py | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Callable, Optional, TypeVar\n\nfrom rx import operators as ops\nfrom rx.core import Observable, pipe, typing\nfrom rx.internal.basic import default_comparer\n\n_T = TypeVar(\"_T\")\n\n\ndef contains_(\n value: _T, comp... | python | edit | 1 | 2 | mit | 9f9357bc46f813cd8a26a5f14bba5364aa4a4c10 | ReactiveX/RxPY,ReactiveX/RxPY | rx/core/operators/contains.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyparsing import *\n\nfrom ...constants.math.deff import NUM, FULLNUM\nfrom ...constants.zones.deff import TOP, BOTTOM\nfrom ...constants.verbs.deff import *\nfrom ...mana.deff import color\nfrom ...types.deff import nontype, supertype... | python | edit | 42 | 0 | mit | 2e0585a59e7c3c60b8bf7e0a8d5e377b7f2f9cd5 | jrgdiz/cardwalker,jrgdiz/cardwalker | grammar/entities/adjectives/deff.py | rejected_lint | Too many lint violations: 42 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf8\n\"\"\"\nTest that C++ supports char8_t correctly.\n\"\"\"\n\nfrom __future__ import print_function\n\nimport lldb\nfrom lldbsuite.test.decorators import *\nfrom lldbsuite.test.lldbtest import *\nimport lldbsuite.test.lldbutil... | python | edit | 10 | 1 | apache-2.0 | dadbcf91eab36b67ba9f0db77076651c04d1e85d | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Testing use of cpl_errs\n\nimport pytest\n\nimport rasterio\nfrom rasterio.errors import RasterioIOError\n\n\ndef test_io_error(tmpdir):\n with pytest.raises(RasterioIOError) as exc_info:\n rasterio.open(str(tmpdir.join('foo.tif... | python | edit | 1 | 1 | bsd-3-clause | 400027592a131872da5754306ee5e0ec2eba61cf | kapadia/rasterio,brendan-ward/rasterio,kapadia/rasterio,kapadia/rasterio,brendan-ward/rasterio,brendan-ward/rasterio | tests/test_err.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\n\nimport json\n\nimport websocket\n\nfrom polyaxon_client.logger import logger\n\n\nclass SocketTransportMixin(object):\n \"\"\"Socket operations ... | python | edit | 1 | 4 | apache-2.0 | 1bd57b89cb0deed5081540e5b29f7531215fa121 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon_client/transport/socket_transport.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hoomd.parameterdicts import AttachedTypeParameterDict\n\n\nclass TypeParameter:\n def __init__(self, name, type_kind, param_dict):\n self.name = name\n self.type_kind = type_kind\n self.param_dict = param_dict\n... | python | edit | 1 | 1 | bsd-3-clause | 2717a35a78f5982f96d57e258dfedd308cb6ffa8 | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/typeparam.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Plot to test date axis\"\"\"\nimport matplotlib.pyplot as plt\nimport matplotlib\nimport mpld3\n\n\ndef create_plot():\n fig, ax = plt.subplots()\n ax.plot([2000, 2050], [1, 2])\n ax.set_title('Tick label test', size=14)\n ... | python | edit | 3 | 1 | bsd-3-clause | fcb80afe4703c7a031778ef573a3b839484d8c24 | jakevdp/mpld3,mpld3/mpld3,mpld3/mpld3,jakevdp/mpld3 | mpld3/test_plots/test_ticklabels.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyblish.api\n\n\nclass ValidateMindbenderSingleShape(pyblish.api.InstancePlugin):\n \"\"\"One mesh per transform\"\"\"\n\n label = \"Validate Single Shape\"\n order = pyblish.api.ValidatorOrder\n hosts = [\"maya\"]\n a... | python | edit | 1 | 6 | mit | 86c106fc95946e4558fabfae57bbd039b248a70c | mindbender-studio/core,MoonShineVFX/core,getavalon/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core | mindbender/maya/plugins/validate_single_shape.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport gzip\nimport urllib.request\nfrom celery import shared_task\nfrom django.core.mail import EmailMessage\nfrom celery.task import periodic_task\nfrom celery.schedules import crontab\n\n\n@shared_task(name='deliver_email')\nd... | python | edit | 1 | 3 | mit | d2250ac74b0797d1662c054d2357573578caa251 | LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID | core/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logging.handlers import SocketHandler\nimport ssl\n\nclass LogstashHandler(SocketHandler):\n \"\"\"\n Sends output to an optionally encrypted streaming logstash TCP listener.\n \"\"\"\n\n def __init__(self, host, port, keyfile=None... | python | edit | 1 | 2 | mit | 7f83888c957b892e6cc9d2e92f49a2737a9eabfe | klynch/python-logstash-handler | logstash_handler/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass BaseTransport(object):\n \"\"\"Base transport class.\"\"\"\n\n def __init__(self, name, data_format_class, data_format_options,\n handler_class, handler_options):\n self._name = name\n self._data_fo... | python | edit | 1 | 1 | apache-2.0 | 398937e4ca759de8e1f88db7245280c72eddb88d | devicehive/devicehive-python | devicehive/transports/base_transport.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, with_statement\n\nfrom nose.tools import eq_\n\nfrom orges.main import optimize\nfrom orges.optimizer.gridsearch import GridSearchOptimizer\nfrom orges.test.util.one_param_sleep_and_negate_f ... | python | edit | 1 | 1 | bsd-3-clause | 96aa6271a4dab8c4e222c4161ab9ad06472b4f19 | cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt | orges/test/integration/test_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.contenttypes import models as ct_models, generic\n\nfrom nodeconductor.quotas import models, utils\n\n\nclass QuotaScopeClassListFilter(admin.SimpleListFilter):\n # Human-readable tit... | python | edit | 1 | 2 | mit | 116432001ca2b8eb1716add4455dfb1e2562f29a | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/quotas/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.14 on 2018-09-11 14:35\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom django.db import migrations, models\nfrom corehq.sql_db.operations import Ra... | python | edit | 3 | 0 | bsd-3-clause | 256a86b9cfbf2f78fc913b87997dd89673d177c5 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | custom/icds_reports/migrations/0070_ccsrecordmonthly_closed.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pwd\nimport unittest\n\nimport osgtest.library.core as core\nimport osgtest.library.files as files\nimport osgtest.library.tomcat as tomcat\nimport osgtest.library.osgunittest as osgunittest\n\nclass TestGUMS(osgunittest.O... | python | edit | 5 | 1 | apache-2.0 | 09fa1e01c6de9dffc99c7726607d64c843b564ba | efajardo/osg-test,efajardo/osg-test | osgtest/tests/test_53_gums.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tapiriik.database import db\nfrom tapiriik.messagequeue import mq\nimport kombu\nfrom datetime import datetime\nimport time\n\nchannel = mq.channel()\nexchange = kombu.Exchange(\"tapiriik-users\", type=\"direct\")(channel)\nexchange.de... | python | edit | 3 | 0 | apache-2.0 | d029c67f59ce65f9ad651b2e261e7f29ef8c2ca2 | campbellr/tapiriik,niosus/tapiriik,dlenski/tapiriik,niosus/tapiriik,cmgrote/tapiriik,gavioto/tapiriik,cpfair/tapiriik,cpfair/tapiriik,abhijit86k/tapiriik,cheatos101/tapiriik,abhijit86k/tapiriik,niosus/tapiriik,cmgrote/tapiriik,dmschreiber/tapiriik,brunoflores/tapiriik,marxin/tapiriik,campbellr/tapiriik,cgourlay/tapirii... | sync_scheduler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Reverse each word in a sentence\n\ndef reverse_sentence(string, separator):\n\t# string_list = string.split()\n\t# flipped_list = string_list[::-1]\n\tflipped_list = (string.split())[::-1] # split string into list and then reverse order o... | python | edit | 2 | 2 | mit | a44c71cf25672606bd866014982b18836acc46ef | derekmpham/interview-prep,derekmpham/interview-prep | string/reverse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gettext\n\n\nclass Version(object):\n def __init__(self, canonical_version, final):\n self.canonical_version = canonical_version\n self.final = final\n\n @property\n def pretty_version(self):\n if self.f... | python | edit | 1 | 2 | apache-2.0 | 641b1e0c78da6459a43516fc23c5dc388fe2d273 | eatbyte/Swift,prashanthpai/swift,notmyname/swift,matthewoliver/swift,Seagate/swift,bkolli/swift,prashanthpai/swift,smerritt/swift,Akanoa/swift,matthewoliver/swift,notmyname/swift,citrix-openstack-build/swift,dpgoetz/swift,larsbutler/swift,clayg/swift,iostackproject/IO-Bandwidth-Differentiation,mjzmjz/swift,daasbank/swi... | swift/__init__.py | rejected_duplicate | Near-duplicate of sample 241 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyDH\n\ndef test_pydh_keygen():\n d1 = pyDH.DiffieHellman()\n d2 = pyDH.DiffieHellman()\n d1_pubkey = d1.gen_public_key()\n d2_pubkey = d2.gen_public_key()\n d1_sharedkey = d1.gen_shared_key(d2_pubkey)\n d2_sharedke... | python | edit | 1 | 1 | apache-2.0 | 8322c776fe989d65f83beaefff5089716d0286e7 | amiralis/pyDH | test/test_pydh.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Bring in encoder from webhooks."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nSerialize data to/from JSON\nInspired by https://github.com/django/django/blob/master/django/core/serializers/json.py\n\"\"... | python | new_file | 1 | 9 | bsd-3-clause | 49c00236569d48f651bd8f2226907d5c784cbe77 | audreyr/standardjson,audreyr/standardjson | json262/json262.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 OpenStack Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# ... | python | edit | 1 | 2 | apache-2.0 | 94b716142a575e73d906f332fda84d68b549d5cd | zhangg/trove,zhangg/trove,hplustree/trove,openstack/trove,openstack/trove,hplustree/trove | trove/tests/unittests/util/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom . import views\n\nurlpatterns = [\n url(\"^$\", views.request_view, name=\"request_site\"),\n url(\"^approve$\", views.approve_view, name=\"approve_site\"),\n url(\"^admin$\", views.approve_... | python | edit | 1 | 0 | mit | 3b127af586ccfeb785a16ef432af8ce52c08a7e4 | tjcsl/director,tjcsl/director,tjcsl/director,tjcsl/director | web3/apps/request/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# stdlib\nfrom typing import Any\nfrom typing import Dict\n\n# third party\nfrom pandas import DataFrame\n\n# syft relative\nfrom ...messages.group_messages import CreateGroupMessage\nfrom ...messages.group_messages import DeleteGroupMessag... | python | edit | 1 | 1 | apache-2.0 | 4fb3ff629f88935a6dcd905f9268eb953b6ad7fb | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | src/syft/grid/client/request_api/group_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015-2017 John \"LuaMilkshake\" Marion\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# ... | python | edit | 1 | 1 | apache-2.0 | 4e309e7f70760e400dc7150b34e7f86c4c5643b4 | Packeteers/GoldDust | golddust/packages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sim.PathWorldGenerator import PathWorldGenerator\n\n\nclass SimplePathWorldGenerator(PathWorldGenerator):\n\n\tdef __init__(self, logger, view_size, world_size, sampler, path_in_init_view=False,\n\t\t\t\t target_not_in_init_view=False)... | python | edit | 1 | 1 | mit | b87da7d5666fc5dc3654d9f58779b8f58a3e6e9f | kevinkepp/search-for-this | sft/sim/SimplePathWorldGenerator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nLWR HTTP Client layer based on Python Standard Library (urllib2)\n\"\"\"\nfrom __future__ import with_statement\nfrom os.path import getsize\nimport mmap\ntry:\n from urllib2 import urlopen\nexcept ImportError:\n from urllib.r... | python | edit | 1 | 8 | apache-2.0 | f17611b39c9cc3ec6815093db2eb85cb6b30b5ba | jmchilton/pulsar,natefoo/pulsar,ssorgatem/pulsar,jmchilton/lwr,galaxyproject/pulsar,jmchilton/pulsar,ssorgatem/pulsar,galaxyproject/pulsar,natefoo/pulsar,jmchilton/lwr | lwr/lwr_client/transport/standard.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport os.path\nfrom . import database\n\nTHEME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), \"../themes\"))\n\ndef getCurrentTheme():\n\tdatabaseConnection = database.ConnectionManager.getConnection(\"main\")\n... | python | edit | 2 | 7 | mit | f1f18b6b996d2bcf108bf7b594d0fdf4dab23057 | ollien/Timpani,ollien/Timpani,ollien/Timpani | timpani/themes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# I started here: https://www.django-rest-framework.org/api-guide/renderers/#example\n\nfrom rest_framework import renderers\nimport unicodecsv as csv\nimport io\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\nclass SimpleCSVRe... | python | edit | 1 | 5 | bsd-3-clause | 4c655c31bf9625fe426c8b481afba41fe328494d | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | metaci/api/renderers/csv_renderer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Game():\n def __init__(self):\n self._score = 0\n\n def roll(self, pins):\n self._score += pins\n\n def score(self):\n return self._score\n\n```\n\nApply this change: [Python] Add 'spare' support in when ... | python | edit | 1 | 3 | mit | 101e50f1e668169836a5f253c938420f3675fb16 | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | jesusmtnez/python/kata/game.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass TestPropagation(object):\n def test_node_propagation(self):\n \"\"\"\n Tests that check node propagation\n\n 1) Spin up four servers.\n 2) Make the first one send a sync request to all three others.\n ... | python | edit | 1 | 2 | mit | 0858cd463d4e6179e3bf4abbfa94cc54fb0600db | thiderman/network-kitten | test/integration/test_node_propagation.py | rejected_duplicate | Near-duplicate of sample 4011 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport urllib\n\n\n############### Functions called by stackdoc\n\ndef get_version():\n return 1\n\ndef get_ids(title, body, tags):\n ids = []\n if \"http://docs.python.org/\" in body:\n urls = re.findall(r'<a hre... | python | edit | 3 | 6 | bsd-3-clause | 29316060fb422a881833e411350e0149575bf1c4 | alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc | update-database/stackdoc/namespaces/python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.syndication.views import Feed\nfrom django.db.models import Max\n\nfrom projects.models import Project\n\nclass LatestProjectsFeed(Feed):\n title = \"Recently updated documentation\"\n link = \"http://readthedocs.o... | python | edit | 3 | 1 | mit | f5aa51a57e3d161c12d8b8390e6e6aab7609b459 | VishvajitP/readthedocs.org,soulshake/readthedocs.org,agjohnson/readthedocs.org,attakei/readthedocs-oauth,nikolas/readthedocs.org,pombredanne/readthedocs.org,michaelmcandrew/readthedocs.org,laplaceliu/readthedocs.org,takluyver/readthedocs.org,atsuyim/readthedocs.org,mrshoki/readthedocs.org,d0ugal/readthedocs.org,asampat... | readthedocs/projects/feeds.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport inspect\nimport os\n\n# Get testdata absolute path.\nabs_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\npath = abs_path + \"/testdata\"\n\n\n```\n\nApply this change: Change the testdata path to rel... | python | edit | 1 | 0 | mit | f19d4eaec9681192eb761758b1506638b78a5e15 | PytLab/VASPy,PytLab/VASPy | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n'''\nDiscover all instances of unittest.TestCase in this directory.\n'''\n# Import python libs\nimport os\n# Import salt libs\nimport saltunittest\nfrom integration import TestDaemon\n\nTEST_DIR = os.path.dirname(os.p... | python | edit | 1 | 1 | apache-2.0 | 6c0c05c523043abd4fb35ee53daf1a216346a94d | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport logging\nimport json\nfrom logging.config import dictConfig\nfrom gluon.storage import Storage\nfrom gluon.contrib.appconfig import AppConfig\n\n\n# app_config use to cache values in production\napp_config = AppConfig(relo... | python | edit | 6 | 0 | apache-2.0 | 0dac29f30853498f6e9d82c8b791ced5ec21667c | wefner/w2pfooty,wefner/w2pfooty,wefner/w2pfooty | models/00_settings.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Stupid simple Python configuration environments\"\"\"\n\nfrom __future__ import absolute_import\n\nimport os as _os\n\n__version__ = '0.6.0'\n\n\n\n_os.environ.setdefault('MARTEN_ENV', 'default')\n\ntry:\n\tfrom .util import get_confi... | python | edit | 3 | 0 | mit | 4ce674ea3a672c2819112b5237319000e33f22c5 | nick-allen/marten | marten/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSECRET_KEY = 'not-anymore'\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n }\n}\n\nINSTALLED_APPS = [\n 'tests',\n]\n\n```\n\nApply this change: Add support for Django 4.0."
},
{
"role": "... | python | edit | 1 | 0 | mit | 6c2d73b0d387eb49e38b0432318733b56d2deb96 | gintas/django-picklefield | tests/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys, socket, time, logging\nimport shlex, subprocess\nfrom hdfs import *\n\nlogging.basicConfig()\n\nif len(sys.argv) < 4:\n print \"usage: napper_kittydar <job name> <worker ID> <executable>\"\n sys.exit(1)\n\njob_name = sys.argv[... | python | edit | 5 | 0 | mit | da3e6b3c59e2c0d94f165e526daefd33fc9d8d79 | ms705/napper | napper_kittydar.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import *\n\nfrom profiles import views\n\n\nurlpatterns = patterns('',\n url(r'^(?P<username>[\\w.-]+)/$',\n views.profile_detail,\n {'template_... | python | edit | 4 | 0 | mit | cd599444433fd32f989fa4f61a3b19f773b12f0e | techtonik/readthedocs.org,sid-kap/readthedocs.org,agjohnson/readthedocs.org,asampat3090/readthedocs.org,CedarLogic/readthedocs.org,soulshake/readthedocs.org,LukasBoersma/readthedocs.org,VishvajitP/readthedocs.org,KamranMackey/readthedocs.org,nikolas/readthedocs.org,VishvajitP/readthedocs.org,wanghaven/readthedocs.org,s... | readthedocs/profiles/urls/public.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom utils import CanadianJurisdiction\nfrom opencivicdata.divisions import Division\nfrom pupa.scrape import Organization\n\n\nclass OntarioEnglishPublicSchoolBoards(CanadianJurisdiction):\n classification = 'legislature' # just to avo... | python | edit | 1 | 3 | mit | 1ea4e06fb3dc08a27a37b379e9ba2fffd5303625 | opencivicdata/scrapers-ca,opencivicdata/scrapers-ca | ca_on_school_boards_english_public/__init__.py | rejected_duplicate | Near-duplicate of sample 3672 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Penelophant Models \"\"\"\nfrom .User import User\nfrom .UserAuthentication import UserAuthentication\nfrom .Auction import Auction\nfrom .Bid import Bid\nfrom .Invoice import Invoice\n\n```\n\nApply this change: Load in the double b... | python | edit | 8 | 0 | apache-2.0 | 9f18d05091abfb6b13914c4b29970ed6fc5d367d | kevinoconnor7/penelophant,kevinoconnor7/penelophant | penelophant/models/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Transformer(object):\n class Feats():\n exclude = None\n\n def __init__(self):\n for field in self.get_feats():\n getattr(self.Feats, field).bind(field, self)\n\n def get_feats(self):\n return ... | python | edit | 1 | 4 | mit | 17cdaa0cf7313e4edf5ef28ea2634410bd085d4f | rsk-mind/rsk-mind-framework | rsk_mind/transformer/transformer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSettings for tests.\n\n\"\"\"\nfrom moztrap.settings.default import *\n\nDEFAULT_FILE_STORAGE = \"tests.storage.MemoryStorage\"\nALLOW_ANONYMOUS_ACCESS = False\nSITE_URL = \"http://localhost:80\"\nUSE_BROWSERID = True\n\n```\n\nAppl... | python | edit | 2 | 0 | bsd-2-clause | 8d7862a7045fbb52ce3a2499766ffa1ffef284af | mccarrmb/moztrap,bobsilverberg/moztrap,mozilla/moztrap,mccarrmb/moztrap,shinglyu/moztrap,mccarrmb/moztrap,shinglyu/moztrap,mccarrmb/moztrap,shinglyu/moztrap,mccarrmb/moztrap,bobsilverberg/moztrap,mozilla/moztrap,bobsilverberg/moztrap,shinglyu/moztrap,mozilla/moztrap,shinglyu/moztrap,bobsilverberg/moztrap,mozilla/moztra... | tests/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef hdfs_make_qualified(path):\n return path if 'CF_HADOOP_DEFAULT_FS' not in os.environ else os.environ['CF_HADOOP_DEFAULT_FS'] + path\n\n```\n\nApply this change: Update python script util to detect if paths are already ... | python | edit | 1 | 3 | apache-2.0 | ab3dc6466b617a5bf5a0bec2c122eca645c1d29f | ggear/cloudera-framework,ggear/cloudera-framework,ggear/cloudera-framework | cloudera-framework-assembly/src/main/resources/python/script_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport traceback\nfrom . import client\nfrom . import app\nfrom .thrift import lang_thrift\nimport os.path\nimport random\n\nservers = []\nwith open(os.path.join(os.path.dirname(__file__), 'servers'), 'r') as f:\n for l in f:\n ip... | python | edit | 4 | 4 | mit | a3f33b31a572302609e44c47fff895c988ac9396 | jamesmkwan/cse191,jamesmkwan/cse191,jamesmkwan/cse191,jamesmkwan/cse191 | web/cse191_web/util.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport mechanize\nimport os\n\nclass McGillException(Exception):\n pass\n\nurls = {\n 'login': 'twbkwbis.P_WWWLogin',\n 'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'\n}\n_base_url = 'https://banweb.mcgill.ca/pban1... | python | edit | 1 | 6 | mit | 16c8f23cd6ad9f9a10592bb40d1a18eb2c673d34 | isbadawi/minerva | common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division,\n print_function, unicode_literals)\nfrom builtins import *\n\nfrom sqlalchemy.engine import Engine\n\nfrom zsl import inject\nfrom zsl.db.model.sql_alchemy import me... | python | edit | 2 | 1 | mit | f99efce15513216ae4bd1462daeee8b0d12d2a1e | AtteqCom/zsl,AtteqCom/zsl | zsl/testing/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Dave Kludt\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.o... | python | edit | 1 | 0 | apache-2.0 | f158cecd2e5155a0e8bb2e04d097db5a7b146836 | rackerlabs/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork | pitchfork/config/config.example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nsetuptools.setup(\n name='pyQuantuccia',\n packages=['pyQuantuccia']\n)\n```\n\nApply this change: Add newline at end of file."
},
{
"role": "assistant",
"content": "import setuptools\n\nsetuptools.set... | python | edit | 1 | 0 | bsd-3-clause | b16bd0e8f85aa2895536bf1fe833d07bacc1790e | jwg4/pyQuantuccia,jwg4/pyQuantuccia | pyQuantuccia/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom operator import add\nimport math\n\nmoves = raw_input(\"Enter the moves: \")\n\nstart_position = [0,0]\ncurrent_position = [0,0]\n\n'''\nheading = [1,90] - 1 step North\n\t\t [1, -90] - 1 step South\n\t\t [1,0] - East\n\t\t [1,360] ... | python | edit | 3 | 0 | apache-2.0 | d89093f739cf5c953fb81d1c5c3e6dde5e90fb0c | MayankAgarwal/GeeksForGeeks | check-if-a-given-sequence-of-moves-for-a-robot-is-circular-or-not.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nexample app to test running an app as subprocess within pty\n\"\"\"\nfrom __future__ import print_function, unicode_literals\nimport time\n\n# http://stackoverflow.com/questions/287871/print-in-terminal-with... | python | edit | 1 | 1 | mit | 62febcd8d6fcefdf2db3f411807fcf96c91228b8 | finklabs/inquirer,finklabs/whaaaaat | tests/example_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport getopt, sys\n\nif __name__ == '__main__':\n sippy_path = None\n\n try:\n opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b')\n except getopt.GetoptError:\n usage()\n\n for o, a in opts:\n if o == '-... | python | edit | 2 | 0 | bsd-2-clause | 21e47557da10e1f4bb14e32d15194bf95211882a | sippy/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy | python/getmonotime.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module provides some type definitions and backwards compatibility shims\nfor use in the testsuite driver.\n\nThe testsuite driver can be typechecked using mypy [1].\n\n\n[1] http://mypy-lang.org/\n\"\"\"\n\ntry:\n from typin... | python | edit | 11 | 0 | bsd-3-clause | a0f09e23dd19f0cf223034f9b787a4f038cd995d | sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc | testsuite/driver/my_typing.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on Dec 20, 2011\n\n@author: Tyranic-Moron\n'''\n\nfrom IRCMessage import IRCMessage\nfrom IRCResponse import IRCResponse, ResponseType\nfrom Function import Function\nimport GlobalVars\n\nimport re\n\nclass Instantiate(Function... | python | edit | 3 | 5 | mit | 63fd5cf2c05f1b3e343e315184d99c3b46ed0a33 | HubbeKing/Hubbot_Twisted | Functions/Leave.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#------------------------------------------------------------------------------\n#\n# Copyright (c) 2008, Enthought, Inc.\n# All rights reserved.\n# \n# This software is provided without warranty under the terms of the BSD\n# license i... | python | edit | 1 | 0 | bsd-3-clause | 0aa9b8e4cb9cf542a0eaed81664d6c2bb310c19d | burnpanck/traits,burnpanck/traits | enthought/traits/ui/editors/date_editor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nHolds static data components, like the palette\n'''\ndef get_palette(theme='std'):\n '''\n Return the preferred palette theme\n\n Themes:\n std\n The standard theme used by the console\n '''\n if theme == 'brig... | python | edit | 1 | 2 | apache-2.0 | 72c4a1285eac5f70dfae243e911e0ab3c540d870 | saltstack/salt-console | sconsole/static.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import HttpResponse, HttpResponseNotAllowed\nfrom django.shortcuts import render\nfrom django.views.generic import TemplateView\n\nfrom est_client.forms import Clie... | python | edit | 1 | 2 | mit | 67ab3d4565fe2467c2eb58e77176fd0ccf7d1d65 | Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp | estmator_project/estmator_project/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.tools import eq_\n\nfrom orges.invoker.simple import SimpleInvoker\nfrom orges.invoker.pluggable import PluggableInvoker\n\nfrom orges.main import custom_optimize\nfrom orges.optimizer.gridsearchoptimizer import GridSearchOptimize... | python | edit | 1 | 1 | bsd-3-clause | 7462a6da95443606c4219a6b2ccb8cf422f94037 | cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt | orges/test/integration/test_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport docker\nimport pytest\n\nfrom webcomix.docker import DockerManager, CONTAINER_NAME\n\n@pytest.fixture\ndef cleanup_container():\n yield None\n client = docker.from_env()\n for container in client.containers().list():\n ... | python | edit | 1 | 3 | mit | d24ac637870a5e3e701a172212e38f733acc4fd8 | J-CPelletier/webcomix,J-CPelletier/webcomix | webcomix/tests/test_docker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils import importlib\n\n\ndef import_from_string(val, setting_name):\n \"\"\"\n Attempt to import a class from a string representation.\n Based on the method of the same name in Djang... | python | edit | 2 | 2 | apache-2.0 | 51b1f612ab8058da89cc8aaa6b1db99139c7eda0 | swisscom/cleanerversion,anfema/cleanerversion,anfema/cleanerversion,pretix/cleanerversion,pretix/cleanerversion,swisscom/cleanerversion,swisscom/cleanerversion,pretix/cleanerversion,anfema/cleanerversion | versions/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# stdlib\nfrom typing import Any\nfrom typing import Optional\n\n# third party\nfrom nacl.signing import SigningKey\n\n# syft absolute\nfrom syft import flags\nfrom syft.core.common.message import SyftMessage\nfrom syft.core.io.address impo... | python | edit | 1 | 3 | apache-2.0 | 916441874a3bca016e950557230f7b3a84b3ee97 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | packages/grid/backend/grid/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport json\n\n\ndef main():\n prefix = os.environ['PREFIX']\n info_file = os.path.join(prefix, 'conda-meta',\n 'always_include_files_regex-0.1-0.json')\n with open(info_file, 'r')... | python | edit | 1 | 3 | bsd-3-clause | 19f86127b5c1b738684f493354b2f532f0f58634 | sandhujasmine/conda-build,shastings517/conda-build,rmcgibbo/conda-build,mwcraig/conda-build,sandhujasmine/conda-build,sandhujasmine/conda-build,rmcgibbo/conda-build,shastings517/conda-build,dan-blanchard/conda-build,dan-blanchard/conda-build,ilastik/conda-build,mwcraig/conda-build,shastings517/conda-build,ilastik/conda... | tests/test-recipes/metadata/always_include_files_glob/run_test.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.