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 contextlib import contextmanager\n\n\nclass DatabaseMigratable:\n def __init__(self, conn):\n self.conn = conn\n\n @contextmanager\n def create_resource(self):\n with self.conn.cursor() as cursor:\n # ...
python
edit
1
2
mit
b0961ac53a75ff3745d2297de80748f90c823827
pajlada/tyggbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/pajbot,pajlada/pajbot,pajlada/pajbot,pajlada/pajbot
pajbot/migration/db.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add object-oriented-style lookups for filsys, passwd, and uid lookups\n\nThe filsys entry parsing code is taken from pyHesiodFS and was explicitly\nrelicensed under the MIT license by Quentin Smith <<EMAIL>>" }, { "role": "assistant"...
python
new_file
1
8
mit
91c35078c7a8aad153d9aabe0b02fc3c48cfc76a
ebroder/python-hesiod
hesiod.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Tests for go_cli.main. \"\"\"\n\nfrom unittest import TestCase\n\nfrom click.testing import CliRunner\n\nfrom go_cli.main import cli\n\n\nclass TestCli(TestCase):\n def test_help(self):\n runner = CliRunner()\n resul...
python
edit
1
1
bsd-3-clause
968ef4bfb57743328587f9f693a7c531e20cbce0
praekelt/go-cli,praekelt/go-cli
go_cli/tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Utils.\"\"\"\n\nfrom base64 import b64encode\n\nimport pandas as pd\n\n\ndef dataframe_to_base64(df: pd.DataFrame) -> str:\n \"\"\"Converts a dataframe to a base64-encoded CSV representation of that data.\n\n This is useful for ...
python
edit
1
1
mit
4e63db0d699eeb7a313708f82c129637222e1014
CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime
src/penn_chime/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Feb 24 11:01:10 2016\n\n@author: ererkka\n\"\"\"\n\n__version__ = '1.2.2'\n\n```\n\nApply this change: Revert \"Fixed bug with imports\"\n\nThis reverts commit 7b63b268a002a0ceb0b7bb2c6c57237b...
python
edit
3
0
mit
525441540306cb2ac385b0f633681e24587117dc
ererkka/GDX2py
gdx2py/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom flask import Flask\nfrom flask.ext.autodoc import Autodoc\n\n\nclass TestAutodocWithFlask(unittest.TestCase):\n def setUp(self):\n self.app = Flask(__name__)\n self.autodoc = Autodoc(self.app)\n\n ...
python
edit
1
1
mit
56f7646413de01cb45825b30586231cf3ecbd43c
jwg4/flask-autodoc,jwg4/flask-autodoc
tests/test_flask_get.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve minor import problems with submodules" }, { "role": "assistant", "content": " # Module of Gaussian Mixture models for python\nimport megamix.batch\nimport megamix.online\n \n__all__ = ['batch','online']" } ]
python
new_file
5
0
apache-2.0
4aa979273bfe698459d9a8066ee41741c3a68e3d
14thibea/megamix
megamix/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Tag(models.Model):\n name = models.CharField(\n max_length=31, unique=True)\n slug = models.SlugFi...
python
edit
1
1
bsd-2-clause
1ac385de638854cad1095a3f81a63ecf45fa60ae
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
organizer/models.py
rejected_duplicate
Near-duplicate of sample 13372
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import Client, TestCase\nfrom django.core.urlresolvers import reverse\n\nimport views\n\n\nclass DocsTestCase(TestCase):\n def setUp(self):\n self.client = Client()\n\n def test_index(self):\n response =...
python
edit
1
1
mit
b63ee83574605e79075ee834d2418cd58b722bc6
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
docs/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by NotSqrt\n# Copyright (c) 2013 NotSqrt\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Cppcheck plugin class.\"\"\"\n\nfrom Sub...
python
edit
1
0
mit
f317f946f9f17cbaf162b12c8770908abba5bbeb
SublimeLinter/SublimeLinter-cppcheck,ftoulemon/SublimeLinter-cppcheck
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom pprint import pformat\nfrom re import search as re_search\nfrom re import sub as re_sub\n\n\nclass FFApi:\n def __init__(self, content):\n self.c = content\n\n def pull(self, *fie...
python
edit
1
5
bsd-3-clause
6f6d1a7146020121a98ba6bb6cfa718686fc2a8d
spookey/ffflash,spookey/ffflash
ffflash/lib/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom info import __doc__\nfrom numpy.version import version as __version__\n\nimport multiarray\nimport umath\nimport numerictypes as nt\nmultiarray.set_typeDict(nt.sctypeDict)\nimport _sort\nfrom numeric import *\nfrom fromnumeric import...
python
edit
22
1
bsd-3-clause
5b87029e229fa3dcf0e81231899c36bd52a7616c
dato-code/numpy,jorisvandenbossche/numpy,mathdd/numpy,stefanv/numpy,sinhrks/numpy,stuarteberg/numpy,rajathkumarmp/numpy,madphysicist/numpy,skwbc/numpy,rudimeier/numpy,abalkin/numpy,brandon-rhodes/numpy,Linkid/numpy,shoyer/numpy,pizzathief/numpy,rherault-insa/numpy,pbrod/numpy,mingwpy/numpy,MaPePeR/numpy,argriffing/nump...
numpy/core/__init__.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef _():\n return 1\n\n\n_(u'Price excludes tax')\n_(u'Price includes tax')\n_(u'Street')\n_(u'Left')\n_(u'Right')\n_(u'Average Rating')\n_(u'Zip Code')\n_(u'Last Order Number')\n_(u'Format')\n_(u\"Cart Price\")\n_(u\"Combined Length and...
python
edit
1
1
bsd-3-clause
bf09097e66c02764d81516a4161ca607ccbd0bb5
diefenbach/django-lfs,diefenbach/django-lfs,diefenbach/django-lfs
lfs/other_translations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncore\nimport logging\nimport multiprocessing\nimport os\nimport sys\n\nsys.path.insert(0,\n os.path.abspath(os.path.join(os.path.dirname(__file__), '../')))\n\nfrom mopidy import settings, SettingsError\nfrom mopidy.process im...
python
edit
4
3
apache-2.0
f8c440d849a794298f119735ebe10290fc66f2ec
jodal/mopidy,tkem/mopidy,jodal/mopidy,swak/mopidy,pacificIT/mopidy,tkem/mopidy,adamcik/mopidy,jcass77/mopidy,jmarsik/mopidy,adamcik/mopidy,ali/mopidy,jmarsik/mopidy,pacificIT/mopidy,swak/mopidy,jmarsik/mopidy,hkariti/mopidy,quartz55/mopidy,rawdlite/mopidy,mokieyue/mopidy,ZenithDK/mopidy,bencevans/mopidy,SuperStarPL/mop...
mopidy/__main__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntemplate_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PB...
python
edit
1
0
apache-2.0
b388722fcc70d2787b91b5a4492cb9659cea7a42
Parsl/parsl,Parsl/parsl,Parsl/parsl,swift-lang/swift-e-lab,swift-lang/swift-e-lab,Parsl/parsl
parsl/providers/torque/template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..learner import Learner\nfrom ..policies import RandomPolicy\nfrom ..value_functions import TabularQ\nfrom ...utils import check_random_state\n\n\nclass Sarsa(Learner):\n\n def __init__(self, env, policy=None, learning_rate=0.1, di...
python
edit
1
2
mit
a521c4a4a55437452a4a7d006ec8faea0521ea05
davidrobles/mlnd-capstone-code
capstone/rl/learners/sarsa.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 AnsibleWorks, Inc.\n# All Rights Reserved.\n\n\nfrom django.db import models\n\nclass ActivityStream(models.Model):\n '''\n Model used to describe activity stream (audit) events\n '''\n OPERATION_CHOICES = [...
python
edit
1
0
apache-2.0
f4e36132448a4a55bff5660b3f5a669e0095ecc5
wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx
awx/main/models/activity_stream.py
rejected_duplicate
Near-duplicate of sample 4063
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nApi for the events app\n'''\nimport datetime\nfrom models import Event\nfrom tastypie.utils import trailing_slash\nfrom apis.resources.base import BaseResource\nfrom django.conf.urls.defaults import url\n\nclass EventResource(BaseResou...
python
edit
3
2
bsd-3-clause
5fe73f508d87018db1d6f574cd22d76b46cbe862
alonisser/Open-Knesset,OriHoch/Open-Knesset,habeanf/Open-Knesset,daonb/Open-Knesset,otadmor/Open-Knesset,navotsil/Open-Knesset,MeirKriheli/Open-Knesset,DanaOshri/Open-Knesset,Shrulik/Open-Knesset,daonb/Open-Knesset,otadmor/Open-Knesset,habeanf/Open-Knesset,DanaOshri/Open-Knesset,Shrulik/Open-Knesset,daonb/Open-Knesset,...
events/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/local/bin/python\n\n# Python implementation of an 'echo' tcp server: echo all data it receives.\n#\n# This is the simplest possible server, sevicing a single request only.\n\nimport sys\nfrom socket import *\n\n# The standard echo p...
python
edit
2
4
mit
1f3e42047a67001719220a5a42fe0c5f51d2b740
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Demo/sockets/echosvr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport tserver, sys, md5, math\nfrom disco import Disco, result_iterator\n\ndef data_gen(path):\n return path[1:] + \"\\n\"\n\ndef fun_map(e, params):\n k = str(int(math.ceil(float(e))) ** 2)\n return [(md5.new(k).hex...
python
edit
2
1
bsd-3-clause
9fe93f19c38ea1e41ce7bfe5aca8ec9327b195b5
ErikDubbelboer/disco,beni55/disco,ErikDubbelboer/disco,beni55/disco,pombredanne/disco,scrapinghub/disco,scrapinghub/disco,pombredanne/disco,ErikDubbelboer/disco,seabirdzh/disco,pooya/disco,ErikDubbelboer/disco,discoproject/disco,pombredanne/disco,mwilliams3/disco,simudream/disco,discoproject/disco,mwilliams3/disco,ktkt...
test/test_reqmodules.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n# don't convert to ascii in py2.7 when creating string to return\n\ncrontable = []\noutputs = []\n\nstate = {}\n\n\ndef process_message(data):\n\n channel = data['channel']\n if channel not in ...
python
edit
1
4
mit
81cd919f4f85f2d26d89006234d608aebe8a8047
cworth-gh/stony
plugins/clue/clue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import task, local, run, lcd, cd, env\nfrom os.path import exists as file_exists\nfrom fabtools.python import virtualenv\nfrom os import path\n\n\nPWD = path.join(path.dirname(__file__), '..')\nVENV_DIR = path.join(PWD, '.en...
python
edit
7
1
mit
2d7c7872bb030a280de6047a609d14560ff7e29f
spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc
fabfile/eg.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"testproject.testproject.settings\")\n\nfrom django.test.utils import get_runner\nfrom django.conf import settings\n\ndef runtests():\n # St...
python
edit
1
2
bsd-2-clause
336edeebe5ac04df719569efa40e2fef01a2dccc
fusionbox/django-argonauts
testproject/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nfrom astropy.utils.exceptions import AstropyWarning\n\n__all__...
python
edit
1
0
bsd-3-clause
2f968509be6ae8e3bcd15d0f46ebc3ba290ca086
StuartLittlefair/astroplan
astroplan/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nExposes a class that represents a parsed (or compiled) template.\n\n\"\"\"\n\n\nclass ParsedTemplate(object):\n\n \"\"\"\n Represents a parsed or compiled template.\n\n An instance wraps a list of unicode...
python
edit
3
2
mit
5b00b6cd392a1f5f317cc18893198bb5d62c565d
charbeljc/pystache,nitish116/pystache,defunkt/pystache,harsh00008/pystache,rismalrv/pystache,nitish116/pystache,arlenesr28/pystache,nitish116/pystache,rismalrv/pystache,charbeljc/pystache,arlenesr28/pystache,harsh00008/pystache,beni55/pystache,harsh00008/pystache,jrnold/pystache,rismalrv/pystache,jrnold/pystache,arlene...
pystache/parsed.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\n\ndef extra_setup(setup_code):\n \"\"\"Allows to setup some extra context to it's decorated function.\n\n As a convention, the bench decorated function should always handle\n *args and **kwargs. Kwarg...
python
edit
2
1
mit
80958236edd4390b3f2f9fe4848de68fdda60513
oleiade/Hurdles
hurdles/tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom maas_common import (status_ok, status_err, metric, metric_bool,\n get_auth_ref)\nfrom requests import Session\nfrom requests import exceptions as exc\n\n\ndef check(auth_ref):\n regis...
python
edit
3
4
apache-2.0
d384781d77521f6e4b97b783737be09a7a99423e
mattt416/rpc-openstack,xeregin/rpc-openstack,darrenchan/rpc-openstack,major/rpc-openstack,byronmccollum/rpc-openstack,shannonmitchell/rpc-openstack,cloudnull/rpc-maas,npawelek/rpc-maas,miguelgrinberg/rpc-openstack,robb-romans/rpc-openstack,rcbops/rpc-openstack,BjoernT/rpc-openstack,nrb/rpc-openstack,git-harry/rpc-opens...
glance_registry_local_check.py
rejected_duplicate
Near-duplicate of sample 15786
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom settings import DeploymentType\n\ndef default(request):\n context = {}\n context['DEPLOYMENT'] = settings.DEPLOYMENT\n context['site'] = Site.obje...
python
edit
1
2
mit
3ec825c5ad8f1b4bacbbe9921d7caa46ad5ccd55
bueda/django-comrade
comrade/core/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom nose.plugins import Plugin\nfrom subprocess import Popen\n\n\nclass WatchPlugin(Plugin):\n \"\"\"\n Plugin that use watchdog for continuous tests run.\n \"\"\"\n name = 'watch'\n is_watching = False\n sys ...
python
edit
1
3
bsd-2-clause
cfbe762a0e752dcb58edbbd0835371ecc300d3f4
lukaszb/nose-watch,lukaszb/nose-watch
nosewatch/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom . import settings\n\nfrom django.http import HttpResponse\n\nimport time\nimport redis\n\n# Connection pool\nPOOL = redis.ConnectionPool(**settings.REDIS)\n\nclass RatedMiddleware(object):\n\n def process_view(self, request, view_...
python
edit
1
5
bsd-3-clause
cf99ee9a106b862ee3401399224e4730d758eacc
funkybob/django-rated
rated/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom web_test_base import *\n\nclass TestCSV2IATI(WebTestBase):\n requests_to_load = {\n 'CSV2IATI Homepage': {\n 'url': 'http://csv2iati.iatistandard.org/'\n }\n }\n\n def test_contains_link...
python
edit
5
0
mit
c3762443859ada75687e5a62d576fe8140a42a7c
IATI/IATI-Website-Tests
tests/test_csv2iati.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Gets a list of services from the service resolver for each query. The module then\n# requests each service with the query in async fashion and returns a json response\nimport requests\nimport string\nimport responsefilter\n\ndef do(servic...
python
edit
1
1
mit
1ac69ebb2b1ea3218f5c01338af3df86f3828090
lahsivjar/jarvis-kube
jarvis-system/orchestrator/src/asyncworker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom numpy.testing import assert_equal\nfrom gala import evaluate as ev\n\ndef test_contingency_table():\n seg = np.array([0, 1, 1, 1, 2, 2, 2, 3])\n gt = np.array([1, 1, 1, 2, 2, 2, 2, 0])\n ct = ev.contingency...
python
edit
1
1
bsd-3-clause
6c3b5a314c9ba25fba2b0a605215d2fdad97e8dc
jni/gala,janelia-flyem/gala
tests/test_evaluate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Markdown Linter for SublimeLinter, a code checking framework\n# for Sublime Text 3\n#\n# Written by Jon LaBelle\n# Copyright (c) 2018 Jon LaBelle\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Markdownlint plugin c...
python
edit
1
0
mit
96755c5e3ccf0573e7190da2a4a9264fdf409710
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nweitersager.util\n~~~~~~~~~~~~~~~~\n\nUtilities\n\n:Copyright: 2007-2021 Jochen Kupperschmidt\n:License: MIT, see LICENSE for details.\n\"\"\"\n\nimport logging\nfrom logging import Formatter, StreamHandler\nfrom threading import Th...
python
edit
1
1
mit
d410c30ba779ac0b32fdac7bf15733b1edacafe7
homeworkprod/weitersager
src/weitersager/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCONTACT APP\n\nThis module provides a variety of tasks to be queued by Celery.\n\nClasses:\n n/a\n\nFunctions:\n email_contact_message\n \nCreated on 21 Oct 2013\n\n@author: michael\n\n\"\"\"\nfrom celery.decorators import ...
python
edit
4
3
bsd-3-clause
f707f0daec148ae16604a8fb1326fe10155d4453
unomena/tunobase,unomena/tunobase
tunobase/corporate/company_info/contact/tasks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.nnet import conv\nfrom theano.tensor.nnet import softmax\nfrom theano.tensor import shared_randomstreams\nfrom theano.tensor.signal import downsample\n\n\n\ncl...
python
edit
8
1
cc0-1.0
9b2ee2e4a956f8409047b289ee5c35ad4fcb4310
cn04/insanity
insanity/layers.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nRun the Varda REST server.\n\nTo reset the database:\n\n from varda import db\n db.drop_all()\n db.create_all()\n\n\"\"\"\n\n\nfrom flaskext.script import Manager\nfrom flaskext.celery import install_...
python
edit
1
1
mit
530549f7fe2c6bbf45996e17b2b125150ad031ae
varda/varda,sndrtj/varda
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport unittest\nfrom flask.ext.script import Manager, Server\nfrom app import app\n\n\nmanager = Manager(app)\n\n\nserver = Server(host='0.0.0.0', use_debugger=True)\nmanager.add_command(\"runserver\", ser...
python
edit
1
1
mit
4ac3c1d5feaadd46a13bc78f9834c29a789e0d9a
andytom/snippets,andytom/snippets
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass PyhunterError(Exception):\n \"\"\"\n Generic exception class for the library\n \"\"\"\n pass\n\n\nclass MissingCompanyError(PyhunterError):\n pass\n\n\nclass MissingNameError(PyhunterError):\n pass\n\n\nclass Hunte...
python
edit
1
0
mit
0b0a11d01378368fb795c117ffd931811eaf9b76
VonStruddle/PyHunter
pyhunter/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.trial import unittest\n\nfrom ooni.settings import config\n\n\nclass ConfigTestCase(unittest.TestCase):\n def setUp(self):\n config.initialize_ooni_home(\"ooni_home\")\n\n def tearDown(self):\n config.read_c...
python
edit
1
1
bsd-2-clause
404d499877c050f706ca0f713d1c8ef0e5a88889
kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-pro...
ooni/tests/bases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ExternalManager(object):\n \"\"\"\n Manager the active externals\n \"\"\"\n def __init__(self, processors=None, optimizers=None):\n self.processors = processors if processors is not None else []\n self.optimi...
python
edit
1
3
bsd-3-clause
26330025ccdeab7febd69c7f9053a99ac46d421b
page-io/Cactus,juvham/Cactus,ibarria0/Cactus,gone/Cactus,Knownly/Cactus,ibarria0/Cactus,dreadatour/Cactus,danielmorosan/Cactus,PegasusWang/Cactus,dreadatour/Cactus,andyzsf/Cactus-,Bluetide/Cactus,koenbok/Cactus,Knownly/Cactus,PegasusWang/Cactus,koobs/Cactus,ibarria0/Cactus,eudicots/Cactus,page-io/Cactus,chaudum/Cactus,...
cactus/static/external/manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom TensorMesh import TensorMesh\nfrom CylMesh import CylMesh\nfrom Cyl1DMesh import Cyl1DMesh\nfrom LogicallyRectMesh import LogicallyRectMesh\nfrom TreeMesh import TreeMesh\nfrom BaseMesh import BaseMesh\n\n```\n\nApply this change: Remo...
python
edit
7
0
mit
eacc1f88f7e34e26c3a4d29ec009b4984c10a345
simpeg/discretize,simpeg/simpeg,simpeg/discretize,simpeg/discretize
SimPEG/Mesh/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: set fileencoding=utf-8\n\nimport sys\n\ntry:\n import readline\n # No idea if this is a license violation. Hope it isn't.\nexcept ImportError:\n print(\"Could not find readline, you will likely get no line editing functional...
python
edit
2
0
mit
962ae8a53c95e8ade1e0fd5804062b807837781e
5225225/pycalc,5225225/pycalc
pycalc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2011-2014 LabKey Corporation\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# ...
python
edit
5
0
apache-2.0
d48e1388eb2a21f83094e561405e292f6ecc3fb9
LabKey/labkey-api-python
labkey/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom teamsupport.services import TeamSupportService\n\n__author__ = 'Yola Engineers'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\n__all__ = (TeamSupportService,)\n\n```\...
python
edit
1
0
mit
830e1a23559b82af37f52657484edd20641318c5
zoidbergwill/teamsupport-python,yola/teamsupport-python
teamsupport/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask_wtf import Form\nfrom flask_wtf.recaptcha import RecaptchaField, Recaptcha\nfrom wtforms import StringField, validators\n\nfrom .validation import not_blacklisted_nor_spam\n\n\nclass ShortenedURLForm(Form...
python
edit
1
0
mit
2f03aa69f55d4d899af968e57a59a58d27ef82c8
piotr-rusin/url-shortener,piotr-rusin/url-shortener
url_shortener/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.ext import ndb\n\n\nclass Photo(ndb.Model):\n name = ndb.StringProperty()\n blob_info_key = ndb.BlobKeyProperty()\n date_created = ndb.DateTimeProperty(auto_now_add=True)\n\n\nclass Album(ndb.Model):\n name...
python
edit
1
0
mit
9b524fa97d1d1c8c132d1a880103a5ab4d0dabfc
MichaelAquilina/Photo-Nebula,MichaelAquilina/Photo-Nebula
models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport urllib\n\ndef main():\n api_url = 'https://uw-alert.herokuapp.com/check_availability'\n courses = [{'level': 'under',\n 'session': 1151,\n 'subject': 'CS',\n 'numb...
python
edit
1
2
mit
c7b40736b6e59a654652afaab7fb643e00c1f186
tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter
clients/cron/call_uw_course_alerter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto3\nimport logging\n\nlogger = logging.getLogger()\nlogger.setLevel(logging.INFO)\n\ndef lambda_handler(event, context):\n ec2 = boto3.resource('ec2')\n\n with open('env.sh') as e, open('cloud-init.sh') as f:\n script...
python
edit
1
1
mit
3c04509ced5c51c55294e88ded2614b9f289deea
gertvv/ictrp-retrieval,gertvv/ictrp-retrieval
launch_instance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\nfrom __future__ import division\n\ndef reverse(seq):\n \"\"\"Return the reverse of the given sequence (i.e. 3' to \n 5').\"\"\"\n return seq[::-1]\n\ndef complement(seq):\n \"\"\"Return the complement o...
python
edit
1
2
mit
d5e5b9ca4c9243d950e17b141008ffb168df0b64
kalekundert/kbkdna
kbkdna/dna.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport random\nimport webbrowser\n\nfrom pythonkc_meetups import PythonKCMeetups\nfrom optparse import OptionParser\n\n\ndef raffle_time(api_key=None, event_id=None):\n client = PythonKCMeetups(api_key=api_key)\n...
python
edit
1
2
bsd-3-clause
43e4d71a193f78e83f26e9d1c5fe69cee1b289b5
pythonkc/pythonkc-raffler
raffle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Match\nfrom .models import Tip\n\ndef delete_tips(modeladmin, request, queryset):\n for match in queryset:\n tips = Tip.object.filter(match = match)\n for tip in tips:\n...
python
edit
1
3
mit
34274289f0cbfafbb1d762cad38a7225873d6850
leventebakos/football-ech,leventebakos/football-ech
matches/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom threading import Thread\nfrom Queue import Queue\n\nfrom doubles import lifecycle\n\n\nclass TestLifecycle(object):\n def test_stores_a_space_per_thread(self):\n queue = Queue()\n\n queue.put(lifecycle.current_space())...
python
edit
1
1
mit
88921deb630bef702a08f5b3a07279ccd223902b
uber/doubles
test/lifecycle_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nclass Bit:\n def __init__(self, auth_token, device_id):\n self.token = auth_token\n self.id = device_id\n self.version = '0.1.0'\n self.headers = {\"Authorization\": \"Bearer \" + self.token, ...
python
edit
2
1
mit
0335f32fa7035d394a6434b924a8ebb17332fd45
technoboy10/partly-cloudy
mist/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twilio.rest import TwilioRestClient\nimport config\n\n\nclient = TwilioRestClient(account_sid, auth_token)\n\nmessage = client.messages.create(to=\"+12316851234\", from_=\"+15555555555\",\n body=\"He...
python
edit
5
0
mit
46592a761df3716e5c3e218e4aa714bc7fc1b0ce
nhshd-slot/SLOT,bsharif/SLOT,bsharif/SLOT,nhshd-slot/SLOT,bsharif/SLOT,nhshd-slot/SLOT
twilio.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\":mod:`cliche.services` --- Interfacing external services\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHow to add a new external service\n---------------------------------\n\nIn order to add a new service to cliche, ...
python
edit
1
0
mit
8bd562b3ae6a2e5ae4fd1ad88da5d46408415365
clicheio/cliche,item4/cliche,clicheio/cliche,item4/cliche,clicheio/cliche
cliche/services/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5,\n AreaDetectorFileStoreTIFF,\n AreaDetectorFileStoreTIFFSquashing)\n\n# from shutter impo...
python
edit
5
0
bsd-2-clause
a47e300d9e25dd3f631c9538f33b1d65cca847af
pavoljuhas/ipython_ophyd,pavoljuhas/ipython_ophyd,NSLS-II-XPD/ipython_ophyd,NSLS-II-XPD/ipython_ophyd
profile_collection/startup/80-areadetector.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nfrom django.core.management.base import BaseCommand\n\n\nfrom apps.plea.models import DataValidation, Case\nfrom apps.plea.standardisers import standardise_urn, format_for_region\n\n\nclass Command(BaseCommand):\n help = \"Bu...
python
edit
5
7
mit
bcd9799b790aef9571491c0537e5aeb12bc9a564
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
make_a_plea/management/commands/check_urns_in_db.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport chstrings\nimport config\n\nimport unittest\n\nclass CHStringsTest(unittest.TestCase):\n @classmethod\n def add_smoke_test(cls, cfg):\n def test(self):\n # We just want to see if this will blow up\n ...
python
edit
1
2
mit
1843e34bba0343cd3600f3c8934ae29b4b365554
eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt
chstrings/chstrings_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" A script for testing DraftRegistrationApprovals. Automatically approves all pending\nDraftRegistrationApprovals.\n\"\"\"\nimport sys\nimport logging\n\nfrom website.app import init_app\nfrom website.models import DraftRegistration, S...
python
edit
1
9
apache-2.0
4fdf3af6414ae6fdc20882309bcaf36ffbe5c7a7
crcresearch/osf.io,Johnetordoff/osf.io,TomHeatwole/osf.io,Nesiehr/osf.io,Nesiehr/osf.io,mattclark/osf.io,caneruguz/osf.io,zachjanicki/osf.io,caneruguz/osf.io,SSJohns/osf.io,adlius/osf.io,monikagrabowska/osf.io,abought/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,KAsante95/osf.io,aaxelb/osf.io,acshi/osf.io,KAsante95/...
scripts/prereg/approve_draft_registrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\nfrom django import forms\nfrom django.forms.widgets import TextInput\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext as _\nfrom braces.forms import UserKwargMo...
python
edit
1
1
mit
4add4eb1895498d547c8cf86ea8017c273932139
watchdogpolska/django-one-petition,watchdogpolska/django-one-petition,watchdogpolska/django-one-petition
petition/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom databroker.core import Header\n\n\ndef test_header_dict_conformance(db):\n # TODO update this if / when we add conformance testing to\n # validate attrs in Heade...
python
edit
1
2
bsd-3-clause
cd88b3a695e87078aa0b50f9b3ea3af9ae3eb0a5
ericdill/databroker,ericdill/databroker
databroker/tests/test_core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom api.collections import views\nfrom website import settings\n\nurlpatterns = []\n\n# Routes only active in local/staging environments\nif settings.DEV_MODE:\n urlpatterns.extend([\n url(r'^$...
python
edit
1
0
apache-2.0
e9031ab6091e3b9d7866c300c8e21b9e81e7e935
cslzchen/osf.io,leb2dg/osf.io,kch8qx/osf.io,TomBaxter/osf.io,wearpants/osf.io,laurenrevere/osf.io,chrisseto/osf.io,cslzchen/osf.io,mluo613/osf.io,rdhyee/osf.io,mluke93/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,billyhunt/osf.io,mluo613/osf.io,caseyrollins/osf.io,zachjanicki/osf.io,jnayak1/osf.io,a...
api/collections/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nfrom .. import project\n\n\nclass BoostBuildProject(project.Project):\n\n @staticmethod\n def identifier():\n return 'boostbuild'\n\n @staticmethod\n def is_valid_project(definition, needy)...
python
edit
1
6
mit
9eea896352e62850494dbb3f894eef0b82afab89
vmrob/needy,ccbrown/needy,vmrob/needy,bittorrent/needy,bittorrent/needy,ccbrown/needy
needy/projects/boostbuild.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport celery\nimport os\nimport os.path\nimport sys\n\n# Add the project to the python path\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))\n\n# Configure the application on...
python
edit
1
1
bsd-3-clause
579fbe76f8ab86d5f599f9888149fcaed297842c
zenefits/sentry,nicholasserra/sentry,fotinakis/sentry,JamesMura/sentry,alexm92/sentry,nicholasserra/sentry,BuildingLink/sentry,gencer/sentry,daevaorn/sentry,beeftornado/sentry,JamesMura/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,fotinakis/sentry,mvaled/sentry,JamesMura/sentry,beeftornado/sentry,looker/sentry,fot...
src/sentry/celery.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Natural Language Toolkit: Aligner Utilities\n#\n# Copyright (C) 2001-2013 NLTK Project\n# Author: \n# URL: <http://www.nltk.org/>\n# For license information, see LICENSE.TXT\n\n\n```\n\nApply this change: Convert pharaoh output format to ...
python
edit
1
2
apache-2.0
610c27c15c09777a84143f551bb2cd3c2a5e3584
nltk/nltk,nltk/nltk,nltk/nltk
nltk/align/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from numbers import Number\n import pymongo\nexcept ImportError:\n Number = None\n\nimport diamond\n\n\nclass MongoDBCollector(diamond.collector.Collector):\n \"\"\"Collects data from MongoDB's db.serverStatus() command\n...
python
edit
1
4
mit
7d10b9d803089d1cf8a0c06219608d31bf5fb84f
jriguera/Diamond,MichaelDoyle/Diamond,Netuitive/netuitive-diamond,hamelg/Diamond,dcsquared13/Diamond,sebbrandt87/Diamond,python-diamond/Diamond,gg7/diamond,sebbrandt87/Diamond,actmd/Diamond,signalfx/Diamond,Basis/Diamond,bmhatfield/Diamond,python-diamond/Diamond,krbaker/Diamond,jumping/Diamond,signalfx/Diamond,rtoma/Di...
src/collectors/MongoDBCollector/MongoDBCollector.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom lsapi import lsapi\n\nl = lsapi('my-access-id', 'my-secret-key')\n\n# As you may have noticed, there are lots of columns available\n# I did what I could to make them easily-accessible, but there\n# are a lot, ...
python
edit
1
0
mit
af9b7dd5e4923c15a8adbab41ee9933245714ec8
seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples
python/example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom functools import wraps\n\nfrom mock import patch\n\nfrom elasticmock.fake_elasticsearch import FakeElasticsearch\n\nELASTIC_INSTANCES = {}\n\n\ndef _get_elasticmock(hosts=None, *args, **kwargs):\n elastic_...
python
edit
1
2
mit
59eb6eaf18c67c424dad35f82f6baac6c93de380
vrcmarcos/elasticmock
elasticmock/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom toil import version\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef addBasicProvisionerOptions(parser):\n parser.add_argument(\"--version\", action='version', version=versio...
python
edit
1
1
apache-2.0
ab5ebb50019add34333edb04cc96f7f55fce8d1c
BD2KGenomics/slugflow,BD2KGenomics/slugflow
src/toil/utils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom malibu import command # noqa\nfrom malibu import config # noqa\nfrom malibu import database # noqa\nfrom malibu import design # noqa\nfrom malibu import text # noqa\nfrom malibu import util # noqa\n\nimpo...
python
edit
1
0
unlicense
7755ab25249c39350004447daa614bc35e4517e7
maiome-development/malibu
src/malibu/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\n\nfrom corehq.apps.cleanup.utils import confirm_destructive_operation\nfrom corehq.elastic import get_es_new\n\n\nclass Command(BaseCommand):\n \"\"\"\n Wipe all data from BlobDB.\n \...
python
edit
1
3
bsd-3-clause
44e5d35b6d43a22a480000b39a4e85335a27904b
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/es/management/commands/wipe_es.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom aque.utils import decode_callable\n\n\nlog = logging.getLogger(__name__)\n\n\ndef reduce_children(job):\n\n func = decode_callable(job.get('func'))\n sequence = [child.result() for child in job.children()]\n ...
python
edit
2
3
bsd-3-clause
a4bc21a1e24b0ac86564b1259a2583ed680a29e2
mikeboers/aque,mikeboers/aque
aque/handlers/reduce.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# file findingaids/__init__.py\n#\n# Copyright 2012 Emory University Library\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 obta...
python
edit
1
0
apache-2.0
a6be362f03410b53cd21d6ff7b63bdaef6963ad4
emory-libraries/findingaids,emory-libraries/findingaids
findingaids/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrighted by participating institutions in DataONE. For\n# more information on DataONE, see our web site a...
python
edit
1
0
apache-2.0
a8b1b4ca3fd4964b2349ed085e8d2350072e67b9
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
d1_libclient_python/src/d1_client/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom nose.tools import *\nimport os\nimport time\nfrom shellstreaming.inputstream.textfile import TextFile\n\n\nTEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt'\n\n\ndef test_tex...
python
edit
8
4
apache-2.0
1ebf1cfb0ca67d7bb10fa776b5944d8755292999
laysakura/shellstreaming,laysakura/shellstreaming
shellstreaming/test/inputstream/test_textfile.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy\nfrom nav_msgs.msg import Odometry\n\npublisher = None\n\ndef send_computed_control_actions(msg):\n publisher.publish(msg)\n \n\nif __name__ == '__main__':\n rospy.init_node('pose')\n subscrib...
python
edit
1
1
mit
244e760f27303fcfad220d364cd2d40f3de1cc99
bit0001/trajectory_tracking,bit0001/trajectory_tracking
src/pose.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\nimport hashlib\n\n\ndef short_hash():\n \"\"\"\n Generate a unique short hash (40 bytes) which is suitable as a token, secret or id\n \"\"\"\n return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()\n\n\ndef long_...
python
edit
1
1
bsd-2-clause
5dec9add35697dc77e2351bb076da90c6b56ea8d
JensTimmerman/django-oauth-toolkit,trbs/django-oauth-toolkit,vmalavolta/django-oauth-toolkit,Gr1N/django-oauth-toolkit,cheif/django-oauth-toolkit,drgarcia1986/django-oauth-toolkit,Natgeoed/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,jensadne/django-oauth-toolkit,mjrulesamrat/django-oauth-toolkit,StepicOrg/d...
oauth2_provider/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='python3-indy',\n version='0.0.1',\n packages=['indy'],\n url='https://github.com/hyperledger/indy-sdk',\n license='MIT/Apache-2.0',\n author='Vyacheslav Gudkov',\n auth...
python
edit
1
0
apache-2.0
716282a16cefe1c34ae1bb1f8ffc6bb70879b5c2
Artemkaaas/indy-sdk,anastasia-tarasova/indy-sdk,korsimoro/indy-sdk,srottem/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,srottem/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,korsimoro/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peace...
wrappers/python/setup.py
rejected_duplicate
Near-duplicate of sample 2332
true
[ { "role": "user", "content": "Write python code for the following: Correct the path to the sqlite db on vagrant" }, { "role": "assistant", "content": "SQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'\n" } ]
python
new_file
1
0
mit
4a69aa350f0b3cf95cbf2f518d58310be5731a74
thusoy/pwm-server,thusoy/pwm-server
salt/pwm-server/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nimport logging\n\nif not os.path.exists(os.path.expanduser(\"~/.chatserver\")):\n os.makedirs(os.path.expanduser(\"~/.chatserver\")\nlogging.basicConfig(filename=os.path.expanduser(\"~/.chatserver/chat.log\"), leve...
python
edit
1
0
bsd-3-clause
98d45ace5ce5b8918e470beb7dbcb1d59b0608af
jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat
server_app/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_login import UserMixin\n\n\nclass User(UserMixin):\n # proxy for a database of users\n user_database = {\"test\": (\"slot\", \"test\"), \"live\": (\"slot\", \"live\")}\n\n def __init__(self, username, password):\n ...
python
edit
1
1
mit
1f124ca4c13a0e5ceb9796bb1df95e5f31c5bd04
nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT
slot/users/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n# Fix Python script(s) to reference the interpreter via /usr/bin/env python.\n\nimport sys\nimport regex\nimport regsub\n\n\ndef main():\n\tfor file in sys.argv[1:]:\n\t\ttry:\n\t\t\tf = open(file, 'r+')\n\t\texcep...
python
edit
7
4
mit
574a2d98733cbab814050d29d1a24cd5c6563c4f
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Tools/scripts/fixps.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\"\"\"\n\n\"\"\"\n\nimport unittest\nimport time\n\nclass Case1(unittest.TestCase):\n\n def test_success(self):\n time.sleep(0.5)\n self.assertEqual(1, 1)\n\n def test_failure(self):\n t...
python
edit
1
1
bsd-2-clause
736150f90d82a4583630b9999db94fa6afb47e10
nicolasdespres/hunittest
test_samples/test_simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\n\n__all__ = (\n 'settings',\n)\n\n\ndefault_settings = {\n 'SLACK_CLIENT_ID': None,\n 'SLACK_CLIENT_SECRET': None,\n\n 'SLACK_AUTHORIZATION_URL': 'https://slack.com/oa...
python
edit
1
2
mit
116893350b3618c07e05c671ff52d6f972430565
izdi/django-slack-oauth,avelis/django-slack-oauth
django_slack_oauth/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom testfixtures.shop_article import create_article\nfrom testfixtures.shop_shop import create_shop\n\nfrom tests.base import A...
python
edit
1
1
bsd-3-clause
f8292dced6aef64950280a33e9980a7998f07104
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
tests/services/shop/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom web_test_base import *\n\nclass TestIATIStandard(WebTestBase):\n \"\"\"\n TODO: Add tests to assert that:\n - the number of activities and publishers roughly matches those displayed on the Registry\n - the newsletter form i...
python
edit
5
1
mit
5d36f84fe96eb250760073ab186edc881217ae07
IATI/IATI-Website-Tests
tests/test_iati_standard.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nMicrosoft Update files management via wusa.exe\n\n:maintainer: Thomas Lemarchand\n:platform: Windows\n:depends: PowerShell\n\n'''\n\n# Import python libs\nfrom __future__ import absolute_import\ni...
python
edit
6
3
apache-2.0
09dc09d88d04d2926e3ffc116cf5606aaf3dc681
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/win_wusa.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/python3\n\nimport os\nimport xml.etree.ElementTree as ET\n\noneimage = os.popen(\"oneimage list --xml\")\n\ntree = ET.fromstring(oneimage.read())\n\n#print(tree.tag)\n\nfor image in tree.findall('./IMAGE'):\n imageid = image.find(...
python
edit
1
0
apache-2.0
1c9ce82c954ab206ec1b5387ef5cb49ab9c96208
zhtlancer/addon-iscsi,zhtlancer/addon-iscsi
additional_scripts/image-get-datastore-list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\n########################################################################\n# #\n# This script was written by Thomas Heavey in 2017. #\n# <EMAI...
python
edit
5
0
apache-2.0
66503b8d59a8bb5128bd05966c81fa949b4e5097
theavey/ParaTemp,theavey/ParaTemp
__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The supported extensions, as defined by https://github.com/github/markup\nsupported_extensions = ['.md', '.markdown']\n\n# The default filenames when no file is provided\ndefault_filenames = map(lambda ext: 'README' + ext, supported_exten...
python
edit
1
0
mit
4f67141cfabe99af99434364e13fec91bef291a7
ssundarraj/grip,joeyespo/grip,ssundarraj/grip,jbarreras/grip,jbarreras/grip,joeyespo/grip,mgoddard-pivotal/grip,mgoddard-pivotal/grip
grip/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport time\nimport picamera\nfrom settings import Job, IMAGES_DIRECTORY\n\n\ndef main():\n job = Job()\n if job.exists():\n resolution_x = job.image_settings.resolution_x\n resolution_y = job.im...
python
edit
1
4
mit
de3218c662f5fa98dac57e7f875cbe49efbc1b78
projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse
time_lapse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass EventsConfig(AppConfig):\n name = 'event_monitors'\n verbose_name = 'EventMonitors'\n\n```\n\nApply this change: Fix event monitors app config" }, { "role": "assistant", "conten...
python
edit
1
0
apache-2.0
3bd010690bdbc7ba64c1c15709880368fb78b3e8
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/event_monitors/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uos\nfrom flashbdev import bdev\n\n\ndef check_bootsec():\n buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE\n bdev.readblocks(0, buf)\n empty = True\n for b in buf:\n if b != 0xFF:\n empty = False\n ...
python
edit
1
4
mit
a780d95b76404e46f5060d830fb95b0179716569
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
ports/esp32/modules/inisetup.py
rejected_duplicate
Near-duplicate of sample 13199
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -- coding: utf-8 --\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. ...
python
edit
3
2
apache-2.0
a40415604a9a8bbdc7833d850c4f74d66236d334
jcshen007/cloudstack,DaanHoogland/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,wido/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack...
systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom flask_socketio import SocketIO, send, emit\napp = Flask(__name__, template_folder='./templates')\n\n# Websocket setting\napp.config['SECRET_KEY'] = '12qwaszx'\nsocketio = SocketIO(app)\n\n@app....
python
edit
5
1
mit
0174384553e22046438305d9accb735cc4a8f273
KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice
src/Flask/venv/demo/app/main.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .pool import create_pool\nfrom .pgsingleton import PG\nfrom .connection import compile_query\n\n__version__ = '0.11.0'\npg = PG()\n\n\n```\n\nApply this change: Bump version to fix previous bad version" }, { "role": "assistant"...
python
edit
4
0
apache-2.0
72298e52d3621740f7f7b02098080caa56da19e8
CanopyTax/asyncpgsa
asyncpgsa/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A simple GTFS library.\n\nThis package is used internally to read and process GTFS files and to create OnestopIds.\n\n\"\"\"\n\n__version__ = '0.10.3'\n```\n\nApply this change: Set master version to 'master'" }, { "role": "as...
python
edit
1
0
mit
4227bda80f6aa33356e527399e79c633ef018089
brechtvdv/mapzen-gtfs,brennan-v-/mapzen-gtfs,transitland/mapzen-gtfs
mzgtfs/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.http import HttpResponse\nfrom django.core.urlresolvers import reverse\nfrom django.utils.html import conditional_escape as escape\n\nfrom .models import Search\n\ndef uikit(request):\n searches = Search.object...
python
edit
1
2
bsd-3-clause
fce5d034f007248b74f3d16843d4cdc0d2f50721
wlanslovenija/django-postgres
postgres/search/views.py
accepted
null
true