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\nimport os\nfrom twisted.internet import reactor\nfrom heufybot import HeufyBot, HeufyBotFactory\nfrom config import Config\n\nclass BotHandler(object):\n factories = {}\n globalConfig = None\n\n def __init__(self):\n print \...
python
edit
3
5
mit
443c7f0758b8131069aa0ef9e89eeed6f2d086c1
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
pyheufybot/bothandler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom tests.support.case import ModuleCase\n\n\nclass PillarIncludeTest(ModuleCase):\n\n def test_pillar_include(self):\n '''\n Test pillar include\n '''\n ret = self.mi...
python
edit
1
1
apache-2.0
5dc5de9dab24cf698dc26db24d1e1697472c2e05
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/pillar/test_pillar_include.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens...
python
edit
1
0
apache-2.0
55476a86ed482d2e1f473dc629848d2068225c73
keras-team/keras,keras-team/keras
keras/dtensor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nFFMPEG_PATH = '/usr/local/bin/ffmpeg'\n\nVIDEO_CODEC = 'h264' # used with ffprobe to detect whether or not we need to encode\nVIDEO_ENCODER = 'h264_omx'\n\nAUDIO_CODEC = 'aac' # used with ffprobe to detect whether or not we need to encode\n...
python
edit
1
0
mit
52f85821e35389741f5c595c1808b7b7efab2850
danielbreves/auto_encoder
config.py
rejected_duplicate
Near-duplicate of sample 22541
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.8 on 2016-09-29 19:29\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('cor...
python
edit
1
0
apache-2.0
0633a9dbc2dd5972c41a1d3a21243af7f1a11055
CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend
core/migrations/0065_alter_machinerequest_required_fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom email import utils\nimport re\nimport time\nimport urllib\n\n\ndef digits(s):\n if not s:\n return ''\n return re.sub('[^0-9]', '', s)\n\n\ndef floatformat(num, num_decimals):\n return \"%.{}f\".format(num_decimals) % n...
python
edit
1
3
mit
2c03171b75b6bb4f3a77d3b46ee8fd1e5b022077
bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/t...
template_engine/jinja2_filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport socket\n\ndef convert_filetime_to_epoch(filetime):\n return (filetime / 10000000) - 11644473600\n\n# Can be used to test connectivity if telnet isn't installed (https://stackoverflow.com/a/33117579/399105)...
python
edit
1
2
mit
a01d87c77db46eeb61ff175e6f7cb6973fe80fa2
bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile
python/misc/functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nDOMAIN = 'studyindenmark-newscontrol.appspot.com'\nMAIL_SENDER = \"Per Thulin <<EMAIL>>\"\n```\n\nApply this change: Change email sender to <EMAIL>" }, { "role": "assistant", "content": "# -*- coding: ...
python
edit
1
0
mit
3e66c6546eda367bfef4038a4bb512862a9dd01f
studyindenmark/newscontrol,youtify/newscontrol,studyindenmark/newscontrol,youtify/newscontrol
config.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
aee3fa76d0d61778f17d200f630bbed145fd69c8
rahulunair/nova,jianghuaw/nova,mahak/nova,klmitch/nova,Juniper/nova,rahulunair/nova,klmitch/nova,mahak/nova,phenoxim/nova,rajalokan/nova,openstack/nova,mikalstill/nova,mikalstill/nova,klmitch/nova,gooddata/openstack-nova,Juniper/nova,Juniper/nova,mahak/nova,gooddata/openstack-nova,phenoxim/nova,jianghuaw/nova,rahulunai...
nova/policies/instance_usage_audit_log.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.version import get_version as django_get_version\n\n\nVERSION = (0, 9, 0, 'beta', 1)\n\n\ndef get_version():\n return django_get_version(VERSION) # pragma: no cover\n\n```\n\nApply this change: Move import of Django's g...
python
edit
1
1
bsd-3-clause
1abbca6200fa3da0a3216b18b1385f3575edb49a
myimages/django-registration,Troyhy/django-registration,futurecolors/django-registration,hacklabr/django-registration,akvo/django-registration,sandipagr/django-registration,futurecolors/django-registration,liberation/django-registration,euanlau/django-registration,tdruez/django-registration,Troyhy/django-registration,g...
registration/__init__.py
rejected_duplicate
Near-duplicate of sample 13901
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom werkzeug.security import generate_password_hash, check_password_hash\n\nfrom . import db\n\nclass User(db.Model):\n __tablename__ = 'users'\n id = db.Column(db.Integer, primary_key=True, au...
python
edit
1
1
mit
fedf78926b7c135f0f86934975a2b70aa1256884
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport urllib, json, sys\n\ndef generate(milestone):\n \n # Find the milestone number for the given name\n milestones_json = json.loads(urllib.urlopen('https://api.github.com/repos/CoolProp/Co...
python
edit
1
5
mit
eb28f042e1fdc6b18fbbc75b2dc31825b9ee70ee
dcprojects/CoolProp,DANA-Laboratory/CoolProp,JonWel/CoolProp,henningjp/CoolProp,JonWel/CoolProp,DANA-Laboratory/CoolProp,dcprojects/CoolProp,JonWel/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,dcprojects/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,dcprojects/CoolProp,henningjp/CoolProp,JonWel/CoolPr...
dev/scripts/milestone2rst.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests for sanity of auxiliary basis sets\n\"\"\"\n\nimport pytest\n\nfrom .common_testvars import bs_names, bs_metadata\n\n\n@pytest.mark.parametrize('basis_name', bs_names)\ndef test_aux_sanity(basis_name):\n \"\"\"For all basis...
python
edit
1
7
bsd-3-clause
5fba86c9f9b0d647dc8f821a97a7cc2dbb76deeb
MOLSSI-BSE/basis_set_exchange
basis_set_exchange/tests/test_aux_sanity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jan 10 10:56:16 2017\n\n@author: kangwang\n\"\"\"\n\nimport sys\n\n\nfrom permamodel.components import bmi_Ku_component\nx=bmi_Ku_component.BmiKuMethod()\n\nx.initializ...
python
edit
2
0
mit
e4332261b557c9567568517d33b55eaaa5d1468c
permamodel/permamodel,permamodel/permamodel
run_test_BMI_ku_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom ez_setup import use_setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\nfrom pylamb import __version__\n\n\nsetup(name='ILAMB',\n version=__version__,\n author='Mark Piper',\n ...
python
edit
1
0
mit
798c4489912ab0f6706adc626d930268f2244986
permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom IPython.parallel import Client\nfrom distarray.client import DistArrayContext\nfrom distarray import odin\n\nimport unittest\n\n\nc = Client()\ndv = c[:]\ndac = DistArrayContext(dv)\n\n\n@odin.local(dac)\ndef locals...
python
edit
5
1
bsd-3-clause
f69125a2e9dcd614057c87a36b415f8966075334
enthought/distarray,RaoUmer/distarray,RaoUmer/distarray,enthought/distarray
distarray/tests/test_odin.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom distribute_setup import use_setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\n\nwith open(\"README.rst\") as f:\n long_desc = f.read()\n\nsetup(\n name=\"custodian\",\n packages=find_packa...
python
edit
1
0
mit
706661c45a35fd03784a335ee58030c2a0a2e34e
materialsproject/custodian,materialsproject/custodian,materialsproject/custodian,specter119/custodian,alberthxf/custodian,specter119/custodian,davidwaroquiers/custodian,xhqu1981/custodian,specter119/custodian
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom os.path import dirname, join\n\nfrom .evaluator import evaluate\nfrom .parser import parse, unparse, parse_multiple\nfrom .types import Environment\n\n\ndef interpret(source, env=None):\n \"\"\"\n Inter...
python
edit
1
3
bsd-3-clause
b3c8ffd334df2c7669eb9f3a037ef6fa33fc521b
codecop/diy-lang,codecop/diy-lang
diylang/interpreter.py
rejected_duplicate
Near-duplicate of sample 14596
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom rest_framework.parsers import JSONParser\nfrom api.base.renderers import JSONAPIRenderer\n\nclass JSONAPIParser(JSONParser):\n \"\"\"\n Parses JSON-serialized data. Overrides media_type.\n \"\"\"\n media_type = 'applicati...
python
edit
1
3
apache-2.0
dcbb22300663f0484e81c13770f196e078e83ca5
icereval/osf.io,RomanZWang/osf.io,cwisecarver/osf.io,abought/osf.io,sloria/osf.io,aaxelb/osf.io,zamattiac/osf.io,KAsante95/osf.io,GageGaskins/osf.io,TomHeatwole/osf.io,pattisdr/osf.io,laurenrevere/osf.io,zamattiac/osf.io,emetsger/osf.io,rdhyee/osf.io,cslzchen/osf.io,mluke93/osf.io,samchrisinger/osf.io,mattclark/osf.io,...
api/base/parsers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n version='4.0.0',\n name='vcdriver',\n description='A vcenter driver based on pyvmomi, fabric and pywinrm',\n url='https://github.com/Osirium/vcdriver',\n license='MIT'...
python
edit
1
0
mit
c2a1e32ac0ebfb2b575d8d2b852f6fdd3a4080f9
Osirium/vcdriver
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='pyretry',\n version=\"0.9\",\n description='Separate your retry logic from your business logic',\n author='Bob Renwick',\n author_email='<EMAIL>',\n url='https://github.com/...
python
edit
1
0
mit
ffb1634e89a4ca82d62f35b8befb05b29fe5b401
bobbyrenwick/pyretry
setup.py
rejected_duplicate
Near-duplicate of sample 14245
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"setup.py file.\"\"\"\nimport uuid\n\nfrom setuptools import setup\nfrom pip.req import parse_requirements\n\n\ninstall_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())\nreqs = [str(ir.req) for ir in install_reqs]\n\...
python
edit
1
0
apache-2.0
5eabda987c43c727ea03a8bd56c32e4c1490c918
napalm-automation/napalm-ansible,napalm-automation/napalm-ansible
setup.py
rejected_duplicate
Near-duplicate of sample 4610
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\niniconfig: brain-dead simple config-ini parsing.\n\ncompatible CPython 2.3 through to CPython 3.2, Jython, PyPy\n\n(c) 2010 Ronny Pfannschmidt, Holger Krekel\n\"\"\"\n\nfrom setuptools import setup\n\n\ndef main():\n with open('R...
python
edit
1
1
mit
77919331207033e7d6f77d86978bed3280cf05ff
ronnypfannschmidt/iniconfig,RonnyPfannschmidt/iniconfig
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nsetup(\n name='kittengroomer',\n version='1.0',\n author='Raphaël Vinot',\n author_email='<EMAIL>',\n maintainer='Raphaël Vinot',\n url='https://g...
python
edit
1
0
bsd-3-clause
e1a7b583f7651322861b07606daac2d9e6d8c2d2
Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Dymaxion00/PyCIRCLean
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest LpNorm cost\n\"\"\"\nimport numpy\nimport theano\nfrom theano import tensor as T\nfrom nose.tools import raises\n\n\ndef test_shared_variables():\n '''\n LpNorm should handle shared variables.\n '''\n assert False\n...
python
edit
3
1
bsd-3-clause
0293170e0e8d309e4b2c37e3a07f64d4447b244f
caidongyun/pylearn2,mclaughlin6464/pylearn2,kose-y/pylearn2,chrish42/pylearn,sandeepkbhat/pylearn2,junbochen/pylearn2,fishcorn/pylearn2,w1kke/pylearn2,Refefer/pylearn2,hyqneuron/pylearn2-maxsom,chrish42/pylearn,daemonmaker/pylearn2,fulmicoton/pylearn2,hyqneuron/pylearn2-maxsom,fyffyt/pylearn2,TNick/pylearn2,hantek/pyle...
pylearn2/costs/tests/test_lp_norm_cost.py
rejected_duplicate
Near-duplicate of sample 20103
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\ninstall_requires = [\n \"bleach\",\n \"jinja2\",\n \"celery-haystack\",\n \"Django>=1.4\",\n \"django-celery\",\n \"django-haystack\",\n \"django-jso...
python
edit
1
0
bsd-2-clause
165b1c9528205c96f94abf63dc327c1299c61f04
crateio/crate.web,crateio/crate.web
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Setuptools entrypoint.\"\"\"\nimport codecs\nimport os\n\nfrom setuptools import setup\n\nfrom s3keyring import __version__, __author__\n\ndirname = os.path.dirname(__file__)\n\nlong_description = (\n codecs.open(os.path.join(dirna...
python
edit
1
0
mit
0d6c2ed446cfd56f922ea7202362de2f505c1a91
InnovativeTravel/s3-keyring
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\ndef get_version(package_name):\n version_re = re.compile(r\"^__version__ = [\\\"']([\\w_.-]+)[\\\"']$\")\n package_components = package_name.split('...
python
edit
1
3
bsd-2-clause
3767e12cb429c5e96139b149cd9e66a3b1a1e2c1
NiGhTTraX/hackernews-scraper
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\ntry:\n with open('README.rst', 'r', encoding='utf-8') as f:\n readme = f.read()\nexcept IOError:\n readme = ''\n\n\nsetup(\n name='cr8',\n author='Mathias Fußenegge...
python
edit
1
0
mit
0982d077dceea70e536353bc7a8a23a30ed45cb1
mfussenegger/cr8
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\ninstall_requires = [\n \"bleach\",\n \"jinja2\",\n \"celery-haystack\",\n \"Django>=1.4\",\n \"django-celery\",\n \"django-haystack\",\n \"django-jso...
python
edit
1
0
bsd-2-clause
c051fa4d653af34f1b7ccad88b6d06805e709278
crateio/crate.web,crateio/crate.web
setup.py
rejected_duplicate
Near-duplicate of sample 23150
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools.depends import get_module_constant\nfrom setuptools import setup\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n long_description = fh.read()\n\nsetup(\n name = 'detectlanguage'...
python
edit
1
0
mit
3a3b2b40191bda7acebf084aece8e6f5ed000db4
detectlanguage/detectlanguage-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPIP setup script for the SafeID package.\n\"\"\"\nfrom setuptools import setup\n\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\ndescription=\\\n \"\"\"\n SafeID is a proof-of-concept web server libra...
python
edit
1
1
mit
5e189930d66be1b9fd8c0e1edb1aff8078b56962
ace0/safeid
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Install Mesh TensorFlow.\"\"\"\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nsetup(\n name='mesh-tensorflow',\n version='0.1.2',\n description='Mesh TensorFlow',\n author='Google Inc.',\n auth...
python
edit
1
0
apache-2.0
4f7c8188a33d671c080b643cc8105976f6810391
tensorflow/mesh,tensorflow/mesh
setup.py
rejected_duplicate
Near-duplicate of sample 20622
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport remoteobjects.dataobject\nimport remoteobjects.fields\nfrom remoteobjects.fields import *\nimport typepad.tpobject\n\n\nclass Link(remoteobjects.fields.Link):\n\n \"\"\"A `TypePadObject` property representing a l...
python
edit
7
4
bsd-3-clause
556bda5688f86949b48d52a997b6de6f4edef45f
typepad/python-typepad-api
fields.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Embeds Chrome user data files in C++ code.\"...
python
edit
1
2
bsd-3-clause
b8154abba5e1ea176566af2dcfa6eb2407dad9c6
fujunwei/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,patrickm/chromium.src,Chilledheart/chromium,ltilve/chromium,M4sse/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-...
chrome/test/chromedriver/embed_version_in_cpp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport unittest\n\n\n# Adapted from https://github.com/grpc/grpc/blob/master/examples/python/helloworld.\nclass TestGrpcio(unittest.TestCase):\n\n def setUp(self):\n ...
python
edit
1
1
mit
a154611449f1f5a485ac0e12a9feb9e28e342331
chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy
server/pypi/packages/grpcio/test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom os.path import abspath, join, dirname\nimport random\n\n\n__title__ = 'names'\n__version__ = '0.2'\n__author__ = 'Trey Hunner'\n__license__ = 'MIT'\n\n\nfull_path = lambda filename: abspath(join...
python
edit
1
3
mit
2e3fed0aa1e3c01ed2e831a387cbfd6e5e8a1709
treyhunner/names,treyhunner/names
names/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10 on 2017-08-22 21:30\nfrom __future__ import unicode_literals\n\nimport os\n\nfrom django.conf import settings\nfrom django.db import migrations, models\n\nimport sal.plugin\nfrom server.mo...
python
edit
5
4
apache-2.0
d6f598abee19d45029998e663aaa5645a1771936
salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal
server/migrations/0058_auto_20170822_1430.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom lettuce import step, world\n\n@step(u'post \"([^\"]*)\" records?')\ndef post_record(step, model_name):\n world.path = '/data/%s' % str(model_name.lower())\n for record in step.hashes:\n data = json.dumps(rec...
python
edit
1
2
bsd-3-clause
7a1351c7f677380eeee8027399e69b0d34e3e858
spiral-project/daybed,spiral-project/daybed
daybed/tests/features/model_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nqt_api = os.environ.get('QT_API', 'pyqt')\n\nif qt_api == 'pyqt':\n from PyQt4.QtCore import *\n\n from PyQt4.QtCore import pyqtSignal as Signal\n from PyQt4.Qt import QCoreApplication\n from PyQt4.Qt import Qt\n\n ...
python
edit
9
0
bsd-3-clause
57bc5d89450633ffed33460ae18842f728d601ed
burnpanck/traits,burnpanck/traits
enthought/qt/QtCore.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nproblem55.py\n\nIf we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number\nthat never forms a palindrome through the reverse and add process is called a\nLychrel number. How many Lychrel numbers are there below t...
python
edit
1
2
mit
cc103392eea1f620b656e0dfdb1432a1a589385c
mjwestcott/projecteuler,mjwestcott/projecteuler,mjwestcott/projecteuler
euler_python/problem55.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom vega3 import VegaLite\n\n\nclass VegaLiteAxes(object):\n \"\"\"Class representing a pdvega plot axes\"\"\"\n def __init__(self, spec=None, data=None):\n self.vlspec = VegaLite(spec, data)\n\n @property\n def spec(sel...
python
edit
1
3
mit
ba2618e5ca63cad92e17ea154c9d8332064f7771
jakevdp/pdvega
pdvega/_axes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom ...errors import BinstarError\nfrom .downloader import *\nfrom .uploader import *\nfrom .finder import *\nfrom .scm import *\n\n\ndef parse(handle):\n \"\"\"\n >>> parse(\"user/project:main.ipynb\")\n ('user', 'proj...
python
edit
5
4
bsd-3-clause
4f47fef587b520e4110b232a2eaf175e79be375a
Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client
binstar_client/utils/notebook/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\n\nimport mgi\nimport mgi.load\nimport mgi.models\n\ndef test_mgi_load():\n engine = create_engine('sqlite://')\n metadata = mgi.models.Base.metadata\n m...
python
edit
1
1
mit
a3b31c0a3157accb76611d57caa591cd2cdf8d7a
luispedro/waldo,luispedro/waldo
tests/test_mgi_load.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nIdempotent API for managing MySQL users and databases\n\"\"\"\nfrom __future__ import with_statement\n\nfrom fabtools.mysql import *\nfrom fabtools.deb import is_installed, preseed_package\nfrom fabtools.require.deb import package\n...
python
edit
9
4
bsd-2-clause
f19fb3bf2eb90f77b193dc25f5b8bec0dfd253bc
pombredanne/fabtools,ronnix/fabtools,fabtools/fabtools,badele/fabtools,sociateru/fabtools,davidcaste/fabtools,pahaz/fabtools,n0n0x/fabtools-python,ahnjungho/fabtools,hagai26/fabtools,prologic/fabtools,AMOSoft/fabtools,bitmonk/fabtools,wagigi/fabtools-python
fabtools/require/mysql.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cmdtree import INT\nfrom cmdtree import command, argument, option\n\n\n@argument(\"host\", help=\"server listen address\")\n@option(\"reload\", is_flag=True, help=\"if auto-reload on\")\n@option(\"port\", help=\"server port\", type=INT...
python
edit
3
1
mit
d540b7c14b9411acdedfe41a77fd4911ef2eb660
winkidney/cmdtree,winkidney/cmdtree
src/cmdtree/tests/functional/test_command.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\nfrom hue import bridge, configuration\n\n\n@click.group()\ndef cli():\n \"\"\"\n Control Philips HUE lighting from the command line\n \"\"\"\n\n\n@cli.command()\ndef setup():\n \"\"\"\n Setup connection to Bridg...
python
edit
1
3
mit
8f264af74ca4f1b956af33853134ff8ec722fc40
projectweekend/HUEcli
huecli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'tmkasun'\n\nfrom suds.client import Client\nfrom suds.transport.https import HttpAuthenticated\n\n\nclass AdminService(object):\n client = None\n\n def __init__(self, api, service_name):\n self.tenant = HttpAuthen...
python
edit
1
2
apache-2.0
be94babb7feb7c32c0d269a8cfa8b722c70e0ab0
tmkasun/Knnect,tmkasun/Knnect,tmkasun/Knnect,tmkasun/Knnect
map_service/lib/wso2/carbon_connect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import (\n Blueprint,\n flash,\n redirect,\n url_for,\n render_template)\nfrom flask_login import current_user\nfrom flask_babel import gettext as _\n\nfrom catwatch.blueprints.issue.models import Issue\nfrom catwa...
python
edit
1
2
mit
05c3775c589b5afdb9f3d7d3e347615d699669c7
nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask
catwatch/blueprints/issue/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app import db\n\n\nclass Base(db.Model):\n\n __abstract__ = True\n\n pk = db.Column(db.Integer, primary_key=True)\n created_at = db.Column(db.DateTime, default=db.func.current_timestamp())\n updated_at = db.Column(db.DateTi...
python
edit
1
3
mit
d91f12a36e7980111511a6eb94aea2b09a18cb42
mdsrosa/routes_api_python
app/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom collections import defaultdict\n\ncounter = defaultdict(int)\ncut = 10\n\nwith open(sys.argv[1]) as f:\n for line in f:\n for word in line.split():\n counter[word] += 1\n\n\nfrom operator import itemg...
python
edit
1
5
mit
09d10b24fabbc5982d118b4ba292732945c0e78d
alexalemi/textbench,alexalemi/textbench,alexalemi/textbench,alexalemi/textbench,alexalemi/textbench
vocab.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# ==================================================================================================\n# Copyright 2011 Twitter, Inc.\n# --------------------------------------------------------------------------------------------------\n# Li...
python
edit
1
0
apache-2.0
c5a2cdf6f0a5d94a3f059677ca95383b1dd0be29
pantsbuild/pex,sixninetynine/pex,URXtech/pex,jamesbroadhead/pex,rouge8/pex,jsirois/pex,snyaggarwal/pex,kwlzn/pex,mzdanieltest/pex,snyaggarwal/pex,jsirois/pex,jamesbroadhead/pex,URXtech/pex,pombredanne/pex,mzdanieltest/pex,rouge8/pex,pantsbuild/pex,sixninetynine/pex,kwlzn/pex,pombredanne/pex
src/python/twitter/common/python/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom ns_api import Station, NSAPI\nfrom local_settings import USERNAME, APIKEY\n\n\ndef update_station_data():\n nsapi = NSAPI(USERNAME, APIKEY)\n stations = nsapi.get_stations()\n\n data = {'stations': []}\n for ...
python
edit
3
3
mit
ca48a722fbfeaf8a9e0db5f507ca064e2d90b7dd
bartromgens/nsmaps,bartromgens/nsmaps,bartromgens/nsmaps
update_station_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nimport valve.source.a2s\n\nSERVER=\"163.172.17.175\"\nPORT=30616\n\ndef playerList(server):\n server = valve.source.a2s.ServerQuerier(server)\n info = server.info()\n players = server.players()\n\n for p ...
python
edit
3
2
unlicense
8b4cc54e55ac222f444c512b6dc1b1d55475cddb
saildata/steamscript,lluis/steamscript,oleerik/steamscript
rusts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom __future__ import print_function\nimport sys\nsys.path.insert(1,\"../../\")\nimport h2o\nfrom tests import pyunit_utils\nfrom h2o.estimators import H2OGradientBoostingEstimator\n\n\ndef pyunit_make_metr...
python
edit
5
1
apache-2.0
a78b305ec1624bc76b527094e937a831f6ea37dd
spennihana/h2o-3,jangorecki/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,mathemage/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,spennihana/h2o-3,spennihana/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,h2oai/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,h2oai/h2o-3,spenni...
h2o-py/tests/testdir_misc/pyunit_make_metrics.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nclass SpamListsError(Exception):\n '''There was an error during testing a url or host'''\n \nclass UnknownCodeError(SpamListsError):\n '''The classification code from the service was not recognized'''\n ...
python
edit
1
0
mit
11443eda1a192c0f3a4aa8225263b4e312fa5a55
piotr-rusin/spam-lists
spam_lists/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"CodeJail: manages execution of untrusted code in secure sandboxes.\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name=\"codejail\",\n version=\"3.0.1\",\n packages=['codejail'],\n zip_safe=False,\n classifiers=[\n ...
python
edit
1
0
apache-2.0
9c4cac1eb19cb05fa03fd163cef348331e00820c
edx/codejail
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\nimport os.path as op\nimport uuid\n\nver_file = os.path.join('popylar', 'version.py')\nwith open(ver_file) as f:\n exec(f.read())\n\npopylar_path = op.join(op.expanduser('~'), '.pop...
python
edit
15
0
bsd-2-clause
c8ad21096311971e985ac5705af280a09d66aa15
popylar/popylar
setup.py
rejected_lint
Too many lint violations: 15
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\nexcept ImportError:\n from distutils.core import setup\n\nif sys.version_info < (2,5):\n raise NotImplementedError(\"Sorry, you need at least Python 2.5 or P...
python
edit
1
0
mit
0c1463324d4bdee685fb8ac767168413cc4ee2d0
defnull/contexter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport codecs\nfrom setuptools import find_packages, setup\n\nimport digestive\n\n\nsetup(\n name='digestive',\n version=digestive.__version__, # TODO: don't read this from (uninstalled) module\n url='https://github.com/akaIDIOT/D...
python
edit
1
0
isc
57c62f4107ba53445e7368bfb870fe393bd19dde
akaIDIOT/Digestive
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name = 'pycolors2',\n py_modules = ['colors',],\n version = '0.0.3',\n author = 'Chris Gilmer',\n author_email = '<EMAIL>',\n maintainer = 'Chris Gilmer',\n maintainer_email ...
python
edit
1
0
mit
20e447005b70d29fc9f3852bcd526fc6fb337ea3
chrisgilmerproj/pycolors2
setup.py
rejected_duplicate
Near-duplicate of sample 3664
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\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.org/licenses...
python
edit
5
0
apache-2.0
f430bfecc2a4022967260ff4cb80e3cb9ff84790
sdake/heat-jeos,steveb/heat-cfntools,openstack/heat-cfntools,bbandaru/heat-cfntools,steveb/heat-cfntools
setup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\n\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"v1pysdk\",\n version = \"0.1\", \n description = \"VersionOne API client\", \n author = \"Joe Koberg (VersionOne, Inc.)\",\n author_email = \"<EMAIL>\",\n lice...
python
edit
3
0
bsd-3-clause
773568ab481588fada2b84c8bf9deb5c870290b7
coddingtonbear/VersionOne.SDK.Python,versionone/VersionOne.SDK.Python,doubleO8/versionone-sdk-spoon,aarcro/VersionOne.SDK.Python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='tablo',\n description='A PostGIS table to feature service app for Django',\n keywords='feature service, map server, postgis, django',\n version='1.3.0',\n packages=['tablo', 'tab...
python
edit
1
0
bsd-3-clause
23a082d4035eec48f1b0aba08fcec5ea9d73b848
consbio/tablo
setup.py
rejected_duplicate
Near-duplicate of sample 389
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"py-trello\",\n version = \"0.2.3\",\n\n description = 'Python wrapper around the Trello API',\n long_description = open('R...
python
edit
1
0
bsd-3-clause
f6d086aa0be14dd2f0c8d87e728939053408f2c9
gchp/py-trello,WoLpH/py-trello,mehdy/py-trello,portante/py-trello,ntrepid8/py-trello,nMustaki/py-trello,merlinpatt/py-trello,sarumont/py-trello,Wooble/py-trello
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='typogrify',\n version='2.0.0',\n packages=find_packages(),\n author='Christian Metts',\n author_email='<EMAIL>',\n license='BSD',\n ...
python
edit
1
0
bsd-3-clause
744cbe22784b7b9db537ce89ddf3b55b72980da2
Chimrod/typogrify
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, os.path, sys, shutil\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.core import setup, Extension\nfrom distutils.command.build_ext import build_ext\n\nlibs = ['user32']\n\nsetup(name=\"pyHook\", version=\"1.1\",\...
python
edit
1
0
mit
d3650454eed490e4c91216b26463ae135c47e305
carolus-rex/pyhook_3000,Answeror/pyhook_py3k
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport colors\n\n\nsetup(\n name='ansicolors',\n version=colors.__version__,\n description='ANSI colors for Python',\n long_description=open('README.rst').read(),\n aut...
python
edit
1
0
isc
09ec38cdf1bf6be59f6961fbcbf9847e2b29ccfe
Vietworm/colors,verigak/colors,jonathaneunice/colors,pombredanne/colors,grnet/colors
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport sys\nfrom distutils.core import setup\n\n\nsetup(\n name='pathlib',\n version=open('VERSION.txt').read().strip(),\n py_modules=['pathlib'],\n license='MIT License',\n description='Object-oriente...
python
edit
3
0
mit
2c03fec9a1afb22e2075fa537615d3802fef7ec6
mcmtroffaes/pathlib2,saddingtonbaynes/pathlib2
setup.py
rejected_duplicate
Near-duplicate of sample 3865
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport setuptools\nimport sys\n\n\nif not sys.version_info >= (3, 5):\n exit(\"Sorry, Python must be later than 3.5.\")\n\n\nsetuptools.setup(\n name=\"tensorflow-qnd\",\n version=re.search(r'__version__ *= *\"([0-9]+\\....
python
edit
1
0
unlicense
a0adfab8c2fdac2f2b8bad8b1f036bd35b27a06c
raviqqe/tensorflow-qnd,raviqqe/tensorflow-qnd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='glue',\n version='0.9',\n url='http://github.com/jorgebastida/glue',\n license='BSD',\n author='Jorge Bastida',\n author_email='<EMAIL>',\n description='Glue...
python
edit
1
0
bsd-3-clause
8fdb05f6327249fe945b5310b7a3ca585eddc5d0
WillsB3/glue,zhiqinyigu/glue,dext0r/glue,jorgebastida/glue,dext0r/glue,beni55/glue,jorgebastida/glue,zhiqinyigu/glue,WillsB3/glue,beni55/glue
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, 'README.rst'), encoding='utf-8') as f:\n long_description = f.read()\n\nversion = {}\n...
python
edit
1
0
mit
e1f2f32b87f28f948e9f8321df910700f5a5ece2
russss/python-emv
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\nsetup(name='check_ups_apc.py',\n\tversion='0.10',\n\tdescription='Nagios Check for APC USVs',\n\tauthor='Lukas Schauer',\n\tauthor_email='<EMAIL>',\n\tlicense...
python
edit
1
0
apache-2.0
3ccf8471291ddfc39c7d86caa659ef4eab27bc13
CygnusNetworks/check_ups_apc.py,CygnusNetworks/check_ups_apc.py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nrequirements = [\n]\n\ntest_requirements = [\n]\n\nsetup(\n name='adb_android',\n version='0.5.0',\n descri...
python
edit
1
0
bsd-3-clause
36e678daf3c9d619f6e6013a33d59104f61e291a
vmalyi/adb_android
setup.py
rejected_duplicate
Near-duplicate of sample 20443
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name = \"django-overextends\",\n version = __import__(\"overextends\").__version__,\n author = \"Stephen McDonald\",\n author_email = \"<EMAIL>\",\n description = (\...
python
edit
1
0
bsd-2-clause
ab864d340999fcbfad5677cbb3d0da301e1bce45
dwaynebailey/django-overextends
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name='nova_limits',\n version='0.5.2',\n author='Kevin L. Mitchell',\n author_em...
python
edit
1
1
apache-2.0
d198b96b1e5b35d1362694cd842d2804f31de7e2
klmitch/nova_limits
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom os.path import join, dirname\n\n\nsetup(\n name='pandas-charm',\n version='0.1.0',\n description=(\n 'A small Python library for getting character matrices '\n '(align...
python
edit
1
0
mit
0770c9fd014aff6fa2707014355b0200a8827f64
jmenglund/pandas-charm
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import join\nfrom setuptools import setup, find_packages\n\n\nlong_description = (open('README.rst').read() +\n open('CHANGES.rst').read() +\n open('TODO.rst').read())\n\n\ndef get_version(...
python
edit
1
3
bsd-3-clause
38359ccf2e1269ea01ecb0df274ff47ea18b4e19
yeago/django-model-utils,carljm/django-model-utils,timmygee/django-model-utils,timmygee/django-model-utils,yeago/django-model-utils,nemesisdesign/django-model-utils,nemesisdesign/django-model-utils,patrys/django-model-utils,patrys/django-model-utils,carljm/django-model-utils
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding: utf-8\n\nfrom setuptools import setup, find_packages\nsetup(\n name=\"bentoo\",\n description=\"Benchmarking tools\",\n version=\"0.16.0\",\n packages=find_packages(),\n scripts=[\"scripts/ben...
python
edit
1
0
mit
1dfba0718c7a5166adc188a75b15fdf592ac584b
ProgramFan/bentoo
setup.py
rejected_duplicate
Near-duplicate of sample 12156
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.md')).read()\n\nsys.path.insert(0, here)\n\nfrom titlecase import __version_...
python
edit
1
0
mit
122f596f3568d1ee1031733344e7eebb057cc032
ppannuto/python-titlecase
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.app_tests import BaseTestCase\nfrom app.mod_auth.models import *\nfrom app.mod_auth.views import user_is_logged_in\nfrom flask import url_for\n\nUSERNAME = 'username'\nPASSWORD = 'password'\nINVALID_USERNAME = 'wrong_username'\nI...
python
edit
3
1
mit
364aa00d3f97711e25654f63e5d4ab5d6b4e7d44
ziel980/website,ziel980/website
tests/mod_auth_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n TestCommand.finalize_options(self)\n self.test_args = []\n self.test_suite = True\n ...
python
edit
1
1
mit
6a0752d9a9d7b9687eeba3472a5df44d0fca1a0a
gosquadron/squadron,gosquadron/squadron
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom .exceptions import InvalidURI\nfrom .uri import *\n\n\nVALID_URIS = [\n ('ws://localhost/', (False, 'localhost', 80, '/')),\n ('wss://localhost/', (True, 'localhost', 443, '/')),\n ('ws://localhost/path?quer...
python
edit
4
2
bsd-3-clause
25aba2beceda000d89aab969fec96fc1678e6f6a
aaugustin/websockets,aaugustin/websockets,dommert/pywebsockets,aaugustin/websockets,aaugustin/websockets,andrewyoung1991/websockets,biddyweb/websockets
websockets/test_uri.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test the urls.py and views.py." }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.test import Client\nfrom django.core.urlresolvers import resolve\n\nclass MdotdevTest(TestCase):\n\n def setUp...
python
new_file
1
1
apache-2.0
a6a59cc0fded7bd2f6dc1d0d01e68836f33726aa
uw-it-aca/mdot-developers,uw-it-aca/mdot-developers
mdotdevs/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom argparse import ArgumentParser\n\nimport yaml\n\nfrom .runner import Runner\n\n\ndef parse_variables(args):\n variables = {}\n\n if args is not None:\n for variable in args:\n tokens = variable.split('=')\n ...
python
edit
1
4
mit
b4fa43b85a162fa9bef3cb67c2dd523f25707b4d
thomasleese/mo
mo/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage\nimport threading\n\n\nclass OutputFileQueue(object):\n\n def __init__(self, fp):\n self.fp = fp\n self._lock = threading.RLock()\n\n def enqueu...
python
edit
1
3
mit
6bfd2d0cb6a92322391d7f5d5348594268e305b4
mapzen/tilequeue,tilezen/tilequeue
tilequeue/queue/file.py
rejected_duplicate
Near-duplicate of sample 20737
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom .models import Election, Candidate\n\nclass CandidatePublicSerializer(serializers.ModelSerializer):\n\torganization = serializers.CharField(source='organization.display_name')\n\tclass Meta:\n\...
python
edit
3
1
mit
3e5e35aa85e656efbdddddf4c4d2accad964a42b
ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members
members/elections/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .generic import GrammarTest\n\ndef test_np():\n grammar = GrammarTest('grammars/test_np.fcfg',\n 'grammars/nounphrase.sample', \n 'grammars/nounphrase.sample.negative')\n grammar.check_positive()\n grammar.check_...
python
edit
1
1
mit
0818f5e1471c6da24dbc55954ef4ad27ac289ada
caninemwenja/marker,kmwenja/marker
tests/test_grammars.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom invoke import run\nfrom invoke import task\n\n\n@task\ndef clean(docs=False, bytecode=True, extra=''):\n patterns = ['build']\n if docs:\n patterns.append('docs/_build')\n if bytecode:\n patterns.append('**/*.pyc...
python
edit
1
2
bsd-3-clause
64d7ca9695eed6112c793fda3f2e7fea3751c3cc
pando85/django-registration,allo-/django-registration,sergafts/django-registration,pando85/django-registration,allo-/django-registration,sergafts/django-registration
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom form_utils.forms import BetterForm\n\n\n# This specifies the fields that are in the complaint form\nclass ComplaintForm(BetterForm):\n # Address for the complaints.\n civic = forms.CharField(label='Add...
python
edit
1
1
mit
743f8dd38869987570eba3ea4cf22c6ad5a50cd1
CSC301H-Fall2013/healthyhome,CSC301H-Fall2013/healthyhome
complaints/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nnum = 3\nprint num\n\n\n```\n\nApply this change: Add comments about blanket variable." }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nnum = 3\nprint num\n\n# This is great!\n# Now, ass...
python
edit
2
0
mit
7936ef73a786ac7b4d3a718d72e6d0e087b35e05
sk8boarder/my-first-program
myFirstProgram.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport testinfra.utils.ansible_runner\n\ntestinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(\n os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')\n\n\n# check if MongoDB package is installed\ndef test_mongod...
python
edit
1
1
bsd-2-clause
e3ed0f5e2aba0bcd2328c95f401cc17e2d63ba8f
jugatsu-infra/ansible-role-mongodb
molecule/default/tests/test_default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\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 at\n#\n#...
python
edit
1
1
apache-2.0
0fc8c56438acad93fc74868ef3bec694efe25246
maestro-hybrid-cloud/heat,rh-s/heat,ntt-sic/heat,jasondunsmore/heat,rdo-management/heat,redhat-openstack/heat,rh-s/heat,srznew/heat,dragorosson/heat,steveb/heat,cryptickp/heat,pshchelo/heat,gonzolino/heat,pshchelo/heat,jasondunsmore/heat,ntt-sic/heat,miguelgrinberg/heat,redhat-openstack/heat,pratikmallya/heat,maestro-h...
heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import login_required\nfrom stronghold import conf, utils\n\n\nclass LoginRequiredMiddleware(object):\n \"\"\"\n Force all views to use login required\n\n View is deemed to be public if the @publ...
python
edit
1
5
mit
7f5f4f95eabd1f70c82d336816ae2d17fb273af2
SunilMohanAdapa/django-stronghold,mgrouchy/django-stronghold,SunilMohanAdapa/django-stronghold
stronghold/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\".. Ignore pydocstyle D400.\n\n====================\nClean test directory\n====================\n\nCommand to run on local machine::\n\n ./manage.py cleantestdir\n\n\"\"\"\nimport re\nimport shutil\nfrom itertools import chain\nfrom...
python
edit
1
10
apache-2.0
6785f6ef2287bc161085bcca7f1cb8653b88a433
genialis/resolwe,genialis/resolwe
resolwe/flow/management/commands/cleantestdir.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tastypie.authorization import Authorization\nfrom tastypie.authentication import BasicAuthentication\nfrom tastypie.fields import ForeignKey\nfrom tastypie.resources import ModelResource\nfrom .models import APNSDevice, GCMDevice\n\n\n...
python
edit
3
1
mit
9b53673771b8b185232cffad129036bbe084a169
Ian-Foote/django-push-notifications,matthewh/django-push-notifications,Ubiwhere/django-push-notifications,freakboy3742/django-push-notifications,gkirkpatrick/django-push-notifications,hylje/django-push-notifications,AndreasBackx/django-push-notifications,cristiano2lopes/django-push-notifications,jleclanche/django-push-...
api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast...
python
edit
1
0
bsd-3-clause
0adc42bbcf77c284ed7fbbbed4e50a3640dfa0b5
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.tryserver.chromium.angle/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDerive a list of impossible differentials.\n\"\"\"\n\nimport ast\nimport sys\n\ndef parse(line):\n i, rounds, xss = ast.literal_eval(line)\n yss = [set(xs) for xs in xss]\n return (i, rounds, yss)\n\ndef main():\n if len...
python
edit
3
7
mit
d19e4a358f1f81f72a02c3015fc4a0def2827e19
wei2912/idc,wei2912/idc,wei2912/aes-idc,wei2912/idc,wei2912/idc,wei2912/aes-idc
nibble_aes/find_dist/find_ids.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The WaveBlocks Project\n\nThis file is main script for running simulations with WaveBlocks.\n\n@author: R. Bourquin\n@copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin\n@license: Modified BSD License\n\"\"\"\n\nimport sys\n\nfrom ...
python
edit
1
0
bsd-3-clause
0325d4d55e9f42d031edc66fe4dedfefea4c66e2
WaveBlocks/WaveBlocksND,WaveBlocks/WaveBlocksND
src/scripts/Main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom time import time\n\n\ndef normalize(val, _min, _max):\n return (val - _min) / (_max - _min)\n\n\ndef countdown(initial_time, seconds):\n while time() - initial_time < seconds:\n return Fals...
python
edit
1
2
mit
dc38460e4e8ca70954f34bfffa99170a9ea437cb
richin13/nxt-scripts
scripts/helpers/utils.py
accepted
null
true