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 py101 import Story\nfrom py101 import variables\nfrom py101 import lists\nimport unittest\n\nclass TestStory(unittest.TestCase):\n def test_name(self):\n self.assertEqual(Story().name, 'py101', \"name should be py101\")\n\n\n...
python
edit
1
2
mit
7e89c3fbd08e4824cc84e46b8bad7289db801866
sophilabs/py101
tests/test_story.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef merge(default, to_mutate):\n for key, value in default.items():\n to_mutate.setdefault(key, value)\n\n return to_mutate \n\ndef combine(default, extra):\n new = {}\n for key, value in default.items():\n new[key...
python
edit
1
3
mit
09a395526dadac36f295674e01121818278ac91f
krieghan/kobold_python,krieghan/kobold_python
kobold/hash_functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport hashlib\nimport os\n\n# hack to override sqlite database filename\n# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148\nos.environ['SCRAPERWIKI_DATABASE_NAME'] = 'sqlite:///data.sqlite'\nimp...
python
edit
1
1
mit
00a29c535dc699b5bbbc7b6eb9d439d289c8de18
wdiv-scrapers/dc-base-scrapers
common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2018 The Gin-Config Authors.\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\...
python
edit
22
0
apache-2.0
c95dc576153f60c8c56b7b2c5bfac467ccd9dd97
google/gin-config,google/gin-config
gin/__init__.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport multiprocessing\n\nproc_name = 'gunicorn: {}'.format(os.environ['WEB_HOSTNAME'])\nuser = 'www-data'\ngroup = 'www-data'\nbind = '0.0.0.0:80'\nworkers = multiprocessing.cpu_count() * 2 + 1\nthreads = worke...
python
edit
1
0
mit
6d57372c270d980e0f7d662a60195e54f88b9be5
slava-sh/messenger,slava-sh/messenger,slava-sh/messenger,slava-sh/messenger
web/gunicorn.conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport json\nimport requests\nfrom string import Template\n\nimport dateutil.parser\n\ndef posts_at_url(url):\n \n current_page = 1\n max_page = sys.maxint\n\n while current_page <= max_page:\n\n resp = reques...
python
edit
3
4
cc0-1.0
f1359fb6b8117a00afd833765646f03650df6a54
kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh
_lib/wordpress_post_processor.py
rejected_duplicate
Near-duplicate of sample 30
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom argh import arg, ArghParser\nfrom argh.exceptions import CommandError\nfrom functools import wraps\n\n\nCONFIG = os.environ.get('ALFRED_CONFIG')\n\n\ndef with_app(func):\n @wraps(func)\n @arg('...
python
edit
1
4
isc
61029c887729032c8c832e64dfb63c444a637931
alfredhq/alfred,alfredhq/alfred
alfred/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sockets.stream_socket import StreamSocket\nfrom transfer.request import Request\nfrom transfer.notification import Notification\nimport settings\n\nimport groundstation.logger\nlog = groundstation.logger.getLogger(__name__)\n\n\nclass ...
python
edit
1
1
mit
0943079243e918496bc2cc5a764025bd9dd4f0db
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
groundstation/stream_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ChessPiece(object):\n\n def __init__(self):\n self.column = 0\n self.row = 0\n self.symbol = ''\n\n # Checks piece can attack the specified position\n def can_attack_position(self, column, row):\n ...
python
edit
3
2
mit
c6e48c224b48e90c57d7731fc88be7703990a02a
aymguesmi/ChessChallenge
app/chess/piece.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nStyle\n\nContains convenience functions for styling widgets.\n\n:Authors:\n\tBerend Klein Haneveld\n\"\"\"\nimport sys\n\n\ndef styleWidgetForTab(widget):\n\t\"\"\"\n\tThis function style a widget that can be used inside a QScrollAr...
python
edit
1
3
mit
bc3063a36655f436257beffd2d8815827f601a71
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
ui/widgets/Style.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n VERSION = __import__('pkg_resources') \\\n .get_distribution('django-shortuuidfield').version\nexcept Exception, e:\n VERSION = 'unknown'\n \nfrom fields import ShortUUIDField\n```\n\nApply this change: Remove old-sty...
python
edit
3
0
bsd-3-clause
5493f78cd9225dc4a46689f09f75af59dfea9e16
mriveralee/django-shortuuidfield,nebstrebor/django-shortuuidfield
shortuuidfield/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport warnings\n\nfrom django.conf import settings # pylint: disable=W0611\n\nfrom appconf import AppConf\n\n\nclass WatermarkSettings(AppConf):\n QUALITY = 85\n OBSCURE_ORIGINAL = True\n RANDOM_POSITIO...
python
edit
1
2
bsd-3-clause
e2132caf1c677b34eddd679e23983022ec12b5df
lzanuz/django-watermark,lzanuz/django-watermark
watermarker/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport glob\n\n\nclass Distribution:\n def __init__(self, path):\n \"\"\"\n Construct a distribution from a path to the metadata dir\n \"\"\"\n self.path = path\n\n @classmethod\n ...
python
edit
1
2
apache-2.0
13291e4862ef48a3de3615e8eef5704c6bfff628
python/importlib_metadata
importlib_metadata/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import AnonymousUser\nfrom rest_framework import authentication\nfrom rest_framework import exceptions\nfrom events.models import DataSource\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass...
python
edit
1
3
mit
bebc2a499a4190c8c3090bcab0203b913aa7592d
City-of-Helsinki/linkedevents,aapris/linkedevents,aapris/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
events/auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask\nfrom flask_sslify import SSLify\n\n\napp = Flask(__name__, instance_path='/instance')\nif 'DYNO' in os.environ:\n sslify = SSLify(app)\n\napp.config.from_object('config')\napp.config.from_pyfile('confi...
python
edit
3
0
mit
48543d559d13bb9446f455d14ec3e8ae1ff4f2d7
Clarity-89/blog,Clarity-89/blog,Clarity-89/blog
angular_flask/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nimport six\nimport os\nimport unittest\nimport warnings\n\nimport pims\nimport trackpy\nimport trackpy.diag\n\npath, _ = os.path....
python
edit
3
3
bsd-3-clause
dcba06dfc3ae1e558c3b7926780b0934b7ac3fda
daniorerio/trackpy,daniorerio/trackpy
trackpy/tests/test_misc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!-*- coding:utf-8 -*-\n\"\"\"\nFloyd's cycle-finding algorithm\nhttp://en.wikipedia.org/wiki/Cycle_detection\nhttp://www.siafoo.net/algorithm/10\n\"\"\"\n\ndef floyd(top):\n \"\"\"\n >>> floyd([1,2,3,4])\n False\n >>> floyd([1,...
python
edit
1
5
mit
6ddba0706a377874978da064b47bb6245e362f5b
rokujyouhitoma/tips,rokujyouhitoma/tips,rokujyouhitoma/tips,rokujyouhitoma/tips
floyd/floyd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, print_function\nfrom collections import Counter\nfrom capstone.util.c4uci import load_instance\n\nFILENAME = 'datasets/connect-4.data'\n\noutcomes = []\n\nwith open(FILENAME) as f:\n for i, line in enumer...
python
edit
3
2
mit
7b520e973ed9a72cc3b68bda0a48c89b6d60558b
davidrobles/mlnd-capstone-code
examples/connect4_uci_outcomes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nGrab worker configuration from GCloud instance attributes.\n\"\"\"\nimport json\nimport requests\n\n\nMANAGER_URL_METADATA_URL = \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/halite-manager-url\"\nSECRET_F...
python
edit
1
0
mit
b0a275e2430a04bf4e47b823f48cade92c407673
HaliteChallenge/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Hal...
apiserver/worker/grab_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nname = 'beetle'\nversion = '0.4.1-dev'\nproject_url = 'https://github.com/cknv/beetle'\n\nclass BeetleError(Exception):\n pass\n\n```\n\nApply this change: Allow the BeetleError class to take a page object as an argument" }, { "r...
python
edit
1
1
mit
1e8fd33ef4e8b75632d8a4fe4d86944fdfc5a649
cknv/beetle
beetle/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport sys\nimport argparse\n\nfrom macdict.dictionary import lookup_word\n\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n parser.add_argument('word')\n return parser.parse_arg...
python
edit
1
2
mit
0d81d93a0c90c8cda2e762255c2d41b99ddc16f3
tonyseek/macdict
macdict/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file...
python
edit
1
0
apache-2.0
9904e3843b2efca908845d57033b13f35c2e2a4d
StackStorm/st2-auth-backend-pam,StackStorm/st2-auth-backend-pam
st2auth_pam_backend/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport logging\nimport json\nfrom gather.gatherbot import GatherBot\nfrom gather import commands\n\n\ndef main():\n logging.basicConfig(\n level=logging.INFO,\n format=\"%(asctime)s,%(msecs)03d %(lev...
python
edit
1
1
mit
2bb9eab65b56f012076ed6f122cda4d58b576eb7
veryhappythings/discord-gather
gather/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socket\n\n\nclass HttpServer(object):\n \"\"\"docstring for HttpServer\"\"\"\n def __init__(self, ip=u'127.0.0.1', port=50000, backlog=5):\n self._ip = ip\n self._port = port\n self._backlog = backlog\n ...
python
edit
1
1
mit
98ebd229819cb108af7746dfdd950019111063ce
jefrailey/network_tools
http_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom pymisp import PyMISP\nfrom keys import misp_url, misp_key\nimport argparse\nimport os\nimport json\n\n\n# Usage for pipe masters: ./last.py -l 5h | jq .\n\n\ndef init(url, key):\n re...
python
edit
1
5
bsd-2-clause
b5acf414e9fcbecee8da15e2757a60ce10cc5c10
pombredanne/PyMISP,iglocska/PyMISP
examples/last.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .similarity_measure import (\n\tcosine,\n\teuclidean_distance,\n\tpearson_correlation\t\n)\n\nfrom .similar_item import (\n\tfind_similar_item,\n\tpreferance_space_transform,\n\tuser_match\n)\n\n__all__=[\n\t\t'dataHandle',\n\t\t'recom...
python
edit
12
0
apache-2.0
ca4d5ac415c16594afff5e8c39c732f58e1e3de2
tranlyvu/recommender
recommender/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/\n\nfrom sense_hat import SenseHat\nimport time\n\nsense = SenseHat()\nsense.clear()\n\ntime.sleep(0.5)\n\nr = (255, 0, 0 )\nb = (0,0,0)\nw = (255, 255, 255 )\n...
python
edit
1
3
mit
0824bb4025d00d9e435c162a0b1931d448baf7c9
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
hardware/sense_hat/marble_maze.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, request\nfrom models import db\nfrom forms import SignupForm\n\napp = Flask(__name__)\n\napp.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo'\ndb.init_app(app)\n\napp.secret_key =...
python
edit
1
4
apache-2.0
57b45988072cdc57d90ea11d673b283a5473cd14
cristobal23/strabo,cristobal23/strabo
routes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import UserProfile\n\n\nadmin.site.register(UserProfile)\n\n```\n\nApply this change: Add description for Userprofile model" }, { "role": "assistant", "content": "from django.cont...
python
edit
1
0
mit
af21288fb4245fc56a0b182331cd4db724e05e62
teamtaverna/core
app/accounts/admin.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 Jon LaBelle\n# Copyright (c) 2018 Jon LaBelle\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Markdownlint plugin class.\"\"\"...
python
edit
1
0
mit
9f512fd6f3c7d2928c66062002b18b7bb13a5653
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport tweepy, time, sys, os\nfrom ConfigParser import SafeConfigParser\n\nparser = SafeConfigParser()\nparser.read('secrets.cfg')\n\n#enter the corresponding information from your Twitter a...
python
edit
5
0
mit
4257381997e8ac6968713f1bad96019f977bafc9
premgane/agolo-twitterbot,premgane/agolo-twitterbot
server.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport doctest\nimport os\n\n\ndef test_doctest_types():\n from sider import types\n assert 0 == doctest.testmod(types)[0]\n\n\ndef test_doctest_datetime():\n from sider import datetime\n assert 0 == doctest.testmod(datetime)[0]...
python
edit
2
2
mit
85e77bc7a4706ed1b25d4d53e71ca22beafed411
longfin/sider,dahlia/sider,longfin/sider
sidertests/test_sider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DepthSerializerMixin(object):\n\t\"\"\"Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url\"\"\"\n\t\n\tdef get_serializer_class(self):\n\t\tserializer_class = self.serializer_class\n\t\tque...
python
edit
1
3
mit
5decd7e68c6454e455bc1debe232ea37f7260c58
krescruz/depth-serializer-mixin
mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''Test using a proxy.'''\n\n# External imports\nimport multiprocessing\nimport SocketServer\nimport SimpleHTTPServer\nimport pytest\nrequests = pytest.importorskip(\"requests\")\n\nfrom six.moves.urllib.request imp...
python
edit
1
1
mit
bed9e520a371a99132e05511f110a141d22d2a7f
graingert/vcrpy,kevin1024/vcrpy,graingert/vcrpy,kevin1024/vcrpy
tests/integration/test_proxy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"Common functions that may be used everywhere\"\n\nfrom __future__ import print_function\n\nimport os\nimport sys\nfrom distutils.util import strtobool\n\n\ndef yes_no_query(question):\n \"\"\"Ask the user *question* for 'yes' or 'no'; ...
python
edit
1
3
bsd-2-clause
2e040a77b70b4a07227f5aa3cb3aee6b8c84f4e0
m45t3r/livedumper
src/livedumper/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests.test_actions import *\nfrom ltk import actions, exceptions\nimport unittest\n\nclass TestInitAction(unittest.TestCase):\n\n def test_uninitialized(self):\n # todo create dir outside so folder not initialized\n se...
python
edit
25
1
mit
7b13749feea6c798fb6221ae78ba89033fbd2c45
Lingotek/translation-utility,Lingotek/translation-utility,Lingotek/client,Lingotek/filesystem-connector,Lingotek/client,Lingotek/filesystem-connector
tests/test_actions/test_init.py
rejected_lint
Too many lint violations: 25
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010 Peter Teichman\n\nimport logging\nimport os\nimport sys\nimport time\n\nfrom .stats import Histogram, Statistics\n\nlog = logging.getLogger(\"instatrace\")\n\nclass HistogramsCommand:\n @classmethod\n def add_subp...
python
edit
6
6
mit
c7723ff6d7f43330786e84802ef0bacf70d4ba67
pteichman/instatrace
instatrace/commands.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# Copyright (c) 2006 rPath, Inc\n# All rights reserved\n\nimport sys\nimport os\nimport pwd\nfrom conary.server import schema\nfrom conary.lib import cfgtypes\nfrom conary.repository.netrepos.netserver import ServerConf...
python
edit
2
0
apache-2.0
ff618ea57b8f3d71772bcef5f7fecf9eceae4e3d
sassoftware/rbm,sassoftware/rbm,sassoftware/rbm
scripts/upsrv_schema.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom httoop.util import Unicode\n\n\nclass Codec(object):\n\t@classmethod\n\tdef decode(cls, data, charset=None, mimetype=None): # pragma: no cover\n\t\tif isinstance(data, bytes):\n\t\t\tdata = data.decode(chars...
python
edit
1
3
mit
92438a5450bc644f066a941efe16ec07cf3c129a
spaceone/httoop,spaceone/httoop,spaceone/httoop
httoop/codecs/codec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import widgets\nfrom .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \\\n LocalizedFileField\n\n\nFORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = {\n LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget...
python
edit
1
1
mit
a76101c9ad416323b9379d48adb61c804a5454c0
SectorLabs/django-localized-fields,SectorLabs/django-localized-fields,SectorLabs/django-localized-fields
localized_fields/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"This file should be used to run the flask app with something like Gunicorn.\n\nFor example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app\n\nThis file should NOT be imported anywhere, though, since it would ...
python
edit
1
0
mit
a8823bdc00c83c72352985706f6503557540ae9d
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
src/ocspdash/web/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom vulyk.control import cli\n\nif __name__ == '__main__':\n cli()\n\n```\n\nApply this change: Make it more executable than it was" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding=utf-8 -*-\n\nfrom...
python
edit
1
0
bsd-3-clause
504c7ad1a436af356ca73e2fe8934018e3a7547d
mrgambal/vulyk,mrgambal/vulyk,mrgambal/vulyk
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Lazy objects, for the serializer to find them we put them here\n\nclass LazyDriver(object):\n _driver = None\n\n @classmethod\n def get(cls):\n if cls._driver is None:\n from selenium import webdriver\n ...
python
edit
3
2
apache-2.0
aafcc59ef14fe5af39a06e87bc44546a9da56fb6
holdenk/diversity-analytics,holdenk/diversity-analytics
lazy_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 - Rackspace Hosting\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://ww...
python
edit
1
0
apache-2.0
d5a59b79a3b3d6c2209eb9dc486a40d635aa6778
gilbertpilz/solum,stackforge/solum,gilbertpilz/solum,ed-/solum,openstack/solum,gilbertpilz/solum,openstack/solum,ed-/solum,stackforge/solum,devdattakulkarni/test-solum,gilbertpilz/solum,devdattakulkarni/test-solum,ed-/solum,ed-/solum
solum/builder/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nManagement command entry point for working with migrations\n\"\"\"\n\nimport sys\nimport django\nfrom django.conf import settings\n\nINSTALLED_APPS = [\n \"django.contrib.auth\",\...
python
edit
1
0
bsd-2-clause
51d371918d0ffb5cc96c6faa67fb0a5cd3cf58ae
bennylope/django-addendum,bennylope/django-addendum
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess as sub\n\nimport logbook\n\n\nclass Process(object):\n \"\"\"\n Helper class for running processes\n\n \"\"\"\n\n def __init__(self, cmd):\n self.cmd = cmd\n\n self.proc = None\n self.succe...
python
edit
1
4
mit
b66b63d2a9a6919f3e735d46881740d27bcdc8a6
thiderman/piper
piper/process.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\n\ndef test():\n \"\"\"Test to find this error below.\n\n Traceback (most recent call last):\n File \"../scripts/find_enrichment.py\", line 130, in <module>\n study=study, methods=methods)\n File...
python
edit
1
1
bsd-2-clause
b870f61d131483dd42b3302057351f2461b2cfc6
fidelram/goatools,mfiers/goatools,lileiting/goatools,tanghaibao/goatools,mfiers/goatools,tanghaibao/goatools,fidelram/goatools,lileiting/goatools
tests/test_enrichment_fdr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom jargonprofiler.util import tag_proper_nouns\nfrom jargonprofiler.munroe import munroe_score\n\n\ndef test_proper_noun_in_sentance():\n assert tag_proper_nouns(\"My name is Eilis.\") == set([\"Eilis\"])\n\n\ndef test_proper_noun_be...
python
edit
1
1
mit
b3f3325484426e2f77dc2df092c316ed38584970
ejh243/MunroeJargonProfiler,ejh243/MunroeJargonProfiler
test/proper_noun_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass JVM(object):\n \"\"\"\n Base class for JVMs.\n\n Inheriting classes must implement:\n - ``get_commandline(*args, **options)`` to return a commandline that\n contains the options and runs the JVM\n \"\"\"\n ...
python
edit
1
1
mit
c0c1f964892289dd240de4d6121ebdda6c1753c1
fhirschmann/penchy,fhirschmann/penchy
penchy/jvms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\nfrom sqlalchemy import create_engine\n\n\n@functools.lru_cache()\ndef engine():\n return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') \n\n\ndef query(sql, args=()):\n e = engine()\n result = e.e...
python
edit
1
2
mit
3e28adb3b32e1c88e9295c44e79840ebfe67f83f
flubstep/foxgami.com,flubstep/foxgami.com
py/foxgami/db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport httpretty\nimport pytest\nimport webtest\n\nfrom via.app import create_app\n\n\n@pytest.fixture\ndef test_app(pyramid_settings):\n return webtest.TestApp(create_app(None, **pyramid_settings))\n\n\n@pytest.fixture\ndef checkmate_pa...
python
edit
1
1
bsd-2-clause
7fe8df63288d72fba98fee2cf73a16c0a0b8e326
hypothesis/via,hypothesis/via,hypothesis/via
tests/functional/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponseRedirect\n\nfrom .forms import DonationForm\nfrom .helpers import GoCardlessHelper\n\n\nclass DonationFormMiddleware(object):\n def get_initial(self):\n return {\n 'payment_type': 'su...
python
edit
1
4
bsd-3-clause
54a6e1463104b87a51d17f937c286721cf84466a
DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website
democracy_club/apps/donations/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom typing import Union, List\n\n\nclass InputExample:\n \"\"\"\n Structure for one input example with texts, the label and a unique id\n \"\"\"\n def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], labe...
python
edit
1
3
apache-2.0
fda563e9661c0a65256ba6b1a7416a0f4171f18e
UKPLab/sentence-transformers
sentence_transformers/readers/InputExample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# See also examples/example_track/example_meta.py for a longer, commented example\ntrack = dict(\n author_username='dansbecker',\n)\n\nlessons = [\n dict(topic='How Models Work'),\n dict(topic='Explore Your Data')\n]\n\nnot...
python
edit
1
0
apache-2.0
b3808c39c942bcc2c1701a1dcb61db47c69f1daa
Kaggle/learntools,Kaggle/learntools
notebooks/machine_learning/track_meta.py
rejected_duplicate
Near-duplicate of sample 13984
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 categories\n '''...
python
edit
1
1
mit
342d62a42bb4e1993bbe9d755e6daabcaffe4122
eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt
chdb.py
rejected_duplicate
Near-duplicate of sample 3447
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nExports the libgeos_c shared lib, GEOS-specific exceptions, and utilities.\n\"\"\"\n\nimport atexit\nfrom ctypes import CDLL, CFUNCTYPE, c_char_p\nimport os, sys\n\n# The GEOS shared lib\n\nif os.name == 'nt':\n dll = 'libgeos_c-...
python
edit
1
1
bsd-3-clause
3d46ec43570013bd68135126127c4027e25e3cfa
abali96/Shapely,jdmcbr/Shapely,abali96/Shapely,mouadino/Shapely,jdmcbr/Shapely,mouadino/Shapely,mindw/shapely,mindw/shapely
shapely/geos.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\nsys.path.append(os.curdir)\nfrom pelicanconf import *\n\nSITEURL = 'https://pappasam.github.io'\nRELATIVE_URLS = False\n\nFE...
python
edit
2
0
mit
4c3e9723f67448e93da65ff10142a98176cebe9b
pappasam/pappasam.github.io,pappasam/pappasam.github.io
publishconf.py
rejected_duplicate
Near-duplicate of sample 3867
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom arrange_schedule import *\n\n\ndef test_read_system_setting():\n keys = ['board_py_dir','shutdown','max_db_log','min_db_activity']\n system_setting = read_system_setting()\n for key in keys:\n assert key in system_setti...
python
edit
5
2
apache-2.0
d0380db930dbf145108a7ef0330dd19475f7fdee
Billy4195/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,Billy4195/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,stvreum...
test_arrange_schedule.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom allauth.socialaccount.providers.base import ProviderAccount\nfrom allauth.socialaccount.providers.oauth2.provider import OAuth2Provider\n\n\nclass RedditAccount(ProviderAccount):\n def to_str(self):\n dflt = super(RedditAccou...
python
edit
1
1
mit
939a3be5b24715aae5fd334e6529ec96e1612def
pennersr/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth
allauth/socialaccount/providers/reddit/provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n return \"Hello World!\"\n\nif __name__ == \"__main__\":\n app.run(debug=True)\n\n```\n\nApply this change: Remove debug flag from app" }, { "r...
python
edit
1
1
mit
e4427016abdc7ef146cd7550f2ac1dace07be442
RaspberryPiFoundation/plinky,CodeClub/plinky,codecleaner/plinky,codecleaner/plinky,CodeClub/plinky,martinpeck/plinky,martinpeck/plinky,RaspberryPiFoundation/plinky,RaspberryPiFoundation/plinky
plinky.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef compile_class_from_file(path, filename, system_class, universe):\n return _SourcecodeCompiler().compile(path, filename, system_class, universe)\n\ndef compile_class_from_string(stmt, system_class, universe):\n return ...
python
edit
4
2
mit
9fd54adcbd1d21232306d15dc7c6a786c867e455
SOM-st/PySOM,SOM-st/RPySOM,smarr/RTruffleSOM,smarr/PySOM,SOM-st/RTruffleSOM,smarr/PySOM,SOM-st/RPySOM,SOM-st/PySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM
src/som/compiler/sourcecode_compiler.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis prints the state of a facet query.\nIt is used for debugging the faceting system.\n\"\"\"\n\nfrom django.core.management.base import BaseCommand\nfrom haystack.query import SearchQuerySet\nfrom hs_core.discovery_parser import P...
python
edit
6
3
bsd-3-clause
5998d66442ac0881309005a7bdbedc4ff91b0ea6
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
hs_core/management/commands/solr_queries.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject\n\n\nclass ProfilingGroup(AWSObject):\n resource_type = \"AWS::CodeGuruProfiler::ProfilingGroup\"\n\n ...
python
edit
3
0
bsd-2-clause
1619ba48666be69710cd6bcbffe663cd1f7c1066
cloudtools/troposphere,cloudtools/troposphere
troposphere/codeguruprofiler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport csv\nfrom pml import lattice, element, device\n\n\ndef load(directory, name, control_system):\n lat = lattice.Lattice(name, control_system)\n with open(os.path.join(directory, 'elements.csv')) as elements:\n c...
python
edit
1
4
apache-2.0
9b10bd93191913aaedaa28fc693620a6c2e6d203
willrogers/pml,willrogers/pml
pml/load_csv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import current_app\n\nfrom app.clients.sms.firetext import (\n FiretextClient\n)\n\nlogger = logging.getLogger(__name__)\n\n\nclass LoadtestingClient(FiretextClient):\n '''\n Loadtest sms client.\n '...
python
edit
1
1
mit
124487f204c5dedea471bd2c45ad8b929ff7fae0
alphagov/notifications-api,alphagov/notifications-api
app/clients/sms/loadtesting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.test import Client\nfrom django.http import SimpleCookie\nfrom webtest import TestResponse\nfrom django_webtest.compat import urlparse\n\nclass DjangoWebtestResponse(TestResponse):\n \"\"\"\n WebOb...
python
edit
1
5
mit
58846603f8a5310bb0e6e1eaa9f9f599c315b041
kmike/django-webtest,helenst/django-webtest,vaad2/django-webtest,django-webtest/django-webtest,abbottc/django-webtest,kharandziuk/django-webtest,abbottc/django-webtest,MikeAmy/django-webtest,andrewyoung1991/django-webtest,helenst/django-webtest,yrik/django-webtest,andrewyoung1991/django-webtest,andriisoldatenko/django-...
django_webtest/response.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom connect_four import ConnectFour\n\ndef main():\n \"\"\" Play a game!\n \"\"\"\n connect_four = ConnectFour()\n # start the game\n connect_four.start()\n\nif __name__ == \"__main__\": # Default \"main method\" idiom.\n ...
python
edit
2
2
mit
e3aa12af05003222b295a4cea39a1c05c911024a
LouisBarranqueiro/ia-connect-four-game
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"web URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app import ...
python
edit
1
0
mit
b394f79132d952be20baf15725715691ace69ced
chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms
web/slas-web/web/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! usr/bin/env python3\nfrom docopt import docopt\nfrom matplotlib import pyplot\nimport re\n\n\nclass Schema:\n \"\"\"\n Wraps the SQL source code for a schema and provides methods to get information about that schema.\n \"\"\"\n ...
python
edit
5
1
mit
ddc82357cafbf58822f4d98f484fbe4dd860743e
hawkw/sqlviz
sqlviz.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom collections import OrderedDict\nimport importlib\nimport sys\nimport six\n\n\ndef watermark():\n \"\"\"\n Give the ver...
python
edit
4
6
bsd-3-clause
cc08100734df4eea053758a04610d889ced8c476
tacaswell/dataportal,NSLS-II/dataportal,tacaswell/dataportal,danielballan/dataportal,danielballan/datamuxer,danielballan/datamuxer,ericdill/datamuxer,danielballan/dataportal,ericdill/databroker,ericdill/datamuxer,NSLS-II/dataportal,NSLS-II/datamuxer,ericdill/databroker
dataportal/utils/diagnostics.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Fox, rewritten in Python for literally no reason at all.\n\nimport discord\nimport asyncio\n\nprint(\"Just a moment, Fox is initializing...\")\nfox = discord.Client()\n\n@fox.event\nasync def on_ready():\n print('Fox is ready!')\n p...
python
edit
4
1
mit
08c2e9144e605063ac3c6313efe639eb7139ba75
plusreed/foxpy
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Basic set of tests to ensure entire code base is importable\"\"\"\nimport pytest\n\n\ndef test_importable():\n \"\"\"Simple smoketest to ensure all isort modules are importable\"\"\"\n import isort\n import isort._future\n ...
python
edit
3
1
mit
fc561301c3a3aea79043348a01e6a468a5693d3e
PyCQA/isort,PyCQA/isort
tests/test_importable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom rpg_base.views import *\n\nurlpatterns = [\n # Examples:\n # url(r'^$', 'django_rpg.views.home', name='home'),\n # url(r'^blog/', include('blog.urls')),\n\n url(r'^campaign/$', cam...
python
edit
8
0
mit
c95fdbeb145e5bcef2ded646c2319b58ae9e996d
ncphillips/django_rpg,ncphillips/django_rpg
rpg_base/urls.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User\nfrom django.test.client import RequestFactory\n\nclass BaseTest(TestCase):\n\n def setUp(self):\n self.factory = RequestFactory()\n\n def _create_su...
python
edit
1
3
bsd-3-clause
227ae986590bf2d5daa5aef028f5f4cd4c1e8917
alexsilva/django-xadmin,jneight/django-xadmin,merlian/django-xadmin,pobear/django-xadmin,cupen/django-xadmin,wbcyclist/django-xadmin,cgcgbcbc/django-xadmin,pobear/django-xadmin,t0nyren/django-xadmin,t0nyren/django-xadmin,marguslaak/django-xadmin,t0nyren/django-xadmin,vincent-fei/django-xadmin,iedparis8/django-xadmin,vi...
tests/xtests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom SPARQLWrapper import SPARQLWrapper, JSON\nfrom flask import request\nfrom flask.ext.cors import CORS\n\napp = Flask(__name__)\nCORS(app)\n\n@app.route('/')\ndef hello_world():\n auth = request.authorization\...
python
edit
1
1
apache-2.0
462b6878507e3928068745cccc80720e8699dafa
NLeSC/EmbodiedEmotions,NLeSC/EmbodiedEmotions,NLeSC/UncertaintyVisualization,NLeSC/UncertaintyVisualization,NLeSC/EmbodiedEmotions
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mopidy.models import Track\n\nclass BaseCurrentPlaylistControllerTest(object):\n uris = []\n backend_class = None\n\n def setUp(self):\n self.backend = self.backend_class()\n\n def test_add(self):\n playlist =...
python
edit
3
2
apache-2.0
5203ecdaf839f58e7f00ef74fec9dbecbeb52583
kingosticks/mopidy,abarisain/mopidy,mopidy/mopidy,kingosticks/mopidy,dbrgn/mopidy,SuperStarPL/mopidy,ZenithDK/mopidy,jodal/mopidy,pacificIT/mopidy,diandiankan/mopidy,glogiotatidis/mopidy,pacificIT/mopidy,diandiankan/mopidy,abarisain/mopidy,ZenithDK/mopidy,dbrgn/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,bencevans/mop...
tests/backends/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom cloudtracker import main\n \ndef run_tracker(input_dir):\n print( \" Running the cloud-tracking algorithm... \" )\n print( \" Input dir: \\\"\" + input_dir + \"\\\" \\n\" )\n\n main.main(input_dir)\n\n print(...
python
edit
1
1
bsd-2-clause
726beb71b45c7320b4e2e883f246d389709efe19
lorenghoh/loh_tracker
run_tracker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport os \nimport sys\nimport time\nfrom unrealcv import client\n\nclass Dataset(object):\n def __init__(self,folder,nberOfImages):\n self.folder=folder\n self.nberOfImages=nberOfImages\n self.cl...
python
edit
4
2
bsd-2-clause
c5f75072707dbe9a723ffbff71ab01d0519b6baa
fkenghagho/RobotVQA
tools/generateDataset.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Last Change: Sat Jun 09 07:00 PM 2007 J\n\n#========================================================\n# Constants used throughout the module (def args, etc...)\n#========================================================\n# This is the defa...
python
edit
1
0
bsd-3-clause
d97144e2b45750c416d3adbf9f49f78bfa8e7e6e
scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor
Lib/sandbox/pyem/misc.py
rejected_duplicate
Near-duplicate of sample 14480
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template\n\nfrom . import aflafrettir\nfrom ..models import User, Category, Post\n\n@aflafrettir.route('/')\ndef index():\n categories = Category.get_all_active()\n posts = Post.get_all()\n return render_template...
python
edit
1
1
mit
19e9080f06aa2264e77b65a9c1ad6d30e6b7da4c
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
app/aflafrettir/routes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pybedtools as bt\nimport six\n\ndef concat(bed_files, catted=None):\n \"\"\"\n recursively concat a set of BED files, returning a\n sorted bedtools object of the result\n \"\"\"\n if len(bed_files) == 0:\n if ca...
python
edit
3
7
mit
1e5d549b6fdf62c1016451f9dfe566c9546b2f38
guillermo-carrasco/bcbio-nextgen,lbeltrame/bcbio-nextgen,gifford-lab/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,vladsaveliev/bcbio-nextgen,brainstorm/bcbio-nextgen,mjafin/bcbio-nextgen,lbeltrame/bcbio-nextgen,elkingtonmcb/bcbio-nextgen,brainstorm/bcbio-nextgen,fw1121/bcbio-nextgen,verdurin/bcbio-nextgen,lpantano/bcbio-ne...
bcbio/bed/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import Exceptions\nfrom . import MBInfo\nfrom . import Tag\nfrom . import Util\nfrom . import format\nfrom . import Discogs\nimport re\n\n\n# unknown artist input pattern:\nclass Utilities:\n unknown_artist_pattern = re.compile(r'...
python
edit
8
4
mit
d584ccea9fe985fa230c937ee2e6a03ef6b99967
hidat/audio_pipeline
audio_pipeline/util/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models import CharField\nfrom django.core.exceptions import ValidationError\n\nfrom cyder.cydhcp.validation import validate_mac\n\n\nclass MacAddrField(CharField):\n \"\"\"A general purpose MAC address field\n This fiel...
python
edit
3
4
bsd-3-clause
116708c5458b68110e75a593a0edaa0298bb5586
drkitty/cyder,murrown/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,murrown/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,drkitty/cyder,zeeman/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,OSU-Net/cyder,drkitty/cyder,zeeman/cyder,murrown/cyder,zeeman/cyder
cyder/core/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Create sequences to be aligned.\nfrom alignment.sequence import Sequence\na = Sequence(\"what a beautiful day\".split())\nb = Sequence(\"what a disappointingly bad day\".split())\nprint \"Sequence A:\", a\nprint \"Sequence B:\", b\nprint\...
python
edit
8
0
bsd-3-clause
f2312d1546eb3f6de75cc03a2dabb427a2174e17
eseraygun/python-entities,eseraygun/python-alignment
examples/sequencealignment.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# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n# Targeted tests for decimal type.\n#\nimport logging\nimport pytest\nfrom copy import copy\nfrom tests.common.test_vector import *\nfrom tests.common.impala_t...
python
edit
8
3
apache-2.0
bd1719885b1328c5aca34bc8d78b761e846f4037
cchanning/Impala,XiaominZhang/Impala,tempbottle/Impala,cgvarela/Impala,kapilrastogi/Impala,grundprinzip/Impala,scalingdata/Impala,bratatidas9/Impala-1,mapr/impala,ImpalaToGo/ImpalaToGo,cchanning/Impala,lnliuxing/Impala,gerashegalov/Impala,theyaa/Impala,lirui-intel/Impala,bowlofstew/Impala,ImpalaToGo/ImpalaToGo,gerasheg...
tests/query_test/test_decimal_queries.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom avalanche import benchmarks\r\nfrom avalanche import evaluation\r\nfrom avalanche import logging\r\nfrom avalanche import models\r\nfrom avalanche import training\r\n\r\n\r\n__version__ = \"0.1.0a0\"\r\n\r\n_dataset_add = None\r\n\r\n\...
python
edit
7
2
mit
5b9e168b4a855197b07527c468ef6b60c50ec0c7
ContinualAI/avalanche,ContinualAI/avalanche
avalanche/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Processor for the `Chemical Roles Graph (CRoG)\n<https://github.com/chemical-roles/chemical-roles>`_.\n\"\"\"\n\nfrom typing import Optional\n\nfrom ..utils import RemoteProcessor\n\n__all__ = [\n 'CrogPr...
python
edit
1
5
bsd-2-clause
34da1ea604d1aea4fcefae188f259df4bd8119a5
johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra
indra/sources/crog/processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import six\nfrom rq.decorators import job as _rq_job\n\nfrom .queues import get_queue\n\n\ndef job(func_or_queue, connection=None, *args, **kwargs):\n \"\"\"\n The same as RQ's job decorator, but it works automatical...
python
edit
2
7
mit
5d63656e9b03aaed2ef9042ff61a86bc4b8ee715
meteozond/django-rq,sbussetti/django-rq,sbussetti/django-rq,ui/django-rq,viaregio/django-rq,1024inc/django-rq,meteozond/django-rq,lechup/django-rq,ui/django-rq,mjec/django-rq,1024inc/django-rq,ryanisnan/django-rq,ryanisnan/django-rq,viaregio/django-rq,mjec/django-rq,lechup/django-rq
django_rq/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport numpy as np\nfrom numpy.testing import assert_array_equal\n\nimport pyfive\nimport h5py\n\ndef test_read_basic_example():\n\n # reading with HDF5\n hfile = h5py.File('basic_example.hdf5', 'r')\n assert hfile['/example'].at...
python
edit
1
1
bsd-3-clause
9611fcd38c8d75b1c101870ae59de3db326c6951
jjhelmus/pyfive
pyfive/tests/test_pyfive.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###############################################################################\n# Copyright Kitware Inc.\n#\n# Licensed under the Apache License, Version 2.0 ( the \"License\" );\n# you ...
python
edit
1
1
apache-2.0
2cc8a541814cc353e7b60767afd2128dce38918a
jbeezley/girder,jcfr/girder,RafaelPalomar/girder,opadron/girder,Kitware/girder,essamjoubori/girder,RafaelPalomar/girder,adsorensen/girder,Xarthisius/girder,adsorensen/girder,data-exp-lab/girder,jcfr/girder,girder/girder,opadron/girder,Xarthisius/girder,data-exp-lab/girder,jcfr/girder,kotfic/girder,manthey/girder,msmole...
tests/test_plugins/test_plugin/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField\n\n\nclass JSONPrettyField(JSONField):\n def __init__(self, *args, **kwargs):\n self.__indent = kwargs.pop('indent', 2)\n super().__...
python
edit
1
5
mit
db99f77edfb7318ee3b4a443a98c837611054515
bulv1ne/django-utils,bulv1ne/django-utils
utils/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport lxml.etree\nfrom js2xml.parser import CustomParser as Parser\nfrom js2xml.xmlvisitor import XmlVisitor\n\n_parser = Parser()\n_visitor = XmlVisitor()\n\ndef parse(text, encoding=\"utf8\", debug=False):\n if encoding not in (None, ...
python
edit
4
3
mit
8934730ac2702d2c88d96ed8bb015f7c6e65566b
redapple/js2xml,redapple/js2xml,redapple/js2xml,redapple/js2xml
js2xml/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom math import atan, tan, radians\n\n\ndef lat_lng(lat, lng):\n \"\"\"\n Return corrected lat/lng.\n Lat: -90 to 90\n Lng: -180 to 180\n \"\"\"\n\n # lat\n # if lat > 180: # reduce to value less than 180\n # ...
python
edit
1
1
mit
be03357a9d18a4a6174c075db1fdd786100925aa
bm5w/lat_lng
lat_lng.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nname = \"WSME\"\nversion = \"0.1.0a2\"\n\ndescription = \"Web Services Made Easy\"\nlong_description = \"\"\"\nWeb Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices.\n\"\"\"\n\nauthor = \"Christophe de Vienne\"\nemail = ...
python
edit
1
0
mit
30b6a5364dc22261a4d47aec2e0a77e0c5b8ccd4
stackforge/wsme
wsme/release.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\n\nfrom components.events.models import Event, Performance, Venue\nfrom components.events.factories import (EventFactory, PerformanceFactory,\n VenueFactory)\n\npytestmark = pytest.mark.django_db\n\...
python
edit
1
1
apache-2.0
4657ecdf6889684cf83c77f34233d8bd3ba852a2
hello-base/web,hello-base/web,hello-base/web,hello-base/web
tests/events/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.db.models.fields import CharField\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.encoding import python_2_unicode_compatible\n\nfrom tags.models import...
python
edit
1
3
mit
614ab31af817fa9775fe2aa904687456656bf6fc
avelino/django-tags
tags/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\nimport pytest\n\n\ndef pytest_collection_modifyitems(items):\n for item in items:\n module_path = os.path.relpath(\n item.module.__file__,\n os.path.commonprefix([__file__, item.module.__fil...
python
edit
1
4
mit
dfefb21bd170bf253f0d07dba2931de82ed0b1e8
ionelmc/virtualenv,ionelmc/virtualenv,ionelmc/virtualenv
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom sqlalchemy import (Column, Integer, String, DateTime, ForeignKey)\nfrom sqlalchemy.orm import relationship, backref\n\nfrom .base import Base\n\n\nclass Record(Base):\n __tablename__ = 'records'\n\n id = ...
python
edit
1
0
apache-2.0
f16e8d0bd0765e4d4a8e0f917bf0325a772a1a23
notapresent/rbm2m,notapresent/rbm2m
rbm2m/models/record.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Base class for all taemin plugin \"\"\"\n\nclass TaeminPlugin(object):\n helper = {}\n\n def __init__(self, taemin):\n self.taemin = taemin\n\n def start(self):\n pass\n\n def stop(self):\n pass\n\n ...
python
edit
1
6
mit
f2396815912b1698c4969d86d1f4176122489222
ningirsu/taemin,ningirsu/taemin
taemin/plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom contextlib import contextmanager\n\nfrom sympy import Eq, Lambda, Function, Indexed\n\ndef define(let, be, **kwds):\n return Eq(let, be, **kwds)\n\n@contextmanager\ndef lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: ...
python
edit
1
4
mit
34754e91a398e35f0e7d16bbd591c5b4a496536a
massimo-nocentini/simulation-methods,massimo-nocentini/simulation-methods
src/commons.py
accepted
null
true