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 __future__ import unicode_literals\nimport os\nimport pprint\nimport StringIO\n\nfrom flask import Flask\nfrom flask import request\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef echo():\n stream = StringIO.StringIO()\n ind...
python
edit
1
1
mit
486aa11293754fc56d47b2820041c35255dfcf1c
victorlin/docker-eb-demo,victorlin/docker-eb-demo
echoapp/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom jinja2 import Template\n\nclusters = ['2_3', '2_4', '2_5', '2_6']\n# Commenting out this as we only have one example and it breaks\ntiles = [] # [d for d in os.listdir('../examples') if os.path.isdir...
python
edit
3
0
apache-2.0
1a837e84a129e99f7734fe0ffdc6ff3a239ecc4a
cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator
ci/generate_pipeline_yml.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom . import BinaryData\n\nfor filename in sys.argv[1:]:\n with open(filename) as infile:\n data = BinaryData(infile.read())\n for packet in data.packets():\n print hex(packet.key_id), packet.creat...
python
edit
2
3
bsd-3-clause
f30a923b881e908fa607e276de1d152d803248f1
toofishes/python-pgpdump
pgpdump/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Ridiculously simple test of the os.startfile function for Windows.\n#\n# empty.vbs is an empty file (except for a comment), which does\n# nothing when run with cscript or wscript.\n#\n# A possible improvement would be to have empty.vbs do...
python
edit
7
1
mit
853dc6b254c66807fd6c44b374c89b90069f55b5
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_startfile.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport dns\nimport dns.resolver\nimport dns.rdatatype\nfrom typing import Union, List\n\n\nclass DNSResolver(dns.resolver.Resolver):\n\n def __init__(self, filename='/etc/resolv.conf', configure=False,\n nameservers: Unio...
python
edit
1
9
apache-2.0
d4033694f7686fe1ad48a185ae740c4d966d40d8
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector
classes/dnsresolver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\ndef convert_arg_line_to_args(arg_line):\n \"\"\"argparse helper for splitting input from config\n\n Allows comment lines in configfiles and allows both argument and\n value on the same...
python
edit
1
1
isc
c568cf4b1be5e38b92f7d3a9131e67ff9eff764e
fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver
lib/ctf_gameserver/lib/helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='pytest-flakes',\n description='pytest plugin to check source code with pyflakes',\n long_description=open(\"README.rst\").read(),\n license=\"MIT license\",\n version='1.0.1',\n ...
python
edit
1
0
mit
f8fcdb461f414f3c29263edd7e5c9906d76435a1
fschulze/pytest-flakes
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom whitenoise.generators import BaseGenerator\n\nclass SelectGenerator(BaseGenerator):\n '''\n Creates a value by selecting from another SQLAlchemy table\n Depends on SQLAlchemy, and receiving a session object from...
python
edit
2
3
mit
305969cedb966d1e5cd340d531727bb984ac35a8
James1345/white-noise
whitenoise/generators/sqlalchemy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2012 Jim Lawton. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
python
edit
3
2
apache-2.0
faba2bc98f08cddea51d2e0093aa5c2981c8bf15
babycaseny/gdrive-linux,jimlawton/gdrive-linux-googlecode,jimlawton/gdrive-linux,jmfield2/gdrive-linux
gdrived.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.2 on 2017-01-18 14:37\nfrom __future__ import unicode_literals\nimport binascii\nimport os\n\nfrom django.db import migrations\n\n\ndef generate_key():\n return binascii.hexlify(os.uran...
python
edit
3
1
bsd-3-clause
323cc3f50fa0bbd072bfe243443adf12e1b25220
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/projects/migrations/0019_auto_20170118_1537.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom six import iteritems\n\nfrom yolapy.services import Yola\n\n\nclass Site(object):\n \"\"\"Represents a Site resource on the Yola API.\"\"\"\n\n def __init__(self, **kwargs):\n self.fields = kwargs\n for key, val in ...
python
edit
1
2
mit
05f95bae2c04cb07739b220df1a60577016a1f53
yola/yolapy
yolapy/models/site.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nimport sncosmo\n\n\n@pytest.mark.might_download\ndef test_hst_bands():\n \"\"\" check that the HST and JWST bands are accessible \"\"\"\n for bandname in ['f606w', 'uvf606w', 'f125w', 'f127m',\n '...
python
edit
3
2
bsd-3-clause
23e1766731dbd08d3d6c55d9d1fe2bbf1be42614
sncosmo/sncosmo,sncosmo/sncosmo,sncosmo/sncosmo
sncosmo/tests/test_builtins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom spec import eq_\n\nfrom invoke import run\n\nfrom _utils import support\n\n\n# Yea, it's not really object-oriented, but whatever :)\nclass CLI(object):\n \"Command-line interface\"\n\n # Yo dogfood, I heard you like...
python
edit
13
1
bsd-2-clause
2034c8280800291227232435786441bfb0edace0
frol/invoke,alex/invoke,mkusz/invoke,mattrobenolt/invoke,mattrobenolt/invoke,kejbaly2/invoke,kejbaly2/invoke,pyinvoke/invoke,pfmoore/invoke,sophacles/invoke,pfmoore/invoke,mkusz/invoke,tyewang/invoke,pyinvoke/invoke,singingwolfboy/invoke,frol/invoke
tests/cli.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport ast\n\nfrom . import parse\n\n\nclass Template:\n def __init__(self, raw):\n self.raw = raw\n self.nodelist = parse.parse(raw)\n\n code = ast.Expression(\n body=ast.GeneratorExp(\n ...
python
edit
1
1
mit
f3bbfd5221a3d7b3e394a70853d0a7dc1b5eeeac
funkybob/knights-templater,funkybob/knights-templater
knights/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nimport sys\nimport urllib\n\nfrom scheduleitem import ScheduleItem\nfrom team import Team\n\n\ndef read(uri):\n \"\"\"Open a File or a Web URL\"\"\"\n if uri.startswith('http://') or uri.startswith('https://'):\n re...
python
edit
1
3
mit
22e82e3fb6949efe862216feafaedb2da9b19c62
brianjbuck/robie
filehandler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-lightweight-queue',\n\n url=\"https://chris-lamb.co.uk/projects/django-lightweight-queue\",\n version='2.0.1',\n description=\"Lightweight & modular queue and ...
python
edit
1
0
bsd-3-clause
507ac62597b30ccfa58841ccf26207b67baa8eac
lamby/django-lightweight-queue
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2013 OpenStack Foundation.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance wi...
python
edit
1
3
apache-2.0
1766a5acc5c948288b4cd81c62d0c1507c55f727
petrutlucian94/cinder,Paul-Ezell/cinder-1,CloudServer/cinder,Datera/cinder,nikesh-mahalka/cinder,alex8866/cinder,j-griffith/cinder,cloudbase/cinder,openstack/cinder,julianwang/cinder,redhat-openstack/cinder,tlakshman26/cinder-bug-fix-volume-conversion-full,Akrog/cinder,Hybrid-Cloud/cinder,CloudServer/cinder,tlakshman26...
cinder/brick/initiator/host_driver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Supported 16 color values:\n# 'h0' (color number 0) through 'h15' (color number 15)\n# or\n# 'default' (use the terminal's default foreground),\n# 'black', 'dark red', 'dark green', 'brown', 'dark blue',\n# 'dark magenta', 'dar...
python
edit
3
0
mit
573718a17e5e2d3fe23b1c8cd128a9b46d6076e6
amigrave/pudb,albfan/pudb,amigrave/pudb,albfan/pudb
example-theme.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test imagemagick functions.\"\"\"\nimport unittest\n\nfrom pywal import colors\n\n\nclass TestGenColors(unittest.TestCase):\n \"\"\"Test the gen_colors functions.\"\"\"\n\n def test_gen_colors(self):\n \"\"\"> Generate a ...
python
edit
1
1
mit
72d0ca4e2f4be7969498b226af4243315f2dff0c
dylanaraps/pywal,dylanaraps/pywal,dylanaraps/pywal
tests/test_colors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, division\n\nfrom numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim\nfrom numba import cuda, config\n\n\nclass MyError(Exception):\n pass\n\n\nregex_pattern = (\n r...
python
edit
3
3
bsd-2-clause
864653259bdcddf62f6d3c8f270099e99fbb8457
stuartarchibald/numba,numba/numba,jriehl/numba,jriehl/numba,IntelLabs/numba,seibert/numba,seibert/numba,gmarkall/numba,stonebig/numba,cpcloud/numba,jriehl/numba,IntelLabs/numba,numba/numba,stonebig/numba,sklam/numba,jriehl/numba,seibert/numba,cpcloud/numba,sklam/numba,stuartarchibald/numba,numba/numba,sklam/numba,jrieh...
numba/cuda/tests/cudapy/test_userexc.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 os\nimport datetime\n\nfrom config import USER_DIRECTORY, LOG_DIRECTORY_NAME, STORE_LOGS\n\n\nNOW = datetime.datetime.now()\n\ndef clean_log(filepath):\n delete = False\n with open(fi...
python
edit
2
4
apache-2.0
25e694675d3d2ef8a24f6d0cdd978f42465ae2dc
XDocker/Engine,XDocker/Engine
xdocker/clean_logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.plugins.attrib import attr\nfrom indra.sources.tas import process_from_web\n\n\n@attr('slow')\ndef test_processor():\n tp = process_from_web(affinity_class_limit=10)\n assert tp\n assert tp.statements\n num_stmts = len...
python
edit
1
2
bsd-2-clause
18b62174d8fd48691a78f23b0a9f806eb7eb01f7
johnbachman/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy
indra/tests/test_tas.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import Extension, setup\n\nfrom Cython.Build import cythonize\n\ntry:\n from Cython.Distutils import build_ext\nexcept ImportError:\n use_cython = False\nelse:\n use_cython = True\n\n\nif use_cython:\n extens...
python
edit
1
0
mit
b3acf639f310019d042bbe24e653a6f79c240858
PeithVergil/cython-example
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#coding: utf-8\nfrom distribute_setup import use_setuptools\nuse_setuptools()\n\nfrom aero.__version__ import __version__, __title__, __authors__, __email__, __license__, __url__, __download_url__\nfrom setuptools imp...
python
edit
1
0
bsd-3-clause
f8cbb96f2d5040d060799f62b642e8bb80060d07
Aeronautics/aero
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2011 rPath, Inc.\n#\n# All Rights Reserved\n#\n\nBAD_REQUEST = 400\nNOT_FOUND = 404\nINTERNAL_SERVER_ERROR = 500\n\nclass RbuilderError(Exception):\n \"An unknown error has occured.\"\n\n status = INTERNAL_SERVER_ER...
python
edit
1
2
apache-2.0
6735b31506a86fa440619f1f68e53158dbd79024
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
mint/django_rest/rbuilder/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom vtk import *\n\n\nreader = vtkXMLTreeReader()\nreader.SetFileName(\"vtkclasses.xml\")\nreader.Update()\nprint reader.GetOutput()\n\nview = vtkGraphLayoutView()\nview.AddRepresentationFromInputConnection(reader.GetOutputPort())\nview.Se...
python
edit
6
0
bsd-3-clause
235f8061caa667f7c9bc1f424e14326c22932547
daviddoria/PointGraphsPhase1,jmerkow/VTK,mspark93/VTK,hendradarwin/VTK,aashish24/VTK-old,Wuteyan/VTK,jmerkow/VTK,berendkleinhaneveld/VTK,msmolens/VTK,ashray/VTK-EVM,msmolens/VTK,hendradarwin/VTK,sumedhasingla/VTK,ashray/VTK-EVM,johnkit/vtk-dev,sumedhasingla/VTK,SimVascular/VTK,sankhesh/VTK,candy7393/VTK,jmerkow/VTK,spt...
Examples/Infovis/Python/cone_layout.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BytecodeBase:\n def __init__(self):\n # Eventually might want to add subclassed bytecodes here\n # Though __subclasses__ works quite well\n pass\n\n def execute(self, machine):\n pass\n\n\nclass Push(...
python
edit
1
1
bsd-3-clause
9e1cf6ecf8104b38c85a00e973873cbfa7d78236
darbaga/simple_compiler
bytecode.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom treestore import Treestore\nimport settings\n\n\ndef get_treestore():\n return Treestore(**settings.TREESTORE_KWARGS)\n\ndef uri_from_tree_id(tree_id):\n return (settings.TREE_URI + tree_id)\n\ndef tree_id_from_uri(uri):\n if ...
python
edit
1
3
mit
257d3bf6cee059de50872cd02b682e1a05d467e9
NESCent/phylocommons,NESCent/phylocommons
phylocommons/get_treestore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom checker.local import LocalChecker as BaseChecker\n#from checker.contest import ContestChecker as BaseChecker\n\nOK = 0\nTIMEOUT = 1\nNOTWORKING = 2\nNOTFOUND = 3\n\n```\n\nApply this change: Add forward/reverse ma...
python
edit
3
1
isc
2945ae3bb8dd85bd96546cef4ff1e297774d7190
fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver
checker/checker/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\ntry:\n from setuptools import setup, Extension\nexcept ImportError:\n from distutils.core import setup, Extension\n\nuinput = Extension('libuinput',\n sources = ['src/uinput.c'])\...
python
edit
1
0
mit
1c11d8e2169a90efcd16340c46114cf978e2343f
ynsta/steamcontroller,ynsta/steamcontroller
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nJIRA = {\n \"server\": \"https://example.com/jira/\",\n \"user\": \"user\",\n \"password\": \"password\"\n}\n\n```\n\nApply this change: Add keyring to example config" }, { "role": "assistant", "content": "import keyrin...
python
edit
1
0
mit
2bf883741ce763bde729f2930af913c44a807cb5
mrts/ask-jira
jiraconfig-sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import AuthenticationBase\n\n\nclass Delegated(AuthenticationBase):\n\n def __init__(self, domain):\n self.domain = domain\n\n def get_token(self, client_id, target, api_type, grant_type,\n id_token=...
python
edit
1
5
mit
0df76d66fb6a2425c6ccc8a3a75d41599b2545c6
auth0/auth0-python,auth0/auth0-python
auth0/v2/authentication/delegated.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n mackerel.host\n ~~~~~~~~~~~~~\n\n Mackerel client implemented by Pyton.\n\n Ported from `mackerel-client-ruby`.\n <https://github.com/mackerelio/mackerel-client-ruby>\n\n :copyright: (c) 2...
python
edit
1
1
bsd-3-clause
46fc6c7f8f63ce747a30a35bb5fb33ff2d53a2c0
heavenshell/py-mackerel-client
mackerel/host.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef get_price_without_vat(price_to_show, vat_percent):\n raise NotImplementedError()\n\n\ndef get_price_without_vat_from_other_valuta(conversion_rate, origin_price,\n origin_vat, other_vat):\n ...
python
edit
1
1
mit
3053219149f7dac7ab073fc24488116b1b280b77
coolshop-com/coolshop-application-assignment
money_rounding.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom .log import log_input, log_output\n\n\ndef open(*args, **kwargs):\n \"\"\"Built-in open replacement that logs input and output\n\n Workaround for issue #44. Patching `__builtins__['open']` is complicated,\n becau...
python
edit
1
8
apache-2.0
d51d9cc67eca9566673e963e824dc335eb47a9af
recipy/recipy,recipy/recipy
recipy/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC\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 obtai...
python
edit
1
2
apache-2.0
292a5e5abd0cd3f6d1b30b4513a0bd1f22cefa1b
paulmathews/nova,NewpTone/stacklab-nova,paulmathews/nova,NewpTone/stacklab-nova,savi-dev/nova,NewpTone/stacklab-nova,savi-dev/nova,savi-dev/nova,paulmathews/nova
nova/version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014-2015 0xc0170\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache...
python
edit
1
3
apache-2.0
bd78b8c1bab94b5f048f8bc4895657f1fd36ddfc
0xc0170/project_generator,sarahmarshy/project_generator,hwfwgrp/project_generator,molejar/project_generator,project-generator/project_generator,ohagendorf/project_generator
project_generator/commands/clean.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom better_zoom import BetterZoom\nfrom better_selecting_zoom import BetterSelectingZoom\nfrom broadcaster import BroadcasterTool\nfrom dataprinter import DataPrinter\nfrom data_label_tool import DataLabelTool\nfrom drag_zoom import DragZo...
python
edit
33
0
bsd-3-clause
27a0226ec444523034d739a00a999b089ce116ba
ContinuumIO/chaco,tommy-u/chaco,tommy-u/chaco,ContinuumIO/chaco,tommy-u/chaco,ContinuumIO/chaco,burnpanck/chaco,burnpanck/chaco,ContinuumIO/chaco,burnpanck/chaco
enthought/chaco/tools/api.py
rejected_lint
Too many lint violations: 33
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\nfrom django.shortcuts import render\n\nfrom molo.core.models import ArticlePage\nfrom molo.commenting.models import MoloComment\nfrom wagtail.wagtailsearch.models imp...
python
edit
1
4
bsd-2-clause
eec24c2cff1b588b957215a867a85a148f4e71e9
praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme
tuneme/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('tests',parent_package,top_path)\n\n config.add_subpackage('examples')\...
python
edit
3
1
bsd-3-clause
548e54c0a3e5fe7115b6f92e449c53f5a08ba5de
cournape/numscons,cournape/numscons,cournape/numscons
tests/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\n\nimport repl as benchrepl\n\n@click.group()\n@click.option('--debug/--no-debug', default=False)\ndef cli(debug):\n\t\"\"\"Benchctl is a utility for interacting with benchd and benchd-aggregator\n\tservers to fetch data, progr...
python
edit
1
1
bsd-3-clause
0469c2aba43b20b76482eb9c42c7be19eb39b2a4
openlabequipment/benchd
benchctl/benchctl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import Extension as _Extension\nfrom dist import _get_unpatched\n_Extension = _get_unpatched(_Extension)\n\ntry:\n from Pyrex.Distutils.build_ext import build_ext\nexcept ImportError:\n have_pyrex = False\nelse:\n ...
python
edit
2
3
mit
f6cad3a2bfeb4238da359c882fe7cbbaedb5d8b7
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/extension.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nlog = logging.getLogger(__name__)\n\nfrom pyramid.config import Configurator\nfrom sqlalchemy import engine_from_config\n\nfrom .models import DBSession\n\nrequired_settings = [\n 'pyramid.secret.session',\n 'p...
python
edit
1
4
isc
06b536db7ed82a68a3c1627769364b80dd85e259
cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria,cdunklau/alexandria,bertjwregeer/alexandria
alexandria/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014-2015 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 ...
python
edit
1
2
apache-2.0
bf9866e2c337f024fcc02de69456a235dc7ac07c
jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab
labs/lab-6/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport caldav\nfrom dateutil.relativedelta import relativedelta\n\nlog = logging.getLogger(__file__)\n\n\ndef addToCal(url, date_from, date_end, summary):\n \"\"\" Add entry in calendar to period date_from, date_end \"\"\...
python
edit
1
2
bsd-3-clause
b05eacfa7f2a3fb653ec4a9653780d211245bfb1
doyousoft/pyvac,sayoun/pyvac,doyousoft/pyvac,sayoun/pyvac,doyousoft/pyvac,sayoun/pyvac
pyvac/helpers/calendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nMisc. views.\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom django.contrib.comments.models import Comment\nfrom django.contrib.sitemaps import views as sitemap_views\nfrom django.shortcuts import render\nfrom django.views.d...
python
edit
1
1
bsd-3-clause
1fffdb60aa4eb875bfbd961773d0cf5066dc38e2
nanuxbe/django,xavierdutreilh/djangoproject.com,vxvinh1511/djangoproject.com,rmoorman/djangoproject.com,gnarf/djangoproject.com,django/djangoproject.com,rmoorman/djangoproject.com,relekang/djangoproject.com,hassanabidpk/djangoproject.com,alawnchen/djangoproject.com,alawnchen/djangoproject.com,khkaminska/djangoproject.c...
django_website/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport autograd.numpy as np\n\n\"\"\"\nReferences:\nhttps://en.wikipedia.org/wiki/Activation_function\n\"\"\"\n\n\ndef sigmoid(z):\n return 1.0 / (1.0 + np.exp(-z))\n\n\ndef softmax(z):\n # Avoid numerical overflow by removing max\n ...
python
edit
1
2
mit
b8ad378a796ee867acfa3198e04d47a500dd90d3
rushter/MLAlgorithms
mla/neuralnet/activations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nEQ_RABBITMQ_URL = os.getenv('EQ_RABBITMQ_URL', 'amqp://admin:admin@localhost:5672/%2F')\nEQ_RABBITMQ_QUEUE_NAME = os.getenv('EQ_RABBITMQ_QUEUE_NAME', 'eq-submissions')\nEQ_RABBITMQ_TEST_QUEUE_NAME = os.getenv('EQ_RABBITMQ_TES...
python
edit
1
0
mit
5f1ccd3845e198495e33748b460ef6fa9858e925
ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner
app/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport redis\nimport urlparse\n\nimport beaver.transport\n\n\nclass RedisTransport(beaver.transport.Transport):\n\n def __init__(self, file_config, beaver_config):\n super(RedisTransport, self).__init__(file_confi...
python
edit
1
4
mit
31ce7c5c264e7648427f73b51cd966165e63ec23
doghrim/python-beaver,Appdynamics/beaver,josegonzalez/python-beaver,doghrim/python-beaver,jlambert121/beaver,davidmoravek/python-beaver,josegonzalez/python-beaver,imacube/python-beaver,PierreF/beaver,zuazo-forks/beaver,zuazo-forks/beaver,thomasalrin/beaver,python-beaver/python-beaver,PierreF/beaver,rajmarndi/python-bea...
beaver/redis_transport.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom django.contrib.auth.models import User\n\n\nclass UserSerializer(serializers.HyperlinkedModelSerializer):\n \"\"\" Serializer for a User\n \"\"\"\n\n class Meta:\n model = User\n ...
python
edit
1
0
mit
e91eac0c667c74062672a1a2cdb7da2a910f8cf7
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree
InvenTree/users/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.utils.encoding import force_unicode\n\nclass LinksManager(models.Manager):\n\n def for_model(self, model):\n \"\"\"\n Que...
python
edit
1
2
bsd-3-clause
fcbb2ec6ebceebea0012971a831f2941d1943708
habeanf/Open-Knesset,jspan/Open-Knesset,noamelf/Open-Knesset,navotsil/Open-Knesset,OriHoch/Open-Knesset,noamelf/Open-Knesset,habeanf/Open-Knesset,noamelf/Open-Knesset,daonb/Open-Knesset,Shrulik/Open-Knesset,ofri/Open-Knesset,OriHoch/Open-Knesset,ofri/Open-Knesset,noamelf/Open-Knesset,MeirKriheli/Open-Knesset,DanaOshri/...
src/knesset/links/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\ndef get_mem_usage():\n \"\"\"returns percentage and vsz mem usage of this script\"\"\"\n pid = os.getpid()\n psout = os.popen( \"ps -p %s u\"%pid ).read()\n \n parsed_psout = psout.split(\"\\n\")[1].s...
python
edit
3
1
bsd-3-clause
51d09e2552c31e74b85c2e6bd12bcbab7e1b2047
jeriksson/graphserver,jeriksson/graphserver,graphserver/graphserver,bmander/graphserver,brendannee/Bikesy-Backend,brendannee/Bikesy-Backend,brendannee/Bikesy-Backend,jeriksson/graphserver,jeriksson/graphserver,bmander/graphserver,jeriksson/graphserver,graphserver/graphserver,brendannee/Bikesy-Backend,brendannee/Bikesy-...
pygs/test/stress_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\n\nfrom instance.config import app_config\n\n\napp = Flask(__name__)\n\n\ndef EnvironmentName(environ):\n app.config.from_object(app_config[environ])\n\n\nEnvironmentName('...
python
edit
3
1
mit
93d2e33795e240407ab7e18aec67514124ff6713
paulupendo/CP-2-Bucketlist-Application
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport modinfo\n\nclass Mod():\n \"\"\"The Mod class\n\n This is supposed to act like a superclass for mods.\n Execution order is as follows:\n mod_load -> mod_complete\n \"\"\"\n def mod_info(self):\n \"\"\"Get the...
python
edit
1
2
mit
da952803636a0701331008a025b6789de89ce152
AWSW-Modding/AWSW-Modtools
modloader/modclass.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nimport shutil\nfrom optparse import OptionParser\n\nfrom perfrunner.helpers.remote import RemoteHelper\nfrom perfrunner.settings import ClusterSpec\n\n\ndef get_options():\n usage = '%prog -c cluster'\n\n parser = OptionP...
python
edit
1
5
apache-2.0
ea7200bc9774f69562b37f177ad18ca606998dfa
couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner
perfrunner/utils/debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport sys\nimport hybridJaccard as hj\n\ndef main():\n \"Command line testinterface.\"\n\n parser = argparse.ArgumentParser()\n parser.add_argument('-c','--configFile', help=\"Configuration file (JSON).\", require...
python
edit
1
3
apache-2.0
07d7eddac89d5ac54af62e185801cdbe71720b7c
usc-isi-i2/hybrid-jaccard
hybridJaccardTest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nDescription: Client side of sanity check\nAuthor: Mike Ellis\nCopyright 2017 Owner\n\"\"\"\nfrom htmltree import *\ndef start():\n console.log(\"Starting\")\n newcontent = H1(\"Sanity check PASS\", _cl...
python
edit
10
1
mit
8fad8a4f1591fb4a7d7d1bdf932c5918197b475c
Michael-F-Ellis/htmltree
tests/client.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# This is a platform-independent script to automate building, compiling,\n# and assembling cubeOS. Windows users must have das and dcpu-16 binaries\n# in the cubeOS directory, or in their system PATH location\nfrom subpro...
python
edit
3
0
mit
0dec612eb764cd5cc236637e3fa7473a7c01f8de
cubeOS/cubeOS-alpha
run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom apps.contacts.models import BaseContact\n\n\nclass ContactMixin(object):\n \"\"\"\n Would be used for adding contacts functionality to models with contact data.\n \"\"\"\n\n def get_contacts(self, is_primary=False):\n ...
python
edit
1
3
mit
ab91d525abb5bb1ef476f3aac2c034e50f85617a
wis-software/office-manager
src/apps/contacts/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport configparser\nfrom blo.BloArticle import BloArticle\nfrom blo.DBControl import DBControl\n\n\nclass Blo:\n def __init__(self, config_file_path):\n config = configparser.ConfigParser()\n config.read(config_file_path)\...
python
edit
1
1
mit
6a5c9ccf0bd2582cf42577712309b8fd6e912966
10nin/blo,10nin/blo
blo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# ====================================================================\n# Copyright (c) 2006 CollabNet. All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should hav...
python
edit
1
0
apache-2.0
58d04f636a01cb1d2cbf75414edcd819029058e4
YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion
packages/python-windows/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"\n\nfrom django.test import TestCase\n\n\ncla...
python
edit
1
1
bsd-3-clause
0433623b8e15559fe304e6406e58b1cd2639493f
datphan/teracy-tutorial
apps/polls/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import app_settings\n\n_render_method = None\ndef get_render_method():\n global _render_method\n\n if _render_method is None:\n _render_method = from_dotted_path(app_settings.EMAIL_RENDER_METHOD)\n\n return _render_me...
python
edit
1
2
bsd-3-clause
8d651ed493d2787da478f0c7c120917d3335b4d5
playfire/django-email-from-template,lamby/django-email-from-template
email_from_template/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\nimport os\nfrom unittest import main\n\nfrom _jb_runner_tools import jb_start_tests, jb_doc_args\nfrom teamcity import unittestpy\n\nif __name__ == '__main__':\n path, targets, additional_args = jb_start_tests()\n\n ar...
python
edit
1
0
apache-2.0
1372c00a0668cc6a39953264d23f012391afe768
mglukhikh/intellij-community,ThiagoGarciaAlves/intellij-community,asedunov/intellij-community,vvv1559/intellij-community,signed/intellij-community,suncycheng/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,xfournet/intellij-community,signed/intellij-community,mglukhikh/intellij-community,xfo...
python/helpers/pycharm/_jb_unittest_runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Task functions for use with Invoke.\"\"\"\nfrom invoke import task\n\n\n@task\ndef clean(context):\n cmd = '$(npm bin)/gulp clean'\n\n context.run(cmd)\n\n\n@task\ndef requirements(context):\n steps = [\n 'pip install ...
python
edit
1
4
mit
f5206fa6cd94758202378b7616e578bd8a3a8dfe
rlucioni/typesetter,rlucioni/typesetter,rlucioni/typesetter
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n__version__ = \"unknown\"\n\ntry:\n from version import get_git_version\n __version__ = get_git_version()\nexcept Exception as message:\n print(message)\n\n__author__ = \"Matthew Wood\"\n\nPACKAGE_ROOT = os.path.abspat...
python
edit
1
0
bsd-3-clause
d7299fd931ae62cc661b48dbc84aa161a395f1fa
jefemagril/fermipy,jefemagril/fermipy,jefemagril/fermipy,fermiPy/fermipy
fermipy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport logging\nimport sys\n\nfrom . import commands\n\nparser = argparse.ArgumentParser(description=\"Cobe control\")\nparser.add_argument(\"-b\", \"--brain\", default=\"cobe.brain\")\nparser.add_argument(\"--debug\", acti...
python
edit
2
4
mit
13544ca42db9947eaed7e82c4733683f1fc7c381
LeMagnesium/cobe,meska/cobe,LeMagnesium/cobe,pteichman/cobe,wodim/cobe-ng,DarkMio/cobe,tiagochiavericosta/cobe,wodim/cobe-ng,tiagochiavericosta/cobe,pteichman/cobe,DarkMio/cobe,meska/cobe
cobe/control.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add detection support for bottle." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals, division\n\n\ndef is_available(*capacities):\n \"\"\"\n Detects if t...
python
new_file
2
2
mit
1afa686eafbaa4392e81cad881db55e1fafb112f
armet/python-armet
src/armet/connectors/bottle/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom dataset import DatasetItem\n\nclass DatasetSpider(CrawlSpider):\n\n name =...
python
edit
1
1
mit
e84ca65440bb6b38bf0630373766789d6915a20d
MaxLikelihood/CODE
dataset/dataset/spiders/dataset_spider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nwith open('README.rst') as file:\n long_description = file.read()\n\nclassifiers = [\n 'Programming Language :: Python :: 3',\n 'Development Status :: 5 - Production/Stab...
python
edit
1
0
mit
c3bb736962d77d1fdd0207ba2ee487c1177451c7
etissieres/PyEventEmitter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\n\ndef version():\n \"\"\"Return version string.\"\"\"\n with open('autopep8.py') as input_file:\n for line in input_file:\n if line.st...
python
edit
1
3
mit
934ed097d92728bde9e1fc42b11d688c2b512847
vauxoo-dev/autopep8,MeteorAdminz/autopep8,MeteorAdminz/autopep8,hhatto/autopep8,vauxoo-dev/autopep8,Vauxoo/autopep8,Vauxoo/autopep8,hhatto/autopep8,SG345/autopep8,SG345/autopep8
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nclass BaseStorage(object):\n \"\"\"docstring for BaseStorage\"\"\"\n def __init__(self):\n super(BaseStorage, self).__init__()\n\n def filter(self, criteria):\n raise Exception(\"Not implemneted Error\")\n\n de...
python
edit
1
1
mit
a6d49059851450c7ea527941600564cb3f48cc72
muatik/flask-profiler
flask_profiler/storage/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"empty message\n\nRevision ID: 4093ccb6d914\nRevises: None\nCreate Date: 2014-04-30 22:02:09.991428\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '4093ccb6d914'\ndown_revision = None\n\nfrom alembic import op\nimpor...
python
edit
1
1
mit
0aba3f8d1131b502beff1c249e55af88115950ae
taeram/ineffable,taeram/ineffable,taeram/ineffable
migrations/versions/20140430220209_4093ccb6d914.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib.request\nimport urllib.error\nimport json\nimport plugin\nimport command\nimport message\nimport os\n\ndef onInit(plugin):\n star_command = command.command(plugin, 'star', shortdesc='Post a random picture of Star Butterfly ...
python
edit
8
3
apache-2.0
14edc2e547f3dbad0777c8fccc23a0d0b6a0019f
dhinakg/BitSTAR,dhinakg/BitSTAR,StarbotDiscord/Starbot,StarbotDiscord/Starbot
plugins/star.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nimport jingo\n\nfrom users.models import Profile\nfrom projects.models import Project\nfrom events.models import Event\nfrom feeds.models import Entry\n\n\ndef splash(request):\n \"\"\"Display splash page. With featured ...
python
edit
1
3
bsd-3-clause
be41ae0d987cd1408cb2db649a2eccd73bc272f3
mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm
apps/innovate/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport collections\nfrom setuptools import setup\n\nfrom pip.req import parse_requirements\n\ndependency_links = []\ninstall_requires = []\n\nReqOpts = collections.namedtuple('ReqOpts', ['skip_requirements_regex', 'de...
python
edit
1
0
apache-2.0
a0e795cb0bed84ae6161f5e64290910f2ffe8ee6
uber/vertica-python,twneale/vertica-python,brokendata/vertica-python,natthew/vertica-python,dennisobrien/vertica-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Python imports\nfrom setuptools import setup\n\n# Project imports\nfrom notable import app\n\n# Attributes\nAUTHOR = 'John McFarlane'\nDESCRIPTION = 'A very simple note taking application'\nEMAIL = '<EMAIL>'\nNAME = 'Notable'\nPYPI = 'htt...
python
edit
1
0
mit
69e1e4450eaeb9d57f4cbfff020a9ed56dbbb3ce
jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom modules import *\n\nimport re\nimport urllib2\nimport traceback\ntry:\n import simplejson as json\nexcept ImportError:\n import json\n\nfrom unidecode import unidecode\n\nfrom twitter import Twitter\nfrom bitly import Bitly\nfrom...
python
edit
3
5
mit
2e4e9ab2bab2e0a4bd00e10dcf115b1f96d1c714
billyvg/piebot
modules/urlparser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Cloudbase Solutions Srl\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy o...
python
edit
1
1
apache-2.0
c7f1759ef02c0fa12ca408dfac9d25227fbceba7
klmitch/nova,openstack/nova,klmitch/nova,openstack/nova,mahak/nova,mahak/nova,mahak/nova,klmitch/nova,klmitch/nova,openstack/nova
nova/policies/server_password.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\n\ndef update_pins(setup_args):\n # Use requirements and constraints to set version pins\n packages = set()\n with open('./requirements.txt') as requirements:\n for r in requirements:\n if r...
python
edit
1
13
mit
65a78d5aafdbba03812995f38e31fba0621e350e
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
setup_utils.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom romanesco.format import dict_to_vtkarrays, dict_to_vtkrow\nimport vtk\n\nvtk_builder = vtk.vtkMutableDirectedGraph()\nnode_fields = input[\"node_fields\"]\nedge_fields = input[\"edge_fields\"]\ndict_to_vtkarrays(input[\"node_data\"], n...
python
edit
3
3
apache-2.0
9a97b9df87f06268ab1075726835da95f4852052
Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,girder/girder_worker,girder/girder_worker,girder/girder_worker
romanesco/format/tree/nested_to_vtktree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nclass TestRepoHandlers(TestCase):\n def test_repo_registry(self):\n from package.handlers import get_repo, supported_repos\n g = get_repo(\"github\")\n self.assertEqual(g.title, \"...
python
edit
1
1
mit
a1f26386bec0c4d39bce77d0fd3975ae4b0930d0
nanuxbe/djangopackages,nanuxbe/djangopackages,pydanny/djangopackages,QLGu/djangopackages,miketheman/opencomparison,benracine/opencomparison,QLGu/djangopackages,cartwheelweb/packaginator,miketheman/opencomparison,audreyr/opencomparison,benracine/opencomparison,audreyr/opencomparison,QLGu/djangopackages,cartwheelweb/pack...
apps/package/tests/test_handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name = 'processout',\n packages = ['ProcessOut'],\n version = '2.1.0',\n description = 'ProcessOut API bindings.',\n author = 'ProcessOut',\n author_email = '<EMAIL>',\n url = 'https://git...
python
edit
1
0
mit
5b263cd9c88e7e846fce3b38b9fbc069e809b13c
ProcessOut/processout-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport codecs\nimport os\nimport re\n\nroot_dir = os.path.abspath(os.path.dirname(__file__))\nPACKAGE = 'hackernews_scraper'\n\ndef get_version(package_name):\n version_re = re.compile(r\"^_...
python
edit
null
null
bsd-2-clause
f39c6ff64478f4b20f5eaa26ec060275cdc81813
NiGhTTraX/hackernews-scraper
setup.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The vumi.dispatchers API.\"\"\"\n\n__all__ = [\"BaseDispatchWorker\", \"BaseDispatchRouter\", \"SimpleDispatchRouter\",\n \"TransportToTransportRouter\", \"ToAddrRouter\",\n \"FromAddrMultiplexRouter\", \"UserGroup...
python
edit
1
0
bsd-3-clause
b96cb194c8edd54fda9868d69fda515ac8beb29f
harrissoerja/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix
vumi/dispatchers/__init__.py
rejected_duplicate
Near-duplicate of sample 2225
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_filters import FilterSet, CharFilter, IsoDateTimeFilter, BooleanFilter, ModelChoiceFilter\n\nfrom falmer.events.models import Curator\nfrom . import models\n\n\nclass EventFilterSet(FilterSet):\n class Meta:\n model = ...
python
edit
1
0
mit
2c41a2b37df94339074fdc04ccb3ef560d2e6cac
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/events/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\n\n# Sounds note: Could use http://simpleaudio.readthedocs.io/en/latest/installation.html\nclass GearRatio (threading.Thread):\n PIN1 = 5\n PIN2 = 6\n\n STATE_IDLE = 1\n STATE_START = 2\n STATE_COUNTING = 3\n...
python
edit
1
3
apache-2.0
18a669f3fc9ebd5c1604d1f43fa7b93a2513a250
RoboErik/RUBIK,RoboErik/RUBIK,RoboErik/RUBIK
Rubik/GearRatios/gear_ratios.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask, render_template\nfrom names import get_full_name\n\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef index():\n return render_template('index.html', name=get_full_name())\n\n\nif __name__ == \"__mai...
python
edit
1
2
mit
431720194c20dde7b19236d2302c0f9910fd7ea4
treyhunner/pseudorandom.name,treyhunner/pseudorandom.name
pseudorandom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This module contains built-in introspector plugins for various common\n# Django apps.\n\n# These imports trigger the lower-down files\nimport south.introspection_plugins.geodjango\nimport south.introspection_plugins.django_tagging\nimport...
python
edit
3
0
apache-2.0
55646644c18fe5e10669743025cc00b8225f9908
philipn/django-south,philipn/django-south,nimnull/django-south,RaD/django-south,RaD/django-south,RaD/django-south,nimnull/django-south
south/introspection_plugins/__init__.py
rejected_duplicate
Near-duplicate of sample 1917
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nSetup script.\n\nCreated on Oct 10, 2011\n\n@author: tmetsch\n\"\"\"\n\nfrom distutils.core import setup\nfrom distutils.extension import Extension\ntry:\n from Cython.Build import build_ext, cythonize\n\...
python
edit
1
0
mit
08f633cdf0f5dcd1940da46e91c175e81b39ad3f
tmetsch/python-dtrace,tmetsch/python-dtrace
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mr_streams as ms\nimport unittest\n\n# :::: auxilary functions ::::\ndef sum_reduction(x,y):\n return x + y\n\nclass TestMisc(unittest.TestCase):\n\n def test_sum_reduce(self):\n _ = ms.stream([1,2,3,4,5]).reduce(sum_red...
python
edit
5
2
mit
1239623e7e23d7c51e864f715c0908ef2c0d2765
caffeine-potent/Streamer-Datastructure
tests/test_reduce.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom synthtool import shell\nfrom pathlib import Path\n\n# Parent of the script is the API-specific directory\n# Parent of the API-specific directory is the apis directory\n# Parent of the apis directory is the repo root\nroot = ...
python
edit
1
0
apache-2.0
411ae98889d3611151a6f94d661b86b1bbc5e026
googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/gcloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet
apis/Google.Cloud.Speech.V1/synth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Compatibility routines.\"\"\"\n\nfrom __future__ import absolute_import\n\nimport sys\n\ntry:\n import Image # pylint: disable=import-error,unused-import\nexcept ImportError:\n from PIL import Image # pylint: disable=unused-im...
python
edit
4
0
mit
2722a59aad0775f1bcd1e81232ff445b9012a2ae
jterrace/pyssim
ssim/compat.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module contains utility functions for the Mythril support package.\"\"\"\nfrom typing import Dict\nimport logging\nimport _pysha3 as sha3\n\nlog = logging.getLogger(__name__)\n\n\nclass Singleton(type):\n \"\"\"A metaclass typ...
python
edit
3
3
mit
31f3a4a5c388c7c021c103687fbc8c8a8a0be005
b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril
mythril/support/support_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_website.settings.www import *\n\nPREPEND_WWW = False\nAPPEND_SLASH = True\nINSTALLED_APPS = ['django_website.docs']\nTEMPLATE_CONTEXT_PROCESSORS += [\"django.core.context_processors.request\"]\nROOT_URLCONF = 'django_website.url...
python
edit
5
0
bsd-3-clause
4a810640a3ccdaaa975b9d1b807ff7365282e5b9
relekang/djangoproject.com,gnarf/djangoproject.com,relekang/djangoproject.com,django/djangoproject.com,django/djangoproject.com,khkaminska/djangoproject.com,nanuxbe/django,khkaminska/djangoproject.com,nanuxbe/django,vxvinh1511/djangoproject.com,django/djangoproject.com,django/djangoproject.com,vxvinh1511/djangoproject....
django_website/settings/docs.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wafer.talks.models import Talk, TalkType\nfrom wafer.tests.utils import create_user\n\n\ndef create_talk_type(name):\n \"\"\"Create a talk type\"\"\"\n return TalkType.objects.create(name=name)\n\n\ndef create_talk(title, status,...
python
edit
1
4
isc
ef42117ec2bd2a275dcea5f5a2d57322bbd21faa
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/talks/tests/fixtures.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nimport os\nimport os.path\nimport time\nimport re\nfrom celery.task import task\n\n@task\ndef cleanup_temp_tif_files(age=7200):\n temp_dir = settings.DATASET_DOWNLOAD_DIR\n cutoff = time.time() - age\...
python
edit
1
5
bsd-3-clause
69c2921f308ef1bd102ba95152ebdeccf72b8f6e
consbio/seedsource,consbio/seedsource,consbio/seedsource
source/seedsource/tasks/cleanup_tifs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\r\n# $Id:$\r\n\r\nfrom pyglet.gl import *\r\n\r\ndef draw_client_border(window):\r\n glClearColor(0, 0, 0, 1)\r\n glClear(GL_COLOR_BUFFER_BIT)\r\n\r\n glMatrixMode(GL_PROJECTION)\r\n glLoadIdentity()\r\n glO...
python
edit
21
1
bsd-3-clause
50146d9e3e43ca4d9c50d044c52714cf4234cee1
adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet,niklaskorz/pyglet,seeminglee/pyglet64,niklaskorz/pyglet,niklaskorz/pyglet
tests/window/window_util.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\ntry:\n\tfrom setuptools import setup\nexcept:\n\tpass\n\nsetup(\n name = \"pyjaco\",\n version = \"1.0.0\",\n author = \"Pyjaco development team\",\n author_email = \"<EMAIL>\",\n description...
python
edit
1
0
mit
5737f701d59c229d62f25734260fccb23722a67d
buchuki/pyjaco,chrivers/pyjaco,buchuki/pyjaco,chrivers/pyjaco,chrivers/pyjaco,buchuki/pyjaco
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom flask.ext.mongoengine.wtf import model_form\n\nfrom paveldedik.models import User, Post\n\n\npost_args = {\n 'title': {'label': u'Title'},\n 'leading': {'label': u'Leading'},\n 'content': {'label':...
python
edit
1
0
mit
cddb0ae5c9c2d96c5902943f8b341ab2b698235f
paveldedik/blog,paveldedik/blog
paveldedik/forms.py
accepted
null
true