messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport testtools\n\nfrom testtools.twistedsupport import AsynchronousDeferredRunTest\n\nfrom uritools import urisplit\n\n\nclass TestCase(testtools.TestCase):\n \"\"\" TestCase class for use with Twisted asynchornous tests...
python
edit
1
1
mit
2107a8c161d8a9fe13977a0997defb35297821c2
praekeltfoundation/certbot,praekeltfoundation/certbot
certbot/tests/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file copied from https://github.com/unmonoqueteclea/calendar-telegram\n\nfrom telebot import types\nimport calendar\n\ndef create_calendar(year,month):\n markup = types.InlineKeyboardMarkup()\n #First row - Month and Year\n ...
python
edit
1
4
mit
13866af8073a35c3731a208af662422788d53b19
myxo/remu,myxo/remu,myxo/remu
telegramcalendar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\n\nfrom malcolm.core.serializable import Serializable\n\n\n@Serializable.register(\"malcolm:core/Meta:1.0\")\nclass Meta(Serializable):\n \"\"\"Meta class for describing Blocks\"\"\"\n\n def __init_...
python
edit
1
4
apache-2.0
dc83fd7a77cab31b264d19984ac996bf64356fba
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/core/meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=25\nbranch=\"master\"\ntimestamp=1376610207.69\n```\n\nApply this change: Tag commit for v0.0.26-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=26\nbranc...
python
edit
1
0
mit
bcc5a9a68f0b97b7e170cf34f9ffea00fb5441f4
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Only used for running the tests\n\nimport os\n\nCONTACT_EMAILS = ['charlie@example.com']\n\nDATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}\n\nINSTALLED_APPS = ['contact', 'django.contrib.staticfiles']\n\nROOT_URLCONF = ...
python
edit
1
0
bsd-3-clause
ac83a231b393ab8212b76a2887991cd128d48345
aaugustin/myks-contact,aaugustin/myks-contact
contact/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom katana.utils import Node, Pair, prepare\nfrom katana.compound import sequence, group, repeat, option, maybe\nfrom katana.term import term\n\n\nTa, Tb, Tc = [term(k) for k in 'abc']\nNa, Nb, Nc = [Node(k, 'data') for k in...
python
edit
1
2
mit
ce4dbf4d0ac3ed91c54302ec81e6838d7bf04da2
eugene-eeo/katana
tests/test_compound.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Manage temporary directories.\"\"\"\nimport os\nimport shutil\nimport tempfile\n\n\nclass temporary_directory(object):\n \"\"\"Create, yield, and finally delete a temporary directory.\n\n >>> with tempor...
python
edit
1
2
bsd-3-clause
6498d61ba18699a93689a52a43963e034b14ed84
diecutter/diecutter,diecutter/diecutter
diecutter/utils/files.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ngargoyle.tests\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2010 DISQUS.\n:license: Apache License 2.0, see LICENSE for more details.\n\"\"\"\n\nfrom tests import *\n```\n\nApply this change: Add fixture decorator to make tests better" }, ...
python
edit
2
2
apache-2.0
f742f5ce52738da51a3adce35bad1e852691d7be
disqus/gutter,kalail/gutter,kalail/gutter,disqus/gutter,kalail/gutter
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf8 -*-\n\"\"\"\nUsage:\nexgrep TERM [options] EXCEL_FILE...\n\nOptions:\nTERM The term to grep for. Can be any valid (python) regular expression.\nEXCEL_FILE The list of files to search throug...
python
edit
1
6
mit
fdee121f435128ada3065e2edc08b4ae6edde2d3
Sakartu/excel-toolkit
exgrep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import WhiteNoise\n\n__version__ = '2.0.6'\n\n__all__ = ['WhiteNoise']\n\n```\n\nApply this change: Change version until ready for release" }, { "role": "assistant", "content": "from .base import WhiteNoise\n\n__versi...
python
edit
1
0
mit
1dd863336641b3e9172c9a08018386bb133960bf
evansd/whitenoise,evansd/whitenoise,evansd/whitenoise
whitenoise/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pytest import fixture\n\nfrom oshino.config import Config, RiemannConfig\n\n\n@fixture\ndef base_config():\n return Config({\"riemann\": {\"host\": \"localhost\",\n \"port\": 5555\n ...
python
edit
1
1
mit
0c25bef5514913239db942d96a00a499144282c0
CodersOfTheNight/oshino
tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Provide APP constant for the purposes of manually running the flask app\n\nFor example, build the front end, then run the app with environment variables::\n cd smif/app/\n npm run build\n cd ../http_api/\n ...
python
edit
1
1
mit
62a8ae77a619b8ae915c9489847c5a52ef379779
tomalrussell/smif,willu47/smif,willu47/smif,nismod/smif,tomalrussell/smif,tomalrussell/smif,willu47/smif,nismod/smif,nismod/smif,willu47/smif,nismod/smif,tomalrussell/smif
smif/http_api/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport webview\nfrom .util import run_test\nfrom time import sleep\n\n\ndef test_resize():\n window = webview.create_window('Set Window Size Test', 'https://www.example.org', width=800, height=600)\n run_test(webview, window, resize)\...
python
edit
1
1
bsd-3-clause
e5cf121651051ca904ccdb9409908ad43be32dc2
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
tests/test_resize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom jazzband.projects.tasks import update_project_by_hook\nfrom jazzband.tasks import JazzbandSpinach\n\n\ndef post(client, hook, data, guid=\"abc\"):\n headers = {\"X-GitHub-Event\": hook, \"X-GitHub-Delivery\": guid}\n ...
python
edit
3
1
mit
2462595312ca7ddf38ffb6d4bcdf7515401fe7ee
jazzband/website,jazzband/jazzband-site,jazzband/website,jazzband/website,jazzband/site,jazzband/jazzband-site,jazzband/website,jazzband/site
tests/test_hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.core.checks import Tags, Warning, register\nfrom django.db import connection\nfrom django.utils.translation import gettext_lazy as _\n\nfrom wagtail.search.signal_handlers import register_signa...
python
edit
1
4
bsd-3-clause
155fca9e7e2c8cfee8d2600268ebae8d94b2e7fe
wagtail/wagtail,thenewguy/wagtail,mixxorz/wagtail,rsalmaso/wagtail,zerolab/wagtail,wagtail/wagtail,mixxorz/wagtail,mixxorz/wagtail,zerolab/wagtail,thenewguy/wagtail,jnns/wagtail,jnns/wagtail,zerolab/wagtail,zerolab/wagtail,thenewguy/wagtail,wagtail/wagtail,jnns/wagtail,rsalmaso/wagtail,mixxorz/wagtail,rsalmaso/wagtail,...
wagtail/search/apps.py
rejected_duplicate
Near-duplicate of sample 11486
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pysagec import models\n\n\ndef test_auth_info():\n values = [\n ('mrw:CodigoFranquicia', 'franchise_code', '123456'),\n ('mrw:CodigoAbonado', 'subscriber_code', 'subscriber_code'),\n ('mrw:CodigoDepartamento', '...
python
edit
1
1
mit
06bc49a066958390d423294730debe75466eff1f
migonzalvar/pysagec
tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Collection of HTTP helpers.\"\"\"\n\nfrom functools import partial, wraps\nfrom inspect import iscoroutine\n\nfrom aiohttp.web import json_response\n\n\ndef async_json_out(orig_method=None, *, content_type='application/json', **kwargs...
python
edit
1
2
mit
811263573aa35361da8a8ddde03b333914e156c5
open-craft-guild/aio-feature-flags
web_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!python\n\n# Load libraries\nimport sys, getopt\nimport libPipeline\n\n# Set constants\nhelpMsg ='''\nSYNOPSIS\n parseBowtieOutput\n parseBowtieOutput [OPTIONS] [FILE]\n #\nDESCRIPTION\n parseBowtieOutput.py\n\n Parses Bowti...
python
edit
4
0
apache-2.0
dc43be8d6b34de47b5bcb900e7d055372c2e28cc
awblocker/paired-end-pipeline,awblocker/paired-end-pipeline
parseBowtieOutput.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nfrom pyfr.backends.cuda.provider import CudaKernelProvider\nfrom pyfr.backends.cuda.queue import CudaComputeKernel\nfrom pyfr.nputil import npdtype_to_ctype\n\nclass CudaBlasExtKernels(CudaKe...
python
edit
1
3
bsd-3-clause
cd722b5125b7bbedce3d5e48823644d61a42ffe2
tjcorona/PyFR,Aerojspark/PyFR,tjcorona/PyFR,iyer-arvind/PyFR,BrianVermeire/PyFR,tjcorona/PyFR
pyfr/backends/cuda/blasext.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom urllib import parse\n\nDEBUG = False\n\n\nDATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL_PGBOUNCER')\n\nbits = parse.urlparse(DATABASE_SA)\n\nDATABASE = {\n 'user': bits.username,\n 'database': bits.path[...
python
edit
1
0
bsd-2-clause
94e6079c786444bf1177454582e3c0f4e4d2500c
d0ugal/discode-server,d0ugal/discode-server,d0ugal/discode-server
discode_server/config/base_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport requests\n\n\nSMS_AUTH_ENDPOINT = 'http://localhost:5000'\n\n\nclass SMSAuthClient(object):\n\n def __init__(self, endpoint=SMS_AUTH_ENDPOINT):\n self.endpoint = endpoint\n\n def create_auth(self, auth_id,...
python
edit
16
3
mit
6a74d267c83f887aae9539417b7a13a00afbcd14
flowroute/sms-verification,flowroute/sms-verification,flowroute/sms-verification
sms_auth_service/client.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom github import Github\nfrom django.contrib.auth.models import User\nfrom tools.decorators import extend\n\n\n@extend(User)\nclass Profile(object):\n \"\"\"Add shortcuts to user\"\"\"\n\n @property\n def github(self):\n \...
python
edit
1
1
mit
88d1274638e1f4d0341c5e55bdb729ae52c2b607
nvbn/coviolations_web,nvbn/coviolations_web
accounts/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ast\n\nfrom .base import BaseAnalyzer, Result\n\n\nclass TemplateLoadersVisitor(ast.NodeVisitor):\n\n def __init__(self):\n self.found = []\n\n deprecated_items = {\n 'django.template.loaders.app_directories.load_...
python
edit
1
4
isc
696a166e039220a5431a554db3a0cb379f9a59de
alfredhq/djlint
djlint/analyzers/template_loaders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Skipping test_parser and test_all_fixers\n# because of running\nfrom lib2to3.tests import test_fixers, test_pytree, test_util\nimport unittest\nfrom test.test_support import run_unittest\n\ndef suite():\n tests = unittest.TestSuite()\n...
python
edit
1
2
mit
9fa3775c78b8c44b503ce1565e2e990644a61da6
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_lib2to3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fedora.template.fedora import FedoraTemplate\nfrom fedora.manager.manager import FedoraConnectionManager\n\nif '__main__' == __name__:\n fedoraTemplate = FedoraTemplate()\n a = FedoraConnectionManager(\"http://localhost:8080/rest...
python
edit
2
0
mit
8efde6f0fee26a2e83a0191bd21f78061ff92e8c
sitdh/fedora-parser
fedora.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nPYTHONPATH = '/home/nick/PycharmProjs/tl_cycling/caar'\nsys.path.append(PYTHONPATH)\nPYTHONPATH = '/home/nick/PycharmProjs/tl_cycling/backports'\nsys.path.append(PYTHONPATH)\nPYTHONPATH = '/home/nick/PycharmProjs/tl_cycling/back...
python
edit
23
0
bsd-3-clause
84dee56df90d9181d1e79c3246ef389462f0ca17
nickpowersys/CaaR
configure_console_session.py
rejected_lint
Too many lint violations: 23
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Adaptive configuration dialogs.\n\nAttributes:\n __version__: The current version string.\n\"\"\"\n\nimport os\nimport subprocess\n\n\ndef _get_version(version=None): # overwritten by setup.py\n if version is None:\n pkg...
python
edit
3
2
apache-2.0
30259313a817f2d5f147dc37ebf5ebd2c2edf943
yasserglez/configurator,yasserglez/configurator
configurator/__init__.py
rejected_duplicate
Near-duplicate of sample 22846
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport django_filters\n\nfrom nodeconductor.core import filters as core_filters\n\nfrom . import models\n\n\nclass ExpertProviderFilter(django_filters.FilterSet):\n customer = core_filters.URLFilter(view_name='customer-detail', name='cus...
python
edit
1
0
mit
8e7f793abc012e136fa5ec0f2c003704ab98f751
opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind
src/nodeconductor_assembly_waldur/experts/filters.py
rejected_duplicate
Near-duplicate of sample 4439
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hashring import HashRing\n\ndef test_basic_ring():\n hr = HashRing(range(3))\n actual = hr.get_node('howdy')\n expected = 1\n assert expected == actual\n\n```\n\nApply this change: Add additional test for strings" }, { ...
python
edit
1
1
bsd-2-clause
d8a7abd16e115e142299a4c1ed01b18b15a5b806
goller/hashring
tests/test_hashring.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add login restrictions to chatroom" }, { "role": "assistant", "content": "from django.shortcuts import render\nfrom django.http import HttpResponse, Http404\nfrom .models import Message\nfrom django.contrib.auth.decorators import...
python
new_file
4
1
apache-2.0
1e6fcb420c0cd3c41afd8a91ec020b6e15cf1973
jason-feng/chatroom,jason-feng/chatroom,jason-feng/chatroom,jason-feng/chatroom
client/views.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path as op\n\nimport numpy as np\nimport numpy.testing as npt\n\nimport nibabel as nib\nimport nibabel.tmpdirs as nbtmp\n\nimport dipy.data as dpd\nfrom dipy.reconst.shm import calculate_max_order\n\nfrom AFQ import csd\n\n\ndef t...
python
edit
1
2
bsd-2-clause
f41adb3b11a572251949778ed3fa49cd0c3901c7
arokem/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ,yeatmanlab/pyAFQ
AFQ/tests/test_csd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.views import exception_handler\nfrom rest_framework.exceptions import APIException\n\nfrom rest_framework_friendly_errors import settings\nfrom rest_framework_friendly_errors.utils import is_pretty\n\n\ndef friendly_exce...
python
edit
1
5
mit
f12120dd9a7660277b52cd25f8cfa48b3783eece
oasiswork/drf-friendly-errors,FutureMind/drf-friendly-errors
rest_framework_friendly_errors/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cfr.constants import NUM_ACTIONS\n\n\nclass Node:\n def __init__(self, parent):\n super().__init__()\n self.parent = parent\n self.children = {}\n\n def set_child(self, key, child):\n self.children[key...
python
edit
1
10
mit
ab247f37b72bf833dfb32c93d01e6889642b109e
JakubPetriska/poker-cfr,JakubPetriska/poker-cfr
cfr/game_tree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport hook_system_variables as hook\nimport os_operations as op\nimport os\n\n\ndef setup():\n home_dir = op.get_home()\n app_tree = home_dir + op.separator() + hook.data_storage_path\n\n...
python
edit
2
2
mit
af8d25d74dbbfcb25bcdfb454125d834644bc1bc
adnane1deev/Hook
bin/app_setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Functions for checking files\"\"\"\nimport os\nimport stat\nimport mimetypes\n\nfrom .checker import is_link\nfrom .config import CONFIG\n\ndef is_fastq(fi):\n \"\"\"Check whether a given file is a fastq file.\"\"\"\n path = fi[...
python
edit
3
5
mit
429738972be911f6b05358c918f822270eb94da7
jackstanek/BotBot,jackstanek/BotBot
botbot/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport gevent.socket\nimport redis.connection\nfrom manage import _set_source_root_parent, _set_source_root\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"settings\")\n\n_set_source_root_parent('submodules')\n_set_source_...
python
edit
1
0
bsd-3-clause
1a511f23acc873c95ed60e8a918bff5c6ba68ebc
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
deployment/websocket_wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nfrom libthumbor import CryptoURL\n\nclass ThumborService(object):\n\n def __init__(self, baseurl='http://localhost:8888/'...
python
edit
1
3
mit
d772a2333f0d9736a87180dcfb29000bccee8e19
znerol/spreadflow-thumbor
spreadflow_thumbor/proc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\nimport re\n\n\nmac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$')\n\ndef validate_mac(mac):\n if not isinstance(mac, basestring) or not mac_pattern.match(mac):\n raise V...
python
edit
2
4
bsd-3-clause
44e1b892716b74a3730da92365669f1353eb267e
OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,drkitty/cyder,murrown/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,zeeman/cyder,murrown/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,drkitty/cyder,akeym/cyder,akeym/cyder,akeym/cyder,drkitty/cyder
cyder/cydhcp/validation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2010 10gen, 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# You may obtain a copy of the License at\n#\n# http://www.apache.org/...
python
edit
1
1
apache-2.0
3ac4264b9242e0261735e35401a4a750489a6f0e
develf/mongo-python-driver,ultrabug/mongo-python-driver,aherlihy/mongo-python-driver,jbenet/mongo-python-driver,aherlihy/mongo-python-driver,ShaneHarvey/mongo-python-driver,jbenet/mongo-python-driver,felixonmars/mongo-python-driver,felixonmars/mongo-python-driver,pigate/mongo-python-driver,WingGao/mongo-python-driver,b...
test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom comment_utils.managers import CommentedObjectManager\nfrom django.db import models\n\n\nclass LiveEntryManager(CommentedObjectManager):\n \"\"\"\n Custom manager for the Entry model, providing shortcuts for\n filtering by entr...
python
edit
3
2
bsd-3-clause
16c5c9e89a6cf565070ab58d55a7796ea3183ced
mafix/coltrane-blog,clones/django-coltrane
coltrane/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom os.path import expanduser\n\nUSER_HOME = expanduser(\"~\")\n\n#MASIMATLAB dir:\nif 'MASIMATLAB_PATH' not in os.environ:\n MASIMATLAB_PATH = os.path.join(USER_HOME,'masimatlab')\nelse:\n MASIMATLAB_PATH = os.environ['MASIMA...
python
edit
1
0
mit
4f8c653f877067703acf7146bc3732152b3f8f62
MattVUIIS/dax,MattVUIIS/dax,MattVUIIS/dax,MattVUIIS/dax,VUIIS/dax,VUIIS/dax
dax/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.functional import Promise\nfrom django.utils.translation import force_unicode\n\n\ndef resolve_promise(o):\n if isinstance(o, dict):\n for k, v in o.items():\n o[k] = resolve_promise(v)\n elif isins...
python
edit
1
10
mit
e289f1d604245e48954c09b39091a80beff39e34
gadventures/django-remote-forms
django_remote_forms/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#--coding:utf-8--\n#Platform\n\nclass BasePlatform(object):\n \"\"\"\n A template for codes which are dependent on platform, whatever shell type or system type.\n Redefine members to modify the function.\n \"\"\"\n def __init...
python
edit
3
8
mit
fb5117e653b7a47f4af35d2c19ada9da15458ae3
nday-dev/Spider-Framework
tmpl/Platform.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport paramiko # pip install paramiko\nimport os\n\n\ndef ssh_command(ip, user, command):\n # you can run this script as\n # SSH_PRIV_KEY=[your private key path] python bh_sshcmd.py\n key = paramiko.RSAKey.from_private_key_file(o...
python
edit
2
2
mit
3c855de1b69dac3242d16574188905593330a9b7
inakidelamadrid/bhp_exercises
bh_sshcmd.py
rejected_duplicate
Near-duplicate of sample 6645
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom . import run_vm_script\nfrom ...util.base import BaseStep\n\nLOG = logging.getLogger(__name__)\n\n\nclass ChangeDatabaseConfigFile(BaseStep):\n\n def __unicode__(self):\n return \"Chan...
python
edit
1
1
bsd-3-clause
ba48cd45c56646497bcda70d9a475a40ea44c874
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/mysql/resize/change_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cv2\n\n# Get the number of cameras available\ndef count_cameras():\n max_tested = 100\n for i in range(max_tested):\n temp_camera = cv2.VideoCapture(i)\n if temp_camera.isOpened():\n temp_camera.release...
python
edit
1
3
mit
981ff326ffd104e4665e31d8a38a62a854aa7a4d
foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard,foobar167/junkyard
count_cameras.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013, Sascha Peilicke <<EMAIL>>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2 as\n# published by the Free Software Foundation.\n#...
python
edit
1
2
apache-2.0
a0556156651b6c8f5dd230ba99998efa890e1506
saschpe/rapport
test/unit/test_template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUtility functions for dhcp2nest\n\"\"\"\nfrom queue import Queue\nfrom subprocess import Popen, PIPE\nfrom threading import Thread\n\n\ndef follow_file(fn, max_lines=100):\n \"\"\"\n Return a Queue that is fed lines (up to max...
python
edit
1
2
mit
02ac33ae0f7a6279df3f049e291fed6556b1c481
jbalonso/dhcp2nest
dhcp2nest/util.py
rejected_duplicate
Near-duplicate of sample 15210
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom devicehive.transport import Request\nfrom devicehive.transport import Response\n\n\nclass Api(object):\n \"\"\"Api class.\"\"\"\n\n def __init__(self, transport):\n self._transport = transport\n\n def is_http_transport(...
python
edit
1
1
apache-2.0
3a2d2934f61c496654281da7144f74713a9dea6f
devicehive/devicehive-python
devicehive/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom CITests import CITests\n\n# Libs in Application Examples\nappExamples = {\n\"KundurSMIB\":\"/ApplicationExamples/KundurSMIB/package.mo\",\n\"TwoAreas\":\"/ApplicationExamples/TwoAreas/package.mo\",\n\"SevenBus\":\"/Applicat...
python
edit
1
0
bsd-3-clause
d56ffde056a7758539ce834943ceb0f656e795a8
fran-jo/OpenIPSL,tinrabuzin/OpenIPSL,SmarTS-Lab/OpenIPSL,SmarTS-Lab/OpenIPSL,MaximeBaudette/OpenIPSL,OpenIPSL/OpenIPSL
CI/syntaxCheck.py
rejected_duplicate
Near-duplicate of sample 3407
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe, json\nfrom frappe.model.document import Docume...
python
edit
2
2
mit
eb8f38301a4a61be121be1ff6b985f74871a0aa5
saurabh6790/frappe,manassolanki/frappe,tundebabzy/frappe,adityahase/frappe,neilLasrado/frappe,manassolanki/frappe,tmimori/frappe,tundebabzy/frappe,RicardoJohann/frappe,mhbu50/frappe,frappe/frappe,tmimori/frappe,neilLasrado/frappe,tundebabzy/frappe,RicardoJohann/frappe,saurabh6790/frappe,yashodhank/frappe,neilLasrado/fr...
frappe/core/doctype/deleted_document/deleted_document.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sequana.featurecounts as fc\nfrom sequana import sequana_data\n\n\ndef test_featurecounts():\n RNASEQ_DIR_0 = sequana_data(\"featurecounts\") + \"/rnaseq_0\"\n RNASEQ_DIR_1 = sequana_data(\"featurecounts\") + \"/rnaseq_1\"\n ...
python
edit
2
1
bsd-3-clause
2cd634d22c74c742b0feb2aceef06c610a0fa378
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/test_featurecounts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom ...utils import get_backend\n\n\nclass Command(BaseCommand):\n help = \"Command to deduplicate tasks in a redis-backed queue\"\n\n def add_arguments(self, parse...
python
edit
1
3
bsd-3-clause
35c643aef0cb6b194e62cd5f2fcf7df98bf46870
thread/django-lightweight-queue,thread/django-lightweight-queue
django_lightweight_queue/management/commands/queue_deduplicate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .fields import TimeZoneField # noqa\nfrom .forms import TimeZoneFormField # noqa\n\n__version__ = '1.0'\n\n```\n\nApply this change: Add and __all__ designator to top-level" }, { "role": "assistant", "content": "__vers...
python
edit
1
0
bsd-2-clause
bc021f416530375066c67c117995bd44c2bac7d5
mfogel/django-timezone-field
timezone_field/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Module for the custom Django updatedata command.\"\"\"\n\nfrom django.core import management\n\n\nclass Command(management.base.BaseCommand):\n \"\"\"Required command class for the custom Django updatedata command.\"\"\"\n\n hel...
python
edit
1
1
mit
a303756c2e2735f5eb14b525b98894e985b40baf
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
csunplugged/general/management/commands/updatedata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on Dec 20, 2011\n\n@author: Tyranic-Moron\n'''\n\nfrom IRCMessage import IRCMessage\nfrom IRCResponse import IRCResponse, ResponseType\nfrom Function import Function\nfrom GlobalVars import *\n\nimport re\n\nclass Instantiate(F...
python
edit
4
6
mit
de907a982f172a43e9997b5f41e53bb5ee89a5eb
HubbeKing/Hubbot_Twisted
Functions/Join.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Tests for the extraction of neighbourhoods \"\"\"\nfrom nose.tools import *\nimport marble as mb\n\n\n# Test that for a grid, corners are not neighbours (.touch might have to go)\n# Test clustering on a situation\n\n\n```\n\nApply th...
python
edit
4
3
bsd-3-clause
eb1c913a0800e2d5eabf34e7abce96c8f4096d79
scities/marble,walkerke/marble
marble/tests/test_neighbourhoods.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Image Processing SciKit (Toolbox for SciPy)\"\"\"\n\n\nimport os.path as _osp\n\ndata_dir = _osp.abspath(_osp.join(_osp.dirname(__file__), 'data'))\n\nfrom version import version as __version__\n\ndef _setup_test():\n import gzip\n...
python
edit
5
2
bsd-3-clause
b57bd821f0df367aaf0c993bce87c60875b813d2
youprofit/scikit-image,michaelaye/scikit-image,robintw/scikit-image,almarklein/scikit-image,ofgulban/scikit-image,Hiyorimi/scikit-image,chintak/scikit-image,chintak/scikit-image,paalge/scikit-image,GaZ3ll3/scikit-image,michaelpacer/scikit-image,WarrenWeckesser/scikits-image,almarklein/scikit-image,dpshelio/scikit-image...
scikits/image/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom threading import local\n\nfrom apiclient import discovery\n\n_local = local()\n\n\ndef get_service(credentials):\n service = getattr(_local, 'service', None)\n if not service:\n service = discovery.build(serviceName='drive...
python
edit
1
2
mit
c998588fcc990f077a4f6d34f7d078c54aca1b3b
openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal
modules/google-earth-engine/docker/sepal-ee/sepal/drive/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\nimport json\nimport os.path\nfrom .util import string\n\nclass ConfigReader(object):\n def __init__(self, config_file_path):\n self._config = self._read(config_file_path)\n\n def _read(self, config_file_path):\n ...
python
edit
1
3
mit
582edd6bd36e8b40a37a8aaaa013704b5cd73ad6
bchretien/dotbot,imattman/dotbot,imattman/dotbot,anishathalye/dotbot,anishathalye/dotbot,bchretien/dotbot,bchretien/dotbot,imattman/dotbot
dotbot/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"@package Project\nThis module defines an interface to read and use InputGen projects\n\nSee C++ InputGen project for more details on Projects\n\"\"\"\n\nimport xml.etree.ElementTree as ET\nimport displacementKernels as kernels\n\nclas...
python
edit
4
6
apache-2.0
01c9de35395495e35113e5f9bbee8ebc88e1c0f1
NUAAXXY/globOpt,amonszpart/globOpt,amonszpart/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt
evaluation/packages/project.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n### Redis Options\nREDIS_HOST=\"localhost\"\nREDIS_PORT=6379\nREDIS_DB=1\n\n### Celery Options\nBROKER_URL=\"amqp://guest@localhost//\"\n\nCELERY_ROUTES = {'fuzzer.tasks.fuzz': {'queue': 'fuzzer'}, 'driller.tasks.drill': {'queue': 'driller'...
python
edit
1
0
bsd-2-clause
281629165a1b5cf00fb154ad262f3a592df2bba7
shellphish/driller
driller/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\n\nfrom wmt.config import site\nfrom wmt.models.submissions import prepend_to_path\nfrom wmt.utils.hook import find_simulation_input_file\nfrom topoflow_utils.hook import assign_parameters\n\n\nfile_list = ['rti_fil...
python
edit
3
4
mit
a040d06de7624371122960788aff241994ae08f8
csdms/wmt-metadata
metadata/SnowDegreeDay/hooks/pre-stage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport sys\n\nimport lexer as l\nimport parser as p\nimport evaluator as e\nimport context as c\nimport object as o\n\ndef main():\n if len(sys.argv) == 1:\n ctx = c.Context()\n \n...
python
edit
3
6
mit
3aac735425c532bdb565f31feab203a36205df4f
Zac-Garby/pluto-lang
__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nimport os\nimport shutil\n\n\nclass PCLReferenceAssembliesPackage(Package):\n def __init__(self):\n Package.__init__(self,\n name='PortableReferenceAssemblies-2014-04-14',\n ...
python
edit
5
2
mit
c2b5b1458a521b39fbefb9f13428587991d5e3e9
BansheeMediaPlayer/bockbuild,mono/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/pcl-reference-assemblies.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"smif\n\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nimport pkg_resources\nimport warnings\n\n__author__ = \"Will Usher, Tom Russell\"\n__copyright__ = \"Wil...
python
edit
1
0
mit
0c83621f80ad8a1c014cc2ee79ea024f6d073749
willu47/smif,nismod/smif,tomalrussell/smif,tomalrussell/smif,tomalrussell/smif,willu47/smif,willu47/smif,nismod/smif,nismod/smif,willu47/smif,nismod/smif,tomalrussell/smif
src/smif/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport enaml\n\nwith enaml.imports():\n from .bcolz_store import BColzStore\n from .display_value import DisplayValue\n from .event_log import EventLog\n from .epoch_counter import EpochCounter, GroupedEpochCounter\n from .te...
python
edit
9
0
mit
e39430a8d1870c744fcfb479a15c1a7eacca8a32
bburan/psiexperiment
psi/data/sinks/api.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add package datas in the module, with the new name and repo" }, { "role": "assistant", "content": "\"\"\"django-emoticons\"\"\"\n__version__ = '0.1'\n__license__ = 'BSD License'\n\n__author__ = 'Fantomas42'\n__email__ = '<EMAIL>'...
python
new_file
1
0
bsd-3-clause
960d38d139895dcefa946e29655d5f6eee3c4cf5
Fantomas42/django-emoticons,Fantomas42/django-emoticons
smileys/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext as _\nfrom django.contrib.auth.models import User\nfrom django.contrib.sites.models import Site\nfrom django.contrib.sites.managers import CurrentSiteManager\n\nfro...
python
edit
1
2
mit
b2c2c5ea21b7f14820937276148c280303db241b
stefanw/froide,LilithWittmann/froide,stefanw/froide,ryankanno/froide,ryankanno/froide,CodeforHawaii/froide,catcosmo/froide,CodeforHawaii/froide,stefanw/froide,ryankanno/froide,stefanw/froide,fin/froide,ryankanno/froide,okfse/froide,catcosmo/froide,CodeforHawaii/froide,catcosmo/froide,stefanw/froide,okfse/froide,okfse/f...
froide/frontpage/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nKaya Baber\nPhysics 440 - Computational Physics\nAssignment 5 - PDEs\nExploration 1 - Parabolic PDEs: Thermal Diffusion\n'''\n\nimport numpy as np\nfrom numpy import linalg as LA\nimport matplotlib.pyplot as plt\nimport math\n\n```\n\n...
python
edit
6
1
mit
30c9359e33f6ec85ffad227dd8b68f3352f92c36
KayaBaber/Computational-Physics
Assignment_5_partial_differentials/P440_Assign5_Exp1.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Remove default_app_config for Django 3.2 and newer\n\nRemovedInDjango41Warning: 'psqlextra' defines default_app_config = 'psqlextra.apps.PostgresExtraAppConfig'. Django now detects this configuration automatically. You can remove default_app...
python
new_file
1
0
mit
0cfd63816706531646bf496798bf093f8ee081ff
SectorLabs/django-postgres-extra
psqlextra/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._version import get_versions\n__version__ = get_versions()['version']\ndel get_versions\n\nimport os\nimport yaml\nfrom cerberus import Validator\n\nMODULE_DIR = os.path.dirname(os.path.abspath(__file__))\n\n# extension for iseven\ncl...
python
edit
5
3
mit
7223bf0bf3ecf3459e5e7c9f01af61a8236eaffd
PhasesResearchLab/ESPEI
espei/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm, widgets\n\nfrom .models import Fellow, Event, Expense, Blog\n\nclass FellowForm(ModelForm):\n class Meta:\n model = Fellow\n fields = '__all__'\n\n\nclass EventForm(ModelForm):\n class...
python
edit
1
0
bsd-3-clause
db81eaa5f05309be69f7b8d3aa12023c75387194
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
fellowms/forms.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# Script for displaying pretty RSS feeds\n#\n\nfrom sys import argv\nimport feedparser\n\n# Data for parsing\ndata = feedparser.parse(argv[1])\n\n# Display core feed properties\nprint \"\\...
python
edit
8
0
mit
54fddabcb1609755281adc54d6a71bea6c697f43
ZDroid/feedstyl
parser.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = '1.6.7'\nrevision = ' development'\nmilestone = 'Yoitsu'\nrelease_number = '92'\nprojectURL = 'https://syncplay.pl/'\n\n```\n\nApply this change: Mark as 1.6.7 beta 1" }, { "role": "assistant", "content": "version = '1...
python
edit
1
0
apache-2.0
a7b247d7fc44518b58a91eeadc12ac418daf3889
alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay,alby128/syncplay
syncplay/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plotly as py\nimport plotly.graph_objs as go\nfrom datetime import datetime\nfrom sys import argv\n\nimport names\nfrom csvparser import parse\n\ndata_file = argv[1]\nraw_data = parse(data_file)\n\nsleep_durations = []\nsleep_dates =...
python
edit
1
0
mit
fdf7f92a76fb6848f86194507b9a6fe8f0ab0171
f-jiang/sleep-pattern-grapher
hours_slept_time_series.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Problem 12 of https://projecteuler.net\"\"\"\n\nfrom projecteuler.maths_functions import factor_count\nfrom itertools import count\n\n\ndef problem_12():\n \"\"\"Solution to problem 12.\"\"\"\n # Triangle number can be defined a...
python
edit
1
4
mit
457e220ec4a401325b5078c6561c4ca8634d8b60
hjheath/ProjectEuler,heathy/ProjectEuler
projecteuler/problems/problem_12.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport github\nfrom get_repos import *\n\n\nwebservices = []\n\nfor repo in expanded_repos_list(orgs):\n try:\n metadata = get_remote_yaml(repo, 'openedx.yaml')\n except github.GithubException:\n continue\n if 'tags' ...
python
edit
1
0
apache-2.0
4647183697170ce22910bd6cde27746297543514
edx/repo-tools,edx/repo-tools
python3_tools/get_edx_webservices.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\n\nfrom pale.adapters import flask as pale_flask_adapter\n\nfrom tests.example_app import api\n\n\ndef create_pale_flask_app():\n \"\"\"Creates a flask app, and registers a blueprint bound to pale.\"\"\"\n blueprint = fla...
python
edit
1
1
mit
647707293524440f014ed0a3ef7d4322a96775e4
Loudr/pale
tests/example_app/flask_app.py
rejected_duplicate
Near-duplicate of sample 852
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.bootstrap import Bootstrap\nfrom flask.ext.mail import Mail\nfrom flask.ext.moment import Moment\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom flask.ext.login import LoginManager\nfrom config imp...
python
edit
1
1
mit
22db373a8b33b201a8964b3f518434289b2a57af
richgieg/flask-now,richgieg/flask-now
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom lxml import html, etree\n\ndef scrape_acm(page):\n tree = html.fromstring(page.content)\n author_affiliations = []\n authors = tree.xpath('//td/a[@title=\"Author Profile Page\"]')\n for a in authors:\n ...
python
edit
3
4
mit
e1985056a11ca3fff3896d2e4126b6cdf048336d
Twinklebear/dataviscourse-pr-collaboration-networks,Twinklebear/dataviscourse-pr-collaboration-networks,Twinklebear/dataviscourse-pr-collaboration-networks
scrape_affiliation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# File: grains.py\n# Purpose: Write a program that calculates the number of grains of wheat\n# on a chessboard given that the number on each square doubles.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Dat...
python
edit
1
4
mit
88393283ff5e7f7720a98eda5eec8fa53b30f700
amalshehu/exercism-python
grains/grains.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User, Group\nfrom waterfall_wall.models import Image\nfrom rest_framework import serializers\n\n\nclass ImageSerializer(serializers.HyperlinkedModelSerializer):\n url = serializers.SerializerMethodF...
python
edit
4
1
mit
d60d4a039008775b80a56eda4830f06ab9250f2c
carlcarl/rcard,carlcarl/rcard
waterfall_wall/serializers.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom optparse import make_option\nfrom django.core.management.base import BaseCommand\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Command(BaseCommand)...
python
edit
3
9
bsd-3-clause
6321d2e86db0de359886f5e69509dad428778bbf
jrief/django-shop,jrief/django-shop,divio/django-shop,awesto/django-shop,nimbis/django-shop,nimbis/django-shop,khchine5/django-shop,awesto/django-shop,jrief/django-shop,nimbis/django-shop,awesto/django-shop,khchine5/django-shop,nimbis/django-shop,jrief/django-shop,divio/django-shop,khchine5/django-shop,divio/django-sho...
shop/management/commands/shopcustomers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n\nimport argparse\nimport subprocess\nimport sys\n\n\nEXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db']\n\n\ndef main():\n args = parse_args()\n # Normally we like to...
python
edit
2
9
apache-2.0
9accbde96f493ba795eef3d102a41aeecc039dce
sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal
grep_sal_code.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nlog = logging.getLogger(__name__)\n\nfrom uuid import UUID\n\nfrom pyramid.compat import string_types\n\nfrom .... import models as m\n\nclass Entries(object):\n \"\"\"Entries\n\n Traversal object for a site ID\n \"...
python
edit
4
2
isc
69ce80d9bbba46a7934802f4693877cb26903f99
usingnamespace/usingnamespace
usingnamespace/api/traversal/v1/entries.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# --------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license...
python
edit
1
0
mit
1df4a955e80fc82cc88c049e2d9a606845cfb326
Azure/azure-sdk-for-python,AutorestCI/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,lmazuel/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom .exceptions import ImproperlyConfigured\nfrom .utils import safe_join\n\n\nclass BaseFinder(object):\n\n def find(self, path, all=False):\n raise NotImplementedError()\n\n\nclass FileSystemFinder(BaseFinder):\n\n ...
python
edit
1
5
isc
48f281127eb1adf2c1a88dee3759cec41fb95924
gears/gears,gears/gears,gears/gears
gears/finders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom r2.lib.plugin import Plugin\nfrom r2.lib.js import Module\n\n\nclass Adzerk(Plugin):\n needs_static_build = True\n\n js = {\n 'reddit': Module('reddit.js',\n 'adzerk/adzerk.js',\n )\n }\n\n def load...
python
edit
1
1
bsd-3-clause
1ec5327918e11f76cb3d0dd2699585433d4d6058
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
reddit_adzerk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport types\nfrom django.core import urlresolvers as django_urlresolvers\nfrom django.utils.functional import curry\n\nclass DecoratorMixin(object):\n \"\"\"\n Mixin class to return decorated views from RegexURLPattern/RegexURLReso...
python
edit
1
3
bsd-3-clause
4227b5fb52c58304f993d2def11aeb1ed4d5a157
mila/django-urldecorators,mila/django-urldecorators
src/urldecorators/urlresolvers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nimport getopt\nimport sys\n\ndef usage():\n\tprint(\"usage: \" + sys.argv[0] + \" -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results\")\n\nif __name__ == '__main__':\n\tdict_file = postings_file = qu...
python
edit
3
1
mit
9663799d57a2790417e7d2fb9b1672de4d3a0059
ikaruswill/vector-space-model,ikaruswill/boolean-retrieval
search.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom flask import Flask, request\nimport psycopg2\nimport json\n\napp = Flask(__name__)\n\nDATABASE_URL = os.environ['DATABASE_URL']\n\nconn = psycopg2.connect(DATABASE_URL)\n\n@app.route('/find')\ndef find():\n lat = request....
python
edit
1
2
mit
cb774e9950510b559bdccc25d368eccc7b42cb06
noppanit/street-parking-nyc
server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom pupa.utils import JSONEncoderPlus\nfrom contextlib import contextmanager\nfrom pymongo import Connection\nimport argparse\nimport json\nimport os\n\nparser = argparse.ArgumentParser(description='Re-convert a juri...
python
edit
3
2
bsd-3-clause
5283bddb36bf4016609c130ddbe63cb234dceb73
influence-usa/pupa,datamade/pupa,influence-usa/pupa,rshorey/pupa,opencivicdata/pupa,mileswwatkins/pupa,opencivicdata/pupa,rshorey/pupa,mileswwatkins/pupa,datamade/pupa
tools/ocd_restore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nimport sublime, sublime_plugin\n\nclass TotalFileCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\tcleaned = []\n\t\tnumbers = []\n\n\t\tregion = sublime.Region(0, self.view.size());\n\n\t...
python
edit
1
7
mit
d924576329c4a1d7814be2ed7da3ddd96a108c47
RichardHyde/SublimeText.Packages
TotalFile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2014 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.\nimport sys\nimport os\n\n\nfrom tvcm import project as project_module\n...
python
edit
3
2
bsd-3-clause
231902d06b1f7fe3bcd7318f933427cdd3c17d6e
bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer
trace_viewer/trace_viewer_project.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\r\n\r\nclass Getwork_store:\r\n \r\n def __init__(self):\r\n self.data = {}\r\n \r\n def add(self, server, merkle_root):\r\n self.data[merkle_root] = {'name':server[\"name\"], 'timestamp':time.time()}\r...
python
edit
1
3
mit
9aafe3ded97aee0f8f3623f0de1c13cfb555d7a6
c00w/bitHopper,c00w/bitHopper
getwork_store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Created by JHJ on 2016. 10. 5.\n\nfrom django.conf.urls import url\n\nfrom . import views\n\napp_name = 'board'\nurlpatterns = [\n url(r'^$', views.board_list, name='board_list'),\n url(r'^(?P<board_slug>[-\\w]+)/$', views.post_list...
python
edit
1
0
mit
02b87b94e07626a5db5ef548b234c270e5fb05e0
guswnsxodlf/k-board,cjh5414/kboard,hyesun03/k-board,hyesun03/k-board,cjh5414/kboard,hyesun03/k-board,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,cjh5414/kboard,darjeeling/k-board,kboard/kboard,guswnsxodlf/k-board
kboard/board/urls.py
rejected_duplicate
Near-duplicate of sample 11132
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Roman(object):\n\n def __init__(self, number):\n self.number = number\n self.modern_convert()\n convert_table = {}\n\n def modern_convert(self):\n number = self.number\n solution = []\n while True:\n if number...
python
edit
5
9
mit
f0a20db6da65b82ddafd22effbc0d5a7bb17f9e6
Bigless27/Python-Projects
Roman-Numerals/Roman.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport ecto\nimport ecto_test\n\ndef test_feedback():\n plasm = ecto.Plasm()\n g = ecto_test.Generate(\"Generator\", step=1.0, start=1.0)\n add = ecto_test.Add()\n source,sink = ecto.EntangledPair()\n ...
python
edit
1
1
bsd-3-clause
2ac185e96c4a6af91ab3df9d53f4436cd257a5fc
stonier/ecto,v4hn/ecto,stonier/ecto,drmateo/ecto,drmateo/ecto,drmateo/ecto,stonier/ecto,v4hn/ecto,v4hn/ecto,drmateo/ecto,stonier/ecto,v4hn/ecto,drmateo/ecto
test/scripts/test_entanglement.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom Sensor import SenseController\nfrom KeyDispatcher import KeyDispatcher\nfrom Display import Display\nfrom DataLogger import SQLiteLogger\n\n\nDEVICE = \"PiSense\"\n\n\nclass Handler:\n def __init__(self, di...
python
edit
1
2
mit
d85b58a0edce8321312eff66f16fc72439e4426a
thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x
app/sense.py
rejected_duplicate
Near-duplicate of sample 9477
true