messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the LICENSE.txt file for details.\nfrom __future...
python
edit
3
5
bsd-3-clause
4ecd19f7a1a36a424021e42c64fb273d7591ef1f
sjagoe/haas,itziakos/haas,sjagoe/haas,scalative/haas,itziakos/haas,scalative/haas
haas/plugin_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport pandas as pd\n\nfrom influxdb import DataFrameClient\n\n\ndef main(host='localhost', port=8086):\n user = 'root'\n password = 'root'\n dbname = 'example'\n\n client = DataFrameClient(host, port, user, pas...
python
edit
3
1
mit
da39921f94a90e330c796e0ad9ff861e9fc5a8af
BenHewins/influxdb-python,BenHewins/influxdb-python,influxdb/influxdb-python,tzonghao/influxdb-python,tzonghao/influxdb-python,influxdata/influxdb-python,omki2005/influxdb-python,influxdb/influxdb-python,influxdata/influxdb-python,omki2005/influxdb-python
examples/tutorial_pandas.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\n\n# Copyright 2016 Eddie Antonio Santos <<EMAIL>>\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...
python
edit
2
2
apache-2.0
1f2a30f5c9ac68c53ed042ab6b5b9c365a1d0d16
naturalness/sensibility,eddieantonio/ad-hoc-miner,naturalness/sensibility,naturalness/sensibility,eddieantonio/ad-hoc-miner,eddieantonio/ad-hoc-miner,naturalness/sensibility,eddieantonio/ad-hoc-miner
rate_limit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nclass Pagetags:\n\n default_confidence = 100\n\n de...
python
edit
1
1
bsd-3-clause
aaaa857642fa4ce2631fb47f3c929d3197037231
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/generate_pageview.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom trex.models.project import Projec...
python
edit
1
3
mit
83c682264582a345d4c5ada0a8fd2fd540595d1e
bjoernricks/trex,bjoernricks/trex
trex/management/commands/zeiterfassung.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom ansible.forms import AnsibleForm1, AnsibleForm2\nfrom ansible.views import (\n PlaybookWizard, PlaybookListView, PlaybookDetailView,\n)\nfrom . import views\n\n\nurlpatterns = [\n url(r'^create/$...
python
edit
3
0
bsd-3-clause
f20dd39fd3ae739bf6460f452a5d67bc42785adf
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/ansible/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sys import version\n\nfrom distutils.core import setup\nsetup(name='mosquitto',\n\tversion='1.0.1',\n\tdescription='MQTT version 3.1 client class',\n\tauthor='Roger Light',\n\tauthor_email='<EMAIL>',\n\turl='http://mosquitto.org/',\n\t...
python
edit
3
0
bsd-3-clause
3d29cad334446613180e0279cb1197fab1f77764
zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto
lib/python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nCreate wordcloud with Arabic\n===============\nGenerating a wordcloud from Arabic text\n\nDependencies:\n- bidi.algorithm\n- arabic_reshaper\n\nDependencies installation:\npip install python-bidi arabic_reshap...
python
edit
1
0
mit
1a06f983a3edf3ee2f887c2e2094eb76820b5a73
amueller/word_cloud
examples/arabic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom . import auth, commands, tests, utils, account, auth, blueprint, columns, errors, query, segments\nfrom .auth import authenticate, authorize, revoke\nfrom .blueprint import Blueprint\n\n```\n\nApply this change: Ad...
python
edit
17
0
isc
633ba35c87f62b70e0aae275519514632d33a777
debrouwere/google-analytics
googleanalytics/__init__.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"FreeBSD Ports.\"\"\"\n\nfrom __future__ import absolute_import\n\n__all__ = [\"get_port\"]\n\n\nclass PortCache(object):\n \"\"\"Caches created ports.\"\"\"\n\n def __init__(self):\n \"\"\"Initialise port cache.\"\"\"\n ...
python
edit
1
3
bsd-2-clause
c3526f51afc23a4c672e86a850c4f49d094a2482
DragonSA/portbuilder,DragonSA/portbuilder
libpb/port/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"sda\n\n.. codeauthor:: John Lane <<EMAIL>>\n\n\"\"\"\n\nfrom sda import element\nfrom sda import locators\nfrom sda import mixins\nfrom sda import page\nfrom sda import site\nfrom sda import structures\n\n__au...
python
edit
4
0
mit
335ce70414ffecbfc506ce2c22a5a7e4aeeca1a1
jlane9/selenium_data_attributes,jlane9/selenium_data_attributes
sda/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 16.08.2017 19:25\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom .CopyableGrammar import CopyableGrammar as _G\n\n\n\nclass Grammar(_G):\n def __copy__(self):\n r...
python
edit
1
1
mit
51b179a6d8d2bef2a0371c870dbc1b7b3ebc9a38
PatrikValkovic/grammpy
grammpy/Grammars/Grammar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file....
python
edit
2
2
bsd-3-clause
029d5c9f85dedbe8d1b4d41a8cb27d70652c9c1b
dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart...
tools/clean_output_directory.py
rejected_duplicate
Near-duplicate of sample 5016
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2015, Sebastian Linke\n\n# Released under the Simplified BSD license\n# (see LICENSE file for details).\n\n\"\"\"\nConstants that are used by `shcol` in many places. This is meant to modified (i...
python
edit
1
0
bsd-2-clause
bb319f73d16066ffae81cd1f0a7d644b7621dec7
seblin/shcol
shcol/config.py
rejected_duplicate
Near-duplicate of sample 1450
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" This module runs the benchmark test suite. \"\"\"\nfrom .context import phaseflow\n\n\ndef test_lid_driven_cavity_benchmark__ci__():\n \n phaseflow.helpers.run_simulation_with_temporary_output(\n phaseflow.octadecane_ben...
python
edit
1
1
mit
4e6c901140a667612fd311a2f18e1b7c18bafcd0
geo-fluid-dynamics/phaseflow-fenics
tests/test_octadecane_benchmarks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport http.client\nimport urllib\n\n\ndef send_message(settings, message):\n conn = http.client.HTTPSConnection(\"api.pushover.net:443\")\n conn.request(\"POST\", \"/1/messages.json\",\n urllib.parse.urlencode({\n ...
python
edit
1
1
apache-2.0
fb63b49302560d4ab139c3749347edf5878a18c9
aquatix/argus,aquatix/argus
modules/pushover.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Package for GitMan.\"\"\"\n\nfrom pkg_resources import get_distribution\n\nfrom .commands import delete as uninstall # pylint: disable=redefined-builtin\nfrom .commands import display as list\nfrom .commands import init, install, loc...
python
edit
8
0
mit
b04afdc4a6808029443e8107c651a24ba5f9842a
jacebrowning/gitman
gitman/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models.signals import pre_save, post_delete\nfrom django.core.files.storage import default_storage\n\n\ndef asset_file_change(sender, instance, **kwargs):\n # Must be saved already\n if instance.pk is not None:\n ...
python
edit
1
3
bsd-3-clause
8ee418b9a51d418901951b4f7d4cc975b203c0ed
blancltd/blanc-basic-assets
blanc_basic_assets/listeners.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\"\"\"Main package for pybossa-z3950.\"\"\"\n\nfrom flask import current_app as app\nfrom flask.ext.plugins import Plugin\nfrom flask.ext.z3950 import Z3950Manager\n\n__plugin__ = \"PyBossaZ3950\"\n__version__ = \"0....
python
edit
5
3
bsd-3-clause
edfa2547b9ad2f6e8a2f1ab547c08d5d0c702dee
alexandermendes/pybossa-z3950
pybossa_z3950/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nfrom __future__ import print_function\nimport gen_csharp\nimport gen_docs_json\nimport gen_java\nimport gen_python\nimport gen_thrift\nimport bindings\nimport sys, os\n\nsys.path.insert(0, \...
python
edit
1
0
apache-2.0
68673a0c3185b9575ec031c7b7590e5bc091ccb5
h2oai/h2o-dev,mathemage/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,mathemage/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,spennihana/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,spennihana/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/...
h2o-bindings/bin/gen_all.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nfrom django.contrib.auth.models import User\nfrom django.db import models\n\n\nclass Transaction(models.Model):\n title = models.CharField(\"Title\", max_length=255, blank=False)\n ...
python
edit
1
0
mit
56fde910c417a8d1943e5ff110327fee49cb4a6d
n2o/FineAnts,n2o/FineAnts
fineants/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom domain_parser import domain_parser\n\nclass DomainParserTestCase(unittest.TestCase):\n\n def test_google(self):\n \"\"\"Is google.com properly parsed?\"\"\"\n assert domain_parser.parse_domain(\n ...
python
edit
1
1
apache-2.0
4212b35221a69468b62f933e3dbe5ffeaa9d53dc
jeffknupp/domain-parser,jeffknupp/domain-parser
tests/test_domain_parser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import url_for, request, current_app\nfrom markupsafe import Markup\n\nfrom . import get_renderer\n\n\nclass NavigationItem(object):\n def render(self, renderer=None, **kwargs):\n return Markup(\n get_rendere...
python
edit
1
1
mit
b7175449096717dcce9d3f90dd55e341a350b47b
mbr/flask-nav,mbr/flask-nav
flask_nav/elements.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n``http-01`` challenge implementation.\n\"\"\"\nfrom twisted.web.http import OK\nfrom twisted.web.resource import Resource\n\nfrom zope.interface import implementer\n\nfrom txacme.interfaces import IResponder\n\n\n@implementer(IRespo...
python
edit
1
2
mit
42f2f4453552c2c01c0a066ba800b4c92d9d06f6
mithrandi/txacme
src/txacme/challenges/_http.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ajax_select import LookupChannel\nfrom django.utils.html import escape\nfrom django.db.models import Q\nfrom .models import Person\n\n\nclass PersonLookup(LookupChannel):\n\n model = Person\n\n def get_query(self, q, request):\n ...
python
edit
1
2
mit
efcdeb17ec1e3afdfbdbb50a201f90c422d7cd8e
phani00/tovp,mayapurmedia/tovp,phani00/tovp,mayapurmedia/tovp,mayapurmedia/tovp,phani00/tovp
tovp/contacts/lookups.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gpiozero import Servo\nfrom gpiozero.tools import sin_values\n\nservo = Servo(17)\n\nservo.source = sin_values()\nservo.source_delay = 0.1\n\n```\n\nApply this change: Fix servo sweep example in docs" }, { "role": "assistant", ...
python
edit
1
0
bsd-3-clause
b9388a64b274277eff32fe53c856527716eee282
waveform80/gpio-zero
docs/examples/servo_sweep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .Base import Base\n\n\nclass List(Base):\n def __init__(self, result, object_type):\n Base.__init__(self, result)\n self.object_type = object_type\n\n def __iter__(self):\n for item in self['data']:\n ...
python
edit
1
2
bsd-2-clause
9698dc9da2ca2ac9ba632b14e5757f0f930efe9d
mollie/mollie-api-python
Mollie/API/Object/List.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\n\nDB_FILENAME = 'citationhunt.sqlite3'\n\ndef init_db():\n return sqlite3.connect(DB_FILENAME)\n\ndef reset_db():\n db = init_db()\n\n with db:\n db.execute('''\n DROP TABLE IF EXISTS categories\n ...
python
edit
1
1
mit
a7dce25964cd740b0d0db86b255ede60c913e73d
Stryn/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,Stryn/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt
chdb.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\ndef start():\n return {'start_time': time.time()}\n\ndef end(start_time):\n print(\"count#requests=1\")\n response_time = time.time() - start_time\n print(\"measure#response_time={}ms\".format(response_time * 1000...
python
edit
1
2
mit
d173f5688d2ea466e52e58673d920723847f12a1
mccolgst/www.gittip.com,gratipay/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,studio666/gratipay.com,studio666/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,mccolgst/ww...
gittip/utils/timer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from geopandas.version import version as __version__\nexcept ImportError:\n __version__ = '0.1.0'\n\nfrom geopandas.geoseries import GeoSeries\nfrom geopandas.geodataframe import GeoDataFrame\n\nfrom geopandas.io.file import re...
python
edit
9
0
bsd-3-clause
280e7cf4f7e667ccba796294c58edd5a0f744b70
IamJeffG/geopandas,geopandas/geopandas,perrygeo/geopandas,jorisvandenbossche/geopandas,ozak/geopandas,ozak/geopandas,micahcochran/geopandas,jorisvandenbossche/geopandas,geopandas/geopandas,scw/geopandas,urschrei/geopandas,koldunovn/geopandas,micahcochran/geopandas,jorisvandenbossche/geopandas,kwinkunks/geopandas,jdmcbr...
geopandas/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport logging\nimport argparse\nfrom matador.session import Session\n\n\nclass Command(object):\n\n def __init__(self, **kwargs):\n if kwargs:\n # If kwargs have been supplied, use these in same ...
python
edit
1
3
mit
1f38afdff13c7ccee797fe6063c75630dd642f0a
Empiria/matador
matador/commands/command.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom cffitsio._cfitsio import ffi, lib\n\n\ndef test_create_file(tmpdir):\n filename = str(tmpdir.join('test.fits'))\n f = ffi.new('fitsfile **')\n status = ffi.new('int *')\n lib.fits_create_file(f, filename, statu...
python
edit
1
1
mit
9be02e353335db2c5923be0959595aeb35e9311c
mindriot101/fitsio-cffi
testing/test_direct_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom poetry_core.semver import VersionRange\nfrom poetry_core.semver import parse_constraint\nfrom poetry_core.version.markers import parse_marker\n\nfrom .package import Package\nfrom .utils.utils import create_nested_marker\n\n\nclass Pro...
python
edit
1
3
mit
73ee4af73309c4d20cf7b28ac82a5e1037a5d65a
python-poetry/poetry-core,python-poetry/poetry-core,python-poetry/poetry-core
poetry_core/packages/project_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n wakatime.projects.projectmap\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Information from ~/.waka-projectmap mapping folders (relative to home folder)\n to project names\n\n :author: 3onyc\n :license...
python
edit
3
2
bsd-3-clause
b75570a5897383c6fa9834c1f5f1b2aaf8d236cd
gandarez/wakatime,wakatime/wakatime,wakatime/wakatime,wakatime/wakatime,queenp/wakatime,wakatime/wakatime,prashanthr/wakatime,wangjun/wakatime,wakatime/wakatime,Djabbz/wakatime,wakatime/wakatime,wakatime/wakatime,Djabbz/wakatime,wakatime/wakatime,gandarez/wakatime,queenp/wakatime,wakatime/wakatime,Djabbz/wakatime,prash...
wakatime/projects/projectmap.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'''\nThis tool iterates through all of the scrapers in the datasets module\nand creates a cron-task for each one.\n'''\nimport os\nimport pkgutil\nimport random\nimport sys\n\nfrom publish.l...
python
edit
2
2
mit
25d36ba71aed866de468363ea6004eabbd8f22da
nhsengland/publish-o-matic
publish/tools/crontool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rdflib.graph import ConjunctiveGraph\nfrom rdflib.term import Identifier, URIRef\nfrom rdflib.parser import StringInputSource\nfrom os import path\n\n\nDATA = u\"\"\"\n<http://example.org/record/1> a <http://xmlns.com/foaf/0.1/Document...
python
edit
4
2
bsd-3-clause
3043a2400e46648f01921aad265816d2bcf18211
avorio/rdflib,yingerj/rdflib,avorio/rdflib,RDFLib/rdflib,ssssam/rdflib,marma/rdflib,marma/rdflib,avorio/rdflib,armandobs14/rdflib,RDFLib/rdflib,dbs/rdflib,armandobs14/rdflib,yingerj/rdflib,yingerj/rdflib,ssssam/rdflib,RDFLib/rdflib,dbs/rdflib,yingerj/rdflib,marma/rdflib,dbs/rdflib,armandobs14/rdflib,RDFLib/rdflib,avori...
test/test_conjunctive_graph.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nPostpasses over the LLVM IR.\nThe signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc\n\"\"\"\n\nfrom __future__ import print_function, division, absolute_import\n\nfrom numba.support.mat...
python
edit
1
1
bsd-2-clause
bdecfc7f31b13718957e598947eb52b2e7988fd6
pombredanne/numba,GaZ3ll3/numba,ssarangi/numba,numba/numba,ssarangi/numba,ssarangi/numba,stefanseefeld/numba,cpcloud/numba,pitrou/numba,cpcloud/numba,pitrou/numba,pitrou/numba,stuartarchibald/numba,jriehl/numba,gdementen/numba,stefanseefeld/numba,numba/numba,IntelLabs/numba,stuartarchibald/numba,IntelLabs/numba,GaZ3ll3...
numba/postpasses.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Venues(models.Model):\n\tname = models.CharField(max_length=30)\n\twebsite = models.CharField(max_length=50)\n\taddress = models.CharField(max_length=200)\n\ttown = models.CharField(max_length=30)\n\tpo...
python
edit
1
1
bsd-3-clause
a77b62ccadf578b8e352e4fdae8e4efe5060f938
andreagrandi/workshopvenues
workshopvenues/venues/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import apps\nfrom django.db.models import manager\nfrom django.contrib.postgres.search import SearchVector, SearchQuery, SearchRank\n\n\nclass ProductManager (manager.Manager):\n # Custom manager to facilitate product qu...
python
edit
4
1
bsd-2-clause
7a4d9c88895449b54d016226a383bde40502060c
ftkghost/SuperSaver,ftkghost/SuperSaver
supersaver/product/managers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nHERE = os.path.abspath(os.path.dirname(__file__))\nPROJECT_ROOT = os.path.abspath(os.path.join(HERE, os.pardir))\n\n\nclass Config:\n SECRET_KEY = os.environ.get('SECRET_KEY', 'secret-key')\n SQLA...
python
edit
1
0
mit
75e7008e65cb731cc2a7a24dfa86f02049032b44
zhoux10/pdfhook,zhoux10/pdfhook,zhoux10/pdfhook
src/settings.py
rejected_duplicate
Near-duplicate of sample 2826
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom juju.controller import Controller\nfrom juju.juju import Juju\nfrom .. import base\n\n\n@base.bootstrapped\n@pytest.mark.asyncio\nasync def test_get_controllers(event_loop):\n async with base.CleanController() as co...
python
edit
1
1
apache-2.0
ad17e166cac2863692af96bccf0317d97e102e24
juju/python-libjuju,juju/python-libjuju
tests/integration/test_juju.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd import version\nfrom txircd.module_interface import Command, ICommand, IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass InfoComm...
python
edit
1
1
bsd-3-clause
497116839db95bf734ed66e5cf87e986141ad50d
Heufneutje/txircd,ElementalAlchemist/txircd
txircd/modules/rfc/cmd_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport regex as re\nimport unicodecsv as csv\nimport os.path\nimport pkg_resources\n\n\nclass XSampa(object):\n def __init__(self, delimiter=' '):\n self....
python
edit
1
3
mit
6292cd114d8d982162fa8076605cce569acd8fc5
dmort27/panphon,dmort27/panphon
panphon/xsampa.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.test.testcases import TestCase\n\nfrom django_evolution.models import Version\n\n\nclass VersionManagerTests(TestCase):\n \"\"\"Unit tests for django_evolution.models.VersionManager.\"\"\"\n\n...
python
edit
1
1
bsd-3-clause
2809f97696791f34e659dc9fc3c9e29c802082d2
beanbaginc/django-evolution
django_evolution/tests/test_evolution_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('icekit_events', '0011_event_show_in_calendar'),\n ...
python
edit
3
0
mit
69d18539fb4f394ca45d1116a521084c83ea21b5
ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit_events/migrations/0012_auto_20160706_1606.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport warnings\nimport pkg_resources\n\ntry:\n __version__ = pkg_resources.require('python-dispatch')[0].version\nexcept: # pragma: no cover\n __version__ = 'unknown'\n\nif sys.version_info < (3, 6): # pragma: no cover\n ...
python
edit
5
0
mit
3e6aa4b740b6b22b7ea381db71f76c0c692afa53
nocarryr/python-dispatch
pydispatch/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom datetime import datetime\nfrom decimal import Decimal\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nfrom pamqp import encode, decode\nfrom pamqp import PYTHON3\n\nif PYT...
python
edit
4
3
bsd-3-clause
8ebaf59aa2f966bf0a807c1cbce5359ae0868863
gmr/pamqp
tests/encode_decode_tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# a helper for gyp to do file globbing cross platform\n# Usage: python glob.py root_dir pattern [pattern...]\n\nimport fnmatch\nimport os\nimport sys\n\nroot_dir = sys.argv[1]\npatterns = sys.argv[2:]\n\nfor (dirpath,...
python
edit
1
0
mit
8c20bb711486a95cc861ffeb4bd61e67b3d8f99b
LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core
ledger-core-samples/nodejs/glob.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .widget import Widget, DOMWidget, CallbackDispatcher, register\n\nfrom .widget_bool import Checkbox, ToggleButton\nfrom .widget_button import Button\nfrom .widget_box import Box, Popup, FlexBox, HBox, VBox\nfrom .widget_float import Fl...
python
edit
68
0
bsd-3-clause
aca410866dfdd9ced23df14fb3e51fb02f910e85
jupyter-widgets/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidg...
IPython/html/widgets/__init__.py
rejected_lint
Too many lint violations: 68
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom shapely.geometry import MultiPolygon, Polygon\n\n\ndef test_empty_polygon():\n \"\"\"No constructor arg makes an empty polygon geometry.\"\"\"\n assert Polygon().is_empty\n\n\ndef test_empty_multipolygon():\n \"\"\"No construc...
python
edit
1
1
bsd-3-clause
033c16034074d4fd6eab054a9c97888d23668316
jdmcbr/Shapely,jdmcbr/Shapely
tests/test_empty_polygons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyecmd import *\n\nwith Ecmd(fapi2=\"ver1\"):\n t = loopTargets(\"pu\", ECMD_SELECTED_TARGETS_LOOP)[0]\n data = t.getScom(0x1234)\n t.putScom(0x1234, 0x10100000)\n # These interfaces may not be defined for some plugins\...
python
edit
7
0
apache-2.0
27e7f47f2506be8607f29961dd629a8038c7e67f
open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD
ecmd-core/pyecmd/test_api.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8\n\nfrom http_crawler import crawl\n\n\ndef test_no_links_are_broken(baseurl):\n \"\"\"\n Check that all internal links point to working pages.\n \"\"\"\n responses = []\n for rsp in crawl(baseurl, follow...
python
edit
1
4
mit
c28b0f5ea02652f7899e34d9a8779e2ff47d8020
alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net
tests/test_internal_links.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom malaria24.settings import *\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'malaria24',\n }\n}\n\nONAPIE_ACCESS_TOKEN = 'foo'\nVUMI_GO_ACCOUNT_KEY = 'VUMI_GO_ACCOUNT_KEY'\nVUMI_G...
python
edit
2
0
bsd-2-clause
178006e4a299ca67e758184be50ae94333f09821
praekelt/malaria24-django,praekelt/malaria24-django,praekelt/malaria24-django,praekelt/malaria24-django
test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom python_cowbull_game.GameController import GameController\nfrom python_cowbull_game.GameMode import GameMode\n\n\nclass ExtGameController(GameController):\n additional_modes = [\n GameMode(mode=\"SuperTough\", priority=6, digi...
python
edit
1
1
apache-2.0
3bb2258e75658f8e9c01217fc9b0ae7f53df861a
dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server
extensions/ExtGameController.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\ndef context_preprocessor(request):\n d = {\n 'vdi_media_dir': settings.VDI_MEDIA_PREFIX,\n }\n if request.user.is_authenticated():\n d['institution'] = request.user.username.split('...
python
edit
1
3
apache-2.0
690dbc1ce63a6dc107a34d5b0315d316ef334e49
bmbouter/Opus,ehelms/Opus,ehelms/Opus,bmbouter/Opus,ehelms/Opus,bmbouter/Opus
vdi/context_preprocessors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# EForge project management system, Copyright © 2010, Element43\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the abov...
python
edit
1
1
isc
0d81ecbe4126585d8af089e76fc3bb98b5dc2098
oshepherd/eforge,oshepherd/eforge,oshepherd/eforge
eforge/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport requests\nfrom django.utils.translation import get_language\n\nfrom wagtailaltgenerator.translation_providers import get_current_provider\nfrom wagtailaltgenerator.providers import DescriptionResult\n\n\ndef get_image_da...
python
edit
1
5
mit
221a94c38ac0ad0c6d08f02b587c259423b96311
marteinn/wagtail-alt-generator,marteinn/wagtail-alt-generator,marteinn/wagtail-alt-generator
wagtailaltgenerator/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom handy.db import do_sql, fetch_all, fetch_row, fetch_col, fetch_val\n\n\ndef pytestmark(func):\n pytest.mark.django_db(func)\n pytest.mark.usefixtures('test_table')(func)\n\n\n@pytest.fixture(scope='module')\ndef ...
python
edit
1
1
bsd-3-clause
c2726978a1272b13af2ffdfb10b4238985768317
leliel12/handy,leliel12/handy
tests/test_db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Autoreg(models.Model):\n class Meta:\n db_table = 'autoreg'\n\n mac = models.CharField(max_length=17, db_index=True)\n ip = models.IntegerField(primary_key=True)\n date = models.Int...
python
edit
1
0
bsd-3-clause
3ff7704d9c9998f023fb2d93e279b0f1e4410ad8
drkitty/arim,OSU-Net/arim,drkitty/arim,OSU-Net/arim,OSU-Net/arim,drkitty/arim
arim/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nimport unittest\n\nimport hello_world\n\n\nclass BobTests(unittest.TestCase):\n\n def test_hello_without_name(self):\n self.assertEqual(\n 'Hello, Worl...
python
edit
1
1
mit
3ed33d83b1ade56b41166b50713b1087d6559b70
pheanex/xpython,de2Zotjes/xpython,jmluy/xpython,rootulp/xpython,rootulp/xpython,oalbe/xpython,exercism/xpython,mweb/python,outkaj/xpython,exercism/xpython,mweb/python,jmluy/xpython,behrtam/xpython,N-Parsons/exercism-python,pheanex/xpython,smalley/python,orozcoadrian/xpython,N-Parsons/exercism-python,orozcoadrian/xpytho...
hello-world/hello_world_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport datetime\nfrom uuid import UUID\n\nfrom django.http import HttpResponse\n\nfrom .exceptions import BinderRequestError\n\n\n\nclass BinderJSONEncoder(json.JSONEncoder):\n\tdef default(self, obj):\n\t\tif isinstance(obj, d...
python
edit
1
7
mit
26f48bc7a5e39f50b035f20a517664dade87b981
CodeYellowBV/django-binder
binder/json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\n\nfrom . import BaseBridge\nfrom .. import BaseEvent\n\nclass ConsoleBridge(BaseBridge):\n def __init__(self, config):\n BaseBridge.__init__(self, config)\n self._thread = threading.Thread(target=self.run,...
python
edit
3
4
mit
5429534fc79237fb175aa8f7888565dd14092d9d
Hornwitser/YetiBridge
yetibridge/bridge/console.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Valve Manager base class\"\"\"\n\n# pylint: disable=R0201\n# pylint: disable=W0613\nclass ValveManagerBase: # pylint: disable=too-few-public-methods\n \"\"\"Base class for ValveManager objects.\n\n Expected to control the instal...
python
edit
1
1
apache-2.0
b2c527e912260253be459c9ad3dd6139be21a75d
REANNZ/faucet,faucetsdn/faucet,mwutzke/faucet,anarkiwi/faucet,shivarammysore/faucet,trungdtbk/faucet,REANNZ/faucet,gizmoguy/faucet,anarkiwi/faucet,mwutzke/faucet,trungdtbk/faucet,shivarammysore/faucet,faucetsdn/faucet,gizmoguy/faucet
faucet/valve_manager_base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._hog import hog\nfrom ._greycomatrix import greycomatrix, greycoprops\nfrom .hog import hog\nfrom .texture import greycomatrix, greycoprops, local_binary_pattern\nfrom .peak import peak_local_max\nfrom ._harris import harris\nfrom .te...
python
edit
9
0
bsd-3-clause
014b4905784f50fd13111ca8528fade9be4bd767
blink1073/scikit-image,robintw/scikit-image,emon10005/scikit-image,newville/scikit-image,michaelaye/scikit-image,GaZ3ll3/scikit-image,chintak/scikit-image,chriscrosscutler/scikit-image,warmspringwinds/scikit-image,vighneshbirodkar/scikit-image,robintw/scikit-image,dpshelio/scikit-image,Hiyorimi/scikit-image,youprofit/s...
skimage/feature/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport shopify.resources\n\nclass Countable(object):\n\n @classmethod\n def count(cls, _options=None, **kwargs):\n if _options is None:\n _options = kwargs\n return int(cls.get(\"count\", **_options))\n\n\ncla...
python
edit
1
2
mit
82ba42bf269e7897129976c07d28b4bc0f23df69
Shopify/shopify_python_api
shopify/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Caesar Cipher\n\nMAX_KEY_SIZE = 26\n\ndef getMode():\n while True:\n print('Do you wish to encrypt or decrypt a message?')\n mode = input().lower()\n if mode in 'encrypt e decrypt d'.split():\n return mo...
python
edit
1
10
bsd-2-clause
44a7c59d798d9a20d4d54b9cce7e56b8f88595cc
aclogreco/InventGamesWP
ch14/caesar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport climate\nimport lmj.plot\nimport numpy as np\n\nimport source\nimport plots\n\n\n@climate.annotate(\n root='load experiment data from this directory',\n pattern='plot data from files matching this pattern',\n markers='plot t...
python
edit
1
3
mit
72865598fbe8658ade68f67da4e2a244a13713b9
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/plot-marker-trajectories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os import system\nfrom os import unlink\nfrom os.path import dirname\nfrom os.path import realpath\n\ndef generate_certificate_for(event_id, certificate_name, name_of_certificate_holder):\n resources_path = dirname(realp...
python
edit
3
2
mit
baf41667c9c86484319c58e56187792ed571b6db
codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events,codeeu/coding-events
certificates/generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# File: kindergarten_garden.py\n# Purpose: Write a program that, given a diagram, can tell you which plants each child in the kindergarten class is responsible for.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Date: ...
python
edit
null
null
mit
cc8e643902eb46f9e9d73a4367518e6ab6195308
amalshehu/exercism-python
kindergarten-garden/kindergarten_garden.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom graphql.type.directives import specified_directives as default_directives\n\nfrom .list import ShuffleGraphQLDirective, SampleGraphQLDirective\nfrom .numbers import FloorGraphQLDirective, CeilGraphQLDirective\n...
python
edit
25
0
mit
d38599b88a4537d92b562010ca4b7e56580f2e35
eamigo86/graphene-django-extras
graphene_django_extras/directives/__init__.py
rejected_lint
Too many lint violations: 25
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom urllib.parse import urljoin, urlencode\n\n\nclass ComputerDataImporter(object):\n\n def __init__(self):\n pass\n\n def build_api_url(self, **kwargs):\n api_url = urljoin(settings.LO...
python
edit
1
4
mit
5bad3f45bdca436515b416bbcfb45ca53b46ca2a
msfernandes/facebook-chatbot
application/lomadee/data_importer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-07-28 02:33\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n replaces = [\n ('default', '0005_a...
python
edit
1
0
bsd-3-clause
08b4fae4352f68a524d51a7e14767e5b093c4a73
python-social-auth/social-app-django,python-social-auth/social-app-django,python-social-auth/social-app-django
social_django/migrations/0005_auto_20160727_2333.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: fileencoding=utf-8\nfrom __future__ import print_function, absolute_import, unicode_literals\nimport sys\n\nclass VersionError (ValueError):\n pass\n\ndef check_ex ():\n major, minor, patch = sys.version_info[0:2]\n if major...
python
edit
1
7
mit
e97b5d343ca80ff050fca6d37efffcfe739b42e0
sapphirecat/cloud-maker,sapphirecat/cloud-maker
cloud_maker/py_version.py
rejected_duplicate
Near-duplicate of sample 14745
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nImport the main names to top level.\n\"\"\"\n\ntry:\n\timport numba\nexcept:\n\traise ImportError(\"Cannot import numba from current anaconda distribution. Please run `conda install numba` to install the latest version.\")\n\nfrom ....
python
edit
37
0
bsd-3-clause
c5cd62969ebee36c99923ad7a5b9e7c527bff6cc
QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py
quantecon/__init__.py
rejected_lint
Too many lint violations: 37
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport traceback\n\nclass CustomException(Exception):\n def __init__(self, *args, **kwargs):\n super(CustomException, self).__init__(*args, **kwargs)\n\ndef custom_function():\n\traise CustomException('Test to raise cu...
python
edit
1
1
mit
042c11e298dd76c16ef84b2ee1d96d75de6203d4
iandmyhand/python-utils
print_traceback.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport numpy as np\nfrom anemoi import AnalyticalHelmholtz\n\nclass TestMiniZephyr(unittest.TestCase):\n\n def setUp(self):\n pass\n\n def test_forwardModelling(self):\n\n nx = 100\n nz = 200\n\n ...
python
edit
4
1
mit
b08bff08d69960c9035cefa4e4021d48530c5158
uwoseis/zephyr,uwoseis/anemoi
anemoi/Tests/test_Analytical.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Rooter Analysis S.L.\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...
python
edit
1
1
apache-2.0
036a5f879ddf6f8c2f1ae3bfea6a58962783f949
OpenMOOC/moocng,GeographicaGS/moocng,GeographicaGS/moocng,GeographicaGS/moocng,OpenMOOC/moocng,GeographicaGS/moocng
moocng/portal/management/commands/mailtest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nimport requests\nfrom bs4 import BeautifulSoup\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.gis.geos import GEOSGeometry\nfrom django.contrib.gis.geos import Point\n\nfrom authorities.models imp...
python
edit
7
2
bsd-3-clause
33e1c57cd6186820fb95b5d04a1f494710b2ccbe
DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website
democracy_club/apps/authorities/management/commands/import_mapit_area_type.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# -*- coding: utf-8 -*-\n\nimport sys\nimport os\nimport argparse\nimport re\n\ndef format_go_correspondance(args):\n go = {}\n with open(args.go_correspondance_input, \"r\") as go_correspondance_input:\n ...
python
edit
2
6
apache-2.0
05ecac15aa9b975bd83378daa0560182041bef97
ASaiM/group_humann2_uniref_abundances_to_GO,ASaiM/group_humann2_uniref_abundances_to_GO
src/format_go_correspondance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Dec 30 02:37:25 2013\n\n@author: Jan\n\"\"\"\n\nimport unittest\n\n\nclass PlotStyleTest(unittest.TestCase):\n def test_default(self):\n from opengrid.library.plotting import plot_st...
python
edit
3
1
apache-2.0
52933f030b246615429ac74f7f156b7a33225d7f
opengridcc/opengrid
opengrid/tests/test_plotting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nlogging.basicConfig()\n\nfrom jenkinsapi.jenkins import Jenkins\nJ = Jenkins('http://localhost:8080')\njobName = 'create_fwrgmkbbzk'\n\nconfig = J[jobName].get_config()\n\nprint config\n\n\n```\n\nApply this change: Add a co...
python
edit
2
0
mit
94d3b36e08a546ef470dd0d8dab55a4be3d4265b
imsardine/jenkinsapi,domenkozar/jenkinsapi,jduan/jenkinsapi,mistermocha/jenkinsapi,zaro0508/jenkinsapi,salimfadhley/jenkinsapi,zaro0508/jenkinsapi,aerickson/jenkinsapi,imsardine/jenkinsapi,JohnLZeller/jenkinsapi,aerickson/jenkinsapi,jduan/jenkinsapi,zaro0508/jenkinsapi,mistermocha/jenkinsapi,JohnLZeller/jenkinsapi,sali...
examples/get_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport time\nimport threading\nimport socket\n\n\nclass NetworkFeeder:\n \"\"\"\n A class that feeds data to a socket port\n \"\"\"\n\n def __init__(self, proto, host, port, data, is_client=True, delay=3, timeout=2):\n\n ...
python
edit
1
3
bsd-2-clause
c386e9608eecc1e21fb30f073800755713267c07
shellphish/rex,shellphish/rex
rex/network_feeder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint\n\nbudget = Blueprint('budget', __name__, template_folder = 'templates')\n\n@budget.route('/')\ndef default:\n return \"Hello World!\"\n\n```\n\nApply this change: Fix missing parenthesis for default route in ...
python
edit
1
1
mit
71339b8f92c9057fe029c5db81db7acce7596607
Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault
app/mod_budget/controller.py
rejected_duplicate
Near-duplicate of sample 3050
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.contrib.auth import models as auth_app\nfrom django.db.models.signals import post_syncdb\n\n\ndef create_demo_user(app, created_models, verbosity, ...
python
edit
2
4
bsd-2-clause
1e6f3689a21e12104792236d88e7596cb8397ba5
nikolas/mezzanine,AlexHill/mezzanine,webounty/mezzanine,douglaskastle/mezzanine,nikolas/mezzanine,christianwgd/mezzanine,jjz/mezzanine,guibernardino/mezzanine,stbarnabas/mezzanine,promil23/mezzanine,spookylukey/mezzanine,ryneeverett/mezzanine,gradel/mezzanine,jerivas/mezzanine,fusionbox/mezzanine,guibernardino/mezzanin...
mezzanine/core/management.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n This example implements a server taking a single image when receiving a message from the client.\n\n The image will be fragmented into chunks. The first packet sent contains the number of chunks to expe...
python
edit
1
1
mit
450f082237e5b302988cece5c6eb091a5d8503df
thusoy/nuts-auth,thusoy/nuts-auth
examples/img_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass SignupForm(forms.Form):\n def signup(self, request, user):\n user.is_active = False\n user.save()\n\n```\n\nApply this change: Add email notification when new user has signed up" }, {...
python
edit
1
1
bsd-3-clause
8ddab20fd41217fe4ea9b5e267443a4953d2d8f7
lucifurtun/myquotes,lucifurtun/myquotes,lucifurtun/myquotes,lucifurtun/myquotes
apps/authentication/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8\n\nimport pytest\nimport requests\n\n\n@pytest.mark.parametrize('path', [\n # Check pagination is working correctly\n '/page/2/', '/page/3/',\n])\ndef test_pages_appear_correctly(path):\n ...
python
edit
1
1
mit
3ff5ae10396da6571c54d1aebf7b604c2946bbe4
alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net
_tests/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest settings for ``polymorphic_auth`` app.\n\"\"\"\n\nAUTH_USER_MODEL = 'polymorphic_auth.User'\nPOLYMORPHIC_AUTH = {\n 'DEFAULT_CHILD_MODEL': 'polymorphic_auth_email.EmailUser',\n}\n\nDATABASES = {\n 'default': {\n 'A...
python
edit
1
0
mit
ccb558526cd738c5312556a2a6f34471a3202091
ixc/django-polymorphic-auth
polymorphic_auth/tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport shim\n\ntmpdir = None\n\ndef setUp():\n global tmpdir\n tmpdir = shim.setup_shim_for('kubectl')\n\ndef tearDown():\n global tmpdir\n shim.teardown_shim_dir(tmpdir)\n\n```\n\nApply this change: Update relative imports in t...
python
edit
1
1
apache-2.0
a0f0da456ad2142a179c789f63b3dd234979c68c
SpectoLabs/myna,SpectoLabs/myna
contrib/python-myna/myna/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSupport for working with different sources of configuration values.\n\n class DefaultSettings(schema.Settings):\n SECRET_KEY = schema.Value(str)\n DEBUG = schema.Value(types.boolean, default=False)\n DB_URL =...
python
edit
1
0
mit
7c85e2b278667e7340c7c6bf57c3c0c91210c471
GaretJax/coolfig
coolfig/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.conf import settings\nfrom django.core import urlresolvers\nfrom django.template import Context, Template\nfrom django.utils.translation import get_language, ugettext_lazy as _\nfrom satchmo.configur...
python
edit
10
3
bsd-3-clause
b8bc10e151f12e2bfe2c03765a410a04325a3233
Ryati/satchmo,ringemup/satchmo,Ryati/satchmo,dokterbob/satchmo,twidi/satchmo,twidi/satchmo,dokterbob/satchmo,ringemup/satchmo
satchmo/product/templatetags/satchmo_product.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom uuidfield.fields import UUIDField\nfrom storybase.fields import ShortTextField\n\nclass Organization(models.Model):\n \"\"\" An organization or a community g...
python
edit
1
1
mit
726662d102453f7c7be5fb31499a8c4d5ab34444
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
apps/storybase_user/models.py
rejected_duplicate
Near-duplicate of sample 18221
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom events.models import Event\n\n\nclass Command(BaseCommand):\n help = \"Copies talk title and descriptions from the application.\"\n\n def add_arguments(self, pa...
python
edit
1
8
bsd-3-clause
d0e634e4472dcd82009801626c8e51d0a16fcae6
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
cfp/management/commands/update_talks_and_workshops_from_applications.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom amazonia.classes.sns import SNS\n\nfrom troposphere import Ref, Join, cloudwatch\nfrom troposphere.sns import Topic, Subscription\n\ndef user_registration_topic(emails):\n return topic(\"UserRegistrationReceived\", emails)\n\ndef to...
python
edit
4
2
bsd-3-clause
7d722b5ff87ae1306e089e1bf5839632e628b663
GeoscienceAustralia/geodesy-domain-model,GeoscienceAustralia/Geodesy-Web-Services,GeoscienceAustralia/Geodesy-Web-Services,GeoscienceAustralia/Geodesy-Web-Services,GeoscienceAustralia/geodesy-domain-model,GeoscienceAustralia/Geodesy-Web-Services
aws/customise-stack-template.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ntry:\n from django.conf import settings\n\n settings.configure(\n DEBUG=True,\n USE_TZ=True,\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
1
3
bsd-3-clause
787abe44ca65fb879ef8a6534bdf671d01f8a045
wearehoods/django-model-publisher-ai,wearehoods/django-model-publisher-ai,wearehoods/django-model-publisher-ai,jp74/django-model-publisher,jp74/django-model-publisher,jp74/django-model-publisher
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Execute exactly this copy of pip, within a different environment.\n\nThis file is named as it is, to ensure that this module can't be imported via\nan import statement.\n\"\"\"\n\nimport importlib.util\nimport runpy\nimport sys\nimpor...
python
edit
1
2
mit
00e5adf2aa4223e37a191a454300d888af5687f5
pypa/pip,sbidoul/pip,pfmoore/pip,pfmoore/pip,pypa/pip,pradyunsg/pip,pradyunsg/pip,sbidoul/pip
src/pip/__pip-runner__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2016 Messente Communications OÜ\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 t...
python
edit
1
0
apache-2.0
2c4524c1f40ef9963caefec4ed258974b80a6db1
messente/messente-python
messente/api/sms/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, absolute_import, unicode_literals, division\n\nfrom datetime import datetime, timedelta\nfrom textwrap import dedent\n\nfrom bottle import Bottle\nimport pytz\n\n\"\"\" Super simple IMS mock.\n\nJust l...
python
edit
1
2
apache-2.0
618bf6d4c1fc5e60b7e94d1ad1030bf2cf0de5c2
ImmobilienScout24/afp-alppaca,ImmobilienScout24/alppaca,ImmobilienScout24/alppaca,ImmobilienScout24/afp-alppaca
src/main/python/alppaca/server_mock/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#encoding: utf-8\nfrom fabric.api import run, settings, cd, env\n\nenv.use_ssh_config = True\nenv.ssh_config_path = '~/.ssh/config'\n\n\ndef deploy():\n with settings(host_string='dash.daltonmatos.com'):\n with cd(\"/var/mongrel2/...
python
edit
1
1
bsd-3-clause
456bf650d0c6c487616869986ca29bab4768b0cb
losmiserables/djangodash2012,losmiserables/djangodash2012
dash2012/fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim: set ts=4\n\nfrom django.forms import ModelForm\nfrom django.http import Http404, HttpResponseRedirect\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext\nfrom django....
python
edit
1
3
mit
5b63b724a89c11aa06a8281cf778063c4a8a7096
ivoire/Artifactorial,ivoire/Artifactorial,ivoire/Artifactorial
Artifactor/views.py
accepted
null
true