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\nfrom disco.test import DiscoJobTestFixture, DiscoTestCase\nfrom disco.error import JobError\n\nclass RateLimitTestCase(DiscoJobTestFixture, DiscoTestCase):\n inputs = [1]\n\n def getdata(self, path):\n return 'badger\\n' * 1000...
python
edit
2
2
bsd-3-clause
df24541dc5fff6098c3d3c0d920359c34910221c
pavlobaron/disco_playground,simudream/disco,pombredanne/disco,pavlobaron/disco_playground,pooya/disco,simudream/disco,ktkt2009/disco,discoproject/disco,pombredanne/disco,simudream/disco,pavlobaron/disco_playground,beni55/disco,mwilliams3/disco,ErikDubbelboer/disco,oldmantaiter/disco,seabirdzh/disco,mozilla/disco,ErikDu...
tests/test_ratelimit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport argparse\nimport re\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Set\n\nfrom pre_commit_hooks.util import CalledProcessError\nfrom pre_commit_hooks.util import...
python
edit
5
4
mit
a7af81244972ae6ac30bd55260af46b7ce25a6e1
pre-commit/pre-commit-hooks
pre_commit_hooks/no_commit_to_branch.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
2
apache-2.0
0fa0d792bfc8ea22cd807b3b822edeb67a97943a
dtroyer/python-openstacksdk,dudymas/python-openstacksdk,mtougeron/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,mtougeron/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-opens...
examples/connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# test set for plugin testing\n# from IPython import embed\nimport pytest\n\nclass Dut(object):\n 'fake a device under test'\n\n _allowed = ('a', 'b', 'c')\n\n def __init__(self, mode=None):\n self._mode = mode\n\n def ge...
python
edit
1
1
mit
c057f4865052c893af9abcae2c2f37ec02d56118
tgoodlet/pytest-interactive
example_test_set/tests/test_set_root.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# -*- coding: utf-8 -*-\n\nimport googlemaps\nimport base64\nfrom exceptions import InvalidGoogleCredentials\n\nclass GoogleMapsClientFactory():\n clients = {}\n\n @classmethod\n def get(cls, client_id, cli...
python
edit
1
2
bsd-3-clause
27fde5a910c5274e6f56bbb0b46dbb375822296d
CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/dataservices-api
server/lib/python/cartodb_services/cartodb_services/google/client_factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import redirect, url_for\nfrom portal import app\n\n@app.route('/', methods=['GET'])\ndef index():\n\treturn redirect(url_for('practices_index'))\n\n```\n\nApply this change: Fix incorrect protocol being using when behin reverse ...
python
edit
1
1
mit
8402244112dfbd45f6d05ba5f89c7311a019fbe7
LCBRU/genvasc_portal,LCBRU/genvasc_portal,LCBRU/genvasc_portal,LCBRU/genvasc_portal
web/portal/views/home.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom google.appengine.ext.webapp import template\nfrom base_controller import CacheableHandler\n\n\nclass EventWizardHandler(CacheableHandler):\n CACHE_VERSION = 1\n CACHE_KEY_FORMAT = \"event_wizard\"\n\n def __init__...
python
edit
1
1
mit
d4b32d8f1beb16f9f7309d1cceb16b37e491bea3
fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance,phil-lopreiato/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredha...
controllers/event_wizard_controller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nUnit tests for the implementation ``flocker-deploy``.\n\"\"\"\n\nfrom twisted.trial.unittest import TestCase, SynchronousTestCase\n\nfrom ...testtools import FlockerScr...
python
edit
3
1
apache-2.0
affae124162f03ce8783ced01916c11777cff25f
mbrukman/flocker,runcom/flocker,LaynePeng/flocker,w4ngyi/flocker,LaynePeng/flocker,AndyHuu/flocker,hackday-profilers/flocker,runcom/flocker,achanda/flocker,achanda/flocker,Azulinho/flocker,1d4Nf6/flocker,lukemarsden/flocker,runcom/flocker,AndyHuu/flocker,hackday-profilers/flocker,agonzalezro/flocker,Azulinho/flocker,mo...
flocker/cli/test/test_deploy_script.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport os.path\n\n\nTESTING_DIR = os.path.abspath(os.path.dirname(__file__))\n\n\n@contextlib.contextmanager\ndef cwd(path):\n ...
python
edit
1
2
mit
b4e29b5e63e4cd93d4244e7a52f772a40f9a7772
pre-commit/pre-commit-hooks,Harwood/pre-commit-hooks,Coverfox/pre-commit-hooks
testing/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass TrekkingConfig(AppConfig):\n name = 'geotrek.trekking'\n verbose_name = _(\"Trekking\")\n\n```\n\nApply this change: Add system check...
python
edit
1
1
bsd-2-clause
d05db8b8074503d927847272f53b32edc42fe043
makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/trekking/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .dumpling import Dumpling, DumplingDriver\nfrom .dumplingchef import DumplingChef\nfrom .dumplingeater import DumplingEater\nfrom .dumplinghub import DumplingHub\nfrom .dumplingkitchen import DumplingKitchen\nfrom ._version import __ve...
python
edit
1
0
mit
ba10a22c47ec2f6a27ddbc1cbddbfe8ec31e9955
mjoblin/netdumplings,mjoblin/netdumplings,mjoblin/netdumplings
netdumplings/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.template import loader, Context, TemplateDoesNotExist\nfrom django.template.loader_tags import ExtendsNode\nfrom cms.utils import get_template_from_request\nimport re\n\n# must be imported like this for isinstance\nfrom django.t...
python
edit
4
2
bsd-3-clause
5564ed32acd3baae009096b2240190ff485a0431
ojii/django-cms,dhorelik/django-cms,intip/django-cms,iddqd1/django-cms,bittner/django-cms,petecummings/django-cms,stefanfoulis/django-cms,benzkji/django-cms,leture/django-cms,selecsosi/django-cms,mkoistinen/django-cms,robmagee/django-cms,vad/django-cms,driesdesmet/django-cms,wuzhihui1123/django-cms,evildmp/django-cms,t...
cms/admin/utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom health_check.backends import BaseHealthCheckBackend\nfrom health_check.exceptions import (\n ServiceReturnedUnexpectedResult, ServiceUnavailable\n)\n\nfrom .tasks import add\n\n\nclass CeleryHealt...
python
edit
1
5
mit
4d4148ea831d425327a3047ebb9be8c3129eaff6
KristianOellegaard/django-health-check,KristianOellegaard/django-health-check
health_check/contrib/celery/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractBaseUser, PermissionsMixin\n\n\nclass User(AbstractBaseUser, PermissionsMixin):\n email = models.EmailField(unique=True)\n\n USERNAME_FIELD = 'email'\n\n ...
python
edit
1
2
mit
82700c4a5d11f01b971b8c031d8864cff2737f0e
randomic/aniauth-tdd,randomic/aniauth-tdd
accounts/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFunctions that return external URLs, for example for the Vesper documentation.\n\"\"\"\n\n\nimport vesper.version as vesper_version\n\n\n_USE_LATEST_DOCUMENTATION_VERSION = False\n\"\"\"Set this `True` during development, `False` fo...
python
edit
1
2
mit
fc3e5201935653228a71d4a52eeffb94de284141
HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper
vesper/external_urls.py
rejected_duplicate
Near-duplicate of sample 11913
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom inspect import signature\n\nimport asyncio\n\nclass Signal(object):\n def __init__(self, parameters):\n self._parameters = frozenset(parameters)\n self._receivers = set()\n\n def connect(self, receiver):\n # ...
python
edit
1
3
apache-2.0
fefd2ed137c59830fb3f8872beec8cac8c8e5cc7
rutsky/aiohttp,rutsky/aiohttp,z2v/aiohttp,esaezgil/aiohttp,pfreixes/aiohttp,decentfox/aiohttp,AraHaanOrg/aiohttp,panda73111/aiohttp,panda73111/aiohttp,playpauseandstop/aiohttp,hellysmile/aiohttp,jashandeep-sohi/aiohttp,elastic-coders/aiohttp,jashandeep-sohi/aiohttp,singulared/aiohttp,Eyepea/aiohttp,vaskalas/aiohttp,esa...
aiohttp/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unit test the farms models.\"\"\"\n\nfrom farms.factories import AddressFactory\n\nfrom mock import MagicMock\n\n\ndef test_address_factory_generates_valid_addresses_sort_of(mocker):\n \"\"\"Same test, but using pytest-mock.\"\"\"\...
python
edit
5
1
mit
e380d669bc09e047282be1d91cc95a7651300141
FlowFX/sturdy-potato,FlowFX/sturdy-potato,FlowFX/sturdy-potato
farms/tests/test_models.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef crop_corners(image, box=None, **kwargs):\n \"\"\"\n Crop corners to the selection defined by image_cropping\n \"\"\"\n\n if box:\n values = [int(x) for x in box.split(',')]\n box = (\n int(values[0])...
python
edit
1
5
bsd-3-clause
47e27693788eb84baaabcc4a374e2e8cd6cb1101
henriquechehad/django-image-cropping,winzard/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping
image_cropping/thumbnail_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nScrapy settings for a11y project\n\nFor simplicity, this file contains only settings considered important or\ncommonly used. You can find more settings consulting the documentation:\n\n http://doc.scrapy....
python
edit
1
0
apache-2.0
9efe4325e685b040a4af87a65e0885b950b0cc5a
singingwolfboy/pa11ycrawler,singingwolfboy/pa11ycrawler,singingwolfboy/pa11ycrawler
pa11ycrawler/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.task import task\n\n\n@task\ndef subscribe(email, newsletter_list, lang=None, user=None):\n from courriers.backends import get_backend\n\n backend = get_backend()()\n\n try:\n backend.register(email=email,\n ...
python
edit
1
2
mit
777e567c74ce037fb8de89c64d798d3aa1211da2
ulule/django-courriers,ulule/django-courriers
courriers/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom knesset.browser_test_case import BrowserTestCase, on_platforms\n\n# All browser test cases must inherit from BrowserTestCase which initializes the selenium framework\n# also, they must use the @on_platforms decorat...
python
edit
1
1
bsd-3-clause
bcaa91b14cd852b88c348aa47ab97b6dc8cde42c
MeirKriheli/Open-Knesset,OriHoch/Open-Knesset,OriHoch/Open-Knesset,MeirKriheli/Open-Knesset,alonisser/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset,daonb/Open-Knesset,MeirKriheli/Open-Knesset,OriHoch/Open-Knesset,alonisser/Open-Knesset,MeirKriheli/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,daonb/Open...
knesset/browser_cases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nsetup(name=\"umaineapi_pinchangeserver\",\n version = \"0.1\",\n description = \"A service for connecting to myHousing using a Maine ID and \",\n author = \"Noah Howard\",\n ...
python
edit
1
0
mit
01347b2725c67ba57aff3b48f69907cb2fcd95d0
nh-99/UMaine-Service-API,nh-99/UMaine-Service-API
pinchangeserver/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import NoArgsCommand\nimport os\nimport shutil\n\nclass Command(NoArgsCommand):\n help = \"Copy the satchmo static directory and files to the local project.\"\n\n def handle_noargs(self, **options):\n ...
python
edit
3
2
bsd-3-clause
93057b0bf30e1d4c4449fb5f3322042bf74d76e5
grengojbo/satchmo,grengojbo/satchmo
satchmo/shop/management/commands/satchmo_copy_static.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\n\nfrom juju.utils import run_with_interrupt\n\nfrom conjureup import events\nfrom conjureup.models.provider import LocalhostError, LocalhostJSONError\n\n\nclass BaseCloudController:\n\n cancel_monitor = asyncio.Event()\n\...
python
edit
1
4
mit
a41c8b8f9d3901e8d2794981c6cec050bf086e92
Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,ubuntu/conjure-up,conjure-up/conjure-up,Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up
conjureup/controllers/clouds/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lexos.processors.prepare.cutter import split_keep_whitespace, \\\n count_words, cut_by_number\n\n\nclass TestCutByNumbers:\n def test_split_keep_whitespace(self):\n assert split_keep_whitespace(\"Test string\") == [\"Test\...
python
edit
1
1
mit
ea9dcbed73a2cec0135a54cd093b42bc04364818
WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos
test/unit_test/test_cut_number.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django.dispatch\n\nsaved_file = django.dispatch.Signal(providing_args=['fieldfile'])\n\"\"\"\nA signal sent for each ``FileField`` saved when a model is saved.\n\n* The ``sender`` argument will be the model class.\n* The ``fieldfile`...
python
edit
1
0
bsd-3-clause
5d5d2e90e821a7d377e23d63bc0c7fbba223a1d7
SmileyChris/easy-thumbnails
easy_thumbnails/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nrepo_name = '{{ cookiecutter.repo_name }}'\nassert_msg = 'Repo name should be valid Python identifier!'\n\nif hasattr(repo_name, 'isidentifier'):\n assert repo_name.isidentifier(), assert_msg\nelse:\n import re\n identifier_re = re...
python
edit
1
0
isc
075d6f1b8f232c1ae7cb7d288da8f8d1040f49c9
thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template,thorgate/django-project-template
hooks/pre_gen_project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request\nimport requests\napp = Flask(__name__)\nAPI_ROOT_URL = \"https://api.heroku.com/\"\n\n# uses ~./netrc otherwise which might interfere with your requests\nrequests.defaults.defaults['trust_env'] = False\n\n@...
python
edit
8
4
mit
48884e305609e7c17eb3906c22ce509191f0d00e
Timothee/Passeplat
passeplat.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, Integer, String, DateTime\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker\n\nBase = declarative_base()\n\nclass Article(B...
python
edit
1
1
apache-2.0
99d0dc6a77144f39fce80b81247575d7c92ee4ac
footynews/fn_backend
footynews/db/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Program by Ankur Gupta\n# www.github.com/agupta231\n# Jan 2017\n#\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in ...
python
edit
1
0
mit
54b8d77fed6bc59f7e8926b9f1a8e08f25b26eac
agupta231/fractal_prints
corner_cubes_3d_laser/cut_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport glob\nimport os\nimport subprocess\nimport sys\n\nfiles = sys.argv[1:] if len(sys.argv) > 1 else glob.glob('*')\nfor file in files:\n if os.path.isfile(file):\n\n fileWithoutExtension = os.path.splitext(f...
python
edit
2
0
mit
50d0806e2826a5691f1f2ce8fac27c74d98b51c7
perdian/dotfiles,perdian/dotfiles,perdian/dotfiles
environments/default/bin/convertmp3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\n\nclass BaseAssetHandler(object):\n\n def __call__(self, asset):\n raise NotImplementedError\n\n @classmethod\n def as_handler(cls, **initkwargs):\n @wraps(cls, updated=())\n def ...
python
edit
1
1
isc
ef285377df575e101dd59d11bfec9f5b5d12ab2e
gears/gears,gears/gears,gears/gears
gears/asset_handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport tempfile\nimport os\nimport shutil\nimport pytest\n\nfrom .. import report\n\ntry:\n import Ska.DBI\n with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_op...
python
edit
1
2
bsd-3-clause
4a7b48b29b0a2e476b21e27bda8d7122f9982dae
sot/mica,sot/mica
mica/report/tests/test_write_report.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport GeminiQuery\nfrom gemini_subjects import get_subjects\nfrom ped import load_ped_file, get_ped_fields\nfrom gemini_utils import quote_string\nimport sqlite3\nfrom database import database_transaction\n\ndef amend(parser, args):\n i...
python
edit
4
4
mit
089bce7ec9df43cc526342ba84e37fe87203ca11
xuzetan/gemini,brentp/gemini,heuermh/gemini,xuzetan/gemini,udp3f/gemini,bpow/gemini,heuermh/gemini,arq5x/gemini,brentp/gemini,arq5x/gemini,heuermh/gemini,bw2/gemini,bgruening/gemini,brentp/gemini,arq5x/gemini,heuermh/gemini,bw2/gemini,udp3f/gemini,brentp/gemini,bw2/gemini,bgruening/gemini,xuzetan/gemini,udp3f/gemini,ar...
gemini/gemini_amend.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.7 on 2017-04-13 17:57\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef forwards_func(apps, schema_editor):\n User = apps.get_model(\"auth\", \"User\...
python
edit
1
2
bsd-3-clause
c33aa32b868a33422f79103474cece38131a93c3
solarissmoke/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,sonofatailor/django-oscar,solarissmoke/django-oscar,django-oscar/django-oscar,sonofatailor/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,sasha0/django-oscar,sasha0/django-oscar,django-oscar/django-oscar,...
src/oscar/apps/customer/migrations/0005_auto_20170413_1857.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom cumulusci.tasks.salesforce import BaseSalesforceApiTask\n\n\nclass CheckPermSetLicenses(BaseSalesforceApiTask):\n task_options = {\n \"permission_sets\": {\n \"description\": \"List of permission set n...
python
edit
3
2
bsd-3-clause
b776a97f6f12f7b424c45d73b1c975748c4c30ae
SalesforceFoundation/HEDAP,SalesforceFoundation/HEDAP,SalesforceFoundation/HEDAP
tasks/check_einstein.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport yaml\nimport click\n\n\ndef dump_yaml(obj):\n return yaml.dump(obj, default_flow_style=False)\n\n\ndef edit_yaml(content='', footer=''):\n MARKER = '# Everything below is ignored\\n\\n'\n message = click.edit(con...
python
edit
1
2
bsd-3-clause
efe1417ad049e4bb78bf1f111db6b2ea9c603461
yougov/rapt,yougov/rapt
rapt/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport decimal\nfrom datetime import datetime\n\nimport click\n\nfrom .controller import Controller, SimulatedClock\nfrom .broker import OandaBacktestBroker\nfrom .instruments import InstrumentParamType\nfrom .lib import oandapy\nfrom .conf...
python
edit
5
2
mit
b4e874b752b072565effce1534c58067ee0ac1dc
jmelett/pyfx,jmelett/pyfx,jmelett/pyFxTrader
trader/cli.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import PanState\n\n\"\"\" Parked State\n\nThe Parked state occurs in the following conditions:\n * Daytime\n * Bad Weather\n * System error\n\nAs such, the state needs to check for a number of conditions.\n\"\"\"\n\nclass St...
python
edit
1
1
mit
90b2c2b546aa6c4707273be29fe83c2ea36e0ad5
AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,panoptes/POCS,AstroHuntsman/POCS,panoptes/POCS,joshwalawender/POCS,joshwalawender/POCS,joshwalawender/POCS
panoptes/state_machine/states/parked.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"Iterative Solvers for Sparse Linear Systems\"\n\n#from info import __doc__\nfrom iterative import *\nfrom minres import minres\nfrom lgmres import lgmres\nfrom lsqr import lsqr\n\n__all__ = filter(lambda s:not s.startswith('_'),dir())\nfr...
python
edit
7
0
bsd-3-clause
5c41066e9c93c417253cbde325a18079c1c69d1a
bkendzior/scipy,mikebenfield/scipy,anielsen001/scipy,nonhermitian/scipy,aeklant/scipy,apbard/scipy,jjhelmus/scipy,giorgiop/scipy,sonnyhu/scipy,befelix/scipy,jor-/scipy,gfyoung/scipy,piyush0609/scipy,pbrod/scipy,Shaswat27/scipy,pschella/scipy,chatcannon/scipy,Newman101/scipy,ilayn/scipy,Newman101/scipy,mtrbean/scipy,Sha...
scipy/sparse/linalg/isolve/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport zmq\n\nfrom . import monitor\nfrom panoptes.utils import logger, config, messaging, threads\n\n\n@logger.has_logger\n@config.has_config\nclass WeatherStation(monitor.EnvironmentalMonitor):\n\n \"\"\"\n This obj...
python
edit
8
2
mit
d3f33af2fa7d4e7bf9969752e696aaf8120642bc
Guokr1991/POCS,fmin2958/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,fmin2958/POCS,Guokr1991/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,Guokr1991/POCS,AstroHuntsman/POCS,fmin2958/POCS,joshwalawender/POCS,joshwalawender/POCS,Guokr1991/POCS
panoptes/environment/weather_station.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ocds.storage.helpers import CouchView\n\n\nclass AllDocs(CouchView):\n\n design = 'docs'\n\n @staticmethod\n def map(doc):\n yield (doc['tenderID'], doc)\n\n\nclass DateView(CouchView):\n\n design = 'dates'\n\n @s...
python
edit
1
3
apache-2.0
f99a898d66c9f88496dee73ec574c7b9b69e8dc2
yshalenyk/openprocurement.ocds.export,yshalenyk/ocds.export,yshalenyk/openprocurement.ocds.export
ocds/storage/backends/design/tenders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim:fileencoding=utf-8:noet\nfrom __future__ import (unicode_literals, division, absolute_import, print_function)\n\nimport sys\nimport time\n\nfrom threading import Lock\nfrom argparse import ArgumentParser\n\nfrom...
python
edit
1
1
mit
ff0631c625cda7c1aac3d86cbc7074a996ef0fc1
darac/powerline,darac/powerline,junix/powerline,dragon788/powerline,kenrachynski/powerline,junix/powerline,areteix/powerline,russellb/powerline,seanfisk/powerline,Liangjianghao/powerline,lukw00/powerline,xxxhycl2010/powerline,bezhermoso/powerline,bartvm/powerline,EricSB/powerline,cyrixhero/powerline,DoctorJellyface/pow...
powerline/bindings/bar/powerline-bar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of export service" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.contrib.auth.models import User\n\nfrom datastore import models, services\n\nclass ExportServiceTestCase(TestCase):\n...
python
new_file
1
1
mit
493cfa88dae90a19a4173deaae5f4af8934b47b5
impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore
datastore/tests/services/test_export.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/python\n\n\ndef is_prime(integer):\n \"\"\"Determines weather integer is prime, returns a boolean value\"\"\"\n for i in range(2, integer):\n if integer % i == 0:\n return False \n return True\n\n\n\nprint(...
python
edit
1
3
mit
38d298a81aa8fcd85b16b3879c1665085e5450be
introprogramming/exercises,introprogramming/exercises,introprogramming/exercises
exercises/control_flow/prime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n'''\nAutomatron: Fact Finder\n\nIdentify facts about a specified host\n\n * Hostname\n\n'''\n\n\nimport os\nimport json\n\n# pylint: disable=C0103\nsystem_info = {\n 'hostname' : os.uname()[1],\n 'os' : os.unam...
python
edit
2
7
apache-2.0
993ada8e5e970399b98b40832b5a3d23874ae7fb
madflojo/automatron,madflojo/automatron,madflojo/automatron,madflojo/automatron
plugins/vetting/ontarget/system_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom libs.services import Service\n\n\nclass EventService(Service):\n __all__ = ('record', 'setup')\n\n event_manager = None\n\n def can_handle(self, event_type):\n return isinstance(event_type, str) and self.event_manager.k...
python
edit
1
3
apache-2.0
dc40793ad27704c83dbbd2e923bf0cbcd7cb00ed
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/event_manager/event_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Activity(models.Model):\n group = models.CharField(max_length=4)\n grouptype = models.TextField()\n groupdetail = models.TextField()\n details = models.TextField()\n disabled = models.Boo...
python
edit
1
1
bsd-3-clause
4b34053ce422e9be15e0ac386a591f8052a778b1
AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker
vcs/models.py
rejected_duplicate
Near-duplicate of sample 12591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom web.blueprints.helpers.table import BootstrapTable, Column\n\n\nclass SiteTable(BootstrapTable):\n def __init__(self, *a, **kw):\n super().__init__(*a, columns=[\n Column('site', 'Site', formatter='table.linkFormat...
python
edit
1
1
apache-2.0
1163bc40a15eb2461c6ead570db8a8d211f1f5be
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft
web/blueprints/facilities/tables.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport subprocess\nimport shutil\n\nexecutable = sys.argv[1]\nexecfolder = sys.argv[1].rsplit(\"/\",1)[0]\nlibdir = execfolder+\"/lib\"\notool_cmd = [\"otool\", \"-L\",executable]\n\n# Run otool\notool_out = subprocess.check_out...
python
edit
5
5
bsd-3-clause
828e75919bd71912baf75a64010efcfcd93d07f1
baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB
library_magic.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.version import get_version as django_get_version\n\n\nVERSION = (0, 9, 0, 'beta', 1)\n\n\ndef get_version():\n return django_get_version(VERSION) # pragma: no cover\n\n```\n\nApply this change: Move import of Django's g...
python
edit
1
1
bsd-3-clause
1abbca6200fa3da0a3216b18b1385f3575edb49a
myimages/django-registration,Troyhy/django-registration,futurecolors/django-registration,hacklabr/django-registration,akvo/django-registration,sandipagr/django-registration,futurecolors/django-registration,liberation/django-registration,euanlau/django-registration,tdruez/django-registration,Troyhy/django-registration,g...
registration/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow\nimport os\n\nOSM_FILE = \"san-francisco-bay_california.osm\" # Replace this with your osm file\nSAMPLE_FILE = \"s...
python
edit
1
4
mit
cd9a51ab2fe6b99c0665b8f499363a4d557b4a4d
aguijarro/DataSciencePython
DataWrangling/CaseStudy/sample_file.py
rejected_duplicate
Near-duplicate of sample 5955
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth import authenticate\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import serializers\n\n\nclass AuthTokenSerializer(serializers.Serializer):\n username = serializers.CharField()\...
python
edit
1
5
bsd-2-clause
37d01f6088b1cf5673f66f4532dd51c73a0156f1
sehmaschine/django-rest-framework,arpheno/django-rest-framework,ajaali/django-rest-framework,adambain-vokal/django-rest-framework,buptlsl/django-rest-framework,aericson/django-rest-framework,YBJAY00000/django-rest-framework,VishvajitP/django-rest-framework,werthen/django-rest-framework,xiaotangyuan/django-rest-framewor...
rest_framework/authtoken/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass AllowForm(forms.Form):\n redirect_uri = forms.URLField(widget=forms.HiddenInput())\n scopes = forms.CharField(required=False, widget=forms.HiddenInput())\n client_id = forms.CharField(widget=form...
python
edit
1
0
bsd-2-clause
dfa39db42cc5ce2c29da2ec0c388865ec7f41030
trbs/django-oauth-toolkit,DeskConnect/django-oauth-toolkit,jensadne/django-oauth-toolkit,vmalavolta/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,Gr1N/django-oauth-toolkit,andrefsp/django-oauth-toolkit,jensadne/django-oauth-toolkit,drgarcia1986/django-oauth-toolkit,bleib1dj/...
oauth2_provider/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nimport warnings\nimport os\nimport sys\n\n\nfrom lisa.version import __version__\n\n# Raise an exception when a deprecated API is used from within a lisa.*\n# submodule. This ensures that we don't use any deprecat...
python
edit
4
0
apache-2.0
38a2d86aed4ea1e94691993c5f49722f9a69ac8d
ARM-software/lisa,credp/lisa,credp/lisa,credp/lisa,credp/lisa,ARM-software/lisa,ARM-software/lisa,ARM-software/lisa
lisa/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.template.defaultfilters import slugify\n\nfrom opps.core.models import Date, Slugged\n\n\nclass Tag(Date, Slugged):\...
python
edit
1
3
mit
11cd074f67668135d606f68dddb66c465ec01756
jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,williamroot/opps
opps/core/tags/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport tempfile\nimport os\nimport shutil\nimport pytest\n\nfrom .. import report\n\ntry:\n import Ska.DBI\n with Ska.DBI.DBI(server='sqlsao', dbi='sybase', user='aca_op...
python
edit
1
2
bsd-3-clause
7fd76d87cfda8f02912985cb3cf650ee8ff2e11e
sot/mica,sot/mica
mica/report/tests/test_write_report.py
rejected_duplicate
Near-duplicate of sample 13889
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\n\nENV = os.getenv('PYTHONENV', 'prod')\n\nLOG_LEVEL = logging.DEBUG\nLOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s'\n\nHOST = 'localhost'\nPORT = 8080\n\nSSL_VERIFY = False\n\nDEFAULT_ROUTINES = ['auth',...
python
edit
1
0
mit
d6c81135077867283738bcf9cceb0ce8198808d6
amm0nite/unicornclient,amm0nite/unicornclient
unicornclient/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n_ansi_re = re.compile('\\033\\[((?:\\d|;)*)([a-zA-Z])')\n\n\ndef strip_ansi(value):\n return _ansi_re.sub('', value)\n\n\ndef len_exclude_ansi(value):\n return len(strip_ansi(value))\n\n\nclass ansi_str(str):\n \"\"\"A...
python
edit
5
3
mit
6708830ab2bde841bbc3da2befbbe5ab9f3d21aa
msabramo/ansi_str
ansi_str.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Temperature(object):\n '''Temperature facade.\n Temperature sensor is used to measure the ambient room temperature in degrees Celsius\n With method `enable` you can turn on temperature sensor and 'disable'\n method stops t...
python
edit
1
1
mit
f20c911285cc83f2cfe2b4650ba85f4b82eae43c
KeyWeeUsr/plyer,kivy/plyer,kivy/plyer,kived/plyer,KeyWeeUsr/plyer,kived/plyer,kivy/plyer,KeyWeeUsr/plyer
plyer/facades/temperature.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\n\nclass Button(object):\n \"\"\"Class representing keyboard keys.\"\"\"\n def __init__(self, game, number):\n self.game = game\n\n self.number = number\n self.event = None # The last event that ca...
python
edit
1
2
mit
1ee2e880872c4744f4159df7fc64bb64b3f35632
AndyDeany/pygame-template
pygametemplate/button.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"\n\nThis script extracts the top module cells and their corresponding parameters\nfrom json files produced by Yosys.\nThe return code of this script is used to check if the output is equivalent.\n\"\"\"\n\nimpo...
python
edit
1
5
apache-2.0
0b048cef1f0efd190d8bf8f50c69df35c59b91a3
SymbiFlow/yosys-symbiflow-plugins,SymbiFlow/yosys-symbiflow-plugins,SymbiFlow/yosys-f4pga-plugins,SymbiFlow/yosys-symbiflow-plugins,chipsalliance/yosys-f4pga-plugins,antmicro/yosys-symbiflow-plugins,chipsalliance/yosys-f4pga-plugins,antmicro/yosys-symbiflow-plugins,antmicro/yosys-symbiflow-plugins,SymbiFlow/yosys-f4pga...
xdc-plugin/tests/compare_output_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\nfrom django.conf import settings\n#from . import views\n\n\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'app.views.home', name='home'...
python
edit
3
0
unlicense
1056c3f489b162d77b6c117fad2b45bfa06beee1
yourbuddyconner/cs399-social,yourbuddyconner/cs399-social
app/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Import permissions, roles, and their relations from a TOML file.\n\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nimport click\n\nfrom byceps.ser...
python
edit
1
1
bsd-3-clause
ed0821bd41a10dd00727f09cf9ba82123bd2cf93
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
scripts/import_permissions_and_roles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom dateutil import parser\nimport six\n\n\ndef normalize_time(t):\n try:\n if isinstance(t, datetime.datetime):\n return t\n elif isinstance(t, datetime.date):\n return datetime.date...
python
edit
1
6
mit
2549a66b6785d5a0ed0658a4f375a21c486792df
alisaifee/sifr,alisaifee/sifr
sifr/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bson.json_util\nfrom bson.objectid import ObjectId\nimport json\nimport sys\n\n\ndef main():\n node_table = {}\n\n while True:\n line = sys.stdin.readline()\n if not line:\n break\n\n record = js...
python
edit
4
6
apache-2.0
ec7b52b457e749b4b4a1e9110ede221f2f0d5fe9
XDATA-Year-3/clique-propaganda,XDATA-Year-3/clique-propaganda,XDATA-Year-3/clique-propaganda
data/propaganda2mongo.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom mfr.core.provider import ProviderMetadata\n\nfrom mfr.extensions.video import VideoRenderer\n\n\n@pytest.fixture\ndef metadata():\n return ProviderMetadata('test', '.mp4', 'text/plain', '1234', 'http://wb.osf.io/fil...
python
edit
1
1
apache-2.0
4e74723aac53956fb0316ae0d438da623de133d5
felliott/modular-file-renderer,CenterForOpenScience/modular-file-renderer,felliott/modular-file-renderer,CenterForOpenScience/modular-file-renderer,CenterForOpenScience/modular-file-renderer,CenterForOpenScience/modular-file-renderer,felliott/modular-file-renderer,felliott/modular-file-renderer
tests/extensions/video/test_renderer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom malcolm.core.controller import Controller\nfrom malcolm.core.attribute import Attribute\nfrom malcolm.core.numbermeta import NumberMeta\nfrom malcolm.core.method import takes\n\nimport numpy as np\n\nclass CounterController(Controller)...
python
edit
1
1
apache-2.0
d3847357c446c4a1ac50735b983b20cf57f9c7c6
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/controllers/countercontroller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ndef test_bar_fixture(testdir):\n \"\"\"Make sure that pytest accepts our fixture.\"\"\"\n\n # create a temporary pytest test module\n testdir.makepyfile(\"\"\"\n def test_sth(bar):\n ass...
python
edit
1
1
mit
5bde6ca1fd62277463156875e874c4c6843923fd
luzfcb/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
rejected_duplicate
Near-duplicate of sample 3856
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom .views import CubeHandler, ConnectionHandler\nfrom .views import ElementHandler, DashboardHandler, APIElementCubeHandler\n\n\nINCLUDE_URLS = [\n (r\"/admin/connection/?(?P<slug>[\\w-]+...
python
edit
1
0
mit
270af43ffbe8974698d17ff6d5cae20fbf410f73
jgabriellima/mining,avelino/mining,chrisdamba/mining,seagoat/mining,avelino/mining,AndrzejR/mining,mlgruby/mining,mlgruby/mining,mining/mining,mlgruby/mining,mining/mining,chrisdamba/mining,AndrzejR/mining,seagoat/mining,jgabriellima/mining
admin/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Various utility functions\nimport os\n\n\nSHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'\n\n\ndef cached_function(func):\n data = {}\n\n def wrapper(*args):\n if not SHOULD_CACHE:\n return func...
python
edit
1
4
mit
1165c923145be18d40fda1fc4303cac3e1613078
albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com
app/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\n\nfrom money.models import Movement\n\n\ndef parse_csv(raw_csv, parser, header_lines=0):\n\treader = csv.reader(raw_csv, delimiter=',', quotechar='\"')\n\trows = []\n\n\tfor row in reader:\n\t\tif reader.line_num > header_lines ...
python
edit
1
5
bsd-3-clause
f25e0fe435f334e19fc84a9c9458a1bea4a051f9
shakaran/casterly,shakaran/casterly
money/parser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas\n\ndef load_excel(filepath):\n \"\"\"\n Returns a Pandas datafile that contains the contents of a Microsoft Excel\n Spreadsheet\n\n Params:\n filepath - A string containing the path to the file\n\n Return...
python
edit
3
2
mit
c4ef7fe24477d9160214c1cd2938aa8f5135d84b
stuy-tetrabyte/graduation-req-tracker
utils/database_setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file defines a general method for evaluating ftfy using data that arrives\nin a stream. A concrete implementation of it is found in `twitter_tester.py`.\n\"\"\"\nfrom __future__ import print_function, unicode_literals\nfrom ftf...
python
edit
1
5
mit
d52c4340a62802bcd0fcbd68516c5ac66fb10436
LuminosoInsight/python-ftfy
ftfy/streamtester/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django DDP utils for DDP messaging.\"\"\"\nimport collections\nfrom django.core.serializers import get_serializer\n\n_SERIALIZER = None\n\ndef obj_change_as_msg(obj, msg):\n \"\"\"Generate a DDP msg for obj with specified msg type....
python
edit
2
3
mit
5768d1ebcfec46e564c8b420773d911c243327ff
commoncode/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp
dddp/msg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nThis module retrieves the course catalog and overviews of the Udacity API\n\nLink to Documentation:\nhttps://s3.amazonaws.com/content.udacity-data.com/techdocs/UdacityCourseCatalogAPIDocumentation-v0.pdf\n\n'''\n\n\nimport json\nimport...
python
edit
3
1
mit
12130cef6c9b08e0928ed856972ace3c2000e6f8
ueg1990/mooc_aggregator_restful_api
mooc_aggregator_restful_api/udacity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom urlparse import urljoin\nimport requests\n\n# project\nfrom checks import AgentCheck\n\nclass Veneur(AgentCheck):\n\n VERSION_METRIC_NAME = 'veneur.deployed_version'\n BUILDAGE_METRIC_NAME = 'veneur.build_age'\n\...
python
edit
1
3
mit
7a786fd031c3faa057256abc5d9cb47618041696
stripe/stripe-datadog-checks,stripe/datadog-checks
checks.d/veneur.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\nimport sys\n\nfrom utils import serf_event\n\n\ndef write_stdout(s):\n sys.stdout.write(s)\n sys.stdout.flush()\n\ndef write_stderr(s):\n sys.stderr.write(s)\n sys.stderr.flush()\n\ndef main...
python
edit
2
4
mit
859d5ce6553b7651f05f27adec28e8c4330ca9bb
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
handler/supervisor_to_serf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\nimport sys\nfrom temperusb import TemperHandler\n\n\nURL=\"http://dashing:3030/widgets/inside\"\nSCALE=1.0\nOFFSET=-3.0\n\n\nth = TemperHandler()\ndevs = th.get_devices()\nif len(devs) != 1:\n print \"Expect...
python
edit
15
0
mit
3f18e4891b64c45fbda9ae88e9b508b5bc2cb03a
ps-jay/temp2dash
temp2dash.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDefaults for all settings used by AnchorHub\n\"\"\"\n\nWRAPPER = \"{ }\"\n\nINPUT = \".\"\nOUTPUT = \"out-anchorhub\"\n\nARGPARSER = {\n \"description\": \"anchorhub parses through Markdown files and precompiles \"\n ...
python
edit
1
0
apache-2.0
5efddf26176ac778556a3568bf97c2e70daac866
samjabrahams/anchorhub
anchorhub/settings/default_settings.py
rejected_duplicate
Near-duplicate of sample 4186
true
[ { "role": "user", "content": "Here is the current file:\n```python\nPackage ('gtk-quartz-engine', 'master',\n\tsources = [ 'git://github.com/jralls/gtk-quartz-engine.git' ],\n\toverride_properties = { 'configure':\n\t\t'libtoolize --force --copy && '\n\t\t'aclocal && '\n\t\t'autoheader && '\n\t\t'automake -...
python
edit
2
0
mit
338e2ba155df0759113c65ced6be6714092b9aaf
bl8/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/gtk-quartz-engine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom armstrong.utils.backends import GenericBackend\nfrom billing import get_gateway\n\nfrom . import forms\n\n\nclass AuthorizeNetBackend(object):\n def get_form_class(self):\n return forms.CreditCardDonationForm\n\n def purch...
python
edit
1
3
apache-2.0
0b11bf48989673245adbc89aa6f65c85debafd9f
armstrong/armstrong.apps.donations,armstrong/armstrong.apps.donations
armstrong/apps/donations/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"Simple parser for Garmin TCX files.\"\n\nfrom lxml import objectify\n\n__version__ = '0.3.0'\n\n\nclass TcxParser:\n\n def __init__(self, tcx_file):\n tree = objectify.parse(tcx_file)\n self.root = tree.getroot()\n ...
python
edit
1
2
bsd-2-clause
0ec01e1c5770c87faa5300b80c3b9d6bcb0df41b
vkurup/python-tcxparser,vkurup/python-tcxparser,SimonArnu/python-tcxparser
tcxparser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.trial import unittest\nfrom formal import util\n\n\nclass TestUtil(unittest.TestCase):\n\n def test_validIdentifier(self):\n self.assertEquals(util.validIdentifier('foo'), True)\n self.assertEquals(util.validId...
python
edit
1
1
mit
ff90958a0c79936d5056840ba03a5863bcdef099
emgee/formal,emgee/formal,emgee/formal
formal/test/test_util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add header info and submodule imports to init" }, { "role": "assistant", "content": "__author__ = \"Justin Kitzes, Mark Wilber, Chloe Lewis\"\n__copyright__ = \"Copyright 2012, Regents of University of California\"\n__credits__ =...
python
new_file
7
0
bsd-2-clause
f5600008defcd5fe4c9c397c0b7170f6f5e9a5e4
jkitzes/macroeco
__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=UTF8\n\nimport datetime\n\nname = \"Devo\"\n\nrelease_date = datetime.date(2012, 12, 13)\n\nversion = (1, 0, 0)\n\nversion_string = \".\".join(str(x) for x in version)\n\nidentifier = \"com.iogopro.devo\"\n\ncopyright = u\"Copyrigh...
python
edit
1
0
mit
cf6ddfdac8a56194ad1297921a390be541d773cc
shaurz/devo
app_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom jinja2 import Markup\n\nfrom changes.buildfailures.base import BuildFailure\n\n\nclass TestFailure(BuildFailure):\n def get_html_label(self, build):\n link = '/projects/{0}/builds/{1}...
python
edit
1
4
apache-2.0
2e7271a33e098d7cdef15207e8caa05e644c3223
bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes
changes/buildfailures/testfailure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\nimport collections\n\nfrom six import string_types\n\nfrom aq.errors import QueryParsingError\nfrom aq.select_parser import select_stmt, ParseException\n\nTableId = namedtuple('TableId', ('database', 't...
python
edit
1
5
mit
a307c5fc2555d282dfa6193cdbcfb2d15e185c0c
lebinh/aq
aq/parsers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom errno import EROFS\n\nfrom fuse import FuseOSError\n\nfrom gitfs import FuseMethodNotImplemented\n\nfrom .view import View\n\n\nclass ReadOnlyView(View):\n def getxattr(self, path, fh):\n raise FuseMethodNotImpleme...
python
edit
1
1
apache-2.0
4c303007d6418e2a2f1b2e1778d6b7d0c0573c74
bussiere/gitfs,PressLabs/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs,rowhit/gitfs
gitfs/views/read_only.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport math\nimport numpy\nimport random\nfrom demodulate.cfg import *\n\ndef gen_test_data():\n\tpattern = [1,0,1,1,1,0,0,0,0,0,0,0] # morse code 'A'\n\tcycles_per_sample = MORSE_FREQ/SAMPLE_FREQ\n\tradians_per_sample = cycles_per_sample *...
python
edit
6
3
mit
305e54c328cf212e01a3af7cec7b940894044e55
nickodell/morse-code
gen_test.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Oursky Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache....
python
edit
1
2
apache-2.0
1786702388abc4fe737ee73d64ef5864f42f0c3d
SkygearIO/chat,SkygearIO/chat
chat/query.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\n\nurlpatterns = [\n url(r'^api/', include('api.urls')),\n url(r'^admin/', admin.site.urls),\n]\n\n```\n\nApply this change: Add a custom admin site header." ...
python
edit
1
0
apache-2.0
d1be7f345529594ba25ed5d0f22e544735a64404
qubs/climate-data-api,qubs/climate-data-api,qubs/data-centre,qubs/data-centre
qubs_data_centre/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of a backport of 'lzma' included with Python 3.3,\n# exposed under the namespace of backports.lzma following the conventions\n# laid down here: http://pypi.python.org/pypi/backports/1.0\n# Backports homepage: http://bitb...
python
edit
2
0
bsd-3-clause
454c7d322af3328279582aef629736b92c87e869
peterjc/backports.lzma,peterjc/backports.lzma
backports/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\nfrom django.core.management.commands import syncdb\nfrom django.db import models, connection, transaction\n\ntry:\n from south.management.commands import syncdb\nexcept ImportError:\n pass\n\nfrom ...models import Sc...
python
edit
4
4
bsd-3-clause
bd97e698d3a2a795f4c38d7e54eae63737ed74a6
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
multi_schema/management/commands/syncdb.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDummyProcess to check the WPS structure\n\nAuthor: Jorge de Jesus (<EMAIL>) as suggested by Kor de Jong\n\"\"\"\nfrom pywps.Process import WPSProcess \nclass Process(WPSProcess):\n def __init__(sel...
python
edit
1
1
mit
583a6319230b89a5f19c26e5bab83e28a5a4792e
ricardogsilva/PyWPS,jonas-eberle/pywps,geopython/pywps,ldesousa/PyWPS,bird-house/PyWPS,jachym/PyWPS,tomkralidis/pywps
pywps/processes/dummyprocess.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom openerp import models, fields, api\n'''\nThis module create model of Course\n'''\n\nclass Course(models.Model):\n '''This class create model of Course'''\n _name = 'openacademy.course' # Model odoo name...
python
edit
1
3
apache-2.0
270812e89e8e0870bfea01367cf645cf5194a806
jorgescalona/openacademy-project
openacademy/model/openacademy_course.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. 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 License at\n#\n# ...
python
edit
1
4
apache-2.0
a619f703b2d259877e30d3e1ede11813c014f3ad
deepmind/pysc2
pysc2/env/available_actions_printer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom share.models.base import ShareObject\nfrom share.models.people import Person\nfrom share.models.base import TypedShareObjectMeta\nfrom share.models.creative.meta import Venue, Institution, Funder, Award,...
python
edit
1
0
apache-2.0
df6b13a70241b616f49d4dcc25073084c371f5b1
CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,zamattiac/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,laurenbarker/SHARE,aaxelb/SHARE,laurenbarker/SHARE,laurenbarker/SHARE
share/models/creative/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: sw=4 ts=4 sts expandtab smarttab\n# HXN step-scan configuration\n\nimport hxntools.scans\nfrom bluesky.global_state import get_gs\n\ngs = get_gs()\n\nhxntools.scans.setup()\nct = hxntools.scans.count\nascan = hxntools.scans.absolute_...
python
edit
15
0
bsd-2-clause
bf336d99484cc3804f469631b513a927940ada30
NSLS-II-HXN/ipython_ophyd,NSLS-II-HXN/ipython_ophyd
profile_collection/startup/50-scans.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016 Ansible, Inc.\n# All Rights Reserved.\n\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nfrom django.conf import settings\n\n\nclass Migration(migrations.M...
python
edit
1
0
apache-2.0
9f44888c00d29bd1d1a53eb09ab90b61f33c5e05
snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx
awx/main/migrations/0002_v300_changes.py
accepted
null
true