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\n\n# A special triplet is defined as: a <= b <= c for\n# a in list_a, b in list_b, and c in list_c\ndef get_num_special_triplets(list_a, list_b, list_c):\n num_special_triplets = 0\n\n for b in list_b:\n len_a_candidates = len...
python
edit
1
3
mit
0af3f7ddd1912d18d502ca1795c596397d9cd495
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/triple-sum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\n\"\"\" Order 2: Login system by https\n\n```\ncurl -k https://192.168.105.88/axapi/v3/auth -H \"Content-type:application/json\" -d '{\n \"credentials\": {\n \"username\": \"admin\", \n \"pass...
python
edit
1
1
mit
ffadde617db8ac3d0d5362b4a521dd4e9839710f
flyingSprite/spinelle
order/order_2_login_system_by_https.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 Boundary, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#...
python
edit
3
2
apache-2.0
9384f76d4ecfe2a822747020ba20771019105aaa
boundary/boundary-plugin-shell,boundary/boundary-plugin-shell,jdgwartney/boundary-plugin-shell,jdgwartney/boundary-plugin-shell
metric_thread.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator, MaxValueValidator\nfrom django.db import models\nfrom netaddr import AddrFormatError, EUI, mac_unix_expanded\n\n\nclass ASNField(model...
python
edit
3
3
apache-2.0
740cc8b601eb2cd24bcabef59db9a38d2efde70f
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
netbox/dcim/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, patterns\n\nfrom newswall.feeds import StoryFeed\nfrom newswall import views\n\n\nurlpatterns = patterns(\n '',\n url(r'^feed/$', StoryFeed()),\n url(r'^$',\n views.ArchiveIndexView.as_view(...
python
edit
1
0
bsd-3-clause
15e3bd894190ee745fab4534f7bbe14772d17ac1
registerguard/django-newswall,registerguard/django-newswall
newswall/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name = \"ironic-discoverd\",\n version = \"0.2.0\",\n description = \"Simple hardware discovery for OpenStack Ironic\",\n author = \"Dmitry Tantsur\",\n author_email = \"<EMAIL>\",\n...
python
edit
1
0
apache-2.0
bda028a2c5905ee42a07741c111ce1acc4ed433d
rdo-management/ironic-discoverd,openstack/ironic-inspector,openstack/ironic-inspector,rdo-management/ironic-discoverd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#pylint: disable=C0111,R0903\n\n\"\"\"Enable/disable automatic screen locking.\n\nRequires the following executables:\n * xdg-screensaver\n * notify-send\n\"\"\"\n\nimport bumblebee.input\nimport bumblebee.output\nimport bumblebee.eng...
python
edit
1
3
mit
c05fc3ae4d6ac0ed459150acf2c19fd892c2ea9f
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/modules/caffeine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=\"punk\",\n\n version=\"1.0.1\",\n\n description=\"Primitives for Uncovering New Knowledge.\",\n long_description=\"Machine Learning pipeline elements.\",\n\n url...
python
edit
1
0
mit
b6c6d2fc69560a5dbab33fd24d61ecaf827710f9
NewKnowledge/punk,NewKnowledge/punk
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom genes.process.commands import get_env_run\nfrom .traits import only_posix\n\nrun = get_env_run()\n\n\n@only_posix()\ndef chmod(*args):\n # FIXME: this is ugly, name the args\n run(['chmod'] + list(*args))\n\n```\n\nApply this cha...
python
edit
1
1
mit
7e448e9267c375195f3fcd5c80ed9e602cce0c91
hatchery/genepool,hatchery/Genepool2
genes/posix/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .Averager import Averager\nfrom .Config import Config\nfrom .RateTicker import RateTicker\nfrom .Ring import Ring\nfrom .SortedList import SortedList\nfrom .String import string2time, time2string\nfrom .Timer import Timer\nfrom .UserIn...
python
edit
14
0
mit
3ee7d716f0eb3202ccf7ca213747eb903f9bb471
vmlaker/coils
__init__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\n\ndef get_version():\n \"\"\"\n Get the version from version module without importing more than\n necessary.\n \"\"\"\n version_module_path = os.path.join(os.path.dirname(__file__)...
python
edit
1
1
apache-2.0
55ca47133f1cae601daf76484a12f13168083f18
ScatterHQ/eliot,iffy/eliot,ScatterHQ/eliot,ScatterHQ/eliot,ClusterHQ/eliot
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import exists, join\nimport shutil\nimport tempfile\nimport time\n\nfrom lwr.managers.queued import QueueManager\nfrom lwr.managers.stateful import StatefulManagerProxy\nfrom lwr.tools.authorization import get_authorizer\nfrom ...
python
edit
1
3
apache-2.0
776c3b0df6136606b8b7474418fd5d078457bd0a
jmchilton/lwr,natefoo/pulsar,natefoo/pulsar,jmchilton/pulsar,galaxyproject/pulsar,jmchilton/pulsar,ssorgatem/pulsar,galaxyproject/pulsar,ssorgatem/pulsar,jmchilton/lwr
test/persistence_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nclass CheckDigitNumber:\n\n def __init__ (self, number...
python
edit
1
3
bsd-3-clause
aaaaa3a143c370f387edf42ebd6b22c924845afa
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/luhn/check_digit_number.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\"\"\"Shared fixtures for :mod:`pytest`.\"\"\"\n\nfrom __future__ import print_function, absolute_import\n\nimport os\n\nimport pytest # noqa\n\nimport gryaml\nfrom py2neo_compat import py2...
python
edit
1
4
mit
00b5599e574740680e6c08884510ad605294fad2
wcooley/python-gryaml
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# Code Fights Circle of Numbers Problem\n\n\ndef circleOfNumbers(n, firstNumber):\n pass\n\n\ndef main():\n tests = [\n [\"crazy\", \"dsbaz\"],\n [\"z\", \"a\"]\n ]\n\n for t in tests:\n ...
python
edit
1
3
mit
a715821c75521e25172805c98d204fc4e24a4641
HKuz/Test_Code
CodeFights/circleOfNumbers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom pybib import __version__\n\nsetup(name='pybib',\n version=__version__,\n description='Fetch citation information, given a Digital Object Identifier',\n long_description=open('README.rst')....
python
edit
1
0
bsd-3-clause
f5b0203b5651f25246b79896da2c002b8ddad4d6
jgilchrist/pybib
setup.py
rejected_duplicate
Near-duplicate of sample 1294
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nimport proxyprefix\n\n\nsetup(\n name='proxyprefix',\n version=proxyprefix.__version__,\n description='Prefix SCRIPT_NAME with X-Forwarded-Prefix header',\n long_description=proxyprefix.__doc__,\n...
python
edit
1
0
mit
6e0dd9111083258023758fbec2d597d898603ba4
yola/proxyprefix
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass CounterShard(models.Model):\n count = models.PositiveIntegerField()\n\n```\n\nApply this change: Patch update_contenttypes so that it's less likely to fail due to eventual consistency" }, { "...
python
edit
2
0
bsd-3-clause
cc3ab3af17e30e7dd9991d68f01eaa4535b64e6b
nealedj/djangae,martinogden/djangae,grzes/djangae,stucox/djangae,asendecka/djangae,trik/djangae,trik/djangae,wangjun/djangae,armirusco/djangae,b-cannon/my_djae,jscissr/djangae,grzes/djangae,wangjun/djangae,chargrizzle/djangae,chargrizzle/djangae,leekchan/djangae,kirberich/djangae,martinogden/djangae,pablorecio/djangae,...
djangae/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\nimport pytest\n\nfrom scrapi import settings\nsettings.DEBUG = True\nsettings.CELERY_ALWAYS_EAGER = True\nsettings.CELERY_EAGER_PROPAGATES_EXCEPTIONS = True\n\n\n@pytest.fixture(autouse=True)\ndef harvester(monkeypatch):\n i...
python
edit
1
3
apache-2.0
9aeece4a5e3e7e987a709a128509cc0d8dc11e9d
icereval/scrapi,alexgarciac/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,fabianvf/scrapi,felliott/scrapi,ostwald/scrapi,fabianvf/scrapi,felliott/scrapi,mehanig/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom menpofit.result import (\n ParametricAlgorithmResult, MultiFitterResult, SerializableIterativeResult)\n\n\n# TODO: document me!\n# TODO: handle costs\nclass AAMAlgorithmResult(ParametricAlgorithmResu...
python
edit
3
2
bsd-3-clause
71b917eabce9b520d8f7568d1825fa451ea2b8fb
yuxiang-zhou/menpofit,grigorisg9gr/menpofit,grigorisg9gr/menpofit,yuxiang-zhou/menpofit
menpofit/aam/result.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext as _\nfrom Django.contrib.auth.models import User\n\nFEMALE = 'F'\nMALE = 'M'\n\n\nclass Teacher(models.Model):\n \"\"\"\n halaqat teachers informations\n ...
python
edit
1
1
mit
4b34f2afa13ef880b9832bc725c5f1b6ede4dc0e
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
back_office/models.py
rejected_duplicate
Near-duplicate of sample 1975
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nimport stadtgedaechtnis_backend.admin\nimport settings\nfrom thread import start_new_thread\n\njs_info_dict = {\n 'packages': ('stadtgedaechtnis_backend',),\n}\n\nurlpatterns = patte...
python
edit
1
2
mit
217829993e108fb4f5c17ae2bbc80151418cf733
fraunhoferfokus/mobile-city-memory,fraunhoferfokus/mobile-city-memory,jessepeng/coburg-city-memory,jessepeng/coburg-city-memory
Mobiles_Stadtgedaechtnis/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom invoke import ctask as task\n\n\n@task\ndef test(ctx, module=None, runner='spec'):\n \"\"\"\n Run a Spec or Nose-powered internal test suite.\n\n Say ``--module=foo``/``-m foo`` to just run ``tests/foo.py``.\n\n Defaults to...
python
edit
1
2
bsd-2-clause
9cefd4d933590dcea28cf221e6c5706c81cac882
mrjmad/invocations,singingwolfboy/invocations,pyinvoke/invocations,alex/invocations
invocations/testing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Always prefer setuptools over distutils\nfrom setuptools import setup, find_packages\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long descriptio...
python
edit
3
0
mit
dc7153da6ee0bad749f24fdd93fec5aeb66596a5
xandr2/blynkapi
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Settings file to allow parsing API documentation of Django modules,\n# and provide defaults to use in the documentation.\n#\n# This file is placed in a subdirectory,\n# so the docs root won't be detected by find_packages()\n\n# Display sa...
python
edit
1
0
apache-2.0
36da7bdc8402494b5ef3588289739e1696ad6002
django-fluent/django-fluent-contents,ixc/django-fluent-contents,pombredanne/django-fluent-contents,django-fluent/django-fluent-contents,ixc/django-fluent-contents,pombredanne/django-fluent-contents,jpotterm/django-fluent-contents,edoburu/django-fluent-contents,edoburu/django-fluent-contents,jpotterm/django-fluent-conte...
docs/_ext/djangodummy/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\ndef register(cls, admin_cls):\n cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True))\n\n\n```\n\nApply this change: Add a get prepared date method\n\nChild page...
python
edit
1
2
bsd-2-clause
55d22f95301c4c96c42e30fa037df5bc957dc7b4
incuna/incuna-feincms,incuna/incuna-feincms,incuna/incuna-feincms
incunafein/module/page/extensions/prepared_date.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.views.generic.detail import DetailView\nfrom django.views.generic.list import ListView\n\nfrom .models import Contribution\nfrom .views import ContributionCreate, ContributionDelete, C...
python
edit
1
0
apache-2.0
1fbb79762c7e8342e840f0c1bc95c99fd981b81d
DANS-KNAW/dariah-contribute,DANS-KNAW/dariah-contribute
dariah_contributions/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom Cython.Build import cythonize\n\nsetup(\n name='python-wallpaper',\n version='0.2.1',\n url='https://github.com/ondergetekende/python-wallpaper',\n description=(\n 'python...
python
edit
1
0
mit
6d8616ff6d163716366e506d5a7c50a5466987bf
ondergetekende/python-panavatar
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example of phase vocoder based time stretch and pitch shift capabilities" }, { "role": "assistant", "content": "import zounds\nfrom zounds.spectral import time_stretch, pitch_shift\nfrom zounds.ui import AppSettings\nimpor...
python
new_file
1
0
mit
26353ac1c70c1bf47d6f33a0ab8880ec0fb1a002
JohnVinyard/zounds,JohnVinyard/zounds,JohnVinyard/zounds,JohnVinyard/zounds
examples/effects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport numpy\nfrom distutils.extension import Extension\n\nTIMEROOT = os.path.relpath(os.path.dirname(__file__))\n\n\ndef get_extensions():\n time_ext = Extension(\n name=\"astropy.time.sofa_time\",\n sources=[os.path.jo...
python
edit
1
1
bsd-3-clause
afb195b1ca647d776f29fbc1d68a495190caec59
kelle/astropy,AustereCuriosity/astropy,joergdietrich/astropy,stargaser/astropy,astropy/astropy,bsipocz/astropy,bsipocz/astropy,kelle/astropy,larrybradley/astropy,StuartLittlefair/astropy,DougBurke/astropy,mhvk/astropy,stargaser/astropy,aleksandr-bakanov/astropy,tbabej/astropy,dhomeier/astropy,lpsinger/astropy,DougBurke...
astropy/time/setup_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: UTF-8 -*-\nfrom setuptools import setup, find_packages\nimport os\n\ntry:\n import pypandoc\n README = pypandoc.convert('README.md', 'rst')\nexcept (IOError, ImportError):\n README = ''\n\nsetup(name='...
python
edit
3
0
bsd-3-clause
c1edd4d1a9ba3ef57ea3524013efdb4faa51fc94
ilogue/niprov,ilogue/niprov,ilogue/niprov,ilogue/niprov
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"BMI Live clinic\"\"\"\nimport os\n\n\npkg_directory = os.path.dirname(__file__)\ndata_directory = os.path.join(pkg_directory, 'data')\n\n```\n\nApply this change: Include classes in package definition" }, { "role": "assistant"...
python
edit
1
0
mit
6a1d9a327ebf64acba9bd02330bfa047e8137337
csdms/bmi-live,csdms/bmi-live
bmi_live/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .view import View\n\n\nclass HistoryIndexView(View):\n pass\n\n```\n\nApply this change: Add mandatory methods to HistoryIndexView (refactor when working)" }, { "role": "assistant", "content": "from .view import View\n\n...
python
edit
5
2
apache-2.0
4dd86439d4c8393ac9c3bb6b958a1c8cb45b243a
PressLabs/gitfs,ksmaheshkumar/gitfs,rowhit/gitfs,PressLabs/gitfs,bussiere/gitfs
gitfs/views/history_index.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"__init__.py: Language-dependent features.\n\"\"\"\n\nmodule_cache = {}\n\ndef get_language(lang_code):\n \"\"\"Return module with language localizations.\n\n This is a poor copy of the language framework...
python
edit
1
3
mit
6727bb98c91f1185042d08f3ff2a4c5ef625cae4
showa-yojyo/bin,showa-yojyo/bin
mjstat/languages/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport yaml\nfrom gitcd.Config.Parser import Parser\nfrom gitcd.Config.DefaultsPersonal import DefaultsPersonal\n\n\nclass FilePersonal:\n\n loaded = False\n filename = \".gitcd-personal\"\n parser = Parser()\n defaults = Def...
python
edit
3
3
apache-2.0
92595871f908aa22d353a2490f851da23f3d1f64
claudio-walser/gitcd,claudio-walser/gitcd
gitcd/Config/FilePersonal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport argparse\nfrom akaudit.audit import Auditer\n\ndef main(argv = sys.argv, log = sys.stderr):\n\tparser = argparse.ArgumentParser(description='Audit who has access to your homes.', formatter_class=a...
python
edit
1
1
apache-2.0
3faf3a9debc0fad175ca032f3eb0880defbd0cdb
flaccid/akaudit
akaudit/clidriver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2014 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\n\"\"...
python
edit
1
4
apache-2.0
08461a2f61b5a5981a6da9f6ef91a362eed92bfd
lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft
pycroft/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom client.sources.common import importing\nfrom client.sources.doctest import models\nimport logging\nimport os\n\nlog = logging.getLogger(__name__)\n\ndef load(file, name, args):\n \"\"\"Loads doctests from a specified filepath.\n\n ...
python
edit
1
5
apache-2.0
a2aa2ea452c7fb2f3a83a13f000a51223cb3d13f
jackzhao-mj/ok-client,Cal-CS-61A-Staff/ok-client,jathak/ok-client
client/sources/doctest/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.management.base import NoArgsCommand, CommandError\n\nfrom allaccess.models import Provider \n\n\nclass Command(NoArgsCommand):\n \"Convert existing providers from django-social...
python
edit
1
9
bsd-2-clause
e5656674eab83f7005c70d901187fd89027efeba
iXioN/django-all-access,vyscond/django-all-access,dpoirier/django-all-access,dpoirier/django-all-access,mlavin/django-all-access,iXioN/django-all-access,vyscond/django-all-access,mlavin/django-all-access
allaccess/management/commands/migrate_social_providers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\r\n\r\n\r\nclass Config(object):\r\n BASE_URL = \"https://ws.pagseguro.uol.com.br\"\r\n VERSION = \"/v2/\"\r\n CHECKOUT_SUFFIX = VERSION + \"checkout\"\r\n NOTIFICATION_SUFFIX = VERSION + \"transactions/notificat...
python
edit
1
0
mit
e76bd7de6a0eb7f46e9e5ce3cdaec44943b848d2
vintasoftware/python-pagseguro,rochacbruno/python-pagseguro,rgcarrasqueira/python-pagseguro
pagseguro/configs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSYNTAX_BUILDABLE_EXPRESSIBLE_BY_CONFORMANCES = {\n 'ExpressibleByConditionElement': [\n 'ExpressibleByConditionElementList'\n ],\n 'ExpressibleByDeclBuildable': [\n 'ExpressibleByCodeBlockItem',\n 'ExpressibleB...
python
edit
1
0
apache-2.0
3cbc3b96d3f91c940c5d762ce08da9814c29b04d
roambotics/swift,glessard/swift,ahoppen/swift,roambotics/swift,apple/swift,roambotics/swift,gregomni/swift,ahoppen/swift,JGiola/swift,JGiola/swift,apple/swift,gregomni/swift,benlangmuir/swift,gregomni/swift,glessard/swift,atrick/swift,benlangmuir/swift,ahoppen/swift,atrick/swift,benlangmuir/swift,gregomni/swift,atrick/...
utils/gyb_syntax_support/protocolsMap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"bibpy module setup script for distribution.\"\"\"\n\nfrom __future__ import with_statement\n\nimport os\nimport distutils.core\n\n\ndef get_version(filename):\n with open(filename) as fh:\n for line in fh:\n if li...
python
edit
1
3
mit
4ae8302a3d91ca1e9601e0c51cb58a69f1c08cb5
MisanthropicBit/bibpy,MisanthropicBit/bibpy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flow import Flow\n\nfrom config import ORG_ID, CHANNEL_ID\n\nflow = Flow('botbotbot')\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot')\n retur...
python
edit
3
3
mit
60e92f0a085bf7f4cb9f326085e3d4aba11f3594
datamade/semabot,datamade/semabot
bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.template import Context, loader\nfrom stream_django.exceptions import MissingDataException\nimport logging\n\n\nlogger = logging.getLogger(__name__)\nregister = template.Library()\n\nLOG = 'warn'\nIG...
python
edit
1
5
bsd-3-clause
8c819a1cb9df54c00b7246a07e2ba832b763876d
GetStream/stream-django,GetStream/stream-django
stream_django/templatetags/activity_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom mapping.models import Location, Report\n\nclass LocationAdmin(admin.ModelAdmin):\n \n fieldsets = ((None,\n {'fields': (\n ('name', 'suburb'), \n ('x', 'y'), \n ...
python
edit
1
1
bsd-3-clause
f794c6ed1f6be231d79ac35759ad76270c3e14e0
crisisking/udbraaains,crisisking/udbraaains,crisisking/udbraaains,crisisking/udbraaains
brains/mapping/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2013 the BabelFish authors. All rights reserved.\n# Use of this source code is governed by the 3-clause BSD license\n# that can be found in the LICENSE file.\n#\n__title__ = 'babelfish'\n__version...
python
edit
23
0
bsd-3-clause
9d3d2beab6ec06ce13126b818029258a66f450f6
Diaoul/babelfish
babelfish/__init__.py
rejected_lint
Too many lint violations: 23
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nfrom distutils.core import setup\n\nsetup(\n\t# Basic package information.\n\tname = 'Zendesk',\n\tauthor = 'Max Gutman, Stefan Tjarks',\n\tversion = '1.1.1',\n\tauthor_email = '<EMAIL>',\n\tpackages = ['zendesk'],\n\ti...
python
edit
1
0
mit
ea0845828e267583847fa7d288f524289a5c9697
fprimex/zdesk,laythun/zdesk,fprimex/zdgen,blade2005/zdesk
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom monitoring.nagios.plugin.base import NagiosPlugin\nfrom monitoring.nagios.plugin.snmp import NagiosPluginSNMP\nfrom monitoring.nagios.plugin.secureshell import NagiosPluginSSH\nfrom monitoring.nagios.plugin.database import NagiosPlugin...
python
edit
8
0
mit
a910cd19890ef02a08aeb05c8ba450b2c59f0352
bigbrozer/monitoring.nagios,bigbrozer/monitoring.nagios
monitoring/nagios/plugin/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas\nfrom .processor import CTDChemicalDiseaseProcessor, \\\n CTDGeneDiseaseProcessor, CTDChemicalGeneProcessor\n\nbase_url = 'http://ctdbase.org/reports/'\n\nurls = {\n 'chemical_gene': base_url + 'CTD_chem_gene_ixns.tsv.gz...
python
edit
1
3
bsd-2-clause
49f332149ae8a9a3b5faf82bc20b46dfaeb0a3ad
sorgerlab/indra,bgyori/indra,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,bgyori/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra
indra/sources/ctd/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#\n# Copyright (c) 2016, Neil Booth\n#\n# All rights reserved.\n#\n# See the file \"LICENCE\" for information about the copyright\n# and warranty status of this software.\n\n'''Script to kick off the server.'''\n\nim...
python
edit
1
2
mit
0654d962918327e5143fb9250ad344de26e284eb
thelazier/electrumx,shsmith/electrumx,shsmith/electrumx,erasmospunk/electrumx,erasmospunk/electrumx,thelazier/electrumx
electrumx_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Campaign, InformationObject\n\n\ndef connect_info_object(sender, **kwargs):\n reference = kwargs.get('reference')\n if not reference:\n return\n if not reference.startswith('campaign:'):\n return\n...
python
edit
1
11
mit
94264880688f5e2f8dbf098108bb05c2c244048d
okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign
froide_campaign/listeners.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom selenium import webdriver\nfrom selenium.webdriver.chrome.options import Options\nfrom selenium.webdriver.common.keys import Keys\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom selenium.webdriver.support ...
python
edit
3
2
apache-2.0
90ca340883077f57ba63127db058a8d244ec6f4c
Graylog2/graylog-ansible-role
molecule/ui/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass TestVersion:\n def test_version_is_consistent(self):\n from .. import VERSION\n\n with open('README.rst') as f:\n readme = f.read().split('\\n')\n version_list = readme[3].split(':')[2].strip().s...
python
edit
1
2
mit
c264e4b19505bfb0ccebc1551c7b82e96b6a2882
veegee/amqpy,gst/amqpy
amqpy/tests/test_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = (0, 5, 6, 'final', 0)\n\ndef get_version():\n version = '%s.%s' % (VERSION[0], VERSION[1])\n if VERSION[2]:\n version = '%s.%s' % (version, VERSION[2])\n if VERSION[3:] == ('alpha', 0):\n version = '%s pre-a...
python
edit
1
4
bsd-3-clause
4a1c1361f154c3deb1d575b1e0c69acca7827b17
william-gr/dojango,william-gr/dojango,ricard33/dojango,ricard33/dojango,klipstein/dojango,ofirr/dojango,ofirr/dojango,klipstein/dojango,ricard33/dojango,william-gr/dojango,ofirr/dojango
dojango/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"go_contacts\",\n version=\"0.1.0a\",\n url='http://github.com/praekelt/go-contacts-api',\n license='BSD',\n description=\"A contacts and groups API for Vumi Go\",...
python
edit
1
0
bsd-3-clause
cfe724b3ddfc283d394885c8a6f1d410f204f87d
praekelt/go-contacts-api,praekelt/go-contacts-api
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n# Copyright Lajos Katona\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
2
apache-2.0
49367b2077c1ba6e09e10c05653d0dfc0164b1b7
elajkat/hugradexam,elajkat/hugradexam
programmingtheorems/python/theorem_of_summary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom pyramid.config import Configurator\nfrom sqlalchemy import engine_from_config\n\nfrom .models import DBSession, Base\n\n\ndef main(global_config, **settings):\n '''This function returns a Pyramid WSGI application.'''\n ...
python
edit
1
1
mit
8d8b122ecbb306bb53de4ee350104e7627e8b362
recombinators/snapsat,recombinators/snapsat,recombinators/snapsat
app/app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Work around leak in older pygobject\n\nWith older pygobject, any use of the default getter/setters\ngenerated by gobject.property() would leak. If we detect this\nis the case, monkey patch in the fixed version of the default\ngetters/setters...
python
new_file
1
2
bsd-2-clause
a0a98f374a66093ad3c35a2e185ac9b48d8b3f2d
alexey4petrov/reinteract,alexey4petrov/reinteract,alexey4petrov/reinteract
lib/reinteract/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Convert a rosbag file to legacy lidar binary format.\n\"\"\"\n\n\"\"\"LIDAR datatype format is:\n (\n timestamp (long),\n flag (bool saved as int),\n acceleromete...
python
edit
1
2
bsd-2-clause
21059428d95c27cf043ada2e299a4cf3982a4233
oliverlee/antlia
python/printbag.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef transform_scalars(dataset):\n \"\"\"Define this method for Python operators that\n transform the input array.\"\"\"\n from tomviz import utils\n import numpy as np\n import itk\n\n # Get the current volume as a numpy a...
python
edit
1
4
bsd-3-clause
c31c54624d7a46dfd9df96e32d2e07246868aecc
cjh1/tomviz,cryos/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,cjh1/tomviz,thewtex/tomviz,thewtex/tomviz,cryos/tomviz,mathturtle/tomviz,thewtex/tomviz,cjh1/tomviz,cryos/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
tomviz/python/DefaultITKTransform.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nHiveDB client access via SQLAlchemy\n\"\"\"\n\nimport sqlalchemy as sq\n\nmetadata = sq.MetaData()\n\nhive_primary = sq.Table(\n 'hive_primary_DIMENSION',\n metadata,\n sq.Column('id', sq.Integer,\n nullable=Fa...
python
edit
1
3
mit
a465922385ef12cf01f2a8a75928470c33f39569
tv42/snakepit,tv42/snakepit
snakepit/directory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tools for setting up a fake directory structure for processing.\"\"\"\n\nfrom tempfile import mkdtemp\nimport os\nimport shutil\nimport json\n\nfrom pkg_resources import resource_filename\n\n\ndef write_run_clone(proj, run, clone, gen...
python
edit
1
3
mit
4d7dff1c335a49d13d420f3c62b1a2d2382351dd
mpharrigan/trajprocess,mpharrigan/trajprocess
trajprocess/tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# py2deb: Python to Debian package converter.\n#\n# Authors:\n# - Arjan Verwer\n# - Peter Odding <<EMAIL>>\n# Last Change: March 18, 2015\n# URL: https://py2deb.readthedocs.org\n\n\"\"\"\nThe top level :py:mod:`py2deb` module contains onl...
python
edit
1
0
mit
b4995ae809995a4e530bacb8e8732caf1b10d7ee
paylogic/py2deb,paylogic/py2deb
py2deb/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom getpaid.backends import PaymentProcessorBase\n\nclass PaymentProcessor(PaymentProcessorBase):\n BACKEND = 'getpaid.backends.paymi...
python
edit
1
1
mit
5e6e784a5b54f4ac6d1e7841a46772e5aaac9c2d
anih/django-getpaid,glowka/django-getpaid,pawciobiel/django-getpaid,mionch/django-getpaid,dekoza/django-getpaid,dekoza/django-getpaid,mionch/django-getpaid,glowka/django-getpaid,nielsonsantana/django-getpaid,anih/django-getpaid,cypreess/django-getpaid,kamilglod/django-getpaid,pawciobiel/django-getpaid,cypreess/django-g...
getpaid/backends/paymill/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom spec import eq_\n\nfrom invoke import ctask, Collection\n\n\n@ctask\ndef collection(c):\n c.run('false') # Ensures a kaboom if mocking fails\n\n\nns = Collection(collection)\nns.configure({'run': {'echo': True}})\n\n```\n\nApply thi...
python
edit
3
1
bsd-2-clause
eba6e117c0a13b49219bb60e773f896b274b6601
singingwolfboy/invoke,kejbaly2/invoke,tyewang/invoke,frol/invoke,mattrobenolt/invoke,mkusz/invoke,pfmoore/invoke,mkusz/invoke,pyinvoke/invoke,kejbaly2/invoke,pfmoore/invoke,sophacles/invoke,frol/invoke,pyinvoke/invoke,mattrobenolt/invoke
tests/_support/configs/collection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2017-11-21 20:43\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('inv...
python
edit
1
0
mit
97438a877f443980a239c1e960aaf1aa0ddc0469
hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website
inventory/migrations/0002_auto_20171121_2043.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\n\n\n# URL to clone product_details JSON files from.\n# Include trailing slash.\nPROD_DETAILS_URL = 'http://svn.mozilla.org/libs/product-details/json/'\n\n# Target dir to drop JSON files into (must be writable)\nPR...
python
edit
1
0
bsd-3-clause
cdd6bc5258a21a1447c6313fad87056163b58a45
mozilla/django-product-details
product_details/settings_defaults.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy.orm import contains_eager, joinedload, subqueryload_all\n\nfrom zeus import auth\nfrom zeus.config import db\nfrom zeus.models import Author, Build, Email, Source, User\n\nfrom .base import Resource\nfrom ..schemas import Bu...
python
edit
1
3
apache-2.0
79a2671c32c558aeb429c590c255f3092dba7e0b
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
zeus/api/resources/user_builds.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Project Euler - Problem 1\nsum = 0\nfor i in xrange(1, 1001):\n if i % 3 == 0 or i % 5 == 0:\n sum = sum + i\n\nprint \"The sum is: {}\".format(sum)\n\n```\n\nApply this change: Clean up problem 1 solution a bit." }, { "...
python
edit
2
4
mit
eb763a7c7048b857d408825241ed3de6b68b88f6
gregmojonnier/ProjectEuler
1/sumofmultiplesof3and5.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.contrib.sitemaps import Sitemap\nfrom django.db.models import get_models\n\nfrom mezzanine.conf import settings\nfrom mezzanine.core.models import Displayable\nfrom mezzanine.utils.urls import home_slug\n\n\nblog_installed = \...
python
edit
1
4
bsd-2-clause
61251afc42b53f7e72b13ad0543c4740d61f092e
AlexHill/mezzanine,readevalprint/mezzanine,gradel/mezzanine,wyzex/mezzanine,wrwrwr/mezzanine,wyzex/mezzanine,webounty/mezzanine,christianwgd/mezzanine,nikolas/mezzanine,ryneeverett/mezzanine,tuxinhang1989/mezzanine,molokov/mezzanine,adrian-the-git/mezzanine,mush42/mezzanine,adrian-the-git/mezzanine,Cicero-Zhao/mezzanin...
mezzanine/core/sitemaps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.core.urlresolvers import reverse\nfrom whats_fresh_api.models import *\nfrom django.contrib.gis.db import models\nimport json\n\n\nclass ListProductTestCase(TestCase):\n fixtures = ['test_fix...
python
edit
8
4
apache-2.0
f127f0e9bb0b8778feafbdbc1fa68e79a923d639
osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api
whats_fresh/whats_fresh_api/tests/views/entry/test_list_products.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\" Production settings must be here. \"\n\nfrom .core import *\nfrom os import path as op\n\n\nSECRET_KEY = 'SecretKeyForSessionSigning'\nADMINS = frozenset([MAIL_USERNAME])\n\n# flask.ext.collect\n# -----------------\nCOLLECT_STATIC_ROOT =...
python
edit
4
0
bsd-3-clause
ca674b743b6d48593f45d999335ae893cf2a90d6
klen/Flask-Foundation,klen/fquest,klen/tweetchi
base/config/production.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cbagent.collectors.libstats.remotestats import RemoteStats, parallel_task\n\n\nclass TPStats(RemoteStats):\n\n METRICS = (\n (\"rss\", 1), # already in bytes\n )\n\n def __init__(self, hosts, workers, user, password)...
python
edit
1
5
apache-2.0
182cd3b73382bb150111198e5fcbfa43a6bd416f
pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner
cbagent/collectors/libstats/typeperfstats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .voice import (\n Voice,\n VoiceCountry,\n VoiceCountries,\n VoiceNumber,\n VoiceNumbers,\n)\n\nfrom .phone_numbers import (\n PhoneNumberCountries,\n PhoneNumberCountry,\n PhoneNumbers,\n)\n\n```\n\nApply this ...
python
edit
10
0
mit
fe676a041b793f55d33bfd27eb2b4fdfe7d93bb6
tysonholub/twilio-python,twilio/twilio-python
twilio/rest/resources/pricing/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2009 rPath, Inc.\n#\n# All Rights Reserved\n#\n\nfrom conary.lib import util\nfrom mint.rest.db import manager\n\nimport rpath_capsule_indexer\n\nclass CapsuleManager(manager.Manager):\n def getIndexerConfig(self):\n ...
python
edit
1
2
apache-2.0
c45fc698da9783b561cca69363ec4998622e9ac0
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
mint/rest/db/capsulemgr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport django\nfrom django.conf import settings\nfrom django.core.management import call_command\n\n\nsettings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
1
0
mit
48b1cfaadd7642706a576d8ba9bf38c297a2d873
PSU-OIT-ARC/django-perms,wylee/django-perms
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\n\nSELF_CLOSING_HTML_TAGS = getattr(settings,\n 'CONTENTIOUS_SELF_CLOSING_HTML_TAGS', ['img', 'br', 'hr', 'meta'])\n\n\n#Note, the Javascript plugin has its own seprate copy of this:\nTREAT_CONTENT_AS_H...
python
edit
1
0
bsd-2-clause
413ba364dc35a7186953d02bb7cc8cf705371873
potatolondon/contentious,potatolondon/contentious
contentious/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\nimport django\nfrom django.conf import settings\n\nif not settings.configured:\n settings.configure(\n AUTHENTICATION_BACKENDS=(\n 'django_authgroupex.auth.AuthGroupeXBackend',\n ...
python
edit
1
2
bsd-2-clause
4b485e601b4410561ee4b4a681e392f4d141a339
Polytechnique-org/django-authgroupex
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015 All rights reserved\n# This program and the accompanying materials\n# are made available under the terms of the Apache License, Version 2.0\n# which accompanies this distribution, and is available at\n#\n# http://www.ap...
python
edit
1
5
apache-2.0
aa7109d038a86f6a19a9fb4af96bd1199cd81330
opnfv/functest,mywulin/functest,opnfv/functest,mywulin/functest
functest/opnfv_tests/openstack/snaps/snaps_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Leetcode 222. Count Complete Tree Nodes\nMedium\n\nURL: https://leetcode.com/problems/count-complete-tree-nodes/\n\nGiven a complete binary tree, count the number of nodes.\n\nNote:\n\nDefinition of a complete binary tree from Wikiped...
python
edit
2
2
bsd-2-clause
ee6f71ba0e548fdb08a3f1b065cd081b2431caa6
bowen0701/algorithms_data_structures
lc0222_count_complete_tree_nodes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Script for updating a directory of repositories.\"\"\"\nimport logging\nimport os\n\nimport click\n\nfrom .actions import update_repo\n\n\n@click.command()\n@click.option('-d', '--debug', help='Set DEBUG level l...
python
edit
1
3
mit
40ece09df1d757af55a306e99d03f045fc23ac95
e4r7hbug/git_update
git_update/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Available Subsitutions:\n# ${executable}: Path to IHaskell kernel.\nc = get_config()\nexe = '${executable}'.replace(' ', '\\\\\\\\ ')\nc.KernelManager.kernel_cmd = [exe, 'kernel', '{connection_file}']\nc.Session.key = b''\nc.Session.ke...
python
edit
2
0
mit
159753e117f5c82838c478e007b1b72248561205
wyager/IHaskell,artuuge/IHaskell,kfiz/IHaskell,qzchenwl/IHaskell,aostiles/LiveHaskell,kfiz/IHaskell,FranklinChen/IHaskell,franklx/IHaskell,beni55/IHaskell,beni55/IHaskell,artuuge/IHaskell,wyager/IHaskell,aostiles/LiveHaskell,thomasjm/IHaskell,gibiansky/IHaskell,franklx/IHaskell,artuuge/IHaskell,thomasjm/IHaskell,thomas...
config/ipython_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom stacklogger import srcfile\n\nclass TestUtils(unittest.TestCase):\n \n def test_srcfile(self):\n self.assertTrue(srcfile(\"foo.py\").endswith(\"foo.py\"))\n self.assertTrue(srcfile(\"foo.pyc\").en...
python
edit
1
1
isc
4a84fe0c774638b7a00d37864b6d634200512f99
whilp/stacklogger
tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nmultiplication-table.py\nAuthor: <your name here>\nCredit: <list sources used, if any>\nAssignment:\n\nWrite and submit a Python program that prints a multiplication table. The user \nmust be able to determine the width and height o...
python
edit
1
0
mit
de40597b406b27c64077dc714b5890f83758d05d
HHS-IntroProgramming/Multiplication-table,HHS-IntroProgramming/Multiplication-table
multiplication-table.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######\n# Set the Version Stamp to actual time and date\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# Li...
python
edit
2
0
apache-2.0
25712b9c94062f41c50a8611c5b7069bde7e1c8f
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/cnx/VersionStamp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom oauth2_provider import views\n\nurlpatterns = (\n url(r'^authorize/$', views.AuthorizationView.as_view(\n template_name='accounts/authorize_client.html',\n ), name=\"authorize\"),\n url...
python
edit
1
0
apache-2.0
b11a0197bbecbbdb6e5f3c82285f6b749596947d
AudioCommons/ac-mediator,AudioCommons/ac-mediator,AudioCommons/ac-mediator
api/oauth2_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom sherry import app\n\n# Load debug config\napp.config.from_pyfile('../sherry.conf', silent=False)\n\napp.run(host='0.0.0.0', port=5000, debug=True)\n\n\n```\n\nApply this change: Make optional sherry.conf optional...
python
edit
1
0
bsd-2-clause
130acde92df3b0f9aad2f28b61f45e37531f44ac
PaulMcMillan/sherry,PaulMcMillan/sherry
runserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os\nimport os.path\nimport json\nimport re\nimport tabulate\n\n\ndef get_json_file():\n dir='/var/www/html'\n json_list = []\n for root, dirs, files in os.walk( dir ):\n for f in files:\n ...
python
edit
3
4
mit
680b8680f5d2dbc7ccb742cf09bf6f688afcbd96
andylytical/brewpi-scripts,andylytical/brewpi-scripts
parse_brewpi_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"ActiveMaster definition.\"\"\"\n\n\nfrom config_bootstrap import Ma...
python
edit
1
0
bsd-3-clause
4e3042ed2e76ab3563cfd0f53a20b82d9ec545c3
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.client.skia/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Utility module for command line argument parsing\"\"\"\n\nfrom argparse import ArgumentParser, FileType\n\n\ndef parent_parser():\n \"\"\"Create command line argument parser with common PostgreSQL options\n...
python
edit
1
1
bsd-3-clause
98b7836d066e52ea75c2253d539edc252af79d1a
reedstrm/Pyrseas,dvarrazzo/Pyrseas,perseas/Pyrseas
pyrseas/cmdargs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport warnings\n\nfrom django.conf import settings # pylint: disable=W0611\n\nfrom appconf import AppConf\n\n\nclass EasyMapsSettings(AppConf):\n CENTER = (-41.3, 32)\n GEOCODE = 'easy_maps.geocode.google_...
python
edit
1
0
mit
5ea19da9fdd797963a7b7f1f2fd8f7163200b4bc
kmike/django-easy-maps,kmike/django-easy-maps,bashu/django-easy-maps,bashu/django-easy-maps
easy_maps/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom airmozilla.main.models import Event\n\n\ndef sidebar(request):\n featured = Event.objects.approved().filter(public=True, featured=True)\n upcoming = Event.objects.upcoming().order_by('start_tim...
python
edit
1
2
bsd-3-clause
8b7ab303340ba65aa219103c568ce9d88ea39689
EricSekyere/airmozilla,lcamacho/airmozilla,kenrick95/airmozilla,tannishk/airmozilla,tannishk/airmozilla,a-buck/airmozilla,bugzPDX/airmozilla,ehsan/airmozilla,mythmon/airmozilla,Nolski/airmozilla,blossomica/airmozilla,EricSekyere/airmozilla,blossomica/airmozilla,zofuthan/airmozilla,bugzPDX/airmozilla,EricSekyere/airmozi...
airmozilla/main/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.11 on 2016-12-02 15:46\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\ndef forward(apps, schema_editor):\n Keyword = apps.get_model('events', 'K...
python
edit
1
3
mit
0fe30bb04e9b3d981cd1f6264485d98ca56a2fb8
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
events/migrations/0035_add_n_events_to_keyword.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nrepositories = [\n {\n \"owner\": \"talk-to\",\n \"name\": \"Knock\"\n }\n]\n```\n\nApply this change: Use capitalised name for constant" }, { "role": "assistant", "content": "REPOSITORIES = [\n {\n ...
python
edit
1
0
mit
2e845dfd2695b1913f4603d88039049fa1eef923
ayushgoel/LongShot
repositories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import (absolute_import, division, print_function)\nimport math\n\n\ndef nernst_potential(ion_conc_out, ion_conc_in, charge, T, constants=None, units=None):\n \"\"\"\n Calculates the Nernst pot...
python
edit
1
3
bsd-2-clause
223872a6f894b429b3784365fe50e139e649d233
bjodah/aqchem,bjodah/aqchem,bjodah/chempy,bjodah/chempy,bjodah/aqchem
chempy/electrochemistry/nernst.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom configurations import values\nfrom .common import Common\n\nclass Local(Common):\n\n JWT_SECRET = values.Value('not-a-secret')\n DEBUG = values.BooleanValue(True)\n\n```\n\nApply this change: Use console EMAIL_BACKEND in developm...
python
edit
1
0
apache-2.0
00479e3d59e7472c77ea2357f25d5579ad5d5b25
stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub
director/director/config/local.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport frappe\n\ndef execute():\n\tif frappe.db.exists('DocType', 'View log'):\n\t\tfrappe.reload_doc('core', 'doctype', 'view_log', force=True)\n\t\tfrappe.db.sql(\"INSERT INTO `tabView Log` SELECT * from `tabView log`\")\n\t\tfrappe.delet...
python
edit
1
2
mit
eb2b91d30244fd44b45ffc21b963256150b59152
mhbu50/frappe,yashodhank/frappe,vjFaLk/frappe,adityahase/frappe,mhbu50/frappe,almeidapaulopt/frappe,saurabh6790/frappe,adityahase/frappe,vjFaLk/frappe,yashodhank/frappe,saurabh6790/frappe,frappe/frappe,frappe/frappe,vjFaLk/frappe,yashodhank/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,mhbu50/f...
frappe/patches/v11_0/reload_and_rename_view_log.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Django\nfrom django.conf.urls import (\n include,\n url,\n)\nfrom django.contrib import admin\nfrom django.http import HttpResponse\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^api/', include('apps.api.urls'...
python
edit
1
0
bsd-2-clause
b3362c05032b66592b8592ccb94a3ec3f10f815f
dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api
project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Run tests under a consistent environment...\n\nWhether run from the terminal, in CI or from the editor this file makes sure\nthe tests are run in a consistent environment.\n\"\"\"\n\n#--------------------------...
python
edit
1
0
bsd-3-clause
05e568571c2f6891ed7be6198b8cf5e4e540d674
pradyunsg/Py2C,pradyunsg/Py2C
dev_tools/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module is for the Terrain class, used for storing randomly generated terrain.\"\"\"\n\n\nclass Terrain(object):\n \"\"\"Container for a randomly generated area of terrain.\n\n Attributes:\n width (int): Width of gene...
python
edit
1
3
mit
9ced61716167505875d3938ae01c08b61acc9392
jackromo/RandTerrainPy
randterrainpy/terrain.py
accepted
null
true