messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.bootstrap import Bootstrap\n\nfrom config import config\n\nbootstrap = Bootstrap()\n\ndef create_app(config_name):\n app = Flask(__name__)\n app.config.from_object(config[config_name])\n\n bootstra...
python
edit
1
1
mit
d5ee91ba36c7e3d2ce0720b5b047934d554041cd
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.context_processors import csrf\nfrom django.core.urlresolvers import reverse\nfrom django.template import Library, Context, loader\n\nregister = Library()\n\n@register.simple_tag( takes_context = True )\ndef jfu( \n ...
python
edit
1
1
bsd-3-clause
114f40dd282d1837db42ffb6625760d1483d3192
Alem/django-jfu,dzhuang/django-jfu,Alem/django-jfu,dzhuang/django-jfu,Alem/django-jfu,dzhuang/django-jfu,dzhuang/django-jfu,Alem/django-jfu
jfu/templatetags/jfutags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# MIT License\n# Copyright (c) 2017 MassChallenge, Inc.\n\nfrom impact.models import RefundCode\nfrom impact.v1.helpers.model_helper import(\n INTEGER_ARRAY_FIELD,\n INTEGER_FIELD,\n ModelHelper,\n PK_FIELD,\n STRING_FIELD,\n...
python
edit
1
4
mit
7b71425a4434ac2544340d651f52c0d87ff37132
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/v1/helpers/refund_code_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (c) Crown Owned Copyright, 2016. Dstl.\n\nimport os\nimport unittest\n\nfrom splinter import Browser\n\n\nclass TestLoginPage (unittest.TestCase):\n def setUp(self):\n self.browser = Browser('phantomjs')\n\n def test_login_pa...
python
edit
1
1
mit
ca777965c26b8dfd43b472adeb032f048e2537ed
dstl/lighthouse,dstl/lighthouse,dstl/lighthouse,dstl/lighthouse,dstl/lighthouse
acceptancetests/tests/acc_test_login_page.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport flynn.decoder\nimport flynn.encoder\n\ndef dump(obj, fp):\n\treturn flynn.encoder.encode(fp, obj)\n\ndef dumps(obj):\n\treturn flynn.encoder.encode_str(obj)\n\ndef dumph(obj):\n\treturn \"\".join(hex(n)[2:].rjust(2...
python
edit
3
1
mit
b506b6796a8ed9e778f69ddc7718a8ea3b0f9e7a
fritz0705/flynn
flynn/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012-2013, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject\nfrom .validators import boolean\ntry:\n from awacs.aws import Policy\n policytypes = (dict, Po...
python
edit
4
0
bsd-2-clause
d6a3d43e58796299c55fe3a6c6d597edaf5cfc3c
ikben/troposphere,pas256/troposphere,johnctitus/troposphere,cloudtools/troposphere,ikben/troposphere,cloudtools/troposphere,johnctitus/troposphere,pas256/troposphere
troposphere/kms.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom raven import Client\n\n\ndef generate_event(msg, dsn):\n client = Client(dsn)\n client.captureMessage(msg)\n\n\ndef clear_inbox(maildir):\n print('Clearing inbox at {}'.format(maildir))\n for fname in os.listdi...
python
edit
1
3
bsd-3-clause
dd260182bd8157fd6ac2a266b3ae5cf168400266
andialbrecht/sentry-comments,andialbrecht/sentry-comments
tests/custom_keywords.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom basics import BaseCharacter\nfrom basics import BaseAttachment\n\n\nclass ModuleTest(TestCase):\n\n def test_character_attach_attachment(self):\n character = BaseCharacter().save()\n at...
python
edit
1
1
apache-2.0
b99770a7c55cd6951df872793a54bfa260b145f9
JASchilz/RoverMUD
basics/test/module-test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom .base import Base\n\n\nCompleteResults = \"g:LanguageClient_completeResults\"\n\n\ndef simplify_snippet(snip: str) -> str:\n snip = re.sub(r'(?<!\\\\)\\$(?P<num>\\d+)', '<`\\g<num>`>', snip)\n return re.sub(r'(?<!\\\\)...
python
edit
1
4
mit
fbc46862af7fa254f74f1108149fd0669c46f1ad
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
rplugin/python3/deoplete/sources/LanguageClientSource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom importlib import import_module\nimport pkgutil\nimport sys\nimport inspect\nfrom...
python
edit
1
3
apache-2.0
e051c915d72b76a189c16de6ff82bcebdab9f881
Yangqing/caffe2,xzturn/caffe2,sf-wind/caffe2,pietern/caffe2,pietern/caffe2,davinwang/caffe2,sf-wind/caffe2,davinwang/caffe2,sf-wind/caffe2,caffe2/caffe2,Yangqing/caffe2,bwasti/caffe2,Yangqing/caffe2,bwasti/caffe2,xzturn/caffe2,pietern/caffe2,davinwang/caffe2,bwasti/caffe2,bwasti/caffe2,sf-wind/caffe2,sf-wind/caffe2,bwa...
caffe2/python/layers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom go.vumitools.conversation.definition import (\n ConversationDefinitionBase, ConversationAction)\n\n\nclass ViewLogsAction(ConversationAction):\n action_name = 'view_logs'\n action_display_name = 'View Sandbox Lo...
python
edit
2
6
bsd-3-clause
33598fd8baf527d63cef965eddfc90548b6c52b3
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/apps/jsbox/definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport sys\nimport os\nimport django\nfrom django.conf import settings\nfrom django.core.management import call_command\n\nsys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))\n\nopt...
python
edit
1
0
mit
2c8351ff8691eb9ad3009d316d932528d6f5c57d
kmike/django-widget-tweaks,daniboy/django-widget-tweaks
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import MetaData, Table, inspect\nfrom sqlalchemy.schema import CreateTable\n\nfrom rs_sqla_test_utils.utils import clean, compile_query\n\n\ndef table_to_ddl(engine, table):\n return str(CreateTable(table)\n ...
python
edit
1
1
mit
7319ac2eb5d31b14c731371a82102c90d8ec3979
sqlalchemy-redshift/sqlalchemy-redshift,sqlalchemy-redshift/sqlalchemy-redshift,graingert/redshift_sqlalchemy
tests/test_reflection_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport subprocess\n\n\n@pytest.mark.parametrize(\"script\", [])\ndef test_script(script):\n\n try:\n subprocess.check_output([script, '-h'], stderr=subprocess.STDOUT)\n except subprocess.CalledProcessError as e:\n pri...
python
edit
2
2
mit
05ddf0fff9469ae0173809eb559486ff216231a0
maxzheng/clicast
test/test_scripts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=8\nbranch=\"master\"\ntimestamp=1376412892.53\n```\n\nApply this change: Tag commit for v0.0.9-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=9\nbranch=\...
python
edit
1
0
mit
4f0fbe048967cab5eb13850cd5ae1e97560a7b27
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nLine Chart with Sequence Generator\n----------------------------------\nThis examples shows how to create multiple lines using the sequence generator.\n\"\"\"\n# category: line charts\n\nimport altair as alt\n\nsource = alt.sequence...
python
edit
1
0
bsd-3-clause
656c0a9b91ee6f6f3f9811b16ab75dc8003402ad
jakevdp/altair,altair-viz/altair
altair/examples/line_chart_with_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom logging import getLogger\nimport os\nimport pwm\n\ndb = SQLAlchemy()\n_logger = getLogger('pwm_server')\n\nclass PWMApp(Flask):\n\n def bootstrap(self):\n ...
python
edit
1
2
mit
4d1dc36e7426a13906dd1b75eda2c8bff94c88b4
thusoy/pwm-server,thusoy/pwm-server
pwm_server/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix build failed on scrutinizer-ci" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# The MIT License (MIT)\n\n# Copyright (c) 2014 Ivan Cai\n\n# Permission is hereby granted, free of charge, t...
python
new_file
3
0
mit
9a4d608471b31550038d8ce43f6515bbb330e68a
caizixian/tcpstat,caizixian/tcpstat
tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests for the future.standard_library_renames module\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals, print_function\nfrom future import standard_library_renames, six\n\nimport unittest\n\n\nclass TestStandardLib...
python
edit
11
2
mit
69abcf66d36079e100815f629487d121ae016ee9
QuLogic/python-future,QuLogic/python-future,krischer/python-future,michaelpacer/python-future,michaelpacer/python-future,krischer/python-future,PythonCharmers/python-future,PythonCharmers/python-future
future/tests/test_standard_library_renames.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport environ\nenv = environ.Env()\nHOLVI_CNC = False\n\ndef get_holvi_singleton():\n global HOLVI_CNC\n if HOLVI_CNC:\n return HOLVI_CNC\n holvi_pool = env('HOLVI_POOL', default=None)\n holvi_ke...
python
edit
1
1
mit
b62f52a30404901ff3ffa7af90a3f1bdd7d05401
HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum
project/hhlcallback/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nLOGGER = logging.getLogger(__name__)\n\n\ndef tidy_up_url(url):\n if url.startswith(\"//\"):\n # If no protocol was supplied, add https\n url = \"https:\" + url\n\n if '?' in url:\n url = url[:ur...
python
edit
1
4
apache-2.0
1a0e277d23dfc41fc03799edde2a650b89cbcced
CharlieCorner/pymage_downloader
src/utils/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Workflow execution engines.\"\"\"\nfrom resolwe.flow.engine import BaseEngine\n\n\nclass BaseExecutionEngine(BaseEngine):\n \"\"\"A workflow execution engine.\"\"\"\n\n def evaluate(self, data):\n \"\"\"Return the code ne...
python
edit
1
1
apache-2.0
b50b7143185131a81e84f0659ff6405317f7d36f
genialis/resolwe,genialis/resolwe
resolwe/flow/execution_engines/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom ._align import Align\nfrom ._align_getter import align_getter\nfrom ._container import MinMaxContainer\nfrom ...
python
edit
33
0
mit
e029998f73a77ebd8f4a6e32a8b03edcc93ec0d7
thombashi/DataProperty
dataproperty/__init__.py
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\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# License:...
python
edit
3
0
apache-2.0
cb0baa6abcb358c4f44135b3f17d02af2d1d4d06
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/doc/DataSources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\nfrom __future__ import unicode_literals\n\nimport frappe\nimport unittest\n\ntest_records = frappe.get_test_records('Role')\n\nclass TestU...
python
edit
1
1
mit
f7bfcd7fee64ae9220710835974125f41dae1c50
mhbu50/frappe,mhbu50/frappe,saurabh6790/frappe,frappe/frappe,saurabh6790/frappe,vjFaLk/frappe,StrellaGroup/frappe,vjFaLk/frappe,yashodhank/frappe,StrellaGroup/frappe,almeidapaulopt/frappe,adityahase/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,adityahase/frappe,mhbu50/frappe,yashodhank/frappe,frappe...
frappe/core/doctype/role/test_role.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Test script-oriented example from interactive plotting tutorial\n\nsource: docs/source/user_manual/chaco_tutorial.rst\n\n\"\"\"\nimport unittest\nfrom numpy import linspace, pi, sin\nfrom enthought.chaco.shell import plot, show, titl...
python
edit
1
1
bsd-3-clause
82121f05032f83de538c4a16596b24b5b012a3be
tommy-u/chaco,burnpanck/chaco,burnpanck/chaco,tommy-u/chaco,tommy-u/chaco,burnpanck/chaco
chaco/shell/tests/test_tutorial_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Config:\n SECRET_KEY = 'jsA5!@z1'\n\nclass DevelopmentConfig(Config):\n DEBUG = True\n SQLALCHEMY_DATABASE_URI = \"postgresql://admin:adminpass@localhost/fastmonkeys\"\n\nconfig = {\n 'development': DevelopmentConfig\n}\n\...
python
edit
1
0
mit
77ae27596c96ef5b8c05fcd02448576b419de074
timzdevz/fm-flask-app
config.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\"\"\"\ngifshare - A command-line tool to upload images to S3.\n\nRun with `python setup.py install` to install gifshare into your default\nPython environment.\n\"\"\"\n\nfrom setuptools imp...
python
edit
1
0
mit
a334611a1bb159489d06a4e67fc0b7f4690b1701
judy2k/gifshare
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import scoped_session, sessionmaker\nfrom sqlalchemy.pool import StaticPool\n\n\nsession = None\n\n\ndef init_session(connection_string=None, drop=False):\n if connection_string i...
python
edit
1
4
bsd-3-clause
3a924ebac8ecd1c8ff1dcbf60b9e5ea45fa58554
eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system
src/database/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\n#Humanize time in milliseconds\n#Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time\ndef HTM(aa):\n a = int(aa)\n b = int(datetime.datetime.now().s...
python
edit
4
5
mit
5577b2a20a98aa232f5591a46269e5ee6c88070d
harishvc/githubanalytics,harishvc/githubanalytics,harishvc/githubanalytics
MyMoment.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nentry_points = {\n 'console_scripts': [\n 'whatportis=whatportis.main:run',\n ]\n}\nrequirements = open('requirements.txt').read()\nreadme = open('README.rst').read()\n\nsetup(\n name=\"whatpo...
python
edit
1
0
mit
f74bc34f40ac746d501e164ea4fd31eda4bf4b21
ncrocfer/whatportis
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom selenium import webdriver\n\nbrowser = webdriver.Firefox()\nbrowser.get('http://localhost:8000')\n\nassert 'Django' in browser.title\n\n\n```\n\nApply this change: Add first FT spec comments" }, { "role": "assistant", "cont...
python
edit
1
1
mit
8a34e665539b10a8e90c86f89a7e2d5881b36519
rodowi/remember-the-beer
functional_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom views import ProcedureViewSet\nfrom rest_framework import routers\n\nrouter = routers.SimpleRouter()\n\nrouter.register(r'procedures', ProcedureViewSet)\n\nurlpatterns = [\n url(r'^', inclu...
python
edit
1
0
bsd-3-clause
b3befb47d4b48e83b42fc6b10a10269d32cafb4e
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
src-backend/api/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 Luke San Antonio Bialecki\n# All rights reserved.\n\nSQLALCHEMY_DATABASE_URI='sqlite:///db.sqlite3'\nSQLALCHEMY_TRACK_MODIFICATIONS=False\n\n```\n\nApply this change: Use a secret key (get it from an env var)" }, { ...
python
edit
1
0
mit
7a408eb5186ef5a7adce026f0629ee1592cd6077
lukesanantonio/inpassing-backend,lukesanantonio/inpassing-backend
inpassing/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\r\nfrom cclib.parser import Jaguar\r\n\r\nos.chdir(os.path.join(\"..\",\"data\",\"Jaguar\",\"basicJaguar\"))\r\n\r\nos.chdir(\"eg01\")\r\n\r\nfor file in [\"dvb_gopt.out\"]:\r\n\tt = Jaguar(file)\r\n\tt.parse()\r\n\r\nprint t.moen...
python
edit
2
0
bsd-3-clause
86ac48a3dcb71a4e504dcf04e30a00262d168e5f
jchodera/cclib,ben-albrecht/cclib,Schamnad/cclib,cclib/cclib,berquist/cclib,jchodera/cclib,berquist/cclib,gaursagar/cclib,ben-albrecht/cclib,Clyde-fare/cclib,andersx/cclib,berquist/cclib,andersx/cclib,gaursagar/cclib,ATenderholt/cclib,ghutchis/cclib,Schamnad/cclib,cclib/cclib,langner/cclib,cclib/cclib,Clyde-fare/cclib,...
test/parseJaguar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nimport re\n\nclass Response(object):\n\n \"\"\"Represents an HTTP response that is hopefully a HAL document.\"\"\"\n\n def __init__(self, response):\n \"\"\"Pass it a Requests respons...
python
edit
1
1
mit
88bd31ebfcaafe7de386f8d00869eed6286066f7
nanorepublica/cetacean-python,benhamill/cetacean-python
cetacean/response.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Echo server program\nimport socket\n\nHOST = '' # Symbolic name meaning all available interfaces\nPORT = 50007 # Arbitrary non-privileged port\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.bind((HO...
python
edit
3
3
mit
e53232a0d4118f415f694084deb602bcc05cb635
ipab-rad/myo_baxter_pc,ipab-rad/baxter_myo,ipab-rad/baxter_myo,ipab-rad/myo_baxter_pc
scripts/server_socket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport site # get site-packages into sys.path\nimport sys\n\n# add local addons folder to sys.path so blender finds it\nsys.path = (\n [os.path.join(os.path.dirname(__file__), '..', 'scripts', 'addons')]\n + sys.path\n )...
python
edit
3
0
bsd-3-clause
e34b7c8d9e869ac1be10e8ae3d71cea794044e13
nightstrike/blender_nif_plugin,amorilia/blender_nif_plugin,amorilia/blender_nif_plugin,nightstrike/blender_nif_plugin
docs/blender-sphinx-build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import join, dirname\nfrom setuptools import setup\n\nimport django_ponydebugger\n\n\nwith open(join(dirname(__file__), 'README.rst')) as f:\n readme = f.read()\n\nwith open(join(dirname(__file__), 'LICENSE')) as f:\n lic...
python
edit
1
0
mit
45348030b5dee0f83632671c26d0ef63287160bb
educreations/django-ponydebugger
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Bump the version since there are commits on top of last tag." }, { "role": "assistant", "content": "#-*- coding: utf-8 -*-\n# version string following pep-0396 and pep-0386\n__version__ = '0.9pbs.10' # pragma: nocover\n" } ]
python
new_file
1
0
bsd-3-clause
d805f9f90558416f69223c72c25357345aae44c7
pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer,pbs/django-filer
filer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.template.response import ContentNotRenderedError\nfrom django.utils.decorators import available_attrs\n\n\ndef cache_view(view...
python
edit
1
6
mit
b4e065bb15cdc7eda91c89fc0bc3472064d5aac0
dreipol/djangocms-spa,dreipol/djangocms-spa
djangocms_spa/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Drupdates setup script. \"\"\"\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='Drupdates',\n description='Drupal updates scripts',\n author='Jim Taylor',\n...
python
edit
1
0
mit
375657de7eff50c182bd78196d22101a1a8bcb91
jalama/drupdates
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport Gen.caffe_pb2 as pb2\nimport google.protobuf.text_format as pb2_text\nimport sys\n\n\ndef binary_to_text(binary_file, text_file):\n msg = pb2.NetParameter()\n\n with open(binary_file) as f:\n ms...
python
edit
1
3
bsd-3-clause
e50655479c0d3a96edd4005f834541889839fca3
BeautifulDestinations/dnngraph,BeautifulDestinations/dnngraph
binary_to_text.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n# NOTE: most of the configuration, including the version number,\n# is defined in setup.cfg\n\nimport sys\nfrom distutils.version import LooseVersion\...
python
edit
1
0
bsd-3-clause
0480c304488e4c8bb9908babafa13745b007ee0a
astropy/astropy-helpers,astropy/astropy-helpers
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.scoring_engine.web.web_test import WebTest\n\n\nclass TestScoreboard(WebTest):\n\n def test_home(self):\n # todo fix this up!!!!\n # resp = self.client.get('/scoreboard')\n # assert resp.status_code == 200...
python
edit
1
1
mit
57f3bec127148c80a9304194e5c3c8a3d3f3bae2
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
tests/scoring_engine/web/views/test_scoreboard.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test that the clang modules cache directory can be controlled.\"\"\"\n\nfrom __future__ import print_function\n\n\nimport unittest2\nimport os\nimport time\nimport platform\nimport shutil\n\nimport lldb\nfrom lldbsuite.test.decorators...
python
edit
11
2
apache-2.0
7db27a3629e442c99abd24503f08d982b6a30e33
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nfrom pylua.tests.helpers import test_file\n\n\nclass TestCompiled(object):\n \"\"\"\n Tests compiled binary\n \"\"\"\n\n def test_addition(self, capsys):\n f = test_file(src=\"\"\"\n ...
python
edit
1
1
bsd-3-clause
ebac72a3753205d3e45041c6db636a378187e3cf
fhahn/luna,fhahn/luna
pylua/tests/test_compiled.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\n# backwards compatibility import\nfrom feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment\n\nregister = template.Library()\n\nregister.tag(fragment)\nregister.tag(get_fragment)\nreg...
python
edit
1
3
bsd-3-clause
5cf17b6a46a3d4bbf4cecb65e4b9ef43066869d9
feincms/feincms,joshuajonah/feincms,feincms/feincms,matthiask/feincms2-content,matthiask/django-content-editor,michaelkuty/feincms,mjl/feincms,matthiask/feincms2-content,mjl/feincms,matthiask/django-content-editor,matthiask/django-content-editor,michaelkuty/feincms,nickburlett/feincms,matthiask/django-content-editor,jo...
feincms/templatetags/applicationcontent_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom datetime import date\n\nimport qual\n\nclass TestProlepticGregorianCalendar(unittest.TestCase):\n def setUp(self):\n self.calendar = qual.ProlepticGregorianCalendar()\n\n def check_valid_date(self, year,...
python
edit
3
1
apache-2.0
1c2b6c0daea1d04985ef6ddff35527ba207ec191
jwg4/calexicon,jwg4/qual
qual/tests/test_calendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n hello/__init__.py\n ------------------\n Initializes Flask application and brings all components together.\n\n\"\"\"\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_misaka import Misaka\n\n# C...
python
edit
4
0
mit
4c5ce80d469619de6a324bd779c6884f6070106f
kennyng/kennyng.org,kennyng/kennyng.org,kennyng/kennyng.org,kennyng/kennyng.org
homepage/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test_models on image test init" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom opps.images.tests.generate import *\nfrom opps.images.tests.test_models import *\n" } ]
python
new_file
3
0
mit
12bb9882c1e2cc3f04b7bef30d4aaf8267793622
williamroot/opps,williamroot/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps
opps/images/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom awsflow.core import AsyncEventLoop\n\nfrom awsflow.context import ContextBase\n\n\nclass WorkflowTestingContext(ContextBase):\n\n def __init__(self):\n self._event_loop = AsyncEventLoop()\n\n def __enter__(self):\n ...
python
edit
1
2
apache-2.0
fc6e3c276ee638fbb4409fa00d470817205f2028
darjus/botoflow,boto/botoflow
lib/awsflow/test/workflow_testing_context.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.db import models as django_models\nfrom tinymce.widgets import TinyMCE\n\nfrom .models import (Recipient, RecipientList, DailyEmailBlast,\n DailyEmailBlastType)\n\n\ndef send_blasts(model...
python
edit
2
2
apache-2.0
b960962472f1c40fbaa1338d2cba316810ba119b
texastribune/tt_dailyemailblast,texastribune/tt_dailyemailblast
tt_dailyemailblast/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError\n\nfrom .__version__ import __autho...
python
edit
45
0
mit
f2bf249f4ea954b318819bd5976584eedba35517
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
pytablereader/__init__.py
rejected_lint
Too many lint violations: 45
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -----------------------------------------------------------------------------\n# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.\n# Distributed under the (new) BSD License.\n# ---------------------------------------------...
python
edit
6
1
bsd-3-clause
b8193a26f0a09ea1cba08046432a02a5e263eb29
glumpy/glumpy,glumpy/glumpy
examples/svg-path.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\n# import time\nimport picamera\nfrom . import config\n\nclass Camera:\n def __init__(self):\n self.camera = picamera.PiCamera(resolution=config.CAPTURE_RESOLUTION)\n self.preview_alpha = 200\n\n def capture(se...
python
edit
1
2
cc0-1.0
f468a26893c44411dc1f865b208788373f993918
jnv/asciibooth,jnv/asciibooth
asciibooth/camera.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2013 - Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License...
python
edit
1
1
apache-2.0
08a3874f826d46528f049318af67b9a39922604c
gilbertpilz/solum,ed-/solum,ed-/solum,julienvey/solum,gilbertpilz/solum,devdattakulkarni/test-solum,gilbertpilz/solum,stackforge/solum,devdattakulkarni/test-solum,ed-/solum,stackforge/solum,ed-/solum,openstack/solum,gilbertpilz/solum,julienvey/solum,openstack/solum
functionaltests/api/test_versions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6\n\ndef test_qtopengl():\n \"\"\"Test the qtpy.QtOpenGL namespace\"\"\"\n from qtpy import QtOpenGL\n\n assert QtOpenGL.QOpenGLBuffer is not None\n assert QtOpenGL.QO...
python
edit
7
1
mit
06d98438f9535a0477cdc85acf4c001fa7657b26
spyder-ide/qtpy
qtpy/tests/test_qtopengl.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" crmngr setup module. \"\"\"\n\nfrom setuptools import setup, find_packages\nfrom crmngr.version import __version__\n\nsetup(\n name='crmngr',\n author='Andre Keller',\n author_email='<EMAIL>',\n classifiers=[\n 'De...
python
edit
1
0
bsd-3-clause
162d5514145f3797e0b9fb6dd19c948d9ddc82b1
vshn/crmngr
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" InfluxDB Alchemy. \"\"\"\n\nfrom .client import InfluxAlchemy\nfrom .measurement import Measurement\n\n__version__ = \"0.1.0\"\n\n```\n\nApply this change: Use package version for __version__" }, { "role": "assistant", "c...
python
edit
4
0
mit
84c2c987151451180281f1aecb0483321462340c
amancevice/influxalchemy
influxalchemy/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#/usr/bin/python\n\n\"\"\" Baseline example that needs to be beaten \"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nx, y, yerr = np.loadtxt(\"data/data.txt\", unpack=True)\n\nA = np.vstack((np.ones_like(x), x)).T\nC = np.di...
python
edit
1
0
mit
b57d0b0d3d65995270318d94b551d8bacda73d22
arfon/dottravis,arfon/dottravis
baseline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Environment:\n def __init__(self, par=None, bnd=None):\n if bnd:\n self.binds = bnd\n else:\n self.binds = {}\n \n self.parent = par\n \n if par:\n self...
python
edit
1
3
mit
d57670995709ae60e9cbed575b1ac9e63cba113a
readevalprintlove/lithp,fogus/lithp,fogus/lithp,readevalprintlove/lithp,magomsk/lithp,readevalprintlove/lithp,fogus/lithp,magomsk/lithp,magomsk/lithp
src/env.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__version__ = '0.5.0'\n\n\n# Module level variables.\nffmpeg = ''\n\"\"\"The path to the installed FFmpeg binary.\"\"\"\nffprobe = ''\n\"\"\"The path to the installed FFprobe binary.\"\"\"\npackager = ''\n\"\"\"The path to the ...
python
edit
1
0
apache-2.0
b0701205f0b96645d3643bab5188f349cd604603
shaka-project/shaka-streamer,shaka-project/shaka-streamer
binaries/streamer_binaries/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom pip._internal.commands import commands_dict, create_command\n\n\ndef test_commands_dict__order():\n \"\"\"\n Check the ordering of commands_dict.\n \"\"\"\n names = list(commands_dict)\n # A spot-check i...
python
edit
1
4
mit
505456fed7bdbd6b2cd78eae10b3b64657cd377b
pradyunsg/pip,xavfernandez/pip,pfmoore/pip,rouge8/pip,xavfernandez/pip,pypa/pip,sbidoul/pip,pfmoore/pip,pypa/pip,rouge8/pip,rouge8/pip,pradyunsg/pip,xavfernandez/pip,sbidoul/pip
tests/unit/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef fibrepr(n):\n fibs = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\n def fib_iter(n, fibs, l):\n for i, f in enumerate(fibs):\n if f == n:\n yield '1' + i*'0' + l\n elif n > f:\n fo...
python
edit
1
5
mit
a2fb1efc918e18bb0ecebce4604192b03af662b2
kynan/CodeDojo30
fib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\n\nfrom txdbus import error, message\n\nclass MessageTester(unittest.TestCase):\n def test_too_long(self):\n class E(message.ErrorMessage):\n _maxMsgLen = 1\n\n def c():\n ...
python
edit
3
2
mit
08d6c4414d72b5431d5a50013058f325f38d7b1c
cocagne/txdbus
txdbus/test/test_message.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Module containing helper functions for using pygame.\"\"\"\ndef load_class_assets(calling_object, assets_dict):\n \"\"\"Load class assets. Only call if class_assets_loaded is False.\"\"\"\n calling_class = type(calling_object)\n...
python
edit
1
5
mit
fb91bf1e7c1677124f4aa1ce9c534fb437145980
AndyDeany/pygame-template
pygametemplate/helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest tools for the storage service.\n\"\"\"\n\nimport unittest\n\nfrom storage.storage import app as storage_app, db\n\n\nclass InMemoryStorageTests(unittest.TestCase):\n \"\"\"\n Set up and tear down an application with an in...
python
edit
1
1
mit
4b000960edc30d9917b80646a0374fb8bf99efcb
jenca-cloud/jenca-authentication
storage/tests/testtools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\nfrom .tasks import push_new_content\n\n@receiver(post_save)\ndef post...
python
edit
1
2
mit
d96e52c346314622afc904a2917416028c6784e3
mback2k/swampdragon-live,mback2k/swampdragon-live
swampdragon_live/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSetuptools is released using 'jaraco.packaging.release'. To make a release,\ninstall jaraco.packaging and run 'python -m jaraco.packaging.release'\n\"\"\"\n\nimport os\n\nimport pkg_resources\n\npkg_resources.require('jaraco.packagi...
python
edit
1
0
mit
2f95af84d585c19a8eb6a8e6d437acdbe3c3d2ae
pypa/setuptools,pypa/setuptools,pypa/setuptools
release.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom _Ax import _Ax_ext\r\nimport numpy as np\r\nimport copy\r\n\r\ndef Ax(img, geo, angles, projection_type=\"Siddon\"):\r\n\r\n if img.dtype != np.float32:\r\n raise TypeError(\"Input data should be float32, not \"+ str(img.dtyp...
python
edit
1
4
bsd-3-clause
675e0a29f780d6053d942dce4f80c6d934f3785a
CERN/TIGRE,CERN/TIGRE,CERN/TIGRE,CERN/TIGRE
Python/tigre/utilities/Ax.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport vcproj.solution\nimport tempfile, filecmp\nimport pytest\n\n@pytest.fixture(scope=\"session\")\ndef test_sol():\n return vcproj.solution.parse('vcproj/tests/test_solution/vc15sol/vc15sol.sln')\n\n\ndef test_all_projects(test_sol):...
python
edit
1
1
unlicense
c447ca3d85d9862be38034be85b2328e3d6b02a3
jhandley/pyvcproj,jhandley/pyvcproj,jhandley/pyvcproj
vcproj/tests/test_solution.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom vaspy.iter import OutCar\n\n_logger = logging.getLogger(\"vaspy.script\")\n\nif \"__main__\" == __name__:\n outcar = OutCar()\n poscar = outcar.poscar\n freq_types = outcar.freq_types\n\n # Frequency info....
python
edit
1
0
mit
fe451116ffcb12621600310b6d4ca9b6316494ff
PytLab/VASPy,PytLab/VASPy
scripts/zpe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom snakeeyes.app import create_app\n\n\n@pytest.yield_fixture(scope='session')\ndef app():\n \"\"\"\n Setup our flask test app, this only gets executed once.\n\n :return: Flask app\n \"\"\"\n params = {\n ...
python
edit
1
1
mit
945e8a256e384ed441fc8f9ec4cf15743ecf5b22
nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask
snakeeyes/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik\n# Author: Dominik Gresch <<EMAIL>>\nr\"\"\"\nTBmodels is a tool for creating / loading and manipulating tight-binding models.\n\"\"\"\n\n__version__ ...
python
edit
6
0
apache-2.0
2e70450846fb0f40d6d0449093ddf121da7547a8
Z2PackDev/TBmodels,Z2PackDev/TBmodels
tbmodels/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport login\nimport time\nimport navigate\nimport modal\n\ndef automate(username, password, tag):\n\tdriver = login.login(username, password)\n\tnavigate.tag(driver, tag)\n\tmodal.open(driver)\n\twhile True:\n\t\ttry:\n\t\t\tmodal.follow(d...
python
edit
1
3
mit
0ce8e39bc641c2b68c3c2bd460a38efc5e4eff01
jshaker/igbot
automate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport discord\nfrom handlers.message_handler import MessageHandler\n\n\nwith open(\"config.json\", \"r\") as f:\n\tconfig = json.load(f)\nclient = discord.Client()\nmessage_handler = MessageHandler(config, client)\n\n\n@client...
python
edit
1
1
mit
20764887bc338c2cd366ad11fb41d8932c2326a2
azeier/hearthbot
bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom test_support import verbose, TestFailed\nimport sunaudiodev\nimport os\n\ndef findfile(file):\n\tif os.path.isabs(file): return file\n\timport sys\n\tfor dn in sys.path:\n\t\tfn = os.path.join(dn, file)\n\t\tif os.path.exists(fn): retu...
python
edit
15
5
mit
c8896c3eceb6ef7ffc6eef16af849597a8f7b8e2
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_sunaudiodev.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Rediculously simple test of the winsound module for Windows.\n\nimport winsound\nfor i in range(100, 2000, 100):\n winsound.Beep(i, 75)\nprint \"Hopefully you heard some sounds increasing in frequency!\"\n\n\n```\n\nApply this change: ...
python
edit
2
0
mit
47e4e74dcf5e2a10f1e231d2fa8af453213e77fb
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_winsound.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mimetypes\nimport mimetools\n\ndef encode_multipart_formdata(params, files):\n boundary = mimetools.choose_boundary()\n\n lines = []\n for name in params:\n lines.append(\"--\" + boundary)\n lines.append(\"Cont...
python
edit
1
4
apache-2.0
b8f893089a35627305b2a6dd1f6ba27268f8e865
photo/openphoto-python,photo/openphoto-python
openphoto/multipart_post.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openprocurement.tender.core.utils import optendersresource\nfrom openprocurement.tender.openeu.views.award_complaint import TenderEUAwardComplaintResource\n\n\n@optendersresource(name='esco.EU:TenderAward Compl...
python
edit
1
0
apache-2.0
8d8eeaa9fd06cd1fc9860a4e5b215e8ed7f107af
Scandie/openprocurement.tender.esco,openprocurement/openprocurement.tender.esco
openprocurement/tender/esco/views/award_complaint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as f:\n readme = f.read()\n\nexecfile('substance/_version.py')\n\ninstall_requires = ['setuptools>=1.1.3', 'PyYAML', 'tabulate', 'paramiko', 'netaddr', 'requests', 't...
python
edit
3
0
apache-2.0
e024f15d20f974a3dc4922631264d79d93a26e5f
turbulent/substance,turbulent/substance
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_sqlalchemy import Model\nfrom sqlalchemy import Column, Integer, Unicode, UnicodeText, ForeignKey\nfrom sqlalchemy.orm import relationship\n\n\nclass User(Model):\n __tablename__ = \"user\"\n ROLE_ADMIN = 0\n ROLE_USER =...
python
edit
1
0
mit
f94347a734df84811b627e767a55dc99831e0076
BrambleLLC/Artizanz,BrambleLLC/Artizanz,BrambleLLC/Artizanz
src/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.test import TestCase as DjangoTestCase\nimport fudge\n\nclass TestCase(DjangoTestCase):\n def setUp(self):\n self._original_settings = settings\n\n def tearDown(self):\n sett...
python
edit
3
1
bsd-3-clause
1e10fa30998f63359ddd26d9804bd32a837c2cab
armstrong/armstrong.esi
armstrong/esi/tests/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\nimport webapp2\nfrom webapp2_extras import jinja2\n\n\nclass BaseHandler(webapp2.RequestHandler):\n @webapp2.cached_property\n def jinja2(self):\n return jinja2.get_jinja2(app=self.app)\n\n def render_templ...
python
edit
3
2
mit
4c43e16c8f39007e1e91195b40e80b53f67b5823
supermitch/mech-ai,supermitch/mech-ai,supermitch/mech-ai
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\nimport matplotlib\nmatplotlib.use(\"pdf\")\nimport matplotlib.pyplot as plt\nimport sys\nimport os.path\n\nfigdir = \"figures\"\n\ndf = pd.read_csv(sys.stdin, \" \", header=None, index_col=0,\n names=[2*...
python
edit
1
0
bsd-3-clause
22c7da6d3de76cf6c36b4206f204a9ee979ba5f7
jpfairbanks/cse6140,jpfairbanks/cse6140,jpfairbanks/cse6140
strides/graphs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IMode, IModuleData, Mode, ModuleData\nfrom txircd.utils import ModeType\nfrom zope.interface import implements\n\nclass InvisibleMode(ModuleData, Mode):\n implements...
python
edit
1
4
bsd-3-clause
52982c735f729ddf0a9c020d495906c4a4899462
Heufneutje/txircd,ElementalAlchemist/txircd
txircd/modules/rfc/umode_i.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Standard test data.\n\"\"\"\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport numpy as np\nfrom numpy.testing import assert_equal\n\nimport mousestyles.data as d...
python
edit
3
1
bsd-2-clause
556cef75198e3a5a8ac3e8f523c54b0b2df6a2c1
berkeley-stat222/mousestyles,togawa28/mousestyles,changsiyao/mousestyles
mousestyles/data/tests/test_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plata\n\n\ndef plata_context(request):\n \"\"\"\n Adds a few variables from Plata to the context if they are available:\n\n * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance\n * ``plata.order``: The cu...
python
edit
1
3
bsd-3-clause
158f1101c3c13db5df916329a66517c7bb85e132
armicron/plata,armicron/plata,armicron/plata
plata/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom openerp import fields, models\n\n'''\nThis module create model of Course\n'''\n\nclass Course(models.Model):\n '''\n This class create model of Course\n '''\n _name = 'openacademy.course'\n\n name = fields.Char(string='T...
python
edit
2
2
apache-2.0
cc5e75078c707ee2b5622700a0ad2890969193c1
LihanHA/opencademy-project
opencademy/model/openacademy_course.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pgcli.packages.sqlcompletion import suggest_type\n\n\ndef test_select_suggests_cols_with_table_scope():\n suggestion = suggest_type('SELECT FROM tabl', 'SELECT ')\n assert suggestion == ('columns-and-functions', ['tabl'])\n\ndef...
python
edit
1
1
bsd-3-clause
c6926dda0a9e6e1515721e54788c29d0ef8b58a4
thedrow/pgcli,d33tah/pgcli,n-someya/pgcli,bitmonk/pgcli,joewalnes/pgcli,yx91490/pgcli,TamasNo1/pgcli,MattOates/pgcli,TamasNo1/pgcli,j-bennet/pgcli,lk1ngaa7/pgcli,zhiyuanshi/pgcli,koljonen/pgcli,dbcli/vcli,dbcli/pgcli,lk1ngaa7/pgcli,dbcli/pgcli,j-bennet/pgcli,suzukaze/pgcli,janusnic/pgcli,darikg/pgcli,johshoff/pgcli,nos...
tests/test_sqlcompletion.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bottle\nimport waitress\nimport controller\nimport breathe\n\n\nif __name__ == '__main__':\n bottle_app = bottle.app()\n breather = breathe.Breathe()\n my_controller = controller.Controller(bottle_app, breather)\n waitres...
python
edit
1
1
mit
22ba81ee7bed81c3a1da4b8d2ace4c38a957b5dd
tipsqueal/duwamish-lighthouse,tipsqueal/duwamish-lighthouse,YonasBerhe/duwamish-lighthouse,illumenati/duwamish-lighthouse,illumenati/duwamish-lighthouse
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nfrom flask.ext.testing import...
python
edit
3
1
apache-2.0
a9f40d7549c43e3e7faf90c79f19a290761d2e08
hyperNURb/ggrc-core,prasannav7/ggrc-core,vladan-m/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,uskudnik/ggrc-core,prasannav7/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,NejcZupec/ggrc-core,p...
src/tests/ggrc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name=\"sphinx-refdoc\",\n version=read('VERSION').strip(),\n author=...
python
edit
1
1
mit
994fc67234a60fbe2c8f4146fa72089ee94432a9
novopl/sphinx-refdoc
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport scrapy\nfrom scrapy.item import BaseItem\nfrom scrapy_rss.elements import *\nfrom scrapy_rss import meta\nimport six\n\n\n@six.add_metaclass(meta.ItemMeta)\nclass RssItem:\n title = TitleElement()\n l...
python
edit
12
2
bsd-3-clause
b5477239d7b1ee9e73265b023355e8e83826ec49
woxcab/scrapy_rss
scrapy_rss/items.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport unittest\nfrom gather.bot import ListenerBot\n\n\nclass TestGatherBot(unittest.TestCase):\n def test_register(self):\n bot = ListenerBot()\n self.assertEqual({}, bot.actions)\n regex = r'^test'\n ...
python
edit
1
1
mit
0155ed7c37fd4cafa2650911d4f902a3a8982761
veryhappythings/discord-gather
test/test_bot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import db\n\n\nclass User(db.Model):\n __tablename__ = 'users'\n\n username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)\n password = db.Column(db.String(192), nullable=False)\n\n def __ini...
python
edit
1
1
mit
92ab5c0878ba528fb49a42fde64dd4d6474bc1e8
jawrainey/atc,jawrainey/atc
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nextra_library_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), \"lib\")\nif extra_library_path not in sys.path:\n sys.path.insert(1, extra_library_path)\n\ndefault_app_config = 'djangae.apps.Djanga...
python
edit
1
0
bsd-3-clause
032ce88cbee5399c97486122e7bd3b8013e88dda
armirusco/djangae,potatolondon/djangae,armirusco/djangae,potatolondon/djangae,kirberich/djangae,grzes/djangae,kirberich/djangae,armirusco/djangae,asendecka/djangae,grzes/djangae,kirberich/djangae,asendecka/djangae,asendecka/djangae,grzes/djangae
djangae/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport itertools\nimport platform\nfrom setuptools import setup, find_packages\n\nwith open(os.path.join(os.path.dirname(__file__), \"mongomock\", \"__version__.py\")) as version_file:\n exec(version_file.read())\n\ninstall_re...
python
edit
2
0
bsd-3-clause
eedd6f7dce57b30841bcaa10f25cc4ac3b314d57
julianhille/mongomock,mdomke/mongomock,StarfishStorage/mongomock,marcinbarczynski/mongomock,vmalloc/mongomock,drorasaf/mongomock,magaman384/mongomock
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nimport os\nfrom flask import Flask, render_template, make_response\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n \"\"\"Render index template\"\"\"\n return render_template('index.ht...
python
edit
3
4
mit
1d391ef70edcb81a7a6f27685e2dca103b24bd66
martinp/jarvis2,mpolden/jarvis2,Foxboron/Frank,martinp/jarvis2,Foxboron/Frank,mpolden/jarvis2,Foxboron/Frank,martinp/jarvis2,mpolden/jarvis2
app.py
accepted
null
true