messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nInteract with your school website with telegram!\n\nCopyright (c) 2016-2017 Paolo Barbolini <<EMAIL>>\nReleased under the MIT license\n\"\"\"\n\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker, scoped_s...
python
edit
3
3
mit
f54e7d2da0ba321bdd5900c9893f6fe76adad12f
paolobarbolini/TelegramSchoolBot
telegramschoolbot/database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom pylons import response, config, tmpl_context as c\nfrom pylons.controllers.util import abort\n\n# Monkey patch the lazywriter, since mercurial needs that on the stdout\nimport paste.script.serve as serve\nserve.LazyWr...
python
edit
8
4
bsd-3-clause
08522cc9c14dca4ea18cd96bf47a43e2f1285248
Pylons/kai,Pylons/kai
kai/controllers/tracs.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('fparser',parent_package,top_path)\n return config\n\n```\n\nApply this change: Add log.config to ...
python
edit
1
1
bsd-3-clause
d0df78e9f660b138b5f79d6714312740ebcf1648
pemryan/f2py,travellhyne/f2py,pearu/f2py,pemryan/f2py
fparser/setup.py
rejected_duplicate
Near-duplicate of sample 3466
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sh\nimport tempfile\nimport logging\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef fetch_bash(conf, **kwargs):\n code = conf['script']\n logger.info(\"Executing bash fetcher\")\n logger.debug(code)\n with tempfile.Nam...
python
edit
1
2
mit
08472dce69bb861f72684037c912625cf70546c1
kibitzr/kibitzr,kibitzr/kibitzr
kibitzr/fetcher/shell.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport pickle\nimport os.path\nimport glob\nimport uuid\nimport sys\nimport os.path\nimport numpy as np\n\n\ndef main():\n if len(sys.argv) != 4:\n print('Usage: bundle_data.py <input dir> <output dir> <sa...
python
edit
3
6
apache-2.0
9e41011a5f164732ffd33ba5ca5edc7813735aeb
baudm/HomographyNet
bundle_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom addict import Dict\n\nfrom gallery.models import File\n\ndef get_dir_file_contents(dir_id):\n print(File.query.filter(File.parent == dir_id).all())\n return File.query.filter(File.parent == dir_id).all()\n\ndef get_dir...
python
edit
1
4
mit
1bf6211f2fd5aef99e529fdc0e714b1a36ace346
liam-middlebrook/gallery,liam-middlebrook/gallery,liam-middlebrook/gallery,liam-middlebrook/gallery
gallery/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nfrom lenrmc.nubase import System\nfrom lenrmc.terminal import TerminalView, StudiesTerminalView\n\n\nclass App(object):\n\n def __init__(self, **kwargs):\n self.kwargs = kwargs\n if 'studies' == self.kwar...
python
edit
1
3
mit
84fbe1eebc2c19b72ab4bba8017e1cb37818afc1
emwalker/lenrmc
scripts/reactions.py
rejected_duplicate
Near-duplicate of sample 12651
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\nfrom imap import EmailCheckError, EmailServer\nfrom postgresql import DatabaseServer\n\n\n# If this is set to a valid path, all CSV files extracted from emails will be\n# stored in sub-folders within it.\nCSV_FOLDER ...
python
edit
3
1
mit
147c53115864cc3b3194fb9c585179d12197c998
AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files
settings_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom builtins import * # NOQA\nfrom future import standard_library\nstandard_library.i...
python
edit
1
1
mit
baf4f922a9f473a4351c3fd9832000244a73a40a
toslunar/chainerrl,toslunar/chainerrl
chainerrl/explorers/additive_gaussian.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport i18naddress\nfrom django import template\nfrom django.utils.translation import pgettext\n\nregister = template.Library()\n\n\n@register.inclusion_tag(\"formatted_address.html\")\ndef format_address(address, include_phone=True, inline...
python
edit
1
3
bsd-3-clause
7ea630074262beed16c70649809fe8115bcc6105
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/account/templatetags/i18n_address_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Migrations for Zinnia\"\"\"\nfrom django.contrib.auth import get_user_model\n\nUser = get_user_model()\nuser_name = User.__name__\nuser_table = User._meta.db_table\nuser_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_n...
python
edit
1
0
bsd-3-clause
ebadbdda9b522588d534697696d3270542d3167e
ghachey/django-blog-zinnia,ZuluPro/django-blog-zinnia,Zopieux/django-blog-zinnia,petecummings/django-blog-zinnia,extertioner/django-blog-zinnia,Zopieux/django-blog-zinnia,ZuluPro/django-blog-zinnia,petecummings/django-blog-zinnia,aorzh/django-blog-zinnia,extertioner/django-blog-zinnia,petecummings/django-blog-zinnia,gh...
zinnia/migrations/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012-2014 OpenStack Foundation.\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
0
apache-2.0
530297a29150736208cd30c018a427f9d7e2d2eb
swiftstack/swift3-stackforge,stackforge/swift3,stackforge/swift3,tumf/swift3,KoreaCloudObjectStorage/swift3,KoreaCloudObjectStorage/swift3,swiftstack/swift3-stackforge,tumf/swift3
swift3/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .gender import Gender\nfrom _ctypes import ArgumentError\n\nclass Genders(object):\n @classmethod\n def match(cls, data):\n \"\"\" Check is data list of genders \"\"\"\n if type(data) is str:\n raise Argu...
python
edit
1
4
mit
59055a9f8d6093e2fc82bb4f656200b71279da1c
translationexchange/tml-python,translationexchange/tml-python
tml/rules/contexts/genders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)\n# Copyright (C) 2009 Lorenzo Gil Sanchez <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with ...
python
edit
1
0
apache-2.0
b4613b6b20c6fae1b73095363078201e666bd5bc
damienmarie-alation/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,knaperek/djangosaml2,writepython/djangosaml2,WebSpider/djangosaml2,knaperek/djangosaml2,MiguelSR/djangosaml2,WebSpider/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,damienmarie-alation/djangosaml2
djangosaml2/urls.py
rejected_duplicate
Near-duplicate of sample 1719
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nApp configuration for ``icekit_events`` app.\n\"\"\"\n\n# Register signal handlers, but avoid interacting with the database.\n# See: https://docs.djangoproject.com/en/1.8/ref/applications/#django.apps.AppConfig.ready\n\nfrom django....
python
edit
1
1
mit
f2af85f7e9de7ca7494a849856a9274a5d969378
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events
icekit_events/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEFAULT_REPLY = \"Sorry, I did not understand you.\"\nERRORS_TO = 'general'\n\nPLUGINS = [\n 'plugins.witai'\n ]\n\n```\n\nApply this change: Remove sending error to general channel" }, { "role": "assistant", "cont...
python
edit
1
0
mit
9a64f7b08704f2f343564698d83dd73bb1f0d4b2
sanjaybv/netbot
slackbot_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\nimport numpy as np\nimport itertools as it\nimport importlib\n\nfrom flowfairy.conf import settings\nfrom flowfairy.utils import take\nfrom flowfairy import data\nfrom flowfairy.feature import FeatureManager\nfrom f...
python
edit
5
6
mit
c62b42eb528babebf96e56738031dcda97868e80
WhatDo/FlowFairy
flowfairy/app.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\nimport subprocess\nimport sys\nimport unittest\n\nimport mopidy\n\n\nclass HelpTest(unittest.TestCase):\n def test_help_has_mopidy_options(self):\n mopidy_dir = os.path.dirname...
python
edit
1
1
apache-2.0
8ea996de13e1ad3c9865866385fa0ecb49d6cbca
jodal/mopidy,adamcik/mopidy,mokieyue/mopidy,jcass77/mopidy,glogiotatidis/mopidy,diandiankan/mopidy,bencevans/mopidy,quartz55/mopidy,dbrgn/mopidy,abarisain/mopidy,swak/mopidy,rawdlite/mopidy,jcass77/mopidy,ZenithDK/mopidy,mopidy/mopidy,bacontext/mopidy,diandiankan/mopidy,jodal/mopidy,diandiankan/mopidy,ali/mopidy,swak/m...
tests/help_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom .constants import COMPANY_RATING_REPORT, RATING_CHOICES\n\nfrom .bisnode import get_bisnode_company_report\n\n\nclass BisnodeRatingReport(models.Model):\n organization_number = models.CharField(max_le...
python
edit
3
1
mit
827644a143a0fae0a1fa34ce2c624b199d0c1b63
FundedByMe/django-bisnode
bisnode/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n#\n# Copyright 2013 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 th...
python
edit
1
2
apache-2.0
f5fd149316d1a5bfc0e271c2c0e0fc6ee74daa96
sanyaade-teachings/oppia,danieljjh/oppia,kaffeel/oppia,whygee/oppia,kennho/oppia,directorlive/oppia,sarahfo/oppia,toooooper/oppia,fernandopinhati/oppia,VictoriaRoux/oppia,danieljjh/oppia,Atlas-Sailed-Co/oppia,fernandopinhati/oppia,DewarM/oppia,brylie/oppia,oppia/oppia,aldeka/oppia,amgowano/oppia,AllanYangZhou/oppia,sdu...
models/augmented_user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\n\n\nclass _Storage:\n def __getitem__(self, key):\n pass\n\n def __setitem__(self, key, value):\n pass\n\n def __delitem__(self, key):\n pass\n\n\nclass _DictionaryStorage(_Storage):\n def __ini...
python
edit
1
3
mit
a6c6175c6d15cd9d7fd711431a6741afa35e78fb
Cyanogenoid/smartbot,Muzer/smartbot,thomasleese/smartbot-old,tomleese/smartbot
smartbot/storage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport pykka\n\n\nclass PlainActor(pykka.ThreadingActor):\n def __init__(self):\n super().__init__()\n self.stored_messages = []\n\n def on_receive(self, message):\n if message.get('comma...
python
edit
1
2
apache-2.0
bcf4c5e632ae3ee678ac10e93887b14c63d4eb4a
jodal/pykka
examples/plain_actor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, g, request\nimport uuid\nimport requests\n\napp = Flask(__name__)\n\napp.config.from_pyfile(\"config.py\")\n\n\n@app.before_request\ndef before_request():\n # Sets the transaction trace id into the global object ...
python
edit
1
2
mit
617ac4a745afb07299c73977477f52911f3e6e4c
matthew-shaw/thing-api
flask_skeleton_api/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bluesky.examples import *\nfrom bluesky.standard_config import RE\nfrom matplotlib import pyplot as plt\nfrom xray_vision.backend.mpl.cross_section_2d import CrossSection\nimport numpy as np\nimport filestore.api as fsapi\nimport time ...
python
edit
18
2
bsd-3-clause
3dda5003b3ce345a08369b15fc3447d2a4c7d1ad
ericdill/bluesky,sameera2004/bluesky,sameera2004/bluesky,klauer/bluesky,klauer/bluesky,dchabot/bluesky,ericdill/bluesky,dchabot/bluesky
examples/plotting_2d.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom genes.apt import commands as apt\nfrom genes.brew import commands as brew\nfrom genes.debian.traits import is_debian\nfrom genes.mac.traits import is_osx\nfrom genes.ubuntu.traits import is_ubuntu\n\n\ndef main():\n if is_ubuntu() o...
python
edit
1
5
mit
09418ae8fa652a5f8d2d3b3058e4acc774cbcbe9
hatchery/genepool,hatchery/Genepool2
genes/nginx/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Import nacl libs\nimport libnacl\nimport libnacl.encode\n\n# Import python libs\nimport datetime\nimport binascii\n\n\nclass BaseKey(object):\n '''\n Include methods for key management convenience\n '''...
python
edit
1
2
apache-2.0
aed4d20d4e101891d2dd1149a6c111f06036ec73
cachedout/libnacl,saltstack/libnacl,mindw/libnacl,johnttan/libnacl,RaetProtocol/libnacl,coinkite/libnacl
libnacl/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport requests\n\nfrom django.conf import settings\n\nlogger = logging.getLogger(\"nurseconnect.services\")\n\n\ndef get_clinic_code(clinic_code):\n if settings.FAKE_CLINIC_CODE_VALIDATION and settings.DEBUG:\n re...
python
edit
1
10
bsd-2-clause
602d0f487f8926f41577adb442830796d6612998
praekelt/nurseconnect,praekelt/nurseconnect,praekelt/nurseconnect
nurseconnect/services.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBraubuddy Dummy thermometer unit tests\n\"\"\"\n\nimport unittest\nfrom mock import patch, call, MagicMock\nfrom braubuddy.thermometer import dummy \nfrom braubuddy.thermometer import DeviceError\nfrom braubuddy.thermometer import R...
python
edit
5
2
bsd-3-clause
c02dc4c0717d15f4f042c992b4b404056e0e0a14
amorphic/braubuddy,amorphic/braubuddy,amorphic/braubuddy
braubuddy/tests/thermometer/test_dummy.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Q7- Assume s is a string of lower case characters. Write a program that\nprints the number of times the string 'bob' occurs in s. For example, if s =\n'azcbobobegghakl', then your program should print Number of times bob occurs\nis: ...
python
edit
1
2
mit
e543a6e12f34dfdde4f55630fcd1514d7622e0ee
SuyashD95/python-assignments
countBob.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport jinja2\n\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass Config(object):\n DEBUG = False\n SECRET_KEY = 'this is not secret'\n STATIC_URL_PATH = '/supplier/static'\n ASSET_PATH = STATIC_URL_PAT...
python
edit
1
1
mit
92b2c210133d1be628330db37b1ac69278bf99b5
alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphag...
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom electro.errors import ResourceDuplicatedDefinedError\n\nclass API(object):\n\n def __init__(self, app=None, decorators=None,\n catch_all_404s=None):\n self.app = app\n self.endpoin...
python
edit
1
5
mit
6f5e4ff4f8e4002566a9ac18bcb22778be9409bd
soasme/electro
electro/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom flask import Blueprint, render_template\nimport subprocess\nimport tempfile\nimport os\n\nadmin_controller = Blueprint('admin_controller', 'admin_controller',\n templ...
python
edit
4
1
bsd-3-clause
b73691f2c9f10f44ecd87fe9a6a18bb14a570e6d
xlexi/pastedirectory,xlexi/pastedirectory,xlexi/pastedirectory,xlexi/pastedirectory
modules/admin.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = (0, 9, 0, 'beta', 1)\n\n\ndef get_version():\n from django.utils.version import get_version as django_get_version\n return django_get_version(VERSION) # pragma: no cover\n\n```\n\nApply this change: Fix version number report...
python
edit
1
4
bsd-3-clause
99b96d2c0b82e186b9eaa13d2efe8b617c9cf3aa
dinie/django-registration,dinie/django-registration,FundedByMe/django-registration,FundedByMe/django-registration,Avenza/django-registration
registration/__init__.py
rejected_duplicate
Near-duplicate of sample 13080
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\n\nfrom wsstat.main import WebsocketTestingClient, ConnectedWebsocketConnection\n\nclass Tests(object):\n def setup(self):\n self.client = WebsocketTestingClient('wss://testserver/', total_connections=1, max_connect...
python
edit
1
1
mit
d042f4ced40d8d03bd65edf798a29058f26e98c6
Fitblip/wsstat
test/test_wsstat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom src.main import db\nfrom sqlalchemy.sql import func\n\nclass InvalidatedToken(db.Model):\n token = db.Column(db.String(120), primary_key=True)\n invalidated_date = db.Column(db.DateTime(timezone = True), server_default = func.now...
python
edit
1
1
apache-2.0
5984c55a555ef88068f33a28c45a449416ee2896
tomaszguzialek/flask-api,tomaszguzialek/flask-api,tomaszguzialek/flask-api
src/models/invalidated_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.conf import settings\n\nimport urllib, urllib2\n\nC2DM_URL = 'https://android.apis.google.com/c2dm/send'\n\nclass C2DMProfile(models.Model):\n deviceId = models.CharField(max_length = 64)\n re...
python
edit
3
3
bsd-3-clause
c5e2b375cc722f717c2b159451b8ca1e45060e83
scottferg/django-c2dm
models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport datetime\nimport os\nimport sys\nimport unittest\n\nfrom pythainlp.spell import NorvigSpellChecker, correct, spell\n\n\nclass TestSpellPackage(unittest.TestCase):\n\n def test_spell(self):\n self....
python
edit
5
1
apache-2.0
c9f2ecea38711db75235aca2879f9a0b14762c9f
PyThaiNLP/pythainlp
tests/test_spell.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Author: Taylor Smith <<EMAIL>>\n#\n# The pyramid module\n\n__version__ = \"0.6.1-dev0\"\n\ntry:\n # this var is injected in the setup build to enable\n # the retrieval of the version number without actual...
python
edit
7
1
mit
b12ff9bbdea517a9ac70f9ea2f06c50e110da003
alkaline-ml/pmdarima,tgsmith61591/pyramid,tgsmith61591/pyramid,tgsmith61591/pyramid,alkaline-ml/pmdarima,alkaline-ml/pmdarima
pyramid/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys, re\n\ncounts = {}\nfor line in sys.stdin:\n for word in re.findall(r'[A-Za-z\\']+', line.lower()):\n counts[word] = counts.get(word, 0) + 1\n\nfor word, count in sorted(counts.items()):\n print(word, count)\n\n```\n...
python
edit
1
0
mit
bc313462e7d1d1e45cfa0b15baf668b96569f52f
rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal...
python/wordcount.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Plotting functions.\"\"\"\n\nfrom .time_series import plot_time_series, plot_bursts\nfrom .filt import plot_filter_properties, plot_frequency_response, plot_impulse_response\nfrom .rhythm import plot_swm_pattern, plot_lagged_coherence...
python
edit
15
0
apache-2.0
f5d9fbf618f44e8572344e04e9a09c7cae3302bb
voytekresearch/neurodsp
neurodsp/plts/__init__.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import join\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('utils', parent_package, top_path)\n\n config.add_data_dir('tests')\n\n ...
python
edit
3
2
bsd-3-clause
372cb5cfb74e207c169bec473eeed48497748d51
wanderine/nipype,JohnGriffiths/nipype,iglpdc/nipype,blakedewey/nipype,Leoniela/nipype,FredLoney/nipype,arokem/nipype,Leoniela/nipype,mick-d/nipype,glatard/nipype,dmordom/nipype,pearsonlab/nipype,pearsonlab/nipype,rameshvs/nipype,pearsonlab/nipype,sgiavasis/nipype,grlee77/nipype,arokem/nipype,wanderine/nipype,iglpdc/nip...
nipype/utils/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DijkstraNew:\n def __init__(self,edges,start):\n self.edges = edges\n self.take_shorter_edges() # Bei doppelten Kanten kürzere nehmen\n self.start = start\n self.edges_in_dijkstra = [] # Kanten, über die...
python
edit
1
10
apache-2.0
259b212c68233ed56f9bc3123d85ea28f885af78
NWuensche/DijkstraInPython
dijkstraNew.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Simple demo of reading the tsl2591 lux sensor from the\n# ESP8266 running micropython.\n\nfrom antevents import *\nfrom tsl2591 import Tsl2591\ntsl = Tsl2591('lux-1')\ntsl.sample()\nsched = Scheduler()\n\nclass Output:\n def on_next(se...
python
edit
3
1
apache-2.0
a06c4da0cc683162b8ecf8569f6d8878b8d45872
mpi-sws-rse/antevents-python,mpi-sws-rse/antevents-python,mpi-sws-rse/thingflow-python,mpi-sws-rse/thingflow-python
examples/esp8266/lux_sensor_demo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom threading import Thread\nimport subprocess\nfrom functions import *\n\ndef runTest(branch,os):\n subprocess.call(test_script + \" \" + branch + \" \" + os, shell=True)\n \nfor branch in branches:\n threads =...
python
edit
16
1
mit
b5871e451955e993ea368cb832714612a6dd48d1
FOGProject/fog-community-scripts,FOGProject/fog-community-scripts,FOGProject/fog-community-scripts
fog-aws-testing/scripts/test_all.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utilities for Halo library.\n\"\"\"\nimport platform\nimport six\nimport codecs\n\nfrom colorama import init, Fore\nfrom termcolor import colored\n\ninit(autoreset=True)\n\ndef is_supported():\n \"\"\"Check whether operating system...
python
edit
3
3
mit
30a81d64c513d23aae6dc6cc51fa047d6479150f
ManrajGrover/halo,manrajgrover/halo
halo/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase as BaseTestCase\n\nfrom django.test import RequestFactory\n\nfrom permissions import PermissionsRegistry as BasePermissionsRegistry\n\n\nclass PermissionsRegistry(BasePermissionsRegistry):\n\n def _get_us...
python
edit
1
2
mit
0bd93ad8fa88287452326ee635bbbb5d2c685a06
PSU-OIT-ARC/django-perms,wylee/django-perms
permissions/tests/base.py
rejected_duplicate
Near-duplicate of sample 4267
true
[ { "role": "user", "content": "Write python code for the following: Increment version number to 1.1.0" }, { "role": "assistant", "content": "__version_info__ = (1, 1, 0)\n__version__ = '.'.join(map(str, __version_info__))\n" } ]
python
new_file
1
0
bsd-2-clause
2c11dd51db3a7663aa31913fa68656f60a80fcf6
hkmshb/django-select2-forms,sandow-digital/django-select2-forms,sandow-digital/django-select2-forms,SpectralAngel/django-select2-forms,hkmshb/django-select2-forms,SpectralAngel/django-select2-forms,sandow-digital/django-select2-forms,hkmshb/django-select2-forms,JP-Ellis/django-select2-forms,SpectralAngel/django-select2...
select2/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport itertools\n\nimport searchlight.common.wsgi\n\n\ndef list_opts():\n return [\n ('DEFAULT',\n itertools.chain(searchlight.common.wsgi.bind_opts,\n searchlight.common.wsgi.socket_opts,\n ...
python
edit
1
1
apache-2.0
a2f13a262e22187adaf9586aac951005f43c81b3
openstack/searchlight,openstack/searchlight,lakshmisampath/searchlight,openstack/searchlight
searchlight/opts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\ndef add_output_images(images, logits, labels):\n cast_labels = tf.cast(labels, tf.uint8) * 128\n cast_labels = cast_labels[...,None]\n tf.summary.image('input_labels', cast_labels, max_outputs=3)\n\n c...
python
edit
1
1
mit
6e6aa02907b3d156174cfe1a5f8e9c274c080778
mshunshin/SegNetCMR,mshunshin/SegNetCMR
SegNetCMR/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######################################################\n# logs time, fahrenheit and humidity every 5 minutes\n#\n######################################################\n\nimport time\nimport HTU21DF\nimport logging\nlogging.basicConfig(file...
python
edit
1
1
mit
d42c0c31f040ff684c738de975e94270b93f399a
khuisman/project-cool-attic
logTemps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import date, timedelta\n\nclass DateWithCalendar(object):\n def __init__(self, calendar_class, date):\n self.calendar = calendar_class\n self.date = date\n\n def convert_to(self, calendar):\n return ...
python
edit
1
2
apache-2.0
0751ee8ea1153ca1227fafcfbca1dc00fc148c4b
jwg4/qual,jwg4/calexicon
qual/calendar.py
rejected_duplicate
Near-duplicate of sample 11097
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA logging handler that's tty aware.\n\"\"\"\n\nimport logging\nfrom . import rendering\n\n\nclass VTMLHandler(logging.StreamHandler):\n \"\"\" Parse VTML messages to colorize and embolden logs. \"\"\"\n\n log_format = '[<blue>...
python
edit
1
1
mit
43f4d3394e184f9984f10cbeec51ca561a8d548c
mayfield/shellish
shellish/logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Run a server that takes all GET requests and dumps them.\"\"\"\n\nfrom flask import Flask, request, send_from_directory\n\nfrom flask_cors import CORS\nfrom w3lib.html import replace_entities\n\napp = Flask(__name__)\nCORS(app)\n\n\n@...
python
edit
3
2
apache-2.0
71a182665e0e131f14bcefe52e8a8e7b2ffe674d
umisc/listenserv
server/run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = 'Mike'\nSITENAME = 'Conversations with Mike the Turtle'\nSITEURL = ''\nRELATIVE_URLS = True\n\nPATH = 'content'\n\nTIMEZONE = 'America/New...
python
edit
1
0
mit
440cd5bdd7806d7e67345153dd37a8aa4e50e283
dankolbman/CleverTind,dankolbman/CleverTind
site/pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom enum import Enum\nfrom app import db\n\n\nclass AwardCategory(Enum):\n Champions = 0\n Research = 1\n Presentation = 2\n Innovative_Solution = 3\n Mechanical_Design = 4\n Programming = 5\n Strategy_and_Innovation =...
python
edit
1
3
mit
c218603fc429f60a6935de88bee50bc1db3f6fb9
rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy
app/awards/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Run a server that takes all GET requests and dumps them.\"\"\"\n\nfrom flask import Flask, request, send_from_directory\n\nfrom flask_cors import CORS\nfrom w3lib.html import replace_entities\n\napp = Flask(__name__)\nCORS(app)\n\n\n@...
python
edit
3
3
apache-2.0
bb195d3290d2e9921df8b989ac0d2123a6b9a7f8
umisc/listenserv
server/run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\ndef setup_module(module):\n from nose import SkipTest\n from nltk.parse.malt import MaltParser\n\n try:\n depparser = MaltParser()\n except LookupError:\n...
python
edit
3
2
apache-2.0
53a442ac37bf58bca16dee2ad0787bdf2df98555
nltk/nltk,nltk/nltk,nltk/nltk
nltk/test/gluesemantics_malt_fixt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, division\n\nfrom unittest2 import TestCase\nfrom mock import patch\n\nfrom succubus import Daemon\n\n\n\nclass TestDaemonize(TestCase):\n @patch('succubus.daemonize.sys')\n def t...
python
edit
3
2
apache-2.0
7d8c724abc4b5a692bd046313774921bc288f7a4
ImmobilienScout24/succubus
src/unittest/python/daemonize_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Fibonacci series:\n\n0, 1, 1, 2, 3, 5, 8,... \n\n- Fib(0) = 0\n- Fib(1) = 1\n- Fib(n) = Fib(n - 1) + Fib(n - 2)\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\...
python
edit
2
2
bsd-2-clause
91162995c6425307cb586e663d4bf0241f68d588
bowen0701/algorithms_data_structures
alg_fibonacci.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom staticgen.staticgen_pool import staticgen_pool\nfrom staticgen.staticgen_views import StaticgenView\n\nfrom .models import Post\n\n\nclass BlogPostListView(Staticgen...
python
edit
3
3
bsd-3-clause
a1300dc059bd4eeb44654b75132c3e542caa29cc
mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo
staticgen_demo/blog/staticgen_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm,Textarea,TextInput\n\n\nfrom .models import Post\n\n\nclass PostForm(ModelForm):\n class Meta:\n model = Post\n fields = ('subject','body')\n widgets = {\n 'subject':...
python
edit
1
0
mit
a894e53d48737f5b9ddc3cc2f5ffe4de98b558dd
Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters
forum/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\n pyalysis.analysers.raw\n ~~~~~~~~~~~~~~~~~~~~~~\n\n :copyright: 2014 by Daniel Neuhäuser and Contributors\n :license: BSD, see LICENSE.rst for details\n\"\"\"\nimport codecs\n\nfrom pyalysis.utils impor...
python
edit
1
2
bsd-3-clause
d25167937a6e0f923d9c03cd94c227e96fdf12ba
DasIch/pyalysis,DasIch/pyalysis
pyalysis/analysers/raw.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom IPython.display import Image\n\nimport requests\n\nAPI_ENDPOINT = 'http://api.giphy.com/v1/gifs/random'\nAPI_KEY = 'dc6zaTOxFJmzC'\n\ndef giphy(tag):\n params = {\n 'api_key': API_KEY,\n 'tag': tag\n }\n\n r = re...
python
edit
1
1
mit
79f60cdb3853a60fd2cf6e69a141ed7b756f86cb
AustinRochford/giphy-ipython-magic,AustinRochford/giphy-ipython-magic
giphy_magic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Record\nfrom .tasks import send_personnel_code\n\n\nclass RecordAdmin(admin.ModelAdmin):\n list_display = [\n \"id\", \"identity\", \"write_to\", \"created_at\", \"updated_at...
python
edit
1
3
bsd-3-clause
28a35d1434cb8dfdc9da130bd86518df4e8c6d4a
praekelt/hellomama-registration,praekelt/hellomama-registration
uniqueids/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom django import template\nfrom django.http import QueryDict\n\nfrom classytags.core import Tag, Options\nfrom classytags.arguments import MultiKeywordArgument, MultiValueArgument\n\nfrom libs.utils import canonical_u...
python
edit
1
4
mit
d55dfc5152f6ebeabe761b627a26a9f00cc4e37c
dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/libs/templatetags/url_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom abundsolar import elsolarlogepsilon\n\nzfactor = 10 ** -1.92\n# Smith et al. (2000) ROA 219 in Omega Centauri\n# [Fe/H] is about ~-1.7\n#logxtofe = log epsilon(X) - log epsilon(Fe)\ntargetlogxtofe = {'rb': 1.34 - 6.25,\n ...
python
edit
1
0
mit
9aad4c5f22b8dd84711df2c85147f4cb37c23802
lukeshingles/evelchemevol
tools/initialcompdata/abundomegacen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('signal', parent_package, top_path)\n\n config.add_data_dir('tests')\n\n ...
python
edit
1
1
bsd-3-clause
b757a5e24fa8018647827b8194c985881df872d5
andyfaff/scipy,sauliusl/scipy,newemailjdm/scipy,jor-/scipy,mikebenfield/scipy,jsilter/scipy,mortada/scipy,josephcslater/scipy,jjhelmus/scipy,trankmichael/scipy,larsmans/scipy,jamestwebber/scipy,jonycgn/scipy,haudren/scipy,petebachant/scipy,endolith/scipy,vigna/scipy,e-q/scipy,raoulbq/scipy,aeklant/scipy,fredrikw/scipy,...
scipy/signal/setup.py
rejected_duplicate
Near-duplicate of sample 3899
true
[ { "role": "user", "content": "Write python code for the following: Set up the DB schema for posts." }, { "role": "assistant", "content": "from django.db import models\n\nclass Author(models.Model):\n name = models.CharField(max_length=20)\n email = models.EmailField(max_length=254)\n\n ...
python
new_file
1
1
mit
effbffd67d52561ca1ba09201782aafc6cfc52f7
Lukasa/minimalog
blog/posts/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#------------------------------------------------------------------------------\n# Copyright (c) 2012, Enthought, Inc.\n# All rights reserved.\n#------------------------------------------------------------------------------\nfrom abc impo...
python
edit
1
0
bsd-3-clause
8cfe4d9ef565502b247b7ac3b438b49f257c7012
tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable
enable/layout/ab_constrainable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['client', 'user_auth', 'aws_auth', 'util']\n\nCLIENT_VERSION = '1.2.0'\n\n\nclass CerberusClientException(Exception):\n \"\"\"Wrap third-party exceptions expected by the Cerberus client.\"\"\"\n pass\n\n```\n\nApply this ch...
python
edit
5
0
apache-2.0
e5c4d03a8c0ef66299d30fb0ecca6dfc54c15506
Nike-Inc/cerberus-python-client
cerberus/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Initialize Sentry\nimport sentry_sdk\n\nsentry_sdk.init(\n \"https://<EMAIL>/5445901\",\n traces_sample_rate=0.5\n)\n\nfrom socli.socli import main\nmain()\n\n```\n\nApply this change: Set sample rate to 1.0" }, { "role": "a...
python
edit
1
0
bsd-3-clause
332bbd84477498a045cfdd7b56b21127fa366a2b
gautamkrishnar/socli
socli/sentry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os.path import dirname, abspath\n\nfrom django.conf import settings\n\nif not settings.configured:\n settings.configure(\n DATABASE_ENGINE = 'sqlite3',\n SITE_ID = 1,\n TEMPLAT...
python
edit
1
2
mit
7a7afea2539048d172b1d5abfc4a4d9dff0827e7
coleifer/django-relationships,maroux/django-relationships,coleifer/django-relationships,maroux/django-relationships
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is part of the MSS Python's module.\nSource: https://github.com/BoboTiG/python-mss\n\"\"\"\n\nimport platform\nfrom typing import TYPE_CHECKING\n\nfrom .exception import ScreenShotError\n\n\nif TYPE_CHECKING:\n from typing i...
python
edit
1
4
mit
e6d4ca44f3f71468c40842c53e3963b425ac2527
BoboTiG/python-mss
mss/factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom accounts import models, names\n\n\ndef ensure_core_accounts_exists(sender, **kwargs):\n # We only create core accounts the first time syncdb is run\n if models.Account.objects.all().count() > 0:\n return\n\n # Create as...
python
edit
1
2
bsd-3-clause
62abb800b1b40cfbce120c0f3fb5169e32daaa60
Jannes123/django-oscar-accounts,amsys/django-account-balances,michaelkuty/django-oscar-accounts,michaelkuty/django-oscar-accounts,Mariana-Tek/django-oscar-accounts,machtfit/django-oscar-accounts,carver/django-account-balances,machtfit/django-oscar-accounts,amsys/django-account-balances,Mariana-Tek/django-oscar-accounts...
accounts/management/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contric.auth.models import User\nfrom django.template.defaultfilters import slugify\n\n\n#class MyModel(models.Model):\n# title = models.CharField(max_length=255)\n# slug = models.SlugField()\...
python
edit
5
0
bsd-3-clause
65b2dd9e0293265d528059a3a240d555661d1460
strycore/djung,strycore/djung,strycore/djung,strycore/djung
main/models.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport json\n\nfrom . import ATTRIBUTE_SPECIFICATION_PATH, REF_SPECIFICATION_PATH\n\n\nclass OutputSpecification(object):\n\n def __init__(\n self, attribute_specification_path=ATTRIBUTE_SPECIFICATIO...
python
edit
1
1
apache-2.0
760a543cf13552ce951fee12c6e9a9d5d335a168
jamesroutley/formation
formation/output_specification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n__author__ = 'Hugo Berg'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\nfrom rocket_snake.constants import *\n\n```\n\nApply this change: Add the RLS client import to init file\n\nSigned-off-by: drummersbrother ...
python
edit
4
0
apache-2.0
039d326907d88e24a48100b7f3cb0b8e0eb843d0
Drummersbrother/rocket-snake
rocket_snake/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for moocng project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``runse...
python
edit
2
1
apache-2.0
4065f8edc61ae9078238219dad674ae114c78003
OpenMOOC/moocng,GeographicaGS/moocng,GeographicaGS/moocng,GeographicaGS/moocng,OpenMOOC/moocng,GeographicaGS/moocng
moocng/wsgi.py
rejected_duplicate
Near-duplicate of sample 16015
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef reverse_insort(seq, val):\n lo = 0\n hi = len(seq)\n while lo < hi:\n mid = (lo + hi) // 2\n if val > seq[mid]:\n hi = mid\n else:\n lo = mid + 1\n seq.insert(lo, val)\n\n```\n\nApp...
python
edit
1
4
mit
d676a1b1e7e3efbbfc72f1d7e522865b623783df
BeatButton/beattie,BeatButton/beattie-bot
utils/etc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write a function to covert far to kelvin" }, { "role": "assistant", "content": "def k_to_c(temp):\n\treturn temp - 273.15\n\ndef f_to_k(temp):\n\treturn ((temp - 32) * (5 / 9)) + 273.15\n" } ]
python
new_file
1
1
mit
321b627c3c7d241d6e6cc4e319911cfbcd1533fb
xykang/2015-05-12-BUSM-git,xykang/2015-05-12-BUSM-git
src/temp_functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nDEBUG = os.environ['SERVER_SOFTWARE'].startswith('Dev')\n\n# The CONFIG variables should have exactly the same structure between environments\n# Eventually a test environment should be added. -gregmarra 17 Jul 2012\nif DEBUG:\n...
python
edit
1
0
mit
835cae8c7bb8a9120008657e5641d6fbbdc5782b
phil-lopreiato/the-blue-alliance,1fish2/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,synth3tk/the-blue-alliance,josep...
tba_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = u'Mappy'\nSITENAME = u'Mappy Labs'\nSITEURL = ''\n\nTIMEZONE = 'Europe/Paris'\n\nDEFAULT_LANG = u'en'\n\nTHEME = 'theme/mappy'\n\n# Feed g...
python
edit
1
0
mit
bd1a244aa3d9126a12365611372e6449e47e5693
paulgreg/mappy.github.io-source,paulgreg/mappy.github.io-source,Mappy/mappy.github.io-source,Mappy/mappy.github.io-source,paulgreg/mappy.github.io-source,Mappy/mappy.github.io-source,paulgreg/mappy.github.io-source,Mappy/mappy.github.io-source
pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pml.exceptions import PvException\nimport pml.device\nimport pytest\nimport mock\n\n\n@pytest.fixture\ndef create_device(readback, setpoint):\n _rb = readback\n _sp = setpoint\n device = pml.device.Device(rb_pv=_rb, sp_pv=_sp,...
python
edit
1
1
apache-2.0
b13efa6234c2748515a9c3f5a8fbb3ad43093083
willrogers/pml,willrogers/pml
test/test_device.py
rejected_duplicate
Near-duplicate of sample 17683
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# T...
python
edit
1
0
apache-2.0
4607c2fdb39301cc60d49280dd1253e3d62845be
pixelrebel/st2,jtopjian/st2,nzlosh/st2,Itxaka/st2,Plexxi/st2,grengojbo/st2,lakshmi-kannan/st2,armab/st2,Plexxi/st2,peak6/st2,pixelrebel/st2,emedvedev/st2,emedvedev/st2,Plexxi/st2,Itxaka/st2,tonybaloney/st2,lakshmi-kannan/st2,pixelrebel/st2,jtopjian/st2,jtopjian/st2,dennybaa/st2,punalpatel/st2,dennybaa/st2,alfasin/st2,a...
st2api/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012-2019, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 16.1.0\n\n\nfrom troposphere import ...
python
edit
1
0
bsd-2-clause
b77622311c69cd74c9c3c3b7c66747c79ea41bec
cloudtools/troposphere,cloudtools/troposphere
troposphere/qldb.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntwython.advisory\n~~~~~~~~~~~~~~~~\n\nThis module contains Warning classes for Twython to specifically\nalert the user about.\n\nThis mainly is because Python 2.7 > mutes DeprecationWarning and when\nwe de...
python
edit
1
0
mit
1b085180ff6d9cb4e395551682c5a628545cb70c
ryanmcgrath/twython
twython/advisory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix silly error. This makes more sense." }, { "role": "assistant", "content": "__version__ = '0.3.3-dev'\n\nVERSION = __version__ # synonym\n" } ]
python
new_file
1
0
bsd-2-clause
bbfa404e4679f4229e44fd7e641e62fdd2e7bdd5
kylefox/django-rest-framework,sbellem/django-rest-framework,jerryhebert/django-rest-framework,atombrella/django-rest-framework,rafaelcaricio/django-rest-framework,brandoncazander/django-rest-framework,hnakamur/django-rest-framework,YBJAY00000/django-rest-framework,maryokhin/django-rest-framework,ezheidtmann/django-rest...
djangorestframework/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /bin/python\nimport argparse\nfrom xml.dom import minidom\n\nparser = argparse.ArgumentParser(description='Parse a dive in xml formt.')\nparser.add_argument('-f', '--file', required=True,\n\t\t\t\t\tdest='path', help='path to xml file')...
python
edit
1
0
isc
315e6da0dc3d7424a14c65ac243af1faef36b710
AquaBSD/libbuhlmann,AquaBSD/libbuhlmann,AquaBSD/libbuhlmann
test/parse_dive.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework import serializers\n\n\nclass EnumField(serializers.ChoiceField):\n default_error_messages = {\"invalid_choice\": _('\"{input}\" i...
python
edit
1
5
mit
5a4a71aaed65bb2ea676a0ec1fa75a8a801f1013
5monkeys/django-enumfield
django_enumfield/contrib/drf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The API definition for the metrics API.\n\nThis defines the APIs and the handlers for the APIs.\n\"\"\"\n\nimport api_util\nimport metrics\n\nfrom protorpc import protojson\nfrom flask import request\nfrom flask.ext.restful import Res...
python
edit
1
1
bsd-3-clause
ff0bae24be1dfc800dd76940f95cc4580cdc7421
all-of-us/raw-data-repository,all-of-us/raw-data-repository,all-of-us/raw-data-repository
rest-api/metrics_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nAll salt configuration loading and defaults should be in this module\n'''\n# Import python modules\nimport os\nimport sys\nimport socket\n# Import third party libs\nimport yaml\n\ndef minion_config(path):\n '''\n Reads in the min...
python
edit
1
3
apache-2.0
fbea1cdd96ef259e8affc87ee72d8bbaef40c00d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport fnmatch\nimport os\nimport unittest\n\nfrom . import validate_json_format\n\n\nclass TestSettings(unittest.TestCase):\n def _get_json_files(self, file_pattern, folder='.'):\n for ro...
python
edit
1
7
mit
e0f296e776e2aaed2536eeebfb4900a23973aaf5
jonlabelle/SublimeJsPrettier,jonlabelle/SublimeJsPrettier
tests/test_json.py
rejected_duplicate
Near-duplicate of sample 22599
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: ascii -*-\n\nimport sys\n\nimport instabot\n\nNICKNAME = 'Echo'\n\ndef post_cb(self, msg, meta):\n if msg['text'].startswith('!echo '):\n return msg['text'][6:]\n\ndef main():\n parser = in...
python
edit
1
9
mit
066d776041b2cae4e0435935d7f9a05173e34563
CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant,CylonicRaider/Instant
script/echo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pyxb.Namespace\nimport pyxb.xmlschema as xs\nimport sys\n\nimport pyxb.standard.bindings.wsdl as wsdl\nimport pyxb.standard.bindings.soaphttp as soaphttp\nfrom xml.dom import Node\nfrom xml.dom import minidom\nimport pyxb.binding.gen...
python
edit
3
0
apache-2.0
4ad06836e009309c7b5c00f0f932f9db38dff15c
balanced/PyXB,CantemoInternal/pyxb,pabigot/pyxb,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,CantemoInternal/pyxb,jonfoster/pyxb1,jonfoster/pyxb2,jonfoster/pyxb2,balanced/PyXB,CantemoInternal/pyxb,balanced/PyXB,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb-upstream-mirror,pabigot/pyxb,jonfoster/pyxb2
examples/weather/gensvcbind.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass FileResolver(object):\n\n def read(self, path):\n with open(path, 'r') as file:\n return file.read()\n\n```\n\nApply this change: Throw CfnSphereException on IOErrors. Fix landmark issue." }, { "role": ...
python
edit
2
2
apache-2.0
dbba9e403538fb3bfd29763b8741e07dad3db1b1
cfn-sphere/cfn-sphere,cfn-sphere/cfn-sphere,ImmobilienScout24/cfn-sphere,cfn-sphere/cfn-sphere,marco-hoyer/cfn-sphere
src/main/python/cfn_sphere/resolver/file.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tg\nfrom tg.util import *\nfrom nose.tools import eq_\nimport os\n\npath = None\ndef setup():\n global path\n path = os.curdir\n os.chdir(os.path.abspath(os.path.dirname(os.path.dirname(tg.__file__))))\n\ndef teardown():\n ...
python
edit
7
1
mit
9c3d24083be5969ca84c1625dbc0d368acdc51f8
lucius-feng/tg2,lucius-feng/tg2
tg/tests/test_util.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\n# import statepoint\nsys.path.insert(0, '../../src/utils')\nimport statepoint\n\n# read in statepoint file\nif len(sys.argv) > 1:\n sp = statepoint.StatePoint(sys.argv[1])\nelse:\n sp = statepoin...
python
edit
1
0
mit
52a4a10d54374b08c5835d02077fd1edcdc547ac
smharper/openmc,paulromano/openmc,mit-crpg/openmc,bhermanmit/openmc,wbinventor/openmc,paulromano/openmc,samuelshaner/openmc,mit-crpg/openmc,smharper/openmc,samuelshaner/openmc,johnnyliu27/openmc,mit-crpg/openmc,lilulu/openmc,walshjon/openmc,shikhar413/openmc,liangjg/openmc,shikhar413/openmc,walshjon/openmc,paulromano/o...
tests/test_union_energy_grids/results.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Check files with flake8.\"\"\"\nimport flake8.main\nimport re\n\n\nDEFAULTS = {\n 'ignore': '',\n 'complexity': '10',\n}\n\n\nPYTHON_SHEBANG_REGEX = re.compile(r'''^#!.*python''')\n\n\ndef check(file_staged_for_commit, options):...
python
edit
1
5
mit
1e2edd3ff285e71feffac932592e08a483e002be
evvers/git-pre-commit-hook
git_pre_commit_hook/builtin_plugins/flake8_check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nimport os\nimport os.path\n\n__version__ = \"0.1.0\"\n\n\ndef create_app(config=None):\n app = Flask(__name__, instance_relative_config=True)\n\n config_name = \"eyeflask.cfg\"\n\n # Use user specified conf...
python
edit
1
3
mit
b9441dd6e41aa8a73ca61df0963e086bb97ab4ef
n8henrie/eyeflask
src/eyeflask/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom elfi.core import Transform, Simulator, Summary, Discrepancy\nfrom elfi.distributions import *\nfrom elfi.result import *\nfrom elfi.methods import *\nfrom elfi.storage import *\nfrom elfi.visualization import *...
python
edit
17
0
bsd-3-clause
ccaf9cce478c077040a45340b498063ea8b7fc50
HIIT/elfi,elfi-dev/elfi,lintusj1/elfi,elfi-dev/elfi,lintusj1/elfi
elfi/__init__.py
rejected_lint
Too many lint violations: 17
true