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\"\"\"pygypsy\n\nBased on Hueng et all (2009)\n\nHuang, S., Meng, S. X., & Yang, Y. (2009). A growth and yield projection system\n(GYPSY) for natural and post-harvest stands in Alberta. Forestry Division,\nAlberta Sustainable Resource Devel...
python
edit
5
0
mit
b8f33283014854bfa2d92896e2061bf17de00836
tesera/pygypsy,tesera/pygypsy
pygypsy/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom flask_babel import lazy_gettext as _ # noqa\nfrom wtforms import StringField, SubmitField, TextAreaField, \\\n DateField, SelectField\nfrom wtforms.validators import InputRequired\n\n\nclass VacancyForm(...
python
edit
1
0
mit
e85fcd553756eab32cedca214c9b8b86ff48f8b8
viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct
app/forms/vacancy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nInteractor\n\nThis class can be used to simply managing callback resources.\nCallbacks are often used by interactors with vtk and callbacks\nare hard to keep track of.\nUse multiple inheritance to inherit from this class to get acce...
python
edit
1
3
mit
72ce164a461987f7b9d35ac9a2b3a36386b7f8c9
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
ui/Interactor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nfrom pytest import mark\nfrom pytest_benchmark.utils import clonefunc, get_commit_info\n\nf1 = lambda a: a\n\n\ndef f2(a):\n return a\n\n\n@mark.parametrize('f', [f1, f2])\ndef test_clonefunc(f):\n assert clonefunc(...
python
edit
1
2
bsd-2-clause
207d4c71fbc40dd30c0099769d6f12fcb63f826e
thedrow/pytest-benchmark,SectorLabs/pytest-benchmark,ionelmc/pytest-benchmark,aldanor/pytest-benchmark
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom PyQt5.QtWidgets import QApplication\n\nfrom datalogger.bin.workspace import Workspace\nfrom datalogger.analysis_window_testing import AnalysisWindow\n\n\ndef full():\n app = 0\n app = QApplication(sys.argv)\n\n # C...
python
edit
1
1
bsd-3-clause
6728bf1fecef3ac1aea9489e7c74333ad0a3b552
torebutlin/cued_datalogger
datalogger/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This module contains built-in introspector plugins for various common\n# Django apps.\n\n# These imports trigger the lower-down files\nimport south.introspection_plugins.geodjango\nimport south.introspection_plugins.django_tagging\nimport...
python
edit
3
0
apache-2.0
55646644c18fe5e10669743025cc00b8225f9908
philipn/django-south,philipn/django-south,nimnull/django-south,RaD/django-south,RaD/django-south,RaD/django-south,nimnull/django-south
south/introspection_plugins/__init__.py
rejected_duplicate
Near-duplicate of sample 1917
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Project Settings - Settings that don't exist in settings.py that you want to\n# add (e.g. USE_THOUSAND_SEPARATOR, GRAPPELLI_ADMIN_TITLE, CELERYBEAT_SCHEDULER,\n# CELERYD_PREFETCH_MULTIPLIER, etc.)\n\n#USE_THOUSAND_SEPARATOR = True\n\n#GRA...
python
edit
4
0
unlicense
a5faeb16a599b4260f32741846607dd05f10bc53
django-settings/django-settings
myproject/myproject/project_settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Check updates to Arch Linux.\"\"\"\n\n\nimport subprocess\nimport bumblebee.input\nimport bumblebee.output\nimport bumblebee.engine\n\n\nclass Module(bumblebee.engine.Module):\n def __init__(self, engine, config):\n widget =...
python
edit
1
2
mit
0d8585a2ab57ca4d8f3f4ee2429a2137f2045c6a
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/modules/arch-update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Sets up a basic site that can allow two browsers to connect to each\n# other via WebRTC DataChannels, sending connection events via WebSockets.\n\n\nfrom flask import Flask, send_from_directory\nfrom flask_sockets i...
python
edit
2
7
bsd-3-clause
0a6b43f2202cb63aad18c119d7d46916b4d54873
chadnickbok/librtcdcpp,chadnickbok/librtcdcpp
examples/site-api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Single entry point / dispatcher for simplified running of 'pman'\n\nimport os\nfrom argparse import RawTextHelpFormatter\nfrom argparse import ArgumentParser\n\nstr_desc = \"\"\"\n\n ...
python
edit
1
1
mit
21b405f1968dd75a663b253feb19d730af34d380
danmcp/pman,FNNDSC/pman,danmcp/pman,FNNDSC/pman
docker-entrypoint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright ClusterHQ Inc. See LICENSE file for details.\n\"\"\"\nInterfaces for the benchmarking results server.\n\"\"\"\n\nfrom zope.interface import Interface\n\n\nclass IBackend(Interface):\n \"\"\"\n A backend for storing and qu...
python
edit
1
1
apache-2.0
2e6f0934c67baf27cdf3930d48d6b733995e413f
ClusterHQ/benchmark-server,ClusterHQ/benchmark-server
benchmark/_interfaces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef proc(command, message):\n return {\n \"data\": {\n \"status\": \"ok\",\n \"html\": \"\"\"\n <p>\n Hi! I can control your Raspberry Pi. Send me the commands <b>in bold</b> to ...
python
edit
1
1
mit
9ff63d002293da44871307960d5b439b5e6ba48f
alwye/spark-pi,alwye/spark-pi
app/commands/help.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ranger.api.commands import Command\n\nclass fzf_select(Command):\n \"\"\"\n :fzf_select\n\n Find a file using fzf.\n\n With a prefix argument select only directories.\n\n See: https://github.com/junegunn/fzf\n \"\"\"\...
python
edit
1
4
mit
0039eefbfa546f24b3f10031e664341d60e4055c
darthdeus/dotfiles,darthdeus/dotfiles,darthdeus/dotfiles,darthdeus/dotfiles
ranger/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Exception abstract class\nclass CamocoError(Exception):\n pass\n\nclass CamocoExistsError(CamocoError):\n '''\n You tried to create a camoco object which already exists\n under the same name,type combination.\n '''\...
python
edit
1
1
mit
f5e8bfaf5c4f7a2131fbe0ffd0f8d14a316b907e
schae234/Camoco,schae234/Camoco
camoco/Exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unsorted utility functions used in integration tests.\"\"\"\nimport requests\n\n\ndef download_file_from_url(url):\n \"\"\"Download file from the given URL and do basic check of response.\"\"\"\n assert url\n response = reque...
python
edit
1
5
apache-2.0
ec8d7b035617f9239a0a52be346d8611cf77cb6f
jpopelka/fabric8-analytics-common,tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common,tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common
integration-tests/features/src/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BaseExcelError(Exception):\n\n def __init__(self, message):\n super(BaseExcelError, self).__init__()\n self.message = message\n\n\nclass ValidationError(BaseExcelError):\n pass\n\n\nclass ColumnNotEqualError(BaseEx...
python
edit
1
1
mit
dae9d7d67aaf2ab8d39b232d243d860d9597bbd2
NorakGithub/django-excel-tools
django_excel_tools/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#[PROTEXCAT]\n#\\License: ALL RIGHTS RESERVED\n\n\"\"\"System boot time\"\"\"\nimport os\nfrom oeqa.oetest import oeRuntimeTest\nfrom oeqa.runtime.helper import collect_pnp_log\n\nclass BootTimeTest(oeRuntimeTest):\n\n def _setup(self):\...
python
edit
2
1
mit
65266813c6438eeb67002e17dd4cd70a00e84b5d
daweiwu/meta-iotqa-1,ostroproject/meta-iotqa,ostroproject/meta-iotqa,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,wanghongjuan/meta-iotqa-1,wanghongjuan/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,daweiwu/meta-iotqa-1,wanghongjuan/meta-iotqa-1,wanghongjuan/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta...
meta-iotqa/lib/oeqa/runtime/boottime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport logging\nimport multiprocessing as mp\nfrom oggm import cfg, utils\nimport pickle\n\nlogger = logging.getLogger(__name__)\n\ndef pytest_configure(config):\n if config.pluginmanager.hasplugin('xdist'):\n try:\...
python
edit
4
3
bsd-3-clause
3266ecee8f9a6601d8678a91e8923c6d7137adb3
OGGM/oggm,OGGM/oggm,bearecinos/oggm,bearecinos/oggm,juliaeis/oggm,TimoRoth/oggm,anoukvlug/oggm,TimoRoth/oggm,juliaeis/oggm,anoukvlug/oggm
oggm/tests/conftest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os import path\nimport sh\nfrom nib import Processor, resource\n\n@resource('.less')\nclass LessCSSProcessor(Processor):\n def resource(self, reso...
python
edit
1
1
mit
45c4c1f627f224f36c24acebbec43a17a5c59fcb
jreese/nib
nib/plugins/lesscss.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport cPickle as pickle\nimport simplejson as json\n\n\ndef update_pickle(new_cache):\n # print('Updated pickle')\n pickle.dump(new_cache, open('url_cache.pkl', 'wb'), 2)\n\n\ndef check_pickle():\n # print('Checking in ...
python
edit
3
2
apache-2.0
860e16f506d0a601540847fe21e617d8f7fbf882
John-Lin/malware,John-Lin/malware
malware/pickle_tool.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nsample_path = \"conf/net/int_service/giles_conf.json.sample\"\nf = open(path, \"r\")\ndata = json.loads(f.read())\nf.close()\n\nreal_path = \"conf/net/int_service/giles_conf.json\"\ndata['giles_base_url'] = 'http://50.17.111....
python
edit
1
0
bsd-3-clause
b2befc496741a904f8988b2ec8fa5b57aba96a91
e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server
bin/deploy/giles_conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport abc\n\n\nclass Credential(metaclass=abc.ABCMeta):\n \"\"\"Abstract class to manage credentials\"\"\"\n\n @abc.abstractproperty\n def username(self):\n return None\n\n @abc.abstractproperty\n def passw...
python
edit
1
3
mit
0ae9b232b82285f2fa275b8ffa5dced6b9377b0e
jaraco/keyring
keyring/credentials.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport dj_database_url\n\nDATABASES = {\n \"default\": dj_database_url.parse(os.environ[\"DATABASE_URL\"]),\n}\n\nINSTALLED_APPS = (\"django_dbq\",)\n\nMIDDLEWARE_CLASSES = (\n \"django.contrib.sessions.middleware.SessionMi...
python
edit
1
0
bsd-2-clause
97312b55525f81ecba3c0df1d6c2e55fa217ce83
dabapps/django-db-queue
testsettings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2007 Neal Norwitz\n# Portions Copyright 2007 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# Yo...
python
edit
1
1
apache-2.0
e893ac40de2dda19196c7de7d9f7767b20b23884
myint/cppclean,myint/cppclean,myint/cppclean,myint/cppclean
headers/cpp/functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport pytest\n\n\n# Note: \"chromosomes\" worked previous the bug fix\n@pytest.mark.models('en')\n@pytest.mark.parametrize('word,lemmas', [(\"chromosomes\", [\"chromosome\"]), (\"...
python
edit
1
1
mit
102f7979338b948744b6af06689f928deb72f27c
spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,explosion/sp...
spacy/tests/regression/test_issue781.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBase configuration for TiddlySpace.\n\nThis provides the basics which may be changed in tidlywebconfig.py.\n\"\"\"\nfrom tiddlywebplugins.instancer.util import get_tiddler_locations\n\nfrom tiddlywebplugins.tiddlyspace.instance impo...
python
edit
1
0
bsd-3-clause
1af1a7acface58cd8a6df5671d83b0a1a3ad4f3e
FND/tiddlyspace,FND/tiddlyspace,TiddlySpace/tiddlyspace,FND/tiddlyspace,TiddlySpace/tiddlyspace,TiddlySpace/tiddlyspace
tiddlywebplugins/tiddlyspace/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'karl.gong'\n\nfrom .exceptions import UnsupportedOperationException\n\n\ndef SupportedBy(*web_driver_types):\n def handle_func(func):\n def handle_args(*args, **kwargs):\n wd_types = []\n for wd...
python
edit
1
4
apache-2.0
e8c180e65dda3422ab472a6580183c715ef325c3
KarlGong/easyium-python,KarlGong/easyium
easyium/decorator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass Config(object):\n DEBUG = False\n TESTING = False\n CSRF_ENABLED = True\n SQLALCHEMY_TRACK_MODIFICATIONS = False\n SECRET_KEY = os.urandom(32)\n SQ...
python
edit
1
0
mit
7a952d605b629b9c8ef2c96c451ee4db4274d545
SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev
suddendev/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Charles Robison\n# 2016.10.18\n# Dictionary and Set Lab\n\n# Create a dictionary containing “name”, “city”, and “cake”\n# for “Chris” from “Seattle” who likes “Chocolate”.\n\nd = {'name': 'Chris', 'city': 'Seattle', 'cake': 'Chocolate'}\n...
python
edit
1
0
unlicense
18f29b2b1a99614b09591df4a60c1670c845aa9b
Baumelbi/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,Baumelbi/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016
students/crobison/session04/dict_lab.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._develop import *\n\n# DJANGO ######################################################################\n\nDATABASES['default'].update({\n 'TEST': {\n 'NAME': DATABASES['default']['NAME'],\n # See: https://docs.djangopro...
python
edit
10
0
mit
70a40f50e9988fadfbc42f236881c1e3e78f40f1
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/project/settings/_test.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom .api import record # noqa: F401\n\n__version__ = '1.0.0'\n\n```\n\nApply this change: Make assert statement rich in pytest" ...
python
edit
1
0
mit
6c74e5c2bc08fd48af9e646dc911cff5e22064cb
moumoutte/django-perf-rec,YPlan/django-perf-rec
django_performance_recorder/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\r\nimport io\r\n\r\nfrom steel.fields.numbers import BigEndian\r\nfrom steel import fields\r\nfrom steel.chunks import base\r\n\r\n__all__ = ['Chunk', 'Form']\r\n\r\n\r\nclass Chunk(base.Chunk):\r\n id = fields.String(...
python
edit
4
1
bsd-3-clause
c9b6387702baee3da0a3bca8b302b619e69893f7
gulopine/steel
steel/chunks/iff.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport git_pre_commit_hook_utils as utils\n\n\ndef test_is_python_code_by_path():\n file_at_index = utils.FileAtIndex(\n contents='',\n size=0,\n mode='',\n sha1='',\n status='',\n path='some/pat...
python
edit
1
1
mit
89984eb5e9e8cdb8420ff1da07c54ce0dd265629
evvers/git-pre-commit-hook-utils
tests/test_git_pre_commit_hook_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport pytest\n\nfrom cihai import exc, utils\n\n\ndef test_merge_dict():\n dict1 = {'hi world': 1, 'innerdict': {'hey': 1}}\n dict2 ...
python
edit
1
1
mit
30a173da5850a457393cfdf47b7c0db303cdd2e9
cihai/cihai-python,cihai/cihai,cihai/cihai
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import raises\n\nimport panoptes\nfrom panoptes.mount.ioptron import Mount\n\nclass TestIOptron():\n\n\t@raises(AssertionError)\n\tdef test_no_config_no_commands(self):\n\t\t\"\"\" Mount needs a config \"\"\"\n\t\tmount = Mo...
python
edit
6
1
mit
fc259061ccf048af7e657888eb655da120a6606f
fmin2958/POCS,Guokr1991/POCS,joshwalawender/POCS,panoptes/POCS,joshwalawender/POCS,panoptes/POCS,panoptes/POCS,Guokr1991/POCS,fmin2958/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,joshwalawender/POCS,AstroHuntsman/POCS,Guokr1991/POCS,panoptes/POCS,fmin2958/POCS,Guokr1991/POCS,AstroHuntsman/POCS
panoptes/test/mount/test_ioptron.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom DataObjects.Collection import Collection\nfrom ObjectFactories.ItemFactory import ItemFactory\nimport json\n\ndef main():\n updateCollection(\n Collection('item','Items', 'agarner', []),\n ItemFactory.factory('item', [...
python
edit
5
6
apache-2.0
72c9a00d691b2b91bf39e1f5bdd1ef2358d8d671
AmosGarner/PyInventory
updateCollection.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Picture(models.Model):\n\n file = models.ImageField(upload_to=\"pictures\")\n slug = models.SlugField(max_length=50, blank=True)\n\n def __unicode__(self):\n return self.file\n\n @mod...
python
edit
1
1
mit
f2f77cd326c3b121eb7e6e53dfcab3964f473451
extremoburo/django-jquery-file-upload,indrajithi/mgc-django,Imaginashion/cloud-vision,madteckhead/django-jquery-file-upload,sigurdga/django-jquery-file-upload,vaniakov/django-jquery-file-upload,extremoburo/django-jquery-file-upload,sigurdga/django-jquery-file-upload,Imaginashion/cloud-vision,Imaginashion/cloud-vision,m...
fileupload/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ImproperlyConfigured\n\ntry:\n from captcha.fields import ReCaptchaField as CaptchaField\nexcept ImportError:\n try:\n from captcha.fields import CaptchaField\n except ImportError:\n ...
python
edit
1
3
apache-2.0
e6fb5ba043c2db08cbacb119664297b3f3668517
django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments,django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments,edoburu/django-fluent-comments
fluent_comments/forms/_captcha.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django import forms\nfrom django.utils.encoding import smart_unicode\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom recaptcha.client import captcha\n\nfrom captcha.widgets import ReCa...
python
edit
2
2
bsd-3-clause
3f5b1e830eff73cdff013a423b647c795e21bef2
mozilla/django-recaptcha
captcha/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport csv\n\n\n# Question 1\n# ----------\n# Using the csv data file users.csv aggregate app users as well as registration date by month. The count of app\n# users should be one dictionary while the count of registration m...
python
edit
4
1
mit
8e1e6624fb9120b3f26ac373dc48e877240cccac
infoscout/python-bootcamp-pv
bootcamp/lesson5.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport errno\nimport os\n\n\ndef file_exists(path):\n \"\"\"Return True if a file exists at `path` (even if it can't be read),\n otherwise False.\n\n This is different from os.path.isfile and os.path.exists which return\n False ...
python
edit
1
4
mit
51c97b17220e8fc6334d2dce1fd945ee1861385e
yola/healthcheck
healthcheck/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom .command import Command\nfrom matador import utils\n\n\nclass DeployTicket(Command):\n\n def _add_arguments(self, parser):\n parser.prog = 'matador deploy-ticket'\n parser.add_argument(\n ...
python
edit
1
2
mit
b48984747d0f33f8ad9a8721bf7489d8ff97c157
Empiria/matador
matador/commands/deploy_ticket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDraw a solid circle off center in a blank image.\nUse the same array as both the image and the mask.\nThe tiles should subdivide along the curved edge to trace out a smooth circle.\n\"\"\"\nfrom skimage import draw\nimport matplotli...
python
edit
1
0
bsd-3-clause
7f1ddec9e170941e3a5159236ede817c2d569f38
danielballan/photomosaic
graphical_tests/test_partition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyQt5.Qsci import QsciScintilla, QsciLexerPython\n\n\nclass TextArea(QsciScintilla):\n def __init__(self):\n super().__init__()\n\n self.filePath = \"Untitled\"\n\n self.pythonLexer = QsciLexerPython(self)\n ...
python
edit
1
1
mit
17ffc13ba4a5eab56b66b8fe144cc53e8d02d961
msklosak/EasyEdit
easyedit/TextArea.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015, Google, Inc.\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a copy of the\n# License at http://www.apache.org/license...
python
edit
1
1
apache-2.0
6fb605a46a9dd33a2f31128955ca79e44379ad4d
googlearchive/appengine-python-vm-hello,bshaffer/appengine-python-vm-hello,bshaffer/appengine-python-vm-hello,googlearchive/appengine-python-vm-hello
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socks\nimport socket\nfrom stem.control import Controller\nfrom stem import Signal\n\n\nclass Tor(object):\n \"\"\"Tor class for socks proxy and controller\"\"\"\n def __init__(self, socks_port=9050, control_port=9051, control_...
python
edit
1
2
mit
90fb352f313b26964adcc587beb8f21deb3395a4
MA3STR0/simpletor
tor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\nclass TestLocking(object):\n\n def test_correct_os_type(self, ctx, config):\n os_type = ctx.config.get(\"os_type\")\n if os_type is None:\n pytest.skip('os_type was not defined')\n for r...
python
edit
1
4
mit
a52039c139e0d5b1c5fedb1dfb160e2c9b9387b3
SUSE/teuthology,yghannam/teuthology,dmick/teuthology,caibo2014/teuthology,dreamhost/teuthology,caibo2014/teuthology,t-miyamae/teuthology,ivotron/teuthology,SUSE/teuthology,ceph/teuthology,ivotron/teuthology,ktdreyer/teuthology,SUSE/teuthology,dmick/teuthology,t-miyamae/teuthology,robbat2/teuthology,zhouyuan/teuthology,...
teuthology/task/tests/test_locking.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# A context carrying the loaded configuration.\n\nfrom libcloud.compute.types import Provider\nfrom libcloud.compute.providers import get_driver\n\nimport config\n\nclass ConfigContext(object):\n def __init__(self, config):\n self...
python
edit
4
3
mit
424162d2dc8a7c815c48946f4963561be20df62d
fhltang/chews,fhltang/chews
config_context.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'Maksim Dmitriev'\n\nimport argparse\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument('--foo', help='foo help', required=True)\n args = parser.parse_args()\n\n```\n\nApply this...
python
edit
1
0
bsd-3-clause
600fe835ddce18a6aec5702766350003f2f90745
MaksimDmitriev/Python-Scripts
gen-android-icons.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom website.util.sanitize import escape_html\nfrom website.addons.base.exceptions import AddonEnrichmentError\n\n\nclass FigshareIsDraftError(AddonEnrichmentError):\n\n def __init__(self, file_guid):\n self.file_guid = file_guid\...
python
edit
1
1
apache-2.0
65d2a5f08ee96e80752362f7545167888599819e
zachjanicki/osf.io,DanielSBrown/osf.io,njantrania/osf.io,kushG/osf.io,erinspace/osf.io,GaryKriebel/osf.io,wearpants/osf.io,chrisseto/osf.io,samchrisinger/osf.io,caneruguz/osf.io,petermalcolm/osf.io,doublebits/osf.io,arpitar/osf.io,cldershem/osf.io,Nesiehr/osf.io,amyshi188/osf.io,brandonPurvis/osf.io,mluo613/osf.io,patt...
website/addons/figshare/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom msrest import Serializer\nfrom ..commands import command, description\nfrom .._profile import Profile\n\n@command('resource group list')\n@description('List resource groups')\n# TODO: waiting on Python Azure SDK bug fixes\n# @option('-...
python
edit
5
1
mit
ab1e27b3b28e0463f6dd182037a265c9f69fb94f
samedder/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,QingChenmsft/azure-cli,QingChenmsft/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,BurtBiel/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,BurtBiel/azure...
src/azure/cli/commands/resourcegroup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__author__ = 'Ardy Dedase'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\nfrom skyscanner import Flights, FlightsCache, Hotels, CarHire\n```\n\nApply this change: Make it work with Python 3." }, { "role": ...
python
edit
6
0
apache-2.0
041d7285b2ec5c6f323c10a4bbfd388c9d1cb216
valery-barysok/skyscanner-python-sdk,Skyscanner/skyscanner-python-sdk,joesarre/skyscanner-python-sdk
skyscanner/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n#__all__ = [\"hists\", \"binning\"]\n\nfrom .hists import *\n#from .converter import ashist\n```\n\nApply this change: Include ashist in the general namespace by default" }, { "role": "assistant", "content": "\n#__all__ = [\"h...
python
edit
4
0
mit
e492ffe0e8d57917db6b937523abaabe0ee4ff8e
ndevenish/simplehistogram
simplehist/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django.contrib.auth.decorators import login_required\nfrom django.utils.translation import ugettext as _\nfrom django.views...
python
edit
11
3
mit
cb31dcc7be5e89c865686d9a2a07e8a64c9c0179
underlost/GamerNews,underlost/GamerNews
gamernews/apps/threadedcomments/views.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport sys\n\nfrom conda.cli import common\nfrom conda import plan\n\n\ndef install(prefix, specs, args, data):\n # TODO: do we need this?\n common.check_specs(prefix, specs, json=args.json)\n\n...
python
edit
1
7
bsd-3-clause
5fd5d32a04615656af03e0c1fa71ca7b81a72b1f
conda/conda-env,ESSS/conda-env,phobson/conda-env,asmeurer/conda-env,nicoddemus/conda-env,mikecroucher/conda-env,conda/conda-env,dan-blanchard/conda-env,isaac-kit/conda-env,isaac-kit/conda-env,mikecroucher/conda-env,ESSS/conda-env,nicoddemus/conda-env,phobson/conda-env,dan-blanchard/conda-env,asmeurer/conda-env
conda_env/installers/conda.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 Google\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# https://www.apache.org/...
python
edit
1
0
apache-2.0
c5742bb27aa8446cb5b4c491df6be9c733a1408f
quantumlib/unitary,quantumlib/unitary
unitary/examples/tictactoe/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom indra.preassembler.hierarchy_manager import HierarchyManager\n\n# Make a TRIPS ontology\n_fname = os.path.join(os.path.dirname(__file__), 'trips_ontology.rdf')\ntrips_ontology = HierarchyManager(_fname, uri_as_name=False)\nt...
python
edit
1
2
bsd-2-clause
60c4534b1d375aecfe39948e27bc06d0f34907f3
sorgerlab/bioagents,bgyori/bioagents
bioagents/resources/trips_ont_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.5\n#\n# Copyright 2009 the Melange 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 Licen...
python
edit
1
1
apache-2.0
1dfb9fd979206af415e20fc58b905c435a187008
MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging
app/soc/models/grading_project_survey.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom query_result_document import QueryResultDocument\n\n\nclass QueryResultList:\n def __init__(self, query, result_documents = []):\n self.result_documents = result_documents # Guaranteed to be in rank order\n self.query = query\n\...
python
edit
1
1
mit
89e2991109447893b06edf363f223c64e9cafb61
fire-uta/iiix-data-parser
query_result_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom been.couch import CouchStore\nfrom flask import Flask, render_template\n\napp = Flask(__name__)\napp.jinja_env.trim_blocks = True\n\nstore = CouchStore()\nstore.load()\n\n@app.route('/')\ndef wake():\n return render_template('stream...
python
edit
1
1
bsd-3-clause
f4aad7a704628e2ecdbc2222e71998bb71cf37ec
chromakode/wake
wake.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\nimport os\nimport locale\n\nfrom ._types import str_cls\n\n\n_sys_encoding = locale.getpreferredencoding()\n\n\ndef get_env(shell=None):\...
python
edit
1
5
mit
32d7921de5768fd74983ebff6fa37212aed24e83
codexns/shellenv
all/shellenv/_win.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom pkgpanda.util import expect_fs\nfrom util import run\n\nfetch_output = \"\"\"\\rFetching: mesos--0.22.0\\rFetched: mesos--0.22.0\\n\"\"\"\n\n\ndef test_fetch(tmpdir):\n # NOTE: tmpdir is explicitly empty because we want...
python
edit
1
1
apache-2.0
78f8634ac7ae959cfc7f34188ce4f56156922dcb
mesosphere-mergebot/dcos,vishnu2kmohan/dcos,xinxian0458/dcos,GoelDeepak/dcos,jeid64/dcos,mesosphere-mergebot/dcos,kensipe/dcos,lingmann/dcos,surdy/dcos,mesosphere-mergebot/mergebot-test-dcos,amitaekbote/dcos,amitaekbote/dcos,mnaboka/dcos,surdy/dcos,lingmann/dcos,amitaekbote/dcos,vishnu2kmohan/dcos,jeid64/dcos,mesospher...
pkgpanda/integration-tests/test_fetch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.blueprints.admin.party.forms\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom wtforms import BooleanField, DateTimeField, Int...
python
edit
1
0
bsd-3-clause
f1e5e2cc7fd35e0446f105d619dc01d3ba837865
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps
byceps/blueprints/admin/party/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRISC-V Target\n-------------\n\n`RISC-V <http://riscv.org/>`_ is an open instruction set architecture\noriginally developed at UC Berkeley. It is a RISC-style ISA with either a\n32-bit (RV32I) or 64-bit (RV32I) base instruction set ...
python
edit
1
0
apache-2.0
74a944c47432f707bb8cf6cde421e4927eeeaebb
sunfishcode/cretonne,stoklund/cretonne,stoklund/cretonne,stoklund/cretonne,sunfishcode/cretonne,sunfishcode/cretonne
lib/cretonne/meta/isa/riscv/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom api.streams.models import StreamConfiguration\nfrom django.http import JsonResponse\nfrom django.http.request import HttpRequest\nimport requests\n\ndef get_stream_status(request: HttpRequest, stream_slug: str):\n stream = StreamCon...
python
edit
1
1
mit
3eaf93f2ecee68fafa1ff4f75d4c6e7f09a37043
urfonline/api,urfonline/api,urfonline/api
api/streams/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPrimary entrypoint for applications wishing to implement Python Kafka Streams\n\n\"\"\"\n\nimport logging\n\nimport confluent_kafka as kafka\n\nlog = logging.getLogger(__name__)\n\nclass KafkaStream(object):\n \"\"\"\n Encapsu...
python
edit
1
5
apache-2.0
5f05c1f6e06594328a2b328f6b995288707f593c
wintoncode/winton-kafka-streams
src/winton_kafka_streams/kafka_stream.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom os.path import dirname\n\nMIU_TEST_ROOT = dirname(__file__)\n\nINSTALLED_APPS = [\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"markitup\",\n \"tests\",\n \"...
python
edit
1
0
bsd-3-clause
5356aee78495dd7846cec6625b3980ba93be86e6
zsiciarz/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup
tests/test_settings.py
rejected_duplicate
Near-duplicate of sample 3908
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.urls import reverse\n\n\nclass SmokeTest(TestCase):\n def test_landing(self):\n url = reverse('static:home')\n resp = self.client.get(url)\n self.assertContains(resp, 'Co...
python
edit
1
1
mit
59fc12548422ecaa861f810d0e40b631801e2de0
vessemer/concept-to-clinic,antonow/concept-to-clinic,antonow/concept-to-clinic,antonow/concept-to-clinic,antonow/concept-to-clinic,vessemer/concept-to-clinic,vessemer/concept-to-clinic,vessemer/concept-to-clinic
interface/backend/static/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\nimport os\n\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest # NOQA\n\nfrom sigal.settings import read_settings\n\n\nclass TestSettings(unittest.TestCase):\n \"Read a settings f...
python
edit
1
1
mit
655f46a10245de0b7f4d9727f816815c6493d230
jdn06/sigal,Ferada/sigal,elaOnMars/sigal,kontza/sigal,kontza/sigal,t-animal/sigal,kontza/sigal,franek/sigal,cbosdo/sigal,cbosdo/sigal,saimn/sigal,saimn/sigal,jasuarez/sigal,xouillet/sigal,t-animal/sigal,muggenhor/sigal,saimn/sigal,elaOnMars/sigal,Ferada/sigal,franek/sigal,muggenhor/sigal,cbosdo/sigal,jdn06/sigal,xouill...
tests/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom bs4 import BeautifulSoup\nimport pickle\nimport os\n\ndef save_meps():\n url = \"http://www.votewatch.eu//en/term8-european-parliament-members.html?limit=804\"\n path = os.path.expanduser(\"~\")\n\n r = reques...
python
edit
1
2
mit
733f2006f84ade6033a4be2fe3334213b8a2ce85
alanmarazzi/mepcheck
mepcheck/savemeps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n'''\nSimplistic chain discovery\n'''\n\nimport sys\nsys.path.append('../..')\n\nfrom playtag.cables.digilent import Jtagger\nfrom playtag.jtag.discover import Chain\n\nprint Chain(Jtagger())\n\n```\n\nApply this chan...
python
edit
2
0
mit
bba325111b47c9ba7dfc0bc9556a655e3f5afcee
E3V3A/playtag,proteus-cpi/playtag
tools/jtag/discover.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nRegistry class and global node registry.\n\"\"\"\n\nclass NotRegistered(KeyError):\n pass\n\n\n__all__ = [\"NodeRegistry\", \"nodes\"]\n\n\nclass NodeRegistry(dict):\n NotRegistered = NotRegistered\n\n def register(self, no...
python
edit
1
6
apache-2.0
492004049da87744cd96a6e6afeb9a6239a8ac44
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
ocradmin/lib/nodetree/registry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ntry:\n from __builtins__ import ReferenceError\nexcept (NameError, ImportError): # pragma: no cover\n from weakref import ReferenceError\n\n__all__ = ['ReferenceError']\n\n```\n\nApply this change: Fix a py3...
python
edit
1
0
bsd-3-clause
6ecbcfd1b132b0c4acd2d413818348a2fe2b6bfe
alexrudy/Cauldron
Cauldron/utils/referencecompat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nExample using the NetworkX ego_graph() function to return the main egonet of \nthe largest hub in a Barabási-Albert network.\n\"\"\"\n__author__=\"\"\"Drew Conway (<EMAIL>)\"\"\"\n\nfr...
python
edit
1
0
bsd-3-clause
78351e785f413f44e07faa0b8a856639296a5591
RMKD/networkx,RMKD/networkx,jni/networkx,kernc/networkx,sharifulgeo/networkx,debsankha/networkx,kai5263499/networkx,farhaanbukhsh/networkx,jfinkels/networkx,NvanAdrichem/networkx,jakevdp/networkx,dmoliveira/networkx,jni/networkx,jakevdp/networkx,SanketDG/networkx,kernc/networkx,beni55/networkx,sharifulgeo/networkx,dhim...
examples/drawing/ego_graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the Wallace API.\"\"\"\n\nimport subprocess\nimport re\nimport os\nimport requests\n\n\nclass TestHeroku(object):\n\n \"\"\"The Heroku test class.\"\"\"\n\n sandbox_output = subprocess.check_output(\n \"cd examp...
python
edit
1
1
mit
0225177c39df95bc12d9d9b53433f310d083905f
berkeley-cocosci/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,suchow/Wallace,Dallinger/Dallinger,berkeley-cocosci/Wallace,berkeley-cocosci/Wallace,jcpeterson/Dallinger,jcpeterson/Dallinger,suchow/Wallace,suchow/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dalli...
tests/test_heroku.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hb_res.storage import ExplanationStorage\n\n__author__ = 'skird'\n\nimport codecs\nfrom hb_res.explanations.Explanation import Explanation\n\n\nclass FileExplanationStorage(ExplanationStorage):\n \"\"\"\n Class representing expla...
python
edit
1
3
mit
f97d9d6462ce9e60c1811bd40428a1f30835ce95
hatbot-team/hatbot_resources
hb_res/storage/FileExplanationStorage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nThis module will send SMS reminders periodically, using Twilio.\nThe aim is to encourage user to code, commit and push to GitHub everyday\n'''\n\nimport requests\n\ndef set_configuration():\n '''\n Set Twilio configuration\n '...
python
edit
3
1
mit
c471a5d6421e32e9c6e3ca2db0f07eae45a85408
ueg1990/fuckit_commit
fuckit_commit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport sys\n\nfrom .loader import Loader, I18nFileLoadError\n\nclass PythonLoader(Loader):\n \"\"\"class to load python files\"\"\"\n def __init__(self):\n super(PythonLoader, self).__init__()\n\n def load_fi...
python
edit
1
3
mit
048994463cda7df1bbaf502bef2bf84036e73403
tuvistavie/python-i18n
i18n/loaders/python_loader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom nodeconductor_assembly_waldur.invoices.tasks import format_invoice_csv\n\nfrom .. import models\nfrom . import fixtures\n\n\nclass TestReportFormatter(TestCase):\n def test_invoice_items_are_prope...
python
edit
1
1
mit
c1889a71be161400a42ad6b7c72b2559a84f69bf
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur
src/nodeconductor_assembly_waldur/invoices/tests/test_report.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom kokki import *\n\nPackage(\"nginx\")\n\nDirectory(env.config.nginx.log_dir,\n mode = 0755,\n owner = env.config.nginx.user,\n action = 'create')\n\nfor nxscript in ('nxensite', 'nxdissite'):\n File(\"/usr/sbin/%s\" % nxsc...
python
edit
9
0
bsd-3-clause
4f9569037ad835b852e6389b082155d45a88774c
samuel/kokki
kokki/cookbooks/nginx/recipes/default.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom peewee import SqliteDatabase\nfrom playhouse.test_utils import test_database\n\nimport api.tests.helpers as helpers\nfrom api.destinations.endpoint import *\nfrom api.destinations.endpoint import _get_destinations\n\...
python
edit
1
1
mit
7bc247550f136c5f0e34f411b868f9e5949e1ec4
mdowds/commutercalculator,mdowds/commutercalculator,mdowds/commutercalculator
api/tests/destinations/endpoint_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\n# Import the models we want directly available through the root module\nfrom .models import \\\n Gruppe, \\\n Omrade, \\\n Ste...
python
edit
7
0
mit
0e14aaba251e3257bc298561a9004d88e0d8e3b6
Turbasen/turbasen.py
turbasen/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['Cartfile']\n\nimport re\nfrom pathlib2 import Path\nfrom .basic_types import *\nfrom .errors import *\n\n\nclass Cartfile(object):\n def __init__(self, speci...
python
edit
5
9
mit
9535234db263f0155f515236457ee7ba5e9e1e0e
schwa/punic
punic/cartfile.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport json\n\n\nPACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))\nwith open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:\n SMARTPHONE_DEV_IDS = json.load(open(f))\nwith open(os.path.join(PACKA...
python
edit
1
0
mit
11c30f5dd765475a9f5f0f847f31c47af8c40a39
lorien/user_agent
user_agent/device.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Jinja environment filters for Pynuts.\"\"\"\n\nfrom flask import escape\nfrom flask.ext.wtf import (\n QuerySelectField, QuerySelectMultipleField, BooleanField)\n\n\ndef data(field):\n \"\"\"Field data...
python
edit
1
8
bsd-3-clause
94e344b48161e20fec5023fbeea4a14cdc736158
Kozea/Pynuts,Kozea/Pynuts,Kozea/Pynuts
pynuts/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nfrom django.db import models\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\n\nDEFAULT_ICEBERG_ENV = getattr(settings, 'ICEBERG_DEFAULT_ENVIRO', \"prod\")\n\nclass IcebergBaseModel(models.Mo...
python
edit
1
1
mit
8b9ebbad9e87af3f56570ba3c32dcdb2d7ca4a39
izberg-marketplace/django-izberg,izberg-marketplace/django-izberg,Iceberg-Marketplace/django-iceberg,Iceberg-Marketplace/django-iceberg
django_iceberg/models/base_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nTiny utility script to check that coverage statistics output by stack haddock\nare all 100%.\n\"\"\"\nimport sys\nimport re\n\ndef main():\n \"\"\"Entry point to ensure-haddock-coverage.py.\"\"\"\n # Ver...
python
edit
1
8
mit
43e86a3ac5f63c702ce409c45e3aaaac60990fe9
gibiansky/jupyter-haskell
python/ensure_haddock_coverage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast...
python
edit
1
0
bsd-3-clause
0c186d8e0fb5bd7170ec55943e546f1e4e335839
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.tryserver.chromium/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bluebottle.bluebottle_drf2.serializers import ImageSerializer\nfrom bluebottle.projects.models import PartnerOrganization\nfrom bluebottle.projects.serializers import ProjectPreviewSerializer as BaseProjectPreviewSerializer\nfrom rest_...
python
edit
1
0
bsd-3-clause
78f55cf57d88378e59cf1399d7ef80082d3f9555
onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle
bluebottle/partners/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# /ciscripts/coverage/bii/coverage.py\n#\n# Submit coverage totals for a bii project to coveralls\n#\n# See /LICENCE.md for Copyright information\n\"\"\"Submit coverage totals for a bii project to coveralls.\"\"\"\n\nimport errno\n\nimport ...
python
edit
1
3
mit
052c0cfd1ce21b36c9c9a44193e3a9c89ca871f1
polysquare/polysquare-ci-scripts,polysquare/polysquare-ci-scripts
ciscripts/coverage/bii/coverage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import View\nfrom django.http import JsonResponse\nfrom django.conf import settings\n\n\nclass ChatterBotView(View):\n\n def post(self, request, *args, **kwargs):\n input_statement = request.POST.get('tex...
python
edit
1
1
bsd-3-clause
08300895dc8d2abb740dd71b027e9acda8bb84dd
Reinaesaya/OUIRL-ChatBot,Reinaesaya/OUIRL-ChatBot,vkosuri/ChatterBot,davizucon/ChatterBot,gunthercox/ChatterBot,maclogan/VirtualPenPal,Gustavo6046/ChatterBot
chatterbot/ext/django_chatterbot/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DepthFirstSearchStrategy:\n\n def __init__(self, content, max_depth):\n self.content = content\n self.max_depth = max_depth\n\n def __iter__(self):\n return self\n\n def __next__(self):\n try:\n ...
python
edit
1
3
mit
b973a1686f269044e670704b56c07ca79336c29c
b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril
mythril/laser/ethereum/strategy/basic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import tokenizer, ast, codegen\nimport sys, os, subprocess\n\nTRIPLES = {\n\t'darwin': 'x86_64-apple-darwin11.0.0',\n\t'linux2': 'x86_64-pc-linux-gnu',\n}\n\ndef llir(fn, full=True):\n\t\n\tsrc = codegen.source(ast.parse(tokenizer.to...
python
edit
2
3
mit
5c0c2f470451c69a2b4cbba3746d26207c6b17a9
djc/runa,djc/runa,djc/runa,djc/runa
lang/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef remove_low_variance(X, low_variance_threshold=1e-4, axis=0):\n low_variance = X.var(axis=axis) < low_variance_threshold\n X[:, ~low_variance]\n return X\n\n\ndef normalize(X):\n zero_mean = X - X.mean()\n return (zero_mea...
python
edit
4
1
mit
4c00c394e4015a7cae5c5de574d996b20252ea3f
log0ymxm/corgi
corgi/numpy_utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" How to generate a random 4 digit number not starting with 0 and having unique digits in python? \"\"\"\n\nimport random\nl = [0,1,2,3,4,5,6,7,8,9]\nrandom.shuffle(l)\nif l[0] == 0:\n print(''.join(map(str, l[1:5])))\nelse:\n pr...
python
edit
1
0
mit
104c136488d468f26c7fe247d0548636cbf3c6fe
foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard
random_4.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\" propeller model \"\nfrom numpy import pi\nfrom gpkit import Model, parse_variables, SignomialsEnabled, SignomialEquality\n\nclass Propeller(Model):\n \"\"\" Propeller Model\n\n Variables\n ---------\n R 10 ...
python
edit
3
1
mit
129cd22de51d58cc956ca5586fc15cd2e247446b
convexengineering/gplibrary,convexengineering/gplibrary
gpkitmodels/GP/aircraft/prop/propeller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase\n\n\nclass AzureResourceGroupTestCase(ProviderTestBase):\n def test_resource_group_create(self):\n resource_group_params = {'location': self.provider.regi...
python
edit
1
1
mit
2c63efeb705637a068c909be7dc72f18e90561bf
ms-azure-cloudbroker/cloudbridge
cloudbridge/cloud/providers/azure/test/test_azure_resource_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom io import BytesIO\n\nfrom django.conf import settings\nfrom django.core.files.base import ContentFile\n\nfrom PIL import Image\n\nfrom chmvh_website import celery_app\n\n\n@celery_app.task\ndef create_thumbnail(patient):\n image = I...
python
edit
1
3
mit
276f74dfef46f5fa0913ddd3759d682eb58c7cec
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
chmvh_website/gallery/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport multiprocessing\n\nfrom mopidy.mixers import BaseMixer\nfrom mopidy.utils.process import pickle_connection\n\nclass GStreamerSoftwareMixer(BaseMixer):\n \"\"\"Mixer which uses GStreamer to control volume in software.\"\"\"\n\n ...
python
edit
1
1
apache-2.0
d535cf76b3129c0e5b6908a720bdf3e3a804e41b
SuperStarPL/mopidy,bacontext/mopidy,dbrgn/mopidy,ali/mopidy,quartz55/mopidy,adamcik/mopidy,liamw9534/mopidy,ali/mopidy,swak/mopidy,liamw9534/mopidy,abarisain/mopidy,swak/mopidy,mopidy/mopidy,pacificIT/mopidy,swak/mopidy,diandiankan/mopidy,adamcik/mopidy,bencevans/mopidy,hkariti/mopidy,glogiotatidis/mopidy,vrs01/mopidy,...
mopidy/mixers/gstreamer_software.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Delete all documents every second forever\"\"\"\n\n__author__ = 'tunnell'\n\nimport sys\nimport time\nimport json\n\nimport pymongo\n\n\nif __name__ == \"__main__\":\n c = pymongo.MongoClient()\n\n db = c.data\n collection = ...
python
edit
1
0
bsd-3-clause
93be3585d269360641091f18a6443979eb8f1f98
tunnell/wax,tunnell/wax,tunnell/wax
cito/dump_db.py
accepted
null
true