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#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nimport conveyor\n\n\ninstall_requires = [\n \"APScheduler\",\n \"PyYAML\",\n \"redis\",\n \"slumber\",\n \"xmlrpc2\",\n]\n\nsetup(\n name=\"conveyor\",\...
python
edit
1
0
bsd-2-clause
0286126ef0f7876c3ae58a081d48964e49b3a093
crateio/carrier
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom setuptools import setup\n\n\ndef readreq(filename):\n result = []\n with open(filename) as f:\n for req in f:\n req = req.partition('#')[0].strip()\n if not req:\...
python
edit
3
3
apache-2.0
d7f4294f7a218bac15d6ef1b59465203b26f650b
klmitch/cli_tools
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport socket\n\nclass Location(object):\n \" Determine which cluster the code is running in, or CORP if we are not in prod. \"\n\n CORP = \"corp\"\n\n @staticmethod\n def get_location():\n hostname = socket.gethostname()\...
python
edit
2
6
apache-2.0
f82a9994bfe782a575136af506b92c72fd6ac60e
apache/aurora,shahankhatch/aurora,kidaa/aurora,protochron/aurora,thinker0/aurora,medallia/aurora,apache/aurora,medallia/aurora,mkhutornenko/incubator-aurora,rosmo/aurora,crashlytics/aurora,thinker0/aurora,protochron/aurora,thinker0/aurora,mschenck/aurora,medallia/aurora,wfarner/aurora,wfarner/aurora,kidaa/aurora,kidaa/...
src/python/twitter/mesos/location.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n with open(os.path.join(os.path.dirname(__file__), fname)) as f:\n return f.read()\n\n\nsetup(name='timy',\n version='0.4.1',\n description='Minimalist measu...
python
edit
1
1
mit
f730137926b5a59671347e35ced1b43804393ec3
ramonsaraiva/timy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport socket\n\nclass Location(object):\n \"\"\"Determine which cluster the code is running in, or CORP if we are not in prod.\"\"\"\n\n PROD_SUFFIXES = [\n '.corpdc.twitter.com',\n '.prod.twitter.com',\n ]\n\n @static...
python
edit
3
3
apache-2.0
494d2a2cfcfa5dc9058f087588fb1371021174d4
rosmo/aurora,rosmo/aurora,kidaa/aurora,crashlytics/aurora,wfarner/aurora,kidaa/aurora,mkhutornenko/incubator-aurora,apache/aurora,kidaa/aurora,medallia/aurora,mschenck/aurora,wfarner/aurora,mschenck/aurora,apache/aurora,protochron/aurora,shahankhatch/aurora,crashlytics/aurora,shahankhatch/aurora,mkhutornenko/incubator-...
src/python/twitter/mesos/location.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\nimport setuptools\n\nwith open(\"README.md\", 'r') as f:\n long_description = f.read()\n\nsetup(\n name='chess_py',\n version='2.8.0',\n description='Python chess client',\n...
python
edit
1
0
mit
24764af1c7dc0a016b8e36c9a7659e9ac516e026
LordDarkula/chess_py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='prometheus-kafka-consumer-group-exporter',\n version='0.5.0.dev1',\n description='Kafka consumer group Prometheus exporter',\n url='https://github.com/Braedon/prometh...
python
edit
1
0
mit
7bc1f87b24abdfbcbf68f5fc6b3266fc3e6799f0
braedon/prometheus-kafka-consumer-group-exporter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2004 Specifix, Inc.\n# All rights reserved\n#\nimport os\nimport shutil\nimport util\n\nclass Make:\n\n def doBuild(self, dir):\n\tos.system(\"cd %s; make\" % dir)\n\nclass MakeInstall:\n\n def doInstall(self, dir, ...
python
edit
15
1
apache-2.0
238c6b73115f6493246f25d45268e7a675980397
sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary
build/build.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\npybitcoin\n==============\n\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='pybitcoin',\n version='0.9.8',\n url='https://github.com/blockstack/pybitcoin',\n license='MIT',\n author='Blockstac...
python
edit
1
0
mit
39b58dadab6b223e7832c9c48e66d026303b243d
blockstack/pybitcoin
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ntry:\n # HACK: Avoid \"TypeError: 'NoneType' object is not callable\"\n # Related to issue http://bugs.python.org/issue15881\n # https://hg.python.org/cpython/rev/0a58fa8e9ba...
python
edit
2
0
apache-2.0
bf0d12e6470d6fb8b453cf8b08910b4b88847134
telefonicaid/di-py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport sys\nimport numpy as np\n\nfrom bmi import MyBMI\n\ndef print_var_values (bmi, var_name):\n s = ', '.join ([str (x) for x in bmi.get_value (var_name)])\n print (...
python
edit
2
2
mit
37f28dba866ffa3457a4f14a7d3e74e8e88a1dd0
mperignon/bmi-STM,mperignon/bmi-delta,mperignon/bmi-STM,mperignon/bmi-delta
testing/get_value_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nimport sys\n\n# agency.txt done\n# feed_info.txt nothing to change\n\n# calendar_dates.txt depends on service_id.\n# routes.txt depends on agency.txt\n# shapes.txt depends on trips.txt\n# stops.txt depends on stop_times.txt\n# s...
python
edit
1
3
bsd-2-clause
fc4fa5d06ea0ca557d69112d1c8d0f10c8e594e0
sensiblecodeio/diet-gtfs
diet_gtfs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture\ndef pyglui_ui_instance():\n import glfw\n\n from pyglui import cygl, ui\n\n glfw.ERROR_REPORTING = \"raise\"\n glfw_init_successful = glfw.init()\n assert glfw_init_successful, \"Failed to ...
python
edit
1
2
mit
3fdc0db2608427ccb63b53b827e2a78aee40366a
pupil-labs/pyglui,pupil-labs/pyglui
tests/test_ui_elements.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Improve error message for CISD" }, { "role": "assistant", "content": "from pyscf.ci import cisd\n\ndef CISD(mf, frozen=[], mo_coeff=None, mo_occ=None):\n from pyscf import scf\n if isinstance(mf, (scf.uhf.UHF, scf.rohf.ROHF...
python
new_file
1
2
apache-2.0
90eafe038adfeddf5379e950b03ec0727d0c5d36
gkc1000/pyscf,sunqm/pyscf,sunqm/pyscf,sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf,gkc1000/pyscf
ci/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom metakernel.tests.utils import (get_kernel, get_log_text, \n clear_log_text, EvalKernel)\n\ndef test_edit_magic():\n kernel = get_kernel(EvalKernel)\n results = kernel.do_execute(\"%edit LICENS...
python
edit
4
1
bsd-3-clause
fcec71d285236dc3906611323ab74ecd89337081
Calysto/metakernel
metakernel/magics/tests/test_edit_magic.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='psycopg-nestedtransactions',\n version='1.0',\n description='Database transaction manager for psycopg2 database connections with seamless support for nested ...
python
edit
1
0
mit
b363536d92a955150eef1b412c1e34cba66caeeb
asqui/psycopg-nestedtransactions
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom postgres.orm import Model\n\n\nclass Country(Model):\n \"\"\"Represent country records from our database (read-only).\n\n :var int id: the reco...
python
edit
1
1
mit
7a21d2bccbcff2eb6a8b7cfd00c38a28553c0bcd
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com
gratipay/models/country.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport atexit\nimport functools\n\nfrom cupy import cuda\n\n\n_memoized_funcs = []\n\n\ndef memoize(for_each_device=False):\n \"\"\"Makes a function memoizing the result for each argument and device.\n\n This decorator provides automa...
python
edit
1
3
mit
c7030e461026e718c46b86dadecc9681d226c27c
ktnyt/chainer,niboshi/chainer,niboshi/chainer,laysakura/chainer,tscohen/chainer,benob/chainer,chainer/chainer,cupy/cupy,aonotas/chainer,cupy/cupy,jnishi/chainer,cupy/cupy,tkerola/chainer,cemoody/chainer,ktnyt/chainer,chainer/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,truongdq/chainer,kashif/chainer,w...
cupy/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nimport core.views\n\nurlpatterns = [\n url(r'^u/(?P<slug>[\\w-\\.]+)/?$', core.views.run_fn, name=\"run_fn\"),\n]\n\n```\n\nApply this change: Add more patterns to be handled in the slug" }, { ...
python
edit
1
0
mit
4aec042f4a271725451825bf03d48beac000ec9c
theju/urlscript
core/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ]\n\n operations = [\n migrations.CreateModel(\n...
python
edit
1
0
bsd-3-clause
a19b043c910274277ce5a6a777f686030f6ef7d0
Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti,Harvard-ATG/media_management_lti
media_manager/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Unit tests for the Master Controller REST variant.\n\n- http://flask.pocoo.org/docs/0.12/testing/\n\"\"\"\nimport unittest\nimport json\n\nfrom app.app import APP\n\n\nclass MasterControllerTests(unittest.Test...
python
edit
1
1
bsd-3-clause
c4fc5e1f89d756cdd9a7fe19baa04aeae844a26c
SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype,SKA-ScienceDataProcessor/integration-prototype
sip/execution_control/master_controller/rest/tests/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nfrom sphinx_celery import conf\n\nglobals().update(conf.build_config(\n 'kombu', __file__,\n project='Kombu',\n version_dev='4.3',\n version_st...
python
edit
1
0
bsd-3-clause
b8a3fcac063436b4b6e402c9026c03f3e094c14a
ZoranPavlovic/kombu,celery/kombu,ZoranPavlovic/kombu,urbn/kombu
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request\nfrom flask.ext.login import current_user\nfrom werkzeug.exceptions import Forbidden\n\n\ndef request_collections(action):\n try:\n return request.collection_slugs.get(action)\n except:\n return...
python
edit
1
3
mit
88e680302b6880c17111a678440156ac104507ed
smmbllsm/aleph,gazeti/aleph,gazeti/aleph,nightsh/aleph,gazeti/aleph,Luthien123/aleph,gazeti/aleph,nightsh/aleph,OpenGazettes/aleph,mgax/aleph,smmbllsm/aleph,mgax/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,smmbllsm/aleph,alephdata/aleph,OpenGazettes/aleph,alephdata/aleph,OpenGazettes/aleph,Luthien123/aleph,pudo/al...
aleph/authz.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom robber import expect\nfrom robber.matchers.contain import Contain\n\nclass TestAbove(unittest.TestCase):\n def test_matches(self):\n expect(Contain({'key': 'value'}, 'key').matches()) == True\n expect(...
python
edit
1
1
mit
fb8a70c16bb836405f2f811a203955db28f01d04
taoenator/robber.py,vesln/robber.py
tests/matchers/test_contain.py
rejected_duplicate
Near-duplicate of sample 9908
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport re\nfrom twitterbot import TwitterBot\nimport wikipedia\n\n\nclass Genderbot(TwitterBot):\n boring_article_regex = (r\"municipality|village|town|football|genus|family|\"\n \"administrative|di...
python
edit
1
3
mit
447a9c82e229eb801df028d2531764d89b28c923
DanielleSucher/genderbot
genderbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport re\nimport sys\n\ndef main(cmdline):\n\n parser = argparse.ArgumentParser(\n description='Ensure zero padding in numbering of files.')\n parser.add_argument('path', type=str,\n help='pa...
python
edit
1
6
mit
3c8d3bfea2ef1c82a62ef1b7455c29c044c7cfa3
dwinston/cli-utils
ensure_zero_padding_in_numbering_of_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# encoding: utf-8\n\nfrom __future__ import absolute_import\n\nimport urllib\nfrom .base import AuthenticationMixinBase\nfrom . import GrantFailed\n\nclass AuthorizationCodeMixin(AuthenticationMixinBase):\n \"\"\"...
python
edit
1
4
apache-2.0
14762a73617007f0b65880e1d99cd5b47e03bfff
vimeo/vimeo.py,greedo/vimeo.py,blorenz/vimeo.py,gabrielgisoldo/vimeo.py
vimeo/auth/authorization_code.py
accepted
null
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
3
apache-2.0
eadf481f352e4277001f3b9e83c7ffbbd58c789c
stackforge/python-openstacksdk,briancurtin/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk
openstack/tests/functional/network/v2/test_service_provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef cleanup(channel_or_chan_list):\n pass\n\n\ndef gpio_function(pin):\n pass\n\n```\n\nApply this change: Make channel an optional parameter\n\nRPi.GPIO supports calling cleanup() without parameters to cleanup\nall gpios used in the ...
python
edit
1
1
mit
a3d528d58ca3f5df291400a808950661820feb05
Def4l71diot/RPi.GPIO-def
RPi/GPIO/definitions/functions/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"ssoproject URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app ...
python
edit
1
0
mit
644e4301d0a73756750a48226b9db00e51a9e46c
favoritemedium/sso-prototype,favoritemedium/sso-prototype
fmproject/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nimport shlex\nimport subprocess\n\nread_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'\n\nif read_the_docs_build:\n subprocess.call('doxygen', shell=True)\n\nextensions = ['breathe']\nbreathe_projec...
python
edit
4
0
mit
bb1f2ded652c7ec58251112d42e61b8d1232887d
circuitar/Nanoshield_LoadCell,circuitar/Nanoshield_LoadCell
docs/conf.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import RedirectView\n\n\nclass RouteRedirectView(RedirectView):\n \"\"\"Redirect to the target Route.\"\"\"\n permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning\n\n def get_...
python
edit
1
1
bsd-2-clause
5b038b468af0f5a060eaea3bd2956ff85ad09071
meshy/django-conman,meshy/django-conman,Ian-Foote/django-conman
conman/redirects/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2012 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"\nVerifies that app bundles are rebuilt correctl...
python
edit
3
0
bsd-3-clause
02b1611f26f5d6e572e4c818eab8ae4d9bcbcf2f
witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp
test/mac/gyptest-rebuild.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''Main file for running experiments.\n\n'''\n\n\nimport logging\n\nfrom cortex._lib import (config, data, exp, optimizer, setup_cortex,\n setup_experiment, train)\nfrom cortex._lib.utils import print_section\n\nimpo...
python
edit
1
7
bsd-3-clause
303d256bd6615bfef7d26a1b5dadf474dbbb26af
rdevon/cortex,rdevon/cortex
cortex/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Top settings file for development\nfrom .base import * # noqa: F403\nfrom .secrets import * # noqa: F403\n\nCOMPRESS_ENABLED = False\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\nSERVE_MEDIA = DEBUG\n\nSITE_ID = 2\nALLOWED_HOSTS = [\"localh...
python
edit
1
0
mit
fb5378d178f6c4104ac0464ebbf04ce84753c6e2
pydata/conf_site,pydata/conf_site,pydata/conf_site
conf_site/settings/dev.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scriptcwl import WorkflowGenerator as WFGenerator\n\nfrom .utils import CWL_PATH\n\n\nclass WorkflowGenerator(WFGenerator):\n def __init__(self, working_dir=None):\n WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=...
python
edit
1
1
apache-2.0
780b84a2ed7aff91de8ab7b5505e496649d3ddfa
WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln
nlppln/wfgenerator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nClass for communicating with the GrovePi ultrasonic ranger.\n\nHere we treat it as a binary sensor.\n\"\"\"\n\nimport logging\nlogging.basicConfig()\nLOGGER = logging.getLogger(__name__)\nLOGGER.setLevel(logging.getLevelName('INFO')...
python
edit
1
1
apache-2.0
c6021a20cacea609398bd07adabfba3d7782b7ef
aninternetof/rover-code,aninternetof/rover-code,aninternetof/rover-code
rovercode/drivers/grovepi_ultrasonic_ranger_binary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom djangae.utils import djangae_webapp\n\nfrom django.views.decorators.csrf import csrf_exempt\n\ntry:\n from mapreduce.main import create_handlers_map\n wrapped_urls = [url(url_re.replace('.*/', '^...
python
edit
3
0
bsd-3-clause
6e19ff22ea0e8c78e7faaa2ba58626de383dfee3
potatolondon/djangae,grzes/djangae,grzes/djangae,kirberich/djangae,potatolondon/djangae,grzes/djangae,kirberich/djangae,kirberich/djangae
djangae/contrib/mappers/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.shortcuts import redirect\nfrom django.urls import reverse_lazy\nfrom django.views import generic\n\nfrom exp.views.mixins import ExperimenterLoginRequiredMixin\n\n\nclass ExperimenterDashboardView(ExperimenterLoginRequiredMix...
python
edit
1
5
apache-2.0
f46226ed4b5a1c0bf2592692aba8481cc777414f
CenterForOpenScience/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,CenterForOpenScience/lookit-api,pattisdr/lookit-api,pattisdr/lookit-api
exp/views/dashboard.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.conf import settings\n\n\ntrans_app_label = _('Opps')\n\nsettings.INSTALLED_APPS += (\n 'opps.article',\n 'opps.image',\n 'opps.channel',...
python
edit
1
0
mit
92a5712bdb04ae265120a41d688b37b60507d9dd
YACOWS/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps
opps/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom ... import simbad\n\n\ndef test_simbad():\n r = simbad.QueryAroundId('m31', radius='0.5s').execute()\n print r.table\n assert \"M 31\" in r.table[\"MAIN_ID\"]\n...
python
edit
2
2
bsd-3-clause
ede07cc5f2e410481b71bd7ba0cf1aa2fce26e08
imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery
astroquery/simbad/tests/test_simbad.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom itertools import ifilter\nfrom requests_oauthlib import OAuth1Session\n\nclass TwitterDataIngestSource:\n \"\"\"Ingest data from Twitter\"\"\"\n\n def __init__(self, config):\n self.config = config\n\n def __iter__(se...
python
edit
3
2
mit
ae4f144ea9256b4b53fe497a656be38f32213277
W205-Social-Media/w205-data-ingest,abessou/w251-FinalProject,abessou/w251-FinalProject
TwitterDataIngestSource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fluenttest.class_based import ClassTester, lookup_class, the_class\nfrom fluenttest.test_case import TestCase\n\n__all__ = [\n 'ClassTester',\n 'TestCase',\n 'lookup_class',\n 'the_class',\n]\n\n```\n\nApply this change: Ad...
python
edit
1
0
bsd-2-clause
7206db27eb5fccde808f7a4e2b9bea974181bdbc
dave-shawley/fluent-test
fluenttest/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyQt5.QtGui import QFont\nfrom cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT\n\n# Slice Sizing\nSLICE_HELIX_RADIUS = 15.\nSLICE_HELIX_STROKE_WIDTH = 0.5\nSLICE_HELIX_MOD_HILIGHT_WIDTH = 1\nEMPTY_HELIX_STROKE_WIDTH ...
python
edit
3
0
mit
034068e9d01f8087bf9061047fb3aa2550c31708
scholer/cadnano2.5
cadnano/gui/views/sliceview/slicestyles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2015, 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licen...
python
edit
1
0
apache-2.0
f50efcb65d794985185f5cc82c697673f50e4c47
matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse
synapse/replication/slave/storage/keys.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport picamera\n\nclass Camera(object):\n def __init__(self):\n self.camera = picamera.PiCamera()\n self.camera.resolution = (800, 600)\n self.camera.framerate = 30\n self.camera.rotation = 180\n ...
python
edit
1
6
mit
095678fa910f78de1cac80bef46d0e29323a120c
calston/pirnv
camz/camera.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.blueprints.ticketing.views\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2017 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom flask import abort, g\n\nfrom ...services.party imp...
python
edit
1
3
bsd-3-clause
62c9322cf1508eafa6bd3061d1f047ce42b95804
m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
byceps/blueprints/ticketing/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import date, timedelta\n\n\ndef get_cutoff_date(days):\n \"\"\"Calculate the cutoff date or return None if no time period was set.\"\"\"\n if days is None or type(days) != int:\n return None\n else:\n if...
python
edit
1
5
bsd-3-clause
4fa76c04a3455ebce6251b59aea54f5a769f3deb
unt-libraries/django-invite,unt-libraries/django-invite
invite/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# This is a workaround for liburdf.so throwing an exception and killing\n# the process on exit in ROS Indigo.\n\nimport subprocess\nimport os\nimport sys\n\ntests = ['core.py',\n 'valkyrie_com.py' #,\n ...
python
edit
3
0
bsd-3-clause
2399fea4f3fa1c4d4df1bac06b6fb6e3e32f03e9
openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica,openhumanoids/exotica
exotica_python/tests/runtest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom RabiAmp import RabiAmp\nfrom Ramsey import Ramsey\nfrom FlipFlop import FlipFlop\nfrom SPAM import SPAM\nfrom RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT\n```\n\nApply this change: Add a helper function to create calibrat...
python
edit
11
4
apache-2.0
2b3e165a5dbf34d8ed94eda1453b20099d88618f
BBN-Q/QGL,BBN-Q/QGL
BasicSequences/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"DOS is coming\n\nRevision ID: 420\nRevises: 410_remove_empty_drafts\nCreate Date: 2015-11-16 14:10:35.814066\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '420'\ndown_revision = '410_remove_empty_drafts'\n\nfrom al...
python
edit
1
2
mit
3de1b3c8538a473c29189ef4df02f93e67e221ac
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/420_dos_is_coming.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\nfrom linepy import *\r\n\r\nclient = LineClient()\r\n#client = LineClient(authToken='AUTHTOKEN')\r\n\r\nclient.log(\"Auth Token : \" + str(client.authToken))\r\n\r\npoll = LinePoll(client)\r\n\r\n# Receive message...
python
edit
7
3
bsd-3-clause
bb18029c9ca75b420aa486e393b2f79e8f2e009b
fadhiilrachman/line-py
examples/echobot.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\nfrom __future__ import unicode_literals\n\nfrom .. import Provider as InternetProvider\n\n\nclass Provider(InternetProvider):\n free_email_domains = [\n 'email.ua', 'gmail.com', 'gov.ua', 'i.ua', 'meta.ua', 'ukr.ne...
python
edit
1
0
mit
6d6e0b780c62bea5fec43eae1411db827f13fa17
joke2k/faker,trtd/faker,danhuss/faker,joke2k/faker
faker/providers/internet/uk_UA/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict, Mapping\nimport json\n\nclass AST(Mapping):\n def __init__(self, **kwargs):\n self._elements = OrderedDict(**kwargs)\n\n def add(self, key, value):\n previous = self._elements.get(key...
python
edit
1
4
bsd-2-clause
ee61dab40c4c3eaa1553397091a17a3292dcf9d6
frnknglrt/grako,vmuriart/grako
grako/ast.py
rejected_duplicate
Near-duplicate of sample 2048
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport base64\nimport sys\n\nif len(sys.argv) < 3:\n print \"Usage: twitter_application_auth.py <consumer key> <consumer secret>\"\n sys.exit(1)\n\nconsumer_key = sys.argv[1]\nconsumer_secret = sys.argv[2]\ntoken = co...
python
edit
4
0
bsd-3-clause
3ec333d8fc1ad7136b4324476001ed2279977356
aapa/pyfibot,lepinkainen/pyfibot,aapa/pyfibot,lepinkainen/pyfibot
pyfibot/util/twitter_application_auth.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\n\nclass BasePage:\n\n def __init__(self, data):\n self.data = data\n\n @classmethod\n def from_file(cls, path):\n with open(path) as f:\n raw = f.read()\n return cls(raw)\n\n @c...
python
edit
1
2
mit
5b91e6ce3b66721df9943f996368e7d977a1e1c9
kickoffai/footparse,kickoffai/footparse
footparse/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom .. import items\n\nclass DatasetSpider(CrawlSpider):\n\n pages = 9466\n ...
python
edit
1
1
mit
0313743781fd046a587936545f030938beb71364
MaxLikelihood/CODE
dataset/dataset/spiders/dataset_spider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = \"0.7.7\"\n\nimport os\n\nfrom django.core.exceptions import ImproperlyConfigured\n\n# load plugins\nfrom django.conf import settings\ntry:\n plugins_config = getattr(settings, \"FASTAPP_PLUGINS_CONFIG\", {})\n plugins =...
python
edit
3
2
mit
e24098fed631473671849ec920ebb88345b146bc
sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp
fastapp/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom openerp import fields, models\n\nclass Session(models.Model):\n _name = 'openacademy.session'\n\n name = fields.Char(required=True)\n start_date = fields.Date()\n duration = fields.Float(digits=(6...
python
edit
1
0
apache-2.0
657d5b1a79811df660857b7488895143fd4106fc
jorgescalona/openacademy-project
openacademy/model/openacademy_session.py
rejected_duplicate
Near-duplicate of sample 5562
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
1
apache-2.0
51de7814ed881a7974f972aafc391584d0c2c517
openstack/kuryr,celebdor/kuryr-libnetwork,celebdor/kuryr-libnetwork,celebdor/kuryr,celebdor/kuryr,celebdor/kuryr-libnetwork,openstack/kuryr
kuryr/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom txircd.modbase import Mode\n\nclass SecretMode(Mode):\n\tdef listOutput(self, command, data):\n\t\tif command != \"LIST\":\n\t\t\treturn data\n\t\tcdata = data[\"cdata\"]\n\t\tif \"s\" in cdata[\"channel\"].mode and cdata[\"channel\"]....
python
edit
1
6
bsd-3-clause
46cd1dad595aeba0e238a88de9485b1bcbfdab57
Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd
txircd/modules/cmode_s.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBioconda Utilities Package\n\n.. rubric:: Subpackages\n\n.. autosummary::\n :toctree:\n\n bioconda_utils.bot\n bioconda_utils.lint\n\n.. rubric:: Submodules\n\n.. autosummary::\n :toctree:\n\n aiopipe\n bioconductor_skel...
python
edit
1
0
mit
ab8af0f34c468103a092f2c9d751c6c51c5522f1
bioconda/bioconda-utils,bioconda/bioconda-utils,bioconda/bioconda-utils
bioconda_utils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Tviit\n\nadmin.site.register(Tviit)\n```\n\nApply this change: Add uuid to be readable in Admin-panel" }, { "role": "assistant", "content": "from django.contrib import admin\...
python
edit
1
0
mit
3c0ce6a3e4e16ff3991a838009c42efa2f5b237d
DeWaster/Tviserrys,DeWaster/Tviserrys
tviit/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import OsmFixtureTest\n\n\nclass FixNullNetwork(OsmFixtureTest):\n def test_routes_with_no_network(self):\n # ref=\"N 4\", route=road, but no network=*\n # so we should get something that has no network, but a shield...
python
edit
1
1
mit
d7bce814c10ce13cf4c228fd87dcbdee75f8d0a1
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/1211-fix-null-network.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bonobo.execution.base import LoopingExecutionContext, recoverable\n\n\nclass PluginExecutionContext(LoopingExecutionContext):\n PERIOD = 0.5\n\n def __init__(self, wrapped, parent):\n # Instanciate plugin. This is not yet ...
python
edit
1
2
apache-2.0
575462ca4cf9f5345939026ce5571bdc7e8277ad
hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,python-bonobo/bonobo,python-bonobo/bonobo,hartym/bonobo
bonobo/execution/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef detselect(detector_object, suffix=\"_stats_total1\"):\n \"\"\"Switch the active detector and set some internal state\"\"\"\n gs.DETS =[detector_object]\n gs.PLOT_Y = detector_object.name + suffix\n gs.TABLE_COLS = [gs.PLOT...
python
edit
22
4
bsd-2-clause
e3d1c8bbf238516d7a10e03aea0fbd378c4a4f6f
NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd
profile_collection/startup/99-bluesky.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom game import Game\n\nclass BowlingGameTest(unittest.TestCase):\n\n def setUp(self):\n self.g = Game()\n\n def tearDown(self):\n self.g = None\n\n def _roll_many(self, n, pins):\n \"Roll 'n'...
python
edit
1
2
mit
c64d35346ed8d7ae5b08bc8d5eb37f0c827da9f4
JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge
jesusmtnez/python/kata/tests/test_game.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# /setup.py\n#\n# Installation and setup script for parse-shebang\n#\n# See /LICENCE.md for Copyright information\n\"\"\"Installation and setup script for parse-shebang.\"\"\"\n\nfrom setuptools import find_packages, setup\n\nsetup(name=\"p...
python
edit
1
0
mit
d0ba20520b69bf561ef71255c526b34c5fd0d2be
polysquare/python-parse-shebang
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom dreambeam import __version__\n\nsetup(name='dreamBeam',\n version=__version__,\n description='Measurement equation framework for radio interferometry.',\n ...
python
edit
1
0
isc
691e25dbc258d94a80a729924d76aa10a693c08e
2baOrNot2ba/dreamBeam,2baOrNot2ba/dreamBeam
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.\n Fit MGE models, and Generate initial conditions for N body simulations\n See Monnet et al. 1...
python
edit
1
0
bsd-3-clause
e78b832fe1ce10a682be836c0752c0674087b5c4
emsellem/pygme
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='pyretry',\n version=\"0.9\",\n description='Separate your retry logic from your business logic',\n author='Bob Renwick',\n author_email='<EMAIL>',\n url='https://github.com/...
python
edit
1
0
mit
08347214e93d9cfe9ad53a528aea3428afeb49a0
bobbyrenwick/pyretry
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Package setup configuration.\n\nTo Install package, run:\n >>> python setup.py install\n\nTo install package with a symlink, so that changes to the source files will be immediately available, run:\n >>> python setup.py develop\n...
python
edit
1
0
mit
29fb910695eef3b5d10ffbb914b2d605ae7bf4e2
nicolasbessou/mutabletuple
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"setup.py for get_user_headers\"\"\"\n\n__author__ = \"Stephan Sokolow (deitarion/SSokolow)\"\n__license__ = \"MIT\"\n\nimport sys\n\nif __name__ == '__main__' and 'flake8' not in sys.modules:\n # FIXME: Why d...
python
edit
1
0
mit
c22873e2f213ff81e9bd44b37aeb9d66418c5b90
ssokolow/get_user_headers
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport base64\nimport json\nimport Queue\nimport time\nimport logging\n\nfrom boto import sns\nfrom boto import sqs\nfrom boto.sqs.message import Message, RawMessage\n\nfrom nanomon.utils import yaml_includes\nfrom nanomon.message import Na...
python
edit
11
4
bsd-2-clause
259dab25fb2aceb3b5fa229eb41d3eacf8f1c71c
cloudtools/nymms
nanomon/scheduler/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom nodeconductor.cost_tracking import CostTrackingBackend\nfrom nodeconductor.cost_tracking.models import DefaultPriceListItem\n\nfrom .models import SharepointTenant\n\n\nclas...
python
edit
1
2
mit
dced68096d5c84c831866cf92e7430df6cf5f477
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/sharepoint/cost_tracking.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.rst')).read()\nexcept IOError:\n README = ''\n\nversion = \"0.0.1\"\n\ns...
python
edit
3
0
mit
9f744a84300bf9f7d88db952863005b4765528fd
TurboGears/backlash,TurboGears/backlash
setup.py
rejected_duplicate
Near-duplicate of sample 11085
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom setuptools.command.test import test as TestCommand\nfrom setuptools import setup\n\nfrom hbite import VERSION as version\n\n\nclass Tox(TestCommand):\n def finalize_options(self):\n TestCommand...
python
edit
1
1
apache-2.0
aba7dce93a4e13bba9b6fed6b31bf2d370fd54bc
ravwojdyla/hbite,ravwojdyla/hbite
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ninstall_requires = [\n 'dill==0.2.5',\n 'easydict==1.6',\n 'h5py==2.6.0',\n 'jsonpickle==0.9.3',\n 'Keras==1.2.0',\n 'nflgame==1.2.20',\n 'numpy==1.11.2',\n 'pandas==0...
python
edit
1
0
mit
cca830c874741df7456449a6901d367a48d79392
kahnjw/wincast
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst'), \"r\") as readme_file:\n readme = readme_file.read()\n\nsetup(\n name = \"outpan\",\n version = \"0....
python
edit
1
0
mit
fe9a7c9bb597460062fdf9987b98a3a085b2ad48
bertrandvidal/outpan_api
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n$py_copyright\n\ndef _main():\n print(\"Hello from $project_name\")\n\nif __name__ == \"__main__\":\n _main()\n\n```\n\nApply this change: Add shebang and future import" }, { "role": "assistant", "content": "#!/usr/bin/env...
python
edit
null
null
mit
eb22e8931b9ffe9c82b52451a7c17943ea43625d
rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates,rcook/ptool-templates
python-tool/script/project.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\n\nsetup(\n name='django-longform',\n version='0.1.1',\n description='A Django application for longform blogging.',\n author='Martey Dodoo',\n author_email='<EMAIL>',\n ...
python
edit
1
0
mit
134bcc0a0f1fefb7afbcef1e54dfa7c1581f9193
martey/django-longform
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n \nfrom setuptools import setup, find_packages\n \nimport materializecssform\n \nsetup(\n \n name='django-materializecss-form',\n \n version=materializecssform.__version__,\n \n packa...
python
edit
1
0
mit
38349308a5848883a58257c080f3563c806c3db0
florent1933/django-materializecss-form,florent1933/django-materializecss-form
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(\n name = 'dp2ppgen',\n packages = ['dp2ppgen'], # this must be the same as the name above\n version = '0.1',\n description = 'Translates pgdp.org formatted text files into ppgen syntax.',\n auth...
python
edit
1
0
mit
ba9c55206b814d580965fb305c23fdb01c99af7d
davem2/dp2ppgen
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='Matador',\n version='0.0.1',\n author='Owen Campbell',\n author_email='<EMAIL>',\n entry_points={\n 'console_scripts': [\n 'matador = core.manage...
python
edit
1
0
mit
e118e493122726239c0f610b5da1c2b9c0765cdb
Empiria/matador
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python \n# -*- coding: utf-8 -*- \n#\n#\n# Copyright 2012 ShopWiki\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 ...
python
edit
1
0
apache-2.0
d7688948f05366e278f67d72646a05f7985d4cfa
patricklaw/clortho
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom locust import HttpUser, TaskSet, task, between\n\n\nclass WebsiteUser(HttpUser):\n \"\"\"\n Example of the ability of inline nested TaskSet classes\n \"\"\"\n host = \"http://127.0.0.1:8089\"\n wait_time = between(2, 5)\...
python
edit
1
1
mit
35514dcb70ed5ede39299802e82fa352188f3546
mbeacom/locust,locustio/locust,mbeacom/locust,locustio/locust,mbeacom/locust,mbeacom/locust,locustio/locust,locustio/locust
examples/nested_inline_tasksets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom google.cloud import storage\nfrom invoke import task\nimport os\n\nBUCKET_NAME = 'lekcije'\n\n\n@task\ndef backup_mysql(ctx):\n mysqldump = os.getenv('MYSQLDUMP')\n if not mysqldump:\n mysqldump = './bin/m...
python
edit
1
3
mit
f7982e2194c096d0020426a02543fea70c69dce7
oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije,oinume/lekcije
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utils module.\"\"\"\n\nfrom inspect import isclass\n\nfrom .errors import Error\n\n\ndef is_provider(instance):\n \"\"\"Check if instance is provider instance.\"\"\"\n return (not isclass(instance) and\n hasattr(insta...
python
edit
1
2
bsd-3-clause
e817f726c20ccf40cd43d4e6cf36235187a27c20
rmk135/dependency_injector,ets-labs/dependency_injector,ets-labs/python-dependency-injector,rmk135/objects
objects/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Mirantis Inc.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Lice...
python
edit
3
1
apache-2.0
2e6823676dace8b3219aeeef69ab04a2a0dd533a
steveb/heat,pratikmallya/heat,openstack/heat,gonzolino/heat,dragorosson/heat,dims/heat,steveb/heat,cwolferh/heat-scratch,openstack/heat,takeshineshiro/heat,dragorosson/heat,noironetworks/heat,noironetworks/heat,cwolferh/heat-scratch,jasondunsmore/heat,jasondunsmore/heat,maestro-hybrid-cloud/heat,dims/heat,maestro-hybri...
rally-scenarios/plugins/sample_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\n\nprint('\\nKNN\\n---')\nd = {'X1': [ 0, 2, 0, 0, -1, 1 ],\n 'X2': [ 3, 0, 1, 1, 0, 1 ],\n 'X3': [ 0, 0, 3, 2, 1, 1 ],\n 'Y': ['R', 'R', 'R', 'G', 'G', 'R']}\ndf = pd.DataFrame(...
python
edit
1
0
apache-2.0
879b15779c921445ca4412d5e63319408d8e32bf
pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff
python/islp/02statlearn-ex.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom karabo_data.geometry2 import AGIPD_1MGeometry\n\ndef test_snap_assemble_data():\n geom = AGIPD_1MGeometry.from_quad_positions(quad_pos=[\n (-525, 625),\n (-550, -10),\n (520, -160),\n ...
python
edit
1
1
bsd-3-clause
8eed621a15dafc8b0965c59b8da2296f8193d0ca
European-XFEL/h5tools-py
karabo_data/tests/test_agipd_geometry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urlparse\n\nimport requests\n\n\ndef purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):\n session = requests.session()\n headers = {\"X-Fastly-Key\": api_key, \"Accept\": \"application/json\"}\n\n all_tags =...
python
edit
1
6
bsd-3-clause
893540d492b731b93a31f3c5158c99f4db9fc3e4
pydotorg/pypi,pydotorg/pypi,pydotorg/pypi,pydotorg/pypi
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport json\nimport sys\n\nPREFIXES = [\n [\"FAIL\", \"PASS\"],\n [\"EXPECTED FAIL\", \"UNEXPECTED PASS\"],\n]\n\n\ndef parse_expected_failures():\n expected_failures = set()\n with open(\"expected-fail...
python
edit
1
6
isc
fff22f9305fd73f464a6ee9a66b676b66ef88cad
js-temporal/temporal-polyfill,js-temporal/temporal-polyfill,js-temporal/temporal-polyfill
test/parseResults.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport neo4j\nimport random\n\nfrom logbook import Logger\nlog = Logger('trinity.topics')\n\n\nDEFAULT_DEPTH = 5\nNUM_WALKS = 100\n# Passed sorted list (desc order), return top nodes\nTO_RETURN = lambda x: x[:10]\nrandom.seed()\n\ndef rando...
python
edit
3
7
mit
462656f9653ae43ea69080414735927b18e0debf
peplin/trinity
stats/random_walk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\n\nclass TemperatureWatch(object):\n thermostat_url = None\n alert_high = 80\n alert_low = 60\n _last_response = None\n\n def get_info(self):\n r = requests.get(self.thermostat_url + '/ts...
python
edit
1
4
bsd-3-clause
1a1aab7c0a107b2a02d08f13c40c515ff265b60b
adamfast/tempwatcher
tempwatcher/watch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom .utils import dom_contains, wait_for\n\n\nclass ContentTestMixin:\n\n # Assert that the DOM contains the given text\n def should_see_immediately(self, text):\n ...
python
edit
1
1
bsd-3-clause
628ab56107783841d1e64b11c4b82eac4806c019
nimbis/django-selenium-testcase,nimbis/django-selenium-testcase
selenium_testcase/testcases/content.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n pyfire.logger\n ~~~~~~~~~~~~~\n\n Use pocoo's logbook or a simple no-op fallback\n\n :copyright: (c) 2011 by the pyfire Team, see AUTHORS for more details.\n :license: BSD, see LICENSE for mo...
python
edit
1
4
bsd-3-clause
8af483f6bfd0576f694b6693deacbf25a782fe5a
IgnitedAndExploded/pyfire,IgnitedAndExploded/pyfire
pyfire/logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport socket\nimport boto\n\nLOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s'\nLOG_DATE = '%Y-%m-%d %I:%M:%S %p'\n\n\nlogging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN)\nlogger = log...
python
edit
1
4
mit
e23dd39880dc849a56d5376dca318f8bcb2cd998
totem/yoda-discover
discover/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Time series transformation and classification module for Python.\n\npyts is a Python package for time series transformation and classification.\nIt aims to make time series classification easily accessible by providing\npreprocessing ...
python
edit
10
0
bsd-3-clause
616d33e1c69af979163231ef8e9ca9a1f6c7bdf2
johannfaouzi/pyts
pyts/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom tinycontent.models import TinyContent, TinyContentFileUpload\n\n\nclass TinyContentAdmin(admin.ModelAdmin):\n list_display = ('name', )\n search_fields = ('name', 'content', )\n\nadmin.site.regis...
python
edit
1
0
bsd-3-clause
e59f8e72996b036b7c2df8f6b1054f82d730bdf8
ad-m/django-tinycontent,dominicrodger/django-tinycontent,watchdogpolska/django-tinycontent,dominicrodger/django-tinycontent,ad-m/django-tinycontent,watchdogpolska/django-tinycontent
tinycontent/admin.py
accepted
null
true