messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport os\n\nimport pytest\nfrom os.path import join, dirname\nfrom glob import glob\n\n# tests to exclude\nexcludes = ['authorization_v1.py', 'alchemy_data_news_v1.py', 'alchemy_language_v1.py']\n\n# examples path. /examp...
python
edit
1
6
apache-2.0
4b459a367c67b40561b170b86c2df8882880d2be
ehdsouza/python-sdk,ehdsouza/python-sdk,ehdsouza/python-sdk
test/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport logging\nlogger = logging.getLogger('keyring')\n\nfrom .core import (set_keyring, get_keyring, set_password, get_password,\n delete_password)\nfrom .getpassbackend import ge...
python
edit
1
0
mit
285f4e21190d28e4e3b26dc62b9fd396de1db24e
jaraco/keyring
keyring/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#ckwg +4\n# Copyright 2012 by Kitware, Inc. All Rights Reserved. Please refer to\n# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,\n# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.\n\n\ndef test_error...
python
edit
1
5
bsd-3-clause
6d2255b6f44a18bae0b50fb528564c6767683c68
Kitware/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,mathstuf/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,Kitware/sprokit
src/bindings/python/test/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import partial\nfrom itertools import imap\nfrom itertools import islice\nfrom itertools import izip_longest\nfrom itertools import ifilter\nfrom operator import itemgetter\nfrom operator import is_not\n\n\ndef yield_getter_o...
python
edit
1
3
apache-2.0
61d71b27111f255c3dad3f974e6c7e0ace0c2ce9
johnwlockwood/stream_tap,johnwlockwood/karl_data,johnwlockwood/iter_karld_tools,johnwlockwood/stream_tap
karld/iter_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n#\n# Copyright 2015 Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License...
python
edit
1
0
apache-2.0
654d3c666fd963760445f6ae8a6ba745ba85e014
enovance/dci-control-server,redhat-cip/dci-control-server,redhat-cip/dci-control-server,enovance/dci-control-server
dci/server/tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sympy.core.compatibility import default_sort_key, as_int, ordered\nfrom sympy.core.singleton import S\nfrom sympy.utilities.pytest import raises\n\nfrom sympy.abc import x\n\n\ndef test_default_sort_key():\n func = lambda x: x\n ...
python
edit
3
1
bsd-3-clause
a8a257ef2bfb63d175f7db1cb91924adae125b5c
Mitchkoens/sympy,Sumith1896/sympy,kaichogami/sympy,sunny94/temp,jamesblunt/sympy,pbrady/sympy,Vishluck/sympy,Titan-C/sympy,jaimahajan1997/sympy,kevalds51/sympy,yukoba/sympy,kevalds51/sympy,abhiii5459/sympy,debugger22/sympy,kumarkrishna/sympy,lindsayad/sympy,Vishluck/sympy,souravsingh/sympy,debugger22/sympy,yashsharan/s...
sympy/core/tests/test_compatibility.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Listener Class Override\nimport time\nimport json\nfrom tweepy.streaming import StreamListener\nimport sys\n\nclass Listener(StreamListener):\n def __init__(self, twitter_api, start_time=time.time()):\n self.time = start_time\n ...
python
edit
8
3
mit
56b85e7f995eb460a5e6fedb9f2296e430d17e96
robot-overlord/syriarightnow
listener.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom blogtrans.ui.MainWindow import *\nimport sys, traceback\nimport getopt\nimport wx\n\n# Importers / Exporters\nfrom blogtrans.wretch.WretchImporter import WretchImporter\nfrom blogtrans.mt import *\n\nfrom blogtrans.blogger.BloggerExpor...
python
edit
5
7
mit
2733cf558a7455eb017ec4690307a2ee18afbd8b
miaout17/blogtrans,miaout17/blogtrans
blogtrans.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nVerseBot for reddit\nBy Matthieu Grieger\nwebparser.py\nCopyright (c) 2015 Matthieu Grieger (MIT License)\n\"\"\"\n\nfrom bs4 import BeautifulSoup\nfrom urllib.request import urlopen\n\nclass Parser:\n \"\"\" Parser class for Bib...
python
edit
1
4
mit
10db07f1fc432f6f3e1e530d28cfbfd6ada0a321
Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot
versebot/webparser.py
rejected_duplicate
Near-duplicate of sample 16524
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom logging import getLogger\nfrom pkg_resources import get_distribution\n\nfrom django import apps\n\nlog = getLogger(__name__)\n\n\nclass AppConfig(apps.AppConfig):\n name = \"axes\"\n initialized = False\n\n @classmethod\n d...
python
edit
1
6
mit
aae0e295ef1c020371831aa9145820d8678670f7
jazzband/django-axes
axes/apps.py
rejected_duplicate
Near-duplicate of sample 2679
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conans import ConanFile\nimport os\n\n\nclass ArghConan(ConanFile):\n name = \"argh\"\n version = \"1.2.0\"\n url = \"https://github.com/adishavit/argh\"\n description = \"Argh! A minimalist argument handler.\"\n license...
python
edit
3
1
bsd-3-clause
eac6629dca5a368048b4d2eeec30f760efd867a1
adishavit/argh,adishavit/argh
conanfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import gettext as _\nfrom django.utils.translation import gettext_lazy\n\n\nclass PasswordViewRestrictionForm(forms.Form):\n password = forms.CharField(label=gettext_lazy(\"Password...
python
edit
1
2
bsd-3-clause
6d660b0c27029817bc20406454ba565d09cfa31d
zerolab/wagtail,takeflight/wagtail,rsalmaso/wagtail,gasman/wagtail,thenewguy/wagtail,takeflight/wagtail,gasman/wagtail,mixxorz/wagtail,kaedroho/wagtail,FlipperPA/wagtail,rsalmaso/wagtail,wagtail/wagtail,thenewguy/wagtail,rsalmaso/wagtail,takeflight/wagtail,wagtail/wagtail,jnns/wagtail,torchbox/wagtail,mixxorz/wagtail,m...
wagtail/core/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os \nsys.path.append(os.path.join(os.path.dirname(__file__), \"..\")) \n\nimport messagebird\n\nACCESS_KEY = 'test_gshuPaZoeEG6ovbc8M79w0QyM'\n\ntry:\n # Create a MessageBird client with the specified ...
python
edit
1
0
bsd-2-clause
9d95974bb35ab6e7286fe762def7f117944268f0
messagebird/python-rest-api
examples/balance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n migrations.swappable...
python
edit
1
0
bsd-3-clause
fc8318361755d7327fc6e02dbbd68a6221acad34
Top20Talent/django-impersonate,Top20Talent/django-impersonate
impersonate/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.auth.models import User\nfrom django.http import HttpResponse\nfrom django.views.generic.base import TemplateView\nfrom django.views.decorators.csrf import csrf_exempt\nimport redis\nfrom ws4redi...
python
edit
1
1
mit
ef4bd591abc794211624c0723d15cfa311370bb2
schinckel/django-websocket-redis
examples/chatserver/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom settings import *\nimport settings\n\nTEMPLATE_DIRS_BASE = TEMPLATE_DIRS\n\nTEMPLATE_DIRS = (\n '%s/library/templates/mobile/auth' % ROOT_PATH, \n '%s/library/templates/mobile' % ROOT_PATH, \n)\n\n\nTEMPLATE_DIRS += TEMPLAT...
python
edit
7
0
bsd-3-clause
7b758788bdf8ca52d6b75892d8ee97484188d699
srilatha44/threepress,srilatha44/threepress,srilatha44/threepress,srilatha44/threepress
bookworm/settings_mobile.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, os.path\nimport random\nimport string\nimport json\n\nimport cherrypy\n\n\nfrom . import get_pic\n\n\n\nclass StringGenerator(object):\n @cherrypy.expose\n def index(self):\n return \"\"\"<html>\n <head>\n ...
python
edit
4
1
mit
d883208fa4084e06aa0f19ba7031566f33260e23
DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat
lib/web/web.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"A tiny tool used to test the `convert` plugin. It copies a file and appends\na specified text tag.\n\"\"\"\n\nimport sys\n\n\ndef convert(in_file, out_file, tag):\n \"\"\"Copy `in_file` to `out_file` and ap...
python
edit
1
2
mit
fc3f64de95554a66e2ec64804acf9c6032dd7e7b
madmouser1/beets,jcoady9/beets,jcoady9/beets,xsteadfastx/beets,madmouser1/beets,diego-plan9/beets,Kraymer/beets,jackwilsdon/beets,sampsyo/beets,beetbox/beets,MyTunesFreeMusic/privacy-policy,shamangeorge/beets,pkess/beets,Kraymer/beets,mosesfistos1/beetbox,Kraymer/beets,sampsyo/beets,lengtche/beets,pkess/beets,xsteadfas...
test/rsrc/convert_stub.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\n\ndef parse(html):\n soup = BeautifulSoup(html, features=\"html.parser\")\n return soup.get_text()\n```\n\nApply this change: Add support for html2text or no parser Will still prefer beautifulsoup4 if in...
python
edit
1
2
mit
9dad4f997371011ee7fe9f6ecd0c1a58cbba6d27
idiotandrobot/heathergraph
html_parse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nimport unittest\nfrom harness import MockRouter\n\nclass TestLog(unittest.TestCase):\n def test_backend_irc (self):\n router = MockRouter()\n try:\n import i...
python
edit
2
2
bsd-3-clause
a4931218fbb00d646dbc8de6f8861e4647ef7ab4
catalpainternational/rapidsms,caktus/rapidsms,ken-muturi/rapidsms,rapidsms/rapidsms-core-dev,catalpainternational/rapidsms,caktus/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,rapidsms/rapidsms-core-dev,lsgunth/rapidsms,dimagi/rapidsms,ken-muturi/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,lsgunth/rapidsms,ehealth...
lib/rapidsms/tests/test_backend_irc.py
rejected_duplicate
Near-duplicate of sample 4296
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport gst\n\nfrom mopidy import config\nfrom mopidy.backends import BaseBackend\nfrom mopidy.models import Artist, Album, Track, Playlist\n\nlogger = logging.getLogger(u'backends.gstreamer')\n\nclass GStreamerBackend(Base...
python
edit
8
2
apache-2.0
c21fe453911af190f3cbd93356396d4f5e65195e
vrs01/mopidy,bacontext/mopidy,vrs01/mopidy,quartz55/mopidy,priestd09/mopidy,swak/mopidy,liamw9534/mopidy,hkariti/mopidy,pacificIT/mopidy,ZenithDK/mopidy,hkariti/mopidy,dbrgn/mopidy,kingosticks/mopidy,ZenithDK/mopidy,diandiankan/mopidy,vrs01/mopidy,hkariti/mopidy,pacificIT/mopidy,ali/mopidy,SuperStarPL/mopidy,adamcik/mo...
mopidy/backends/gstreamer.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''Unit tests for CODA binary serialization'''\nimport io\nimport unittest\nfrom coda import descriptors\nfrom coda.io.binarycodec import BinaryCodec\nfrom coda.runtime.descdata import BoolValue\n\nclass BinaryCodecTest(unittest.TestCase):\...
python
edit
1
1
apache-2.0
454ee9051bd8d949eb290fb4d3a622941c9ccc74
viridia/coda,viridia/coda,viridia/coda
test/python/test_binarycodec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, Response, request, jsonify\nfrom ldap3 import Server, Connection, ALL\nimport json\nimport re\n\napp = Flask(__name__) # create the application instance :)\n\n@app.route('/')\ndef hello_world():\n return 'Hello, ...
python
edit
9
1
mit
22f01c8727377fcbeb68489c9658443dd9e367dc
cthit/nickIT,cthit/nickIT,cthit/nickIT
flask-app/nickITAPI/app.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\n\nimport subprocess\nimport sys\nfrom typing import Optional\n\nfrom .typing import Command\n\n\nclass CommandError(Exception):\n @property\n def cmd(self) -> Optional[Com...
python
edit
1
1
mit
ebafc242445e1a8413cd6afd45ae53d989850f9e
thombashi/subprocrunner,thombashi/subprocrunner
subprocrunner/error.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport re\nimport subprocess\nimport urlparse\nimport platform\nfrom BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer\n\nclass OpenRemoteHandler(BaseHTTPRequestHandler):\n\n def do_GET(self):\n ...
python
edit
3
3
mit
00f270137c460361537f979adc9da18a38324f2f
chuckbjones/openremote,chuckbjones/openremote,chuckbjones/openremote,chuckbjones/openremote
openremote-server-python/openremote.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# FP Type annotation counts as redefinition\n# See https://github.com/Semmle/ql/issues/2652\n\ndef type_annotation(x):\n foo = 5\n if x:\n foo : int\n do_stuff_with(foo)\n else:\n foo : float\n do_other_...
python
edit
5
2
mit
bbcbcefedcbff4cfd7a16cbfa904b42462f1ee88
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
python/ql/test/query-tests/Variables/unused/type_annotation_fp.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .context import tohu\nfrom tohu.v5.primitive_generators import *\n\n\nEXEMPLAR_PRIMITIVE_GENERATORS = [\n Constant(\"quux\"),\n Integer(100, 200),\n]\n\nEXEMPLAR_DERIVED_GENERATORS = []\n\nEXEMPLAR_GENERATORS = EXEMPLAR_PRIMITIVE...
python
edit
8
0
mit
7f0097d240c4a231029222fdd2bf507ca7d5b2ed
maxalbert/tohu
tests/v6/exemplar_generators.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.test import TestCase\n\nfrom .models import Session\nfrom .models import Spec\n\n# if self.name == '':\n# names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('n...
python
edit
4
2
mit
d4070aaee0e086b934912982d77126af53e9ade8
uxebu/tddbin-backend,uxebu/tddbin-backend
src/core/tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the general model with explicit one-half spin.\"\"\"\n\nimport pytest\n\nfrom drudge import UP, DOWN, SpinOneHalfGenDrudge\n\n\n@pytest.fixture(scope='module')\ndef dr(spark_ctx):\n \"\"\"The fixture with a general spin o...
python
edit
1
4
mit
57f3141bf61fe74cc4ba3472f42640e0fada0f44
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/spin_one_half_gen_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\nimport logging\n\nfrom bitshares.aio.block import Block\n\nlog = logging.getLogger(\"grapheneapi\")\nlog.setLevel(logging.DEBUG)\n\n\n@pytest.mark.asyncio\nasync def test_aio_block(bitshares):\n bl...
python
edit
1
1
mit
f1e7776b8c01081bf54c2c1be0dc2c15e5566ec9
xeroc/python-bitshares
tests/testnet/aio/test_block.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom tests.frontends.mpd import protocol\n\n\nclass AudioOutputHandlerTest(protocol.BaseTestCase):\n def test_enableoutput(self):\n self.sendRequest('enableoutput \"0\"')\n self.as...
python
edit
1
1
apache-2.0
c3e88993964f1c775829fc2f14aea2e84d33c099
jmarsik/mopidy,mopidy/mopidy,priestd09/mopidy,hkariti/mopidy,rawdlite/mopidy,adamcik/mopidy,vrs01/mopidy,ZenithDK/mopidy,ali/mopidy,bacontext/mopidy,kingosticks/mopidy,jcass77/mopidy,bacontext/mopidy,mopidy/mopidy,glogiotatidis/mopidy,bacontext/mopidy,woutervanwijk/mopidy,diandiankan/mopidy,bencevans/mopidy,dbrgn/mopid...
tests/frontends/mpd/protocol/audio_output_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update meta_generator to match case insensitive" }, { "role": "assistant", "content": "def meta_generator(name):\n return '//meta[re:test(@name,\"generator\",\"i\") and contains(@content, \"{}\")]' \\\n '/@content'....
python
new_file
1
1
mit
7226e9ae349eadba10d8f23f81df0b4d70adb6a2
spectresearch/detectem
detectem/plugins/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport quantities as pq\n\n\n# At least up to quantities 0.10.1 the additional arguments to the min and max\n# function did not get passed along.\n# A fix already exists:\n# <https://github.com/dopple...
python
edit
1
1
bsd-3-clause
b5e239d96b9349b2b21b1d8703a5d3f232f871b4
rproepp/spykeutils
spykeutils/monkeypatch/quantities_patch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import Extension\nfrom os.path import dirname, join, relpath, exists\n\nASTROPY_UTILS_ROOT = dirname(__file__)\n\ndef get_extensions():\n return [\n Extension('astropy.utils._compiler',\n [relp...
python
edit
1
1
bsd-3-clause
5228bbadc94159c084f4da77fcebdee3e0733b06
lpsinger/astropy,saimn/astropy,astropy/astropy,pllim/astropy,mhvk/astropy,lpsinger/astropy,larrybradley/astropy,MSeifert04/astropy,StuartLittlefair/astropy,StuartLittlefair/astropy,pllim/astropy,tbabej/astropy,kelle/astropy,AustereCuriosity/astropy,StuartLittlefair/astropy,stargaser/astropy,aleksandr-bakanov/astropy,as...
astropy/utils/setup_package.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n###############################################################################\n# Copyright Kitware Inc.\n#\n# Licensed under the Apache License, Version 2.0 ( the \"License\" );\n# you ...
python
edit
1
3
apache-2.0
ac7c04f76ad4276c34e000a065b6bc900f941ee5
msmolens/girder,salamb/girder,jbeezley/girder,Kitware/girder,data-exp-lab/girder,sutartmelson/girder,opadron/girder,Xarthisius/girder,manthey/girder,essamjoubori/girder,Kitware/girder,sutartmelson/girder,Xarthisius/girder,essamjoubori/girder,kotfic/girder,RafaelPalomar/girder,sutartmelson/girder,kotfic/girder,Kitware/g...
girder/utility/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport pyramid.testing\n\nfrom nflpool.tests.web_settings import settings\n\n\nclass HomeControllerTests(unittest.TestCase):\n def setUp(self):\n from nflpool import main\n\n app = main({}, **settings, logg...
python
edit
3
1
mit
d8d8473e9fd61219f75b64b5bf3c703599b7f09b
prcutler/nflpool,prcutler/nflpool
tests/controller/test_home_controller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport ramrod\n\nproject = u'stix-ramrod'\ncopyright = u'2015, The MITRE Corporation'\nversion = ramrod.__version__\nrelease = version\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.doctest',\n 'sphinx.ext.int...
python
edit
1
0
bsd-3-clause
14f0b7e25a795a853b79f781632edb2b82c3b904
STIXProject/stix-ramrod
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport io\nfrom typing import Any, ContextManager\n\nimport numpy as np\nfrom PIL import Image\nfrom ipywidgets import widgets\n\nfrom puzzle.puzzlepedia import _common\nfrom puzzle.steps import step\n\n\ndef DebugDataWidget(s: step.Step, c...
python
edit
1
10
mit
712741d4c6189e9cb000935676269e84a1be455b
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
src/puzzle/puzzlepedia/debug_data_widget.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom crate.theme.rtd.conf.python import *\n\n\nif \"sphinx.ext.intersphinx\" not in extensions:\n extensions += [\"sphinx.ext.intersphinx\"]\n\n\nif \"intersphinx_mapping\" not in globals():\n intersphinx_mapping = {}\n\n\nintersphinx...
python
edit
4
0
apache-2.0
99daef4c39d89ac41c02533e8c6becd67f5c76b5
crate/crate-python,crate/crate-python
docs/conf.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nimport feedparser\nfrom bs4 import BeautifulSoup\nimport boto3\nfrom PIL import Image\nimport requests\nimport logging\n\nNINEGAG_RSS_URL = 'http://www.15minutesoffame.be/9gag/rss/9GAG_-_Trending.atom'\n\n\ndef main():\n f...
python
edit
1
4
mit
03590da0c3ffceb97ccc15c458ca29a18290f559
sevazhidkov/leonard
jobs/collect_9gag_posts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import ListView\n\nfrom topics.models import Topic, TopIssue\n\n\nclass LandingView(ListView):\n model = Topic\n template_name = 'landing.html'\n\n def get_context_data(self, **kwargs):\n context = ...
python
edit
1
1
mit
00b31f3025493942c0ce7eb03c7cc09abf0eb8d0
texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84
txlege84/core/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_caching import Cache\n\nimport main\n\n\napp = Flask(__name__)\ncache = Cache(app, config={'CACHE_TYPE': 'simple'})\n\n\n@app.route('/')\ndef display_available():\n content = ('<html>' +\n ...
python
edit
1
2
bsd-3-clause
57f4b34a70a3506f1fb1e1842b3e75dc977bfe18
talavis/kimenu
flask_app.py
rejected_duplicate
Near-duplicate of sample 13278
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"Config file for the cleaning - plotting and notebook process\"\"\"\n\n\nclass CleaningConfig:\n\n # Unprocessed dataset\n raw_data = './dataset/raw_results-survey245554.csv'\n ...
python
edit
1
0
bsd-3-clause
a9bc4d98e8b61b63c14a2a5f1e11c85d91747f30
softwaresaved/international-survey
analysis/data_process/uk_2017/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys, urllib, webbrowser\n\ndef tracestack():\n try:\n last_error = sys.last_value\n except:\n raise Exception(\"No error message available.\")\n error_query = urllib.urlencode(\"[python] \" + str(last_error))\n...
python
edit
1
2
mit
a303d4d0491abf91c8f2856527d0b3566f704b90
kod3r/tracestack,danrobinson/tracestack
tracestack/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nfrom django.conf import settings\n\nimport os\nimport uuid\nfrom boto.s3.key import Key\nfrom boto.s...
python
edit
1
3
apache-2.0
e99196e14cd258960ad188875723178579b4dbf4
aaronxsu/raster-foundry,aaronxsu/raster-foundry,kdeloach/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,kdeloach/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,kdeloa...
src/rf/apps/workers/image_validator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest2\nimport datetime\n\nfrom google.appengine.ext import testbed\n\nfrom datafeeds.datafeed_fms import DatafeedFms\n\n\nclass TestDatafeedFmsTeams(unittest2.TestCase):\n\n def setUp(self):\n self.testbed = testbed.Tes...
python
edit
3
3
mit
f73775980e37b51882bfbd21f609ddfda807b8c8
phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,jaredhasenklein/the-blue-alliance,phil-lopreiato/the-blue-alliance...
tests/test_datafeed_fms_teams.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport socket\n\n\nTCP_IP = '127.0.0.1'\nTCP_PORT = 54321\nBUFFER_SIZE = 20 # Normally 1024, but we want fast response\n\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.bind((TCP_IP, TCP_PORT))\ns.listen(...
python
edit
3
0
mit
ad257e7730d03df984124493814656930bcb0b5f
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Communication/tcpServer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom locators_51 import *\nimport copy\n\nnpsp_lex_locators = copy.deepcopy(npsp_lex_locators)\nnpsp_lex_locators['delete_icon']='//span[contains(text() ,\"{}\")]/following::span[. = \"{}\"]/following-sibling::a/child::span[@class = \"delet...
python
edit
3
0
bsd-3-clause
c6346fa2c026318b530dbbdc90dbaee8310b6b05
SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus
robot/Cumulus/resources/locators_50.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.core.management import BaseCommand\nfrom django.conf import settings\n\n\ndef dump_attrs(obj_instance):\n for attr in dir(obj_instance):\n if attr != attr.upper():\n continue\n yield attr...
python
edit
4
6
bsd-3-clause
f863f37a05855180dce40181a27e7925f0662647
weijia/djangoautoconf,weijia/djangoautoconf
djangoautoconf/management/commands/dump_settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os.path\nimport subprocess\nimport argparse\nimport shutil\n\n\ncl_parser = argparse.ArgumentParser()\nargs = cl_parser.parse_args()\n\nos.chdir(os.path.abspath(os.path.dirname(__file__)))\n\nif not os.path.exi...
python
edit
2
0
apache-2.0
e778a2da7938dcf565282635e395dc410ef989d6
aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib
terraform-gce/worker/generate-certs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Manage society membership by checking member IDs and adding new members\"\"\"\n\nimport sqlite3\n\nclass MemberDatabase:\n def __init__(self, dbFile = 'members.db', safe = True):\n self.__connection = sqlite3.connect(dbFile)...
python
edit
6
2
mit
ffdd45d798eaf1349e12fc061789daacdefcd05c
NullInfinity/socman,NullInfinity/society-event-manager
membership.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom rich.highlighter import NullHighlighter\n\n\ndef test_wrong_type():\n highlighter = NullHighlighter()\n with pytest.raises(TypeError):\n highlighter([])\n\n```\n\nApply this change: Add tests for EUI-48 and ...
python
edit
1
1
mit
d47ba3167b60710efe07e40113150b53c88e7d85
willmcgugan/rich
tests/test_highlighter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib import request\n\nfrom bs4 import BeautifulSoup\n\n\nclass AbstractScraper():\n\n def __init__(self, url, test=False):\n if test:\n # when testing, we simply load a file\n self.soup = BeautifulSou...
python
edit
1
2
mit
356c9cd23ebf4953af169f38126fd521b49ca6c4
hhursev/recipe-scraper
recipe_scrapers/_abstract.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom sequana.gui import messages\nfrom PyQt5 import QtWidgets as QW\n\napp = QW.QApplication(sys.argv)\n\ndef test_warning():\n w = messages.WarningMessage(\"test\")\n\n\ndef test_critical():\n w = messages.CriticalMessage...
python
edit
4
1
bsd-3-clause
d371c92e999aa90df39887a33901fdaa58f648f1
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/gui/test_messages.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport os\n\nfrom mopidy.mixers.denon import DenonMixer\n\nclass DenonMixerDeviceMock(object):\n def __init__(self):\n self._open = True\n self.ret_val = bytes('00')\n\n def write(self, x):\n pass...
python
edit
3
2
apache-2.0
631983a14f941fa745b6e7f4b32fe1ef697d5703
mokieyue/mopidy,diandiankan/mopidy,bacontext/mopidy,tkem/mopidy,bacontext/mopidy,priestd09/mopidy,ZenithDK/mopidy,tkem/mopidy,quartz55/mopidy,bencevans/mopidy,vrs01/mopidy,priestd09/mopidy,jodal/mopidy,glogiotatidis/mopidy,ZenithDK/mopidy,rawdlite/mopidy,dbrgn/mopidy,bencevans/mopidy,abarisain/mopidy,jmarsik/mopidy,ali...
tests/mixers/denontest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport tornado.web\nfrom tornado.options import define\n\nfrom .handlers import LandingHandler, RequestHandler\n\n\nclass InteractApp(tornado.web.Application):\n \"\"\"\n Entry point for the interact app.\n \"\"\"\n d...
python
edit
3
1
apache-2.0
b3c99c3ce6ec181cf2ea82dbbbac5801d7f27874
data-8/DS8-Interact,data-8/DS8-Interact,data-8/DS8-Interact
app/interact_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom notebook.utils import url_path_join\n\nfrom jupyterlab_gitsync.handlers import *\nfrom jupyterlab_gitsync.version import VERSION\n\n__version__ = VERSION\n\n\ndef _jupyter_server_extension_paths():\n return [{'module': 'jupyterlab_git...
python
edit
4
1
apache-2.0
d8f6938649acd4a72a53d47c26a1b16adb0e8fe3
GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions
jupyterlab_gitsync/jupyterlab_gitsync/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom greengraph.map import Map\nimport numpy as np\nfrom nose.tools import assert_equal\nimport yaml\n\ndef test_green():\n size = (10,10)\n zoom = 10\n lat = 50\n lon = 50\n satellite = True\n testMap = Map(lat,lon,satell...
python
edit
4
1
mit
351bc14c66962e5ef386b6d41073697993c95236
MikeVasmer/GreenGraphCoursework
greengraph/test/test_map.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport imp #For plugins\nimport sys\nimport traceback\nimport logging\n\nimport os #For plugins\n\n\nlog = logging.getLogger(__name__)\n\npluginsList = []\n\ndef includeme(config):\n global pluginsList\n plugins = load_plugins()\n ...
python
edit
1
5
mit
4636c2deb451c284ffdfc44c744cf025a9f87377
mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui,mapgears/scribeui
scribeui_pyramid/modules/plugins/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n''' test_deltaprel - Test functions for deltaprel module\n\nAuthor: Ian Huston\nFor license and copyright information see LICENSE.txt which was distributed with this file.\n'''\nimport numpy as np\nfrom numpy.testing import assert_, assert_...
python
edit
3
1
bsd-3-clause
efda61fab238c278791245af9a89c6d70d2425e7
ihuston/pyflation,ihuston/pyflation
pyflation/analysis/tests/test_deltaprel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# --------\n# |@ s >|\n# --------\n\nlevel.description(\"It is too dark to see anything, but you smell sludge nearby.\")\nlevel.tip(\"Use warrior.feel().is_empty to see if there is anything in front of you, and warrior.attack! to fight...
python
edit
9
1
mit
2453d33da9535d069a829ec9a316093874fbb9a4
arbylee/python-warrior
pythonwarrior/towers/beginner/level_002.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cellom2tif import cellom2tif\nimport pytest\n\n\ncfile = 'test-data/d1/MFGTMP_120628160001_C18f00d0.C01'\n\n\ndef test_read_image():\n im = cellom2tif.read_image(cfile)\n assert im.shape == (512, 512)\n\n\ndef test_done():\n c...
python
edit
1
1
bsd-3-clause
6d930e7f29e12cd677cce07c7c1accc66ae594c8
jni/cellom2tif
tests/test_zz_jvm_kill.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cdent.test\n\nimport cdent.parser.cdent.yaml\nimport cdent.parser.perl6\n\nclass TestPythonParser(cdent.test.TestCase):\n\n def test_parse_perl6(self):\n parser = cdent.parser.perl6.Parser()\n # parser.debug = True\n...
python
edit
3
2
bsd-2-clause
8972720110ca73bf01c718bdc5cd2f99d2d12743
ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py
tests/test_parse_perl6.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\r\nfrom django.contrib.auth.models import User, Group\r\nfrom evewspace.Map.models import Map\r\nfrom django.db.models.signals import post_save\r\n\r\n# Create your models here.\r\n\r\nclass UserProfile(models.M...
python
edit
1
2
apache-2.0
95da47010839da430223700345e07078b2157131
evewspace/eve-wspace,Maarten28/eve-wspace,proycon/eve-wspace,gpapaz/eve-wspace,Unsettled/eve-wspace,acdervis/eve-wspace,Unsettled/eve-wspace,marbindrakon/eve-wspace,hybrid1969/eve-wspace,Unsettled/eve-wspace,acdervis/eve-wspace,marbindrakon/eve-wspace,Maarten28/eve-wspace,mmalyska/eve-wspace,acdervis/eve-wspace,nyrocro...
evewspace/account/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152\nfrom torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1\nfrom torchvision.models import densenet121,densenet169,densenet201,densenet161\nfro...
python
edit
2
0
apache-2.0
83831a3434cdaf0a5ca214dfc4bd7fec65d4ffac
fastai/fastai
fastai/vision/models/tvm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.static import static\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.views.generic import Templat...
python
edit
1
0
bsd-2-clause
2c742cd00e21412d034bb0cffed0bafca2e6c1ae
refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector
inspector/inspector/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# Run from Cryptchat\n# python3 -m unittest discover\n\nimport unittest\nfrom ..network.networkhandler import NetworkHandler\nfrom ..crypto.aes import AESCipher\nfrom ..crypto.diffiehellman i...
python
edit
1
1
mit
09052d05c27921bc87b0c968de02b244b4e5a56b
djohsson/Cryptchat
cryptchat/test/test_networkhandler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2011 Google Inc. 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\"\"\"\nSmoke-tests 'settings' blocks.\n\"\"\"\n\nimpo...
python
edit
1
0
bsd-3-clause
bca736ac15b06263c88d0265339b93b8c2b20d79
witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp
test/settings/gyptest-settings.py
rejected_duplicate
Near-duplicate of sample 403
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\nfrom ..flags import FLAGS\nfrom ..variable import variable\n\n\n\ndef embeddings(*, id_space_size, embedding_size, name=None):\n return variable([id_space_size, embedding_size], name=name)\n\n\ndef word_embedding...
python
edit
1
2
unlicense
cd5c56583c84b2b0fd05d743578193b7b681151c
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/embedding/embeddings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom .base import Base\n\n\nCompleteResults = \"g:LanguageClient_completeResults\"\n\n\ndef simplify_snippet(snip: str) -> str:\n return re.sub(r'(?<!\\\\)\\$\\d+', '', snip)\n\n\nclass Source(Base):\n def __init__(self, vi...
python
edit
1
4
mit
c0b3a482b8ef5284070da1398350acf936e50121
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
rplugin/python3/deoplete/sources/LanguageClientSource.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dimod.core.sampler import Sampler\nfrom dimod.core.composite import Composite\nfrom dimod.core.structured import Structured\nfrom dimod.decorators import bqm_structured\n\n\nclass StructureComposite(Sampler, Composite, Structured):\n ...
python
edit
1
1
apache-2.0
4673b980252f5fd4c490652d9af63eac02506614
dwavesystems/dimod,dwavesystems/dimod
dimod/reference/composites/structure.py
rejected_duplicate
Near-duplicate of sample 24329
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom compressor.filters.base import CompilerFilter\nfrom compressor.filters.css_default import CssAbsoluteFilter\n\n# Work around the fact that django-compressor doesn't succeed in running the\n# CssAbsoluteFilter on less files due to broke...
python
edit
1
3
mit
10f2a3d6e748e18bd3858fe5686a6978cf9dc9ea
okfn/website,okfn/website,MjAbuz/foundation,MjAbuz/foundation,okfn/foundation,okfn/foundation,okfn/website,MjAbuz/foundation,okfn/foundation,MjAbuz/foundation,okfn/website,okfn/foundation
lib/precompilers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cms.app_base import CMSApp\nfrom cms.apphook_pool import apphook_pool\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass EventsApphook(CMSApp):\n name = _(\"Events Apphook\")\n urls = [\"events.urls\"]\n app_n...
python
edit
1
0
bsd-3-clause
fa418ed5a6769a369d4b5cddfc6e215f551c57cf
theherk/django-theherk-events
events/cms_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'test.db',\n }\n}\nUSE_TZ = False\nSITE_ID = 1\n\nSTATIC_URL = '/static/'\nSECRET_KEY = 'NOT_SO_SEC...
python
edit
1
0
bsd-3-clause
bfcce626990c53aef7fbe534f1f6ff1092945597
consbio/tablo
docs/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 John Reese\n# Licensed under the MIT license\n\nimport importlib\nimport os\n\nfrom functools import lru_cache\nfrom os import path\n\nfrom .base import Plugin\n\n@lru_cache()\ndef load_plugins(config):\n \"\"\"Import al...
python
edit
1
4
mit
9d7beff62a3555aa4be51cefb2f54681070d1305
jreese/ircstat,jreese/ircstat
ircstat/plugins/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom mopidy_scrobbler import Extension, frontend as frontend_lib\n\n\nclass ExtensionTest(unittest.TestCase):\n\n def test_get_default_config(self):\n ext = Extension()\n\n config = ext.get_default_config...
python
edit
null
null
apache-2.0
b5fecb2dd0d85d97716b21aa34a8c41d06bc476f
mopidy/cookiecutter-mopidy-ext
{{cookiecutter.repo_name}}/tests/test_extension.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nFEATURED_CONTENT_COUNT = 30\nNEWS_CONTENT_COUNT = 30\nUPDATED_CONTENT_COUNT = 30\n\nMAX_PREMISE_CONTENT_LENGTH = 300\n```\n\nApply this change: Change contention counts on front-page" }, { "role": "assistant", "content": "FEATUR...
python
edit
1
0
mit
1a00b905b02d47ef8778a4744d9ef67de5149017
taiansu/arguman.org,beratdogan/arguman.org,bahattincinic/arguman.org,arguman/arguman.org,Arthur2e5/arguman.org,taiansu/arguman.org,donkawechico/arguman.org,bahattincinic/arguman.org,Arthur2e5/arguman.org,arguman/arguman.org,Arthur2e5/arguman.org,Arthur2e5/arguman.org,donkawechico/arguman.org,bahattincinic/arguman.org,a...
web/premises/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\n\nfrom ssbench.constants import *\n\nclass Worker:\n def __init__(self, queue):\n queue.use(STATS_TUBE)\n self.queue = queue\n\n def go(self):\n job = self.queue.reserve()\n while job:\n ...
python
edit
2
2
apache-2.0
1e79cc27ae0025d9ba51eff2828cc25247c08d3c
charz/ssbench,swiftstack/ssbench,charz/ssbench,swiftstack/ssbench
ssbench/worker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# trivial_example.py\n#\n# Copyright 2014 BitVault.\n#\n# Reproduces the tests in trivial_example.rb\n\n\nfrom __future__ import print_function\n\nimport pytest\nfrom random import randint\n\n\nfrom patchboard.tests.fixtures import (trivial...
python
edit
3
1
mit
ad8f54f7a2532b0ad643790d061b4e488ac7849d
patchboard/patchboard-py
patchboard/tests/functional/trivial_example_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom frontend import *\nimport tools\n\nversion = \"0.0.1.dev\"\n__version__ = version\n\n```\n\nApply this change: Switch version label to comply with semver" }, { "role": "assistant", "content": "from frontend import *\nimport...
python
edit
4
0
bsd-3-clause
168dab45955499aac320c859ff63a43cb20d9145
kastman/fitz
fitz/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\nfrom flask import request, jsonify, redirect, url_for\n\nfrom IATISimpleTester import app, db\nfrom IATISimpleTester.models import SuppliedData\n\n\n@app.route('/upload', methods=['GET', 'POST'])\ndef upload():\n resp =...
python
edit
3
6
mit
cab4ec885d3101775ac16532d46f6f47700d1134
pwyf/data-quality-tester,pwyf/data-quality-tester,pwyf/data-quality-tester,pwyf/data-quality-tester
IATISimpleTester/views/uploader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\n\n\ndef set_environment_variables(json_file_path):\n \"\"\"\n Read and set environment variables from a flat json file.\n\n Bear in mind that env vars set this way and later on read using\n `os.getenv` fu...
python
edit
1
2
mit
f61c0a33a79fa4670874f4469e7ceb76c644bf4b
HDE/python-lambda-local,HDE/python-lambda-local
lambda_local/environment_variables.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pulp\nfrom typing import Sequence\nimport conference_scheduler.parameters as params\n\n\ndef is_valid_schedule(schedule):\n \"\"\"Validate an existing schedule against a problem\n\n Parameters\n ---------\n schedule : ite...
python
edit
1
4
mit
5bc8ad66b59312d7459ec9c4d58d89bee0038a48
PyconUK/ConferenceScheduler
conference_scheduler/scheduler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ntry:\n\tfrom sexy import SpellEntry as _SpellEntry\nexcept ImportError:\n\tfrom gtk import Entry as _SpellEntry\n\nclass SpellEntry(_SpellEntry):\n\n\t__gtype_name__ = \"SpellEntry\"\n\n\tpass\n\n```\n\nApply this change: Add dummy foregr...
python
edit
1
5
bsd-2-clause
cdb7e9fd80b6b5dc31b0096beb7283b373709b8a
sushi-irc/tekka
tekka/lib/spell_entry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"See LONG_DESC.txt\"\"\"\n\n# Set up the version\nfrom pkg_resources import get_distribution, DistributionNotFound\n\ntry:\n __version__ = get_distribution(__name__).v...
python
edit
1
0
bsd-3-clause
b378102284bbbcc9ad909a7393dfffa24377ce27
pllim/ginga,pllim/ginga,ejeschke/ginga,naojsoft/ginga,ejeschke/ginga,ejeschke/ginga,pllim/ginga,naojsoft/ginga,naojsoft/ginga
ginga/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom django.core.files import File\nfrom django.conf import settings\n\nfrom armstrong.dev.tests.utils import ArmstrongTestCase\nfrom armstrong.dev.tests.utils.backports import *\nfrom armstrong.dev.tests.util...
python
edit
9
3
apache-2.0
d0861d4c072e81c94c06b093469224c076c6c362
texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections
armstrong/core/arm_sections/tests/_utils.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dbt.adapters.base import Column\nfrom dataclasses import dataclass\nfrom dbt.adapters.base.relation import BaseRelation\nfrom dbt.exceptions import RuntimeException\n\n\n@dataclass(frozen=True, eq=False, repr=False)\nclass PostgresRela...
python
edit
1
4
apache-2.0
5830f5590ed185116dd4807f6351ad3afeb0dd5d
analyst-collective/dbt,analyst-collective/dbt
plugins/postgres/dbt/adapters/postgres/relation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport sys\n\n__version__ = '0.3.1'\n__author__ = 'D-Wave Systems Inc.'\n__authoremail__ = '<EMAIL>'\n__description__ = 'A shared API for binary quadratic model samplers.'\n\n_PY2 = sys.version_info...
python
edit
11
0
apache-2.0
6d7e6d649302523ccbe0373b172b4a4fa8990a45
oneklc/dimod,oneklc/dimod
dimod/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add source admin in Admin Opps Core" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom opps.core.admin.channel import *\nfrom opps.core.admin.profile import *\nfrom opps.core.admin.source import *\n" } ]
python
new_file
4
0
mit
3598b974ecc078f34e54a32b06e16af8ccaf839b
opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps
opps/core/admin/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nimport registry\n\napp = flask.Flask(__name__)\n\ndef get_registry():\n r = getattr(flask.g, '_registry', None)\n if r is None:\n r = flask.g._registry = registry.Registry(\"hooks.json\")\n\n return r\n\n\n@app...
python
edit
1
3
mit
1007ee608ac448941e9bb8958c6b2308abeb63ef
Storj/lunchbox,Storj/lunchbox
github-listener/listener.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.user.transfer.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom attr import attrs\n\nfrom ....typing import U...
python
edit
1
0
bsd-3-clause
2aab542cc74fdc0cf060518241f01fd74d91ecb5
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps
byceps/services/user/transfer/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Base classes that are extended by low level AMQP frames and higher level\nAMQP classes and methods.\n\n\"\"\"\n\nclass AMQPObject(object):\n \"\"\"Base object that is extended by AMQP low level frames and AMQP classes\n and meth...
python
edit
1
4
bsd-3-clause
1c4e75c243205ad47cd2e47a3d836c6c9e516db4
reddec/pika,shinji-s/pika,fkarb/pika-python3,renshawbay/pika-python3,zixiliuyue/pika,skftn/pika,vitaly-krugl/pika,vrtsystems/pika,hugoxia/pika,knowsis/pika,Tarsbot/pika,Zephor5/pika,jstnlef/pika,benjamin9999/pika,pika/pika
pika/amqp_object.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.http import HttpResponseRedirect\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n...
python
edit
1
0
mit
82155f3caad1220eeb2ee718142c5aace8600f87
minhlongdo/django-jquery-file-upload,Imaginashion/cloud-vision,vaniakov/django-jquery-file-upload,indrajithi/mgc-django,sigurdga/django-jquery-file-upload,Imaginashion/cloud-vision,minhlongdo/django-jquery-file-upload,Imaginashion/cloud-vision,vaniakov/django-jquery-file-upload,Imaginashion/cloud-vision,sigurdga/django...
django-jquery-file-upload/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport cybox.bindings.cybox_common_types_1_0 as common_types_binding\nimport cybox.bindings.mutex_object_1_3 as mutex_binding\nfrom cybox.objects.mutex_object import Mutex\n\n\nclass MutexTest(unittest.TestCase):\n def s...
python
edit
1
1
bsd-3-clause
67ab4b7374d739719700f84f0f5726f1b0c476d8
CybOXProject/python-cybox
cybox/test/objects/mutex_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\n\nfrom zope.interface import implements\n\nfrom twisted.python import usage\nfrom twisted.plugin import IPlugin\nfrom twisted.application.service import IServiceMaker\nfrom twisted.application import internet\nfrom twisted.web ...
python
edit
1
2
mit
578fe6f7403de0f93b3ca2776092e5dfe8dbfa73
praekeltfoundation/docker-xylem,praekeltfoundation/docker-xylem
twisted/plugins/docker_xylem_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib.admin import widgets \n# Smrtr\nfrom network.models import Network\nfrom challenge.models import Challenge\n# External\nfrom haystack.forms import SearchFor...
python
edit
4
1
bsd-3-clause
65655186f22f1cdc4699cfbddb8b11ccf3ad292a
mfitzp/smrtr,mfitzp/smrtr
apps/challenge/forms.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils import log\nfrom sdist import sdist\nfrom lib2to3.refactor import RefactoringTool, get_fixers_from_package\n\n\nclass _RefactoringTool(RefactoringTool):\n def log_error(self, msg, *args, **kw):\n log.error(msg, *arg...
python
edit
1
4
mit
c4ea358c7cdcd76dc9bf35b54e22cc9be05dc62a
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/command/sdist3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\nimport weakref\n\nimport cffi\n\n\n__version__ = '2.0.0a1'\n\n\n_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')\n_header = open(_header_file).read()\n_header +=...
python
edit
1
0
apache-2.0
3fcdb9e64ef955fd0a7e5b2fda481d351dfb4d18
jodal/pyspotify,mopidy/pyspotify,kotamat/pyspotify,jodal/pyspotify,kotamat/pyspotify,felix1m/pyspotify,mopidy/pyspotify,kotamat/pyspotify,felix1m/pyspotify,felix1m/pyspotify,jodal/pyspotify
spotify/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: set fileencoding=UTF-8 :\n\nfrom ..common import DynamicMethods\nfrom ..expr import Expr, ExprTreeTransformer\n\nfrom ..semantics import cast_error\n\n\nclass Analysis(DynamicMethods):\n\n def __init__(self,...
python
edit
1
2
mit
861f2ea86e26fe27ba3f2f283c32ed0a9931c5fb
admk/soap
ce/analysis/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n :codeauthor: David Boucha\n :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details.\n :license: Apache 2.0, see LICENSE for more details.\n\n\n salt.grains.external_ip\n ~~~~~~~~...
python
edit
5
4
apache-2.0
780ba3b8f1271dd0a4b78c7a3bb00f5f4fabf2eb
UtahDave/external_ip
external_ip.py
rejected_lint
Too many lint violations: 5
true