messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.views.generic.base import RedirectView\n\nfrom gitlab import views\n\nurlpatterns = patterns('',\n url(r'^favicon\\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),\n ... | python | edit | 1 | 0 | apache-2.0 | 423288b4cc8cf1506285913558b3fcff9e7788fa | ReanGD/web-work-fitnesse,ReanGD/web-work-fitnesse,ReanGD/web-work-fitnesse | gitlab/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n# Filename: test_config.py\n\"\"\"\nTest suite for configuration related functions and classes.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nfrom km3pipe.testing import TestCase, BytesIO\nfr... | python | edit | 1 | 1 | mit | 3e1b2b5e87f2d0ed8ecb06b07805723101c23636 | tamasgal/km3pipe,tamasgal/km3pipe | km3pipe/tests/test_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.cbook as cbook\n\nfrom .geom import g... | python | edit | 7 | 4 | bsd-2-clause | 67717116a2585975e0e773956d6a102be9dc11d6 | xguse/ggplot,benslice/ggplot,smblance/ggplot,Cophy08/ggplot,mizzao/ggplot,xguse/ggplot,ricket1978/ggplot,mizzao/ggplot,andnovar/ggplot,bitemyapp/ggplot,kmather73/ggplot,udacity/ggplot,ricket1978/ggplot,benslice/ggplot,wllmtrng/ggplot,assad2012/ggplot | ggplot/geoms/geom_boxplot.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom wit import Wit\nfrom . import text_to_speech as tts\nfrom . import config\n\n\nWIT_AI_KEY = config.WIT_AI_KEY\nsession_id = config.USER\n\n\ndef say(session_id, context, msg):\n tts.talk(msg)\n\n\ndef error(session_id, context, e):\... | python | edit | 1 | 4 | mit | 2f9be950c372beb2f555cbe84a22366e0b95e721 | stsewd/hellopy | hellopy/bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom nltk.stem.snowball import HungarianStemmer\nfrom nltk import word_tokenize\n\nstemmer = HungarianStemmer()\ntest_sentence = \"Szeretnék kérni tőled ... | python | edit | 2 | 0 | apache-2.0 | f6bf104cbdcdb909a15c80dafe9ae2e7aebbc2f0 | davidpgero/hungarian-nltk | examples/snowball_stemmer_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mythril.analysis.report import Report\nfrom .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas\n\n\ndef fire_lasers(statespace):\n... | python | edit | 1 | 4 | mit | 2a8dd80c9769731963fcd75cb24cd8918e48b269 | b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril | mythril/analysis/security.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport time\n\nimport requests\n\nfrom krunchr.vendors.celery import celery\n\n\n@celery.task\ndef get_file(url, path):\n name, ext = os.path.splitext(url)\n name = str(int(time.time()))\n\n path = \"%s/%s%s\" % (path, name, e... | python | edit | 1 | 1 | apache-2.0 | ab4333ad10713b0df25e0ff9bb46da3a0749326f | vtemian/kruncher | analyser/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nimport json\nfrom pathlib import Path\n\nimport ptt_core\nl = ptt_core.l\n\n\n_TARGETS_DIR_PATH = Path('targets')\n\nif not _TARGETS_DIR_PATH.exists():\n _TARGETS_DIR_PATH.mkdir()\n\n\ndef generate_target_from(... | python | edit | 1 | 3 | mit | 0225a79fa43f03a48a6134fce4122ae243a10df2 | moskytw/mining-news | ptt_preproc_to_target.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom SCons.Script import File\n\nfrom path_helpers import path\n\n\ndef get_lib_paths():\n if sys.platform == 'win32':\n lib_paths = set(os.environ['PATH'].split(';'))\n else:\n lib_paths = set()... | python | edit | 1 | 6 | bsd-3-clause | 40e9375f6b35b4a05ad311822705b7a7efe46b56 | wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware | site_scons/get_libs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\"\"\"Module containing only html v5 tags. All deprecated tags have been removed.\n\"\"\"\n\nfrom .common import *\n\ndel ACRONYM\ndel APPLET\ndel BASEFONT\ndel BIG\ndel CENTER\ndel DIR\ndel FONT\ndel FRAME\ndel FRAMESET\ndel NOFRAMES\nde... | python | edit | 95 | 0 | bsd-3-clause | 1212d33d849155f8c1cdc6a610e893318937e7c5 | orbnauticus/silk | silk/webdoc/html/v5.py | rejected_lint | Too many lint violations: 95 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nHelper functions for determining which tests to skip.\n\"\"\"\n\n__authors__ = \"Ian Goodfellow\"\n__copyright__ = \"Copyright 2010-2012, Universite de Montreal\"\n__credits__ = [\"Ian Goodfellow\"]\n__license__ = \"3-clause BSD\"\n... | python | edit | 5 | 2 | bsd-3-clause | 28c26bf5d220a5a60b807470bbaf339bdf9206a9 | CIFASIS/pylearn2,lisa-lab/pylearn2,msingh172/pylearn2,w1kke/pylearn2,lamblin/pylearn2,bartvm/pylearn2,sandeepkbhat/pylearn2,cosmoharrigan/pylearn2,jeremyfix/pylearn2,mkraemer67/pylearn2,jamessergeant/pylearn2,junbochen/pylearn2,TNick/pylearn2,hantek/pylearn2,nouiz/pylearn2,aalmah/pylearn2,skearnes/pylearn2,kose-y/pylea... | pylearn2/testing/skip.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .model import ModalityModel\nfrom .estimator import ModalityEstimator\nfrom .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\\\n MODALITY_TO_CMAP, ModalitiesViz, violinplot\n\n__author_... | python | edit | 3 | 1 | bsd-3-clause | dbb27799a92e58cf03a9b60c17e0f3116fbcf687 | olgabot/anchor,olgabot/modish,YeoLab/anchor | modish/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"The sqlservice package.\n\"\"\"\n\nfrom .__pkg__ import (\n __description__,\n __url__,\n __version__,\n __author__,\n __email__,\n __license__\n)\n\nfrom .client import SQLClient\nfrom .mode... | python | edit | 13 | 0 | mit | 34330aec6cf0c038d47c43ef926fa615bd568ea3 | dgilland/sqlservice | sqlservice/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport subprocess\n\n\ndef main():\n subprocess.call([\"apt-get\", \"update\"])\n subprocess.call([\"apt-get\", \"-y\", \"upgrade\"])\n subprocess.call([\"apt-get\", \"-y\", \"install\", \"python-dev\"])\n ... | python | edit | 1 | 1 | mit | 94c0c60172c1114d6f0938de88af67ae7203ae95 | projectweekend/Pi-Setup,projectweekend/Pi-Setup | pi_setup/system.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration file for gunicorn.\"\"\"\n\n# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime\nworker_class = \"gevent\"\nforwarded_allow_ips = \"*\"\nsecure_scheme_headers = {\"X-APPENGINE-HTTPS\": \"on\"}\... | python | edit | 1 | 0 | mit | 0c8835bb4ab1715ee0de948d9b15a813752b60b5 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/gunicorn.conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.views.generic.base import RedirectView\nfrom django.conf import settings\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nfrom . import views\nfrom projects.views ... | python | edit | 3 | 0 | mit | 9c24dfc6a6207c9688332a16ee1600b73aec44d8 | deckar01/narcis,deckar01/narcis,deckar01/narcis | narcis/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re, snmpy_plugins\n\nclass log_processor:\n def __init__(self, conf):\n self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects... | python | edit | 2 | 4 | mit | 90d8411412b79513338b014da63b18d0d29396d9 | mk23/snmpy,mk23/snmpy | snmpy/log_processor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.html import strip_tags\nfrom django.utils.text import Truncator\nfrom django.utils.tra... | python | edit | 1 | 1 | bsd-3-clause | 9d3750881eaa215f6d06087e6d0f7b6d223c3cd1 | matthiask/feincms3,matthiask/feincms3,matthiask/feincms3 | feincms3/plugins/richtext.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import sudo, hide\nfrom braid import package\nfrom pipes import quote\n\n\ndef install():\n package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])\n\n\ndef _runQuery(query):\n with hide('running', 'output'):\... | python | edit | 1 | 2 | mit | c6d589859d621ac0eb2b4843a22cfe8e011bbeaf | alex/braid,alex/braid | braid/postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib.auth.decorators import login_required\nfrom imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,\n PhotoCreate, PhotoDele... | python | edit | 3 | 0 | mit | 746439a977cd556e91424c80cf532e1da8551ae7 | nbeck90/django-imager,nbeck90/django-imager | imager/imager_images/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom chainerrl.wrappers.cast_observation import CastObservation # NOQA\nfrom chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA\n\nfrom chainerrl.wrappers.randomize_action import RandomizeAction # NOQA\n\nfrom cha... | python | edit | 1 | 0 | mit | 027ae8b8029d01622e3a9647f3ec6b1fca4c4d9d | toslunar/chainerrl,toslunar/chainerrl | chainerrl/wrappers/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import absolute_import, division, print_function\n\nfrom pathlib import Path\n\nfrom isort import SortImports\nfrom shovel import task\n\n# isort multi_line_output modes\nGRID = 0\nVERTICAL = 1\nHANGING_INDE... | python | edit | 1 | 6 | mit | 46b00107e90df8f34a9cce5c4b010fdfb88f5f52 | python-astrodynamics/astrodynamics,python-astrodynamics/astrodynamics | shovel/code.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Core pep438 utility functions\"\"\"\nfrom __future__ import unicode_literals\n\nimport requests\ntry:\n import xmlrpclib\nexcept:\n import xmlrpc.client as xmlrpclib # noqa\nfrom xml.etree import ElementTree\nfrom requirements ... | python | edit | 1 | 3 | mit | dd6a446a9a1ce2624769e276ddb0700da909334b | treyhunner/pep438 | pep438/core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .exceptions import MalformedFileError\n\n\nclass WebVTTParser:\n\n def _parse(self, content):\n self.content = content\n\n def read(self, file):\n with open(file, encoding='utf-8') as f:\n self._parse(f.r... | python | edit | 1 | 2 | mit | e2f2541d909861e140030d50cc1981697118bf2e | glut23/webvtt-py,sampattuzzi/webvtt-py | webvtt/parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\ndef getVersion(b64decodedData):\n json_map = json.loads(b64decodedData)\n if not json_map.has_key(\"View\"):\n return None\n return json.loads(b64decodedData)[\"View\"][\"Dynamo\"][\"Version\"]\n\ndef usesList... | python | edit | 1 | 2 | mit | bc8aa0f8aab15dd704fd34f836464d5e7397c08e | DynamoDS/Coulomb,DynamoDS/Coulomb,DynamoDS/Coulomb | SessionTools/features_JSON.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"Small utility functions for use in various places.\"\"\"\n\n__all__ = [\"pick\", \"is_dunder\"]\n\ndef pick(arg, default):\n \"\"\"Handler for default versus given argument.\"\"\"\n return default if ar... | python | edit | 1 | 4 | bsd-2-clause | fa19a6ec882727bb96f27993d7ac765797c19556 | Vgr255/logging | logger/utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {\n 'DeclBuildable': [\n 'CodeBlockItem',\n 'MemberDeclListItem',\n 'SyntaxBuildable'\n ],\n 'ExprList': [\n 'ConditionElement',\n 'SyntaxBuildable'\... | python | edit | 1 | 0 | apache-2.0 | e99976cbee1e43e7112b4759cf5a1a17a1be8170 | glessard/swift,atrick/swift,apple/swift,benlangmuir/swift,rudkx/swift,glessard/swift,atrick/swift,rudkx/swift,gregomni/swift,glessard/swift,apple/swift,atrick/swift,glessard/swift,JGiola/swift,atrick/swift,ahoppen/swift,gregomni/swift,JGiola/swift,glessard/swift,ahoppen/swift,ahoppen/swift,JGiola/swift,rudkx/swift,atri... | utils/gyb_syntax_support/protocolsMap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nrequests._oauth\n~~~~~~~~~~~~~~~\n\nThis module comtains the path hack neccesary for oauthlib to be vendored into requests\nwhile allowing upstream changes.\n\"\"\"\n\nimport os\nimport sys\n\ntry:\n fr... | python | edit | 7 | 0 | isc | 79aa9edde1bba39a433475929970dd519fecfdf3 | Bluehorn/requests,revolunet/requests,psf/requests,revolunet/requests | requests/_oauth.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils import timezone\nfrom django.conf import settings\n\nfrom studygroups.models import StudyGroup\nfrom studygroups.models import Reminder\nfrom studygroups.models import generate_reminder\nfrom studygroups.models import send... | python | edit | 1 | 3 | mit | 429d840a34c4ec2e3b475e412b53e99ffe2a5677 | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | studygroups/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_replay\n-----------\n\"\"\"\n\n\ndef test_get_user_config():\n config_dict = get_user_config()\n assert 'replay_dir' in config_dict\n\n expected_dir = os.path.expanduser('~/.cookiecutter_repl... | python | edit | 1 | 1 | bsd-3-clause | 9b12a9cdab0021fea7e5f2d8fd8ffe11d065f0d0 | agconti/cookiecutter,luzfcb/cookiecutter,christabor/cookiecutter,terryjbates/cookiecutter,benthomasson/cookiecutter,christabor/cookiecutter,audreyr/cookiecutter,audreyr/cookiecutter,benthomasson/cookiecutter,Springerle/cookiecutter,ramiroluz/cookiecutter,terryjbates/cookiecutter,luzfcb/cookiecutter,takeflight/cookiecut... | tests/test_replay.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom glob import glob\nfrom cx_Freeze import setup, Executable\nfrom version import VERSION\n\n# Dependencies are automatically detected, but it might need\n# fine tuning.\nexcludes = [\"Tkinter\"]\nincludes = [\"logview\", \"... | python | edit | 1 | 0 | apache-2.0 | 0c6bf8eca2d4cfd08cc98df3cb0ab706a6fbf7a2 | timxx/gitc,timxx/gitc | cxfreeze-setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport ipuz\nimport puz\n\nimport crossword\n\n\nclass FormatUnitTest(unittest.TestCase):\n\n def test_to_ipuz_only_include_ipuz_specific_data(self):\n puz_object = puz.read('fixtures/chronicle_20140815.puz')\n ... | python | edit | 1 | 1 | mit | 4d27a526dc6d76989ce65cc60991a7156b333fac | svisser/crossword | tests/test_format.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom motobot import IRCBot, command, Notice\n\n\ndef get_command_help(bot, command, modifier):\n responses = []\n\n func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()\n for plugin in filter(func, ... | python | edit | 1 | 4 | mit | 3919d64370825d8931672011af4b99355e52ef63 | Motoko11/MotoBot | motobot/core_plugins/help.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport cgi, subprocess, json\n\narguments = cgi.FieldStorage()\nbody = arguments.getvalue('body', '')\nmessageTo = arguments.getvalue('messageTo', '')\n\nexitCode = subprocess.call(['./SendImessage.applescript', mes... | python | edit | 4 | 0 | mit | 64303ae1a02b707ff11231a9e3c46405a8a591e7 | chainsawsalad/imessage-liberator,chainsawsalad/imessage-liberator,chainsawsalad/imessage-liberator | host/cgi-bin/liberator.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib import admin\n# admin.autodiscover()\n\nurlpatterns = patterns('',\n (r'apply/', 'resume.views.cs_ap... | python | edit | 4 | 0 | apache-2.0 | 0eb5966ec3261e6c6101b4c9874321a105fb4426 | brownplt/k3,brownplt/k3,brownplt/k3 | dj-resume/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import dirname\n\nfrom django.conf import settings\nfrom pipeline.compilers import SubProcessCompiler\n\nclass Dart2jsCompiler(SubProcessCompiler):\n output_extension = 'js'\n\n def match_file(self, filename):\n re... | python | edit | 1 | 3 | apache-2.0 | bff8d72c83c7f8a9321e4a065daa621c9e7d0539 | wienczny/django-pipeline-dart2js | pipeline_dart2js/compiler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\n\nfrom .views import AwayView, BumperView, GameView, PrologueView\n\n\nurlpatterns = patterns('',\n url(r'^away/$', name='liv... | python | edit | null | null | apache-2.0 | 88d93f580ce2f587ac5fa1b41e7ab3f67a9c6be4 | bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv | avalonstar/apps/live/urls.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport json, os, sys\nimport requests\napi_url = \"https://copr.fedorainfracloud.org/api_2\"\napi_login = os.environ[\"copr_login\"]\napi_token = os.environ[\"copr_token\"]\n\nr = requests.get(\"%s/projects/%s/chroot... | python | edit | 1 | 0 | mit | 0c5abad8259cccfd1ce50b27a124089d9ea946dd | kyl191/nginx-pagespeed,kyl191/nginx-pagespeed,kyl191/nginx-pagespeed | copr_build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport synapse.axon as s_axon\nimport synapse.cells as s_cells\nimport synapse.cryotank as s_cryotank\n\nfrom synapse.tests.common import *\n\nclass CellTest(SynTest):\n def test_getcells(self):\n data = s_cells.getCells()\n ... | python | edit | 7 | 2 | apache-2.0 | 9f1964f9f83c493f9bc6e08e2058d1e14ace031f | vertexproject/synapse,vertexproject/synapse,vertexproject/synapse | synapse/tests/test_cells.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\r\nA number of function that enhance IDLE on MacOSX when it used as a normal\r\nGUI application (as opposed to an X11 application).\r\n\"\"\"\r\nimport sys\r\n\r\ndef runningAsOSXApp():\r\n \"\"\" Returns True iff running from the... | python | edit | 1 | 2 | mit | e08b4f1b74f0fcd987299d4786b5374fe86a21bc | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/idlelib/macosxSupport.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport picamera as p\nimport os\nimport time\n\nos.chdir('/home/pi/Desktop')\n\ncam = p.PiCamera()\ncam.resolution = (320,240)\ncam.hflip = True\ncam.vflip = True\n\nx = 0\nwhile x < 15:\n\timg = cam.capture('gregTest.jpg')\n\ttime.sleep(.2... | python | edit | 1 | 0 | mit | d74b524cec824e77adbcf9cc23e28a6efba02985 | jwarshaw/RaspberryDrive | takePicture.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom ...tasks import update_conversion_rates, create_conversion_dates\n\n\nclass Command(BaseCommand):\n\n def add_arguments(self, parser):\n parser.add_argument(\n ... | python | edit | 1 | 3 | bsd-3-clause | 89526f9af257096d2253b00b72d0cea1493fec52 | mirumee/django-prices-openexchangerates | django_prices_openexchangerates/management/commands/update_exchange_rates.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.core.urlresolvers import reverse\nfrom django.utils.functional import lazy\n\nreverse_lazy = lazy(reverse, unicode)\n\nurlpatterns = patterns('django.contrib.auth.views',\n url(r'^logi... | python | edit | 12 | 0 | mit | ebd024b4f8ee6e490c183da0bada28a2aaf328d8 | bueda/django-comrade | comrade/users/urls.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\ndef retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):\n \"\"\"Retry calling the decorated function using an exponential backoff.\n\n http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-pyt... | python | edit | 3 | 4 | bsd-3-clause | 4410e03df12b99c46467b6fe93f7b8cb206d441c | saltycrane/retry-decorator | decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport six\nfrom subprocess import Popen, PIPE\n\n\ndef run_ipcluster(n=4):\n \"\"\"Convenient way to start an ipcluster for testing.\n\n You have to wait for it to start, however.\n \"\"\"\n # FIXME: This should be reimplemente... | python | edit | 1 | 1 | bsd-3-clause | 37490a9bd916480775271cf7e0c91b11a7eac913 | enthought/distarray,enthought/distarray,RaoUmer/distarray,RaoUmer/distarray | distarray/tests/run_ipcluster.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyramid.config import Configurator\nfrom pyramid.events import BeforeRender\nfrom sqlalchemy import engine_from_config\n\nfrom . import helpers\nfrom .model import Session, Base\n\n\ndef add_renderer_globals(event):\n event['h'] = h... | python | edit | 1 | 1 | mit | 0683e96d0cd55797639c84003e03c48ae7211912 | storborg/sidecar,storborg/sidecar | sidecar/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL\nfrom django.contrib.admin.options import StackedInline, TabularInline\nfrom django.contrib.admin.sites import AdminSite, site\n\n\ndef autodiscover():\n \"\"\"\n ... | python | edit | 9 | 4 | bsd-3-clause | 93f2ff45ff3d61487ed061ae3d1a65051c3d1799 | svn2github/django,svn2github/django,svn2github/django | django/contrib/admin/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.blueprints.shop_admin.service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2014 Jochen Kupperschmidt\n\"\"\"\n\nfrom collections import Counter\n\nfrom ..shop.models import PaymentState... | python | edit | 1 | 3 | bsd-3-clause | 0fed581409f0dfa4788964d02d066e8e30f1387f | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | webapp/byceps/blueprints/shop_admin/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# File: luhn.py\n# Purpose: Write a program that can take a number and determine whether\n# or not it is valid per the Luhn formula.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Date: Sunday 18 Septe... | python | edit | 1 | 3 | mit | 2d5710dfc8361bb4c383e8fe8a2e2ca267c11875 | amalshehu/exercism-python | luhn/luhn.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom mock import Mock\nfrom unittest2 import TestCase\nfrom raven.events import Message\n\n\nclass MessageTest(TestCase):\n\n def test_to_string(self):\n unformatted_message = 'My message from %s about %... | python | edit | 1 | 1 | bsd-3-clause | 0cb5447de992389be9587d7706637212bfe3b90b | johansteffner/raven-python,Photonomie/raven-python,jbarbuto/raven-python,nikolas/raven-python,lepture/raven-python,smarkets/raven-python,arthurlogilab/raven-python,lepture/raven-python,hzy/raven-python,recht/raven-python,inspirehep/raven-python,nikolas/raven-python,openlabs/raven,patrys/opbeat_python,ewdurbin/raven-pyt... | tests/events/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\n\nurlpatterns = patterns('lingcod.layers.views',\n url(r'^public/', \n 'get_public_layers', \n name='public-data-layers'),\n url(r'^kml_file/(?P<session_key>\\w+)/(?P<uid>[\\w_]... | python | edit | 9 | 0 | bsd-3-clause | e7f97bf1ddcf05bee3c3b6fc79c5cefb36af280a | Ecotrust/madrona_addons,Ecotrust/madrona_addons | lingcod/layers/urls.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic import FormView, RedirectView\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.auth import login, logout\n\nclass LoginView(FormView):\n\n... | python | edit | 1 | 2 | mit | edf2388300b0c0b230cd1b1ec91268a13ee6e6ba | polarkac/TaskTracker,polarkac/TaskTracker | homepage/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport colander\nimport deform\n\nfrom csrf import CSRFSchema\n\nclass LoginForm(CSRFSchema):\n \"\"\"The user login form.\"\"\"\n username = colander.SchemaNode(colander.String(),\n title=\"Username\",\n widget=... | python | edit | null | null | isc | 97919d06b252af37e7c955ff800b309599e2debc | usingnamespace/usingnamespace | usingnamespace/forms/user.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom lxml import etree\n\n\ndef new_ele(tag, attrs={}, **extra):\n etree.Element(tag, attrs, **extra)\n\n\ndef sub_ele(parent, tag, attrs={}, **extra):\n etree.SubElement(parent, tag, attrs, **extra)\n\n# Globals\ntag_patte... | python | edit | 1 | 0 | apache-2.0 | 96bb2ba0dc6e58195b598e03d177114becfeba7a | Kent1/nxpy | nxpy/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '1.0'\n__all__ = ['TimeZoneField', 'TimeZoneFormField']\n\nfrom timezone_field.fields import TimeZoneField\nfrom timezone_field.forms import TimeZoneFormField\n\n```\n\nApply this change: Bump version number to 1.1"
},
{
... | python | edit | 1 | 0 | bsd-2-clause | a2c55857cc9d910978c6c1ae963e0669176e061f | mfogel/django-timezone-field | timezone_field/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cgi import FieldStorage\nfrom logging import debug, error, info\nfrom time import time\nfrom trackon import tracker\n\nMAX_MIN_INTERVAL = 60*60*5\nDEFAULT_CHECK_INTERVAL = 60*15\n\n\ndef main():\n args = FieldStorage()\n now = in... | python | edit | 4 | 12 | mit | 4e29782102f121cccfbfbcaccc28fe9ccc99e495 | CorralPeltzer/newTrackon | trackon/update-trackers.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport linkatos.confirmation as confirmation\n\n\ndef test_no_confirmation_with_url():\n expecting_confirmation = False\n parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}\n\n assert confirmation.up... | python | edit | 3 | 1 | mit | f4f5a6ffa1fd60437b83bfc435a180ddf2433ea4 | iwi/linkatos,iwi/linkatos | tests/test_confirmation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport traceback\n\nfrom telethon_examples.interactive_telegram_client \\\n import InteractiveTelegramClient\n\n\ndef load_settings(path='api/settings'):\n \"\"\"Loads the user settings located under `api/`\"\"... | python | edit | 1 | 3 | mit | 9130a94153b7d9f70883da737fb60d41db73e09a | LonamiWebs/Telethon,LonamiWebs/Telethon,kyasabu/Telethon,andr-04/Telethon,LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon | try_telethon.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- test-case-name: axiom.test -*-\nfrom axiom._version import __version__\nfrom epsilon import asTwistedVersion\n\nversion = asTwistedVersion(\"axiom\", __version__)\n\n```\n\nApply this change: Add a local asTwistedVersion implementatio... | python | edit | 1 | 1 | mit | f25c0074a013255141371b46cff0a506ad0b2ab5 | hawkowl/axiom,twisted/axiom | axiom/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport json\n\nparser = argparse.ArgumentParser()\nparser.add_argument('json_file')\nargs = parser.parse_args()\n\nif __name__ == '__main__':\n with open(args.json_file) as f:\n data = json.load(f)\n print ... | python | edit | 6 | 1 | mit | 85458434391144aa40101ba9f97c4ec47c975438 | achalddave/dotfiles,achalddave/dotfiles | zsh/scripts/pyjson_helper.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom utils import write_csv_rows, read_csv_rows\n\nclass input_table:\n def __init__(self, filename, content):\n self.filename = filename\n self.content = content\n\nconnect_tbl=input_table('connectivity.csv',\n ... | python | edit | 3 | 1 | mit | 52b022869b7092fc519accc2132c3f842502aeae | ndebuhr/openfea,ndebuhr/openfea | create_input_files.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef Fun():\n pass\n\nclass A:\n def __init__(self):\n pass\n def Fun(self):\n pass\n\ntry:\n print(Fun.__name__)\n print(A.__init__.__name__)\n print(A.Fun.__name__)\n print(A().Fun.__name__)\nexcept Attri... | python | edit | 1 | 1 | mit | 4102320e908dfa6e2fc320d73f118670ad5b1501 | pozetroninc/micropython,adafruit/circuitpython,MrSurly/micropython,henriknelson/micropython,selste/micropython,kerneltask/micropython,trezor/micropython,pozetroninc/micropython,selste/micropython,pozetroninc/micropython,pramasoul/micropython,kerneltask/micropython,henriknelson/micropython,henriknelson/micropython,tobba... | tests/basics/fun_name.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add 'includeme' function. (Accidently put in SQLAHelper.)"
},
{
"role": "assistant",
"content": "from akhet.static import add_static_route\n\ndef includeme(config):\n \"\"\"Add certain useful methods to a Pyramid ``Configurato... | python | new_file | 1 | 1 | mit | 7389c85979127a48e0ce9b2f11e611c212a95524 | Pylons/akhet,hlwsmith/akhet,hlwsmith/akhet,hlwsmith/akhet,Pylons/akhet | akhet/__init__.py | rejected_duplicate | Near-duplicate of sample 10540 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom auditlog.filters import ResourceTypeFilter\nfrom auditlog.mixins import LogEntryAdminMixin\nfrom auditlog.models import LogEntry\n\n\nclass LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):\n l... | python | edit | 1 | 0 | mit | 33620c30a7e79243a9a1f32cdad7e2af8e1fa278 | jjkester/django-auditlog | auditlog/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nConvenience functions for in memory deduplication\n\"\"\"\n\nimport collections\nimport dedupe.core\n\n \n\ndef dataSample(data, sample_size):\n '''Randomly sample pairs of records... | python | edit | 5 | 4 | mit | ddcb5b11a2f050e1eb8ae185888dde2ef1c66d72 | dedupeio/dedupe-examples,dedupeio/dedupe,neozhangthe1/dedupe,tfmorris/dedupe,datamade/dedupe,pombredanne/dedupe,datamade/dedupe,nmiranda/dedupe,pombredanne/dedupe,neozhangthe1/dedupe,dedupeio/dedupe,davidkunio/dedupe,01-/dedupe,01-/dedupe,nmiranda/dedupe,tfmorris/dedupe,davidkunio/dedupe | dedupe/convenience.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom string import Template\nfrom collections import defaultdict\nimport os\nimport yaml\n\n\ndef load_defaults():\n skipper_conf = 'skipper.yaml'\n defaults = {}\n if os.path.exists(skipper_conf):\n with open(skipper_conf) ... | python | edit | 1 | 5 | apache-2.0 | 508c9ef5f7dfd974fdad650cf1a211dad9d41db5 | Stratoscale/skipper,Stratoscale/skipper | skipper/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\n\nfrom game import Game, DiscState\n\nclass SelfPlay:\n\n def __init__(self, game):\n self.game = game\n\n def play(self):\n while self.game.winner is None:\n col_index = self.calc_move(self.game.current_player)\... | python | edit | 3 | 6 | mit | 1e150c4d5797f17ba8bea53d328cb613adc6bc0f | misterwilliam/connect-four | self_play.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python\nimport sys, time, optparse, os\nimport PEATSA.Core as Core\nimport PEATSA.WebApp as WebApp\nimport ConstructJob\nimport MySQLdb\n\nusage = \"usage: %prog [options]\"\n\nparser = optparse.OptionParser(usage=usage, version... | python | edit | 4 | 0 | mit | 0c3a0fd8eee8ca4ced29dbb69570aa1605ea0d5d | dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat | PEATSA/Database/Scripts/JobMailer.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.test import TestCase\nfrom django.utils import timezone\n\nfrom ..utils import convert_tstamp, plan_from_stripe_id\n\n\nclass TestTimestampConversion(TestCase):\n\n def test_conversion_without_field_name(se... | python | edit | 1 | 1 | mit | 8fa89c8642721896b7b97ff928bc66e65470691a | pinax/django-stripe-payments | pinax/stripe/tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nBLUE = '\\033[94m'\nGREEN = '\\033[92m'\nYELLOW = '\\033[93m'\nRED = '\\033[91m'\nENDC = '\\033[0m'\nBOLD = '\\033[1m'\nUNDERLINE = '\\033[4m'\n\ndef green(text):\n return GREEN + text + ENDC\n\ndef red(text):\n return RED + text + EN... | python | edit | 1 | 1 | mit | 4dabc48455ebb8f22d37cd964ceb16373f784362 | EliRibble/mothermayi | mothermayi/colors.py | rejected_duplicate | Near-duplicate of sample 5848 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport extractor.ui.mainapplication as ui\nimport Tkinter as tk\n\ndef main():\n## root = tk.Tk()\n## root.title('SNES Wolfenstein 3D Extractor')\n## root.minsize(400, 100)\n## ui.MainApplication(root).pack(side=\"top\", fill=\"... | python | edit | 3 | 1 | mit | 70cc77a9146f9d4afd78df9a2f8da8673f0320de | adambiser/snes-wolf3d-extractor | extractor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response\nfrom django.shortcuts import redirect\n\nfrom models import DownloadLink\n\ndef index(request):\n links = DownloadLink.objects.all()\n context = {'links': list(links)}\n return rende... | python | edit | 3 | 1 | bsd-3-clause | 316a6583036ca18cfdf1a95a122aa2367237fa2c | ProgVal/Supybot-website | get/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nfrom lib import Leap\nfrom lib.Leap import Bone\n\n'''\ngets the current frame from controller\nfor each finger, stores the topmost end of each bone (4 points)\nadjusts bone location relativity by subtracting the center of the ... | python | edit | 2 | 5 | mit | 1e50bdf90756a79d45b0c35353d007c5dad2abfc | ssaamm/sign-language-tutor,ssaamm/sign-language-translator,ssaamm/sign-language-translator,ssaamm/sign-language-tutor | hand_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n__version__ = '0.9.1'\n\nENCODINGS = ['Base64',\n 'Base64 URL',\n 'Base32',\n 'Hex',\n 'URL',\n 'HTML',\n 'Rot13',\n 'UTF8',\n 'UT... | python | edit | 2 | 0 | apache-2.0 | 4bd6ed79562435c3e2ef96472f6990109c482117 | takeshixx/deen,takeshixx/deen | deen/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.apps import apps as django_apps\n\nfrom .signals import connect\n\n__version__ = '0.0.1'\ndefault_app_config = 'diffs.apps.DiffLogConfig'\n\nklasses_to_connect = []\n\n... | python | edit | 1 | 3 | mit | ff06ce55d0856cff774bdec5f0e872e093216bce | linuxlewis/django-diffs | diffs/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"PyModels package.\"\"\"\n\nimport os as _os\nfrom . import LI_V01_01\nfrom . import TB_V02_01\nfrom . import BO_V03_02\nfrom . import TS_V03_03\nfrom . import SI_V22_02\nfrom . import coordinate_system\n\n\nwith open(_os.path.join(__p... | python | edit | 4 | 0 | mit | 31d9644f1f5790e63affd89fd0f2145777e8f0f6 | lnls-fac/sirius | pymodels/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib.parse\nimport urllib.request\nimport http.cookiejar\n\nurl = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'\nvalues = {'usuario' : 'admin',\n 'senha' : 'tke'}\n\ncj = http.cookiejar.Cookie... | python | edit | 1 | 0 | mit | 33f94c28500c96841b1bf5ce507e418364ea556f | taschetto/sublimeSettings,taschetto/sublimeSettings | StarWebTkeDesenv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC.\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\... | python | edit | 3 | 1 | apache-2.0 | 83d4c5b9b1f7ed9b75ae04464423b7ca4b5d627d | plumgrid/plumgrid-nova,adelina-t/nova,houshengbo/nova_vmware_compute_driver,cyx1231st/nova,redhat-openstack/nova,noironetworks/nova,jeffrey4l/nova,Stavitsky/nova,zaina/nova,CloudServer/nova,openstack/nova,sridevikoushik31/nova,eonpatapon/nova,usc-isi/extra-specs,shail2810/nova,sridevikoushik31/nova,russellb/nova,bclau/... | nova/db/sqlalchemy/migrate_repo/versions/037_add_config_drive_to_instances.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, url_for, redirect\nfrom peewee import *\n\napp = Flask(__name__)\ndatabase = SqliteDatabase('developmentData.db')\n\n#class Device(Model):\n\n@app.route('/')\ndef index():\n\t# http://flask.pocoo.or... | python | edit | 7 | 1 | mit | a1c8326b9e520a9f262360ef97e2d5651c2e973e | lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory | inventory.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# load.py\n# loads and formats bp files\n\nimport re\nimport os\nimport os.path\n\n\ndef load(iterator):\n \"\"\"\n Loads lines from an iterator and does line parsing\n\n 1 Handles line continuation\n 2 Handles include statement... | python | edit | 12 | 6 | mit | 6a246c46f5adadc12fe4034c2b25e79196c3c831 | AlexSzatmary/bake | bake/load.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Swarming Authors. All rights reserved.\n# Use of this source code is governed by the Apache v2.0 license that can be\n# found in the LICENSE file.\n\n\"\"\"Configures appstats.\n\nhttps://developers.google.com/appengine... | python | edit | 1 | 2 | apache-2.0 | f6313e28bbf00d65d6a4635b5377f9ad06548de6 | luci/luci-py,luci/luci-py,madecoste/swarming,luci/luci-py,pombreda/swarming,madecoste/swarming,madecoste/swarming,pombreda/swarming,pombreda/swarming,luci/luci-py,pombreda/swarming,madecoste/swarming | appengine_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\n__author__ = 'Louis Taylor'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\n__all__ = ['Etcd3Client', 'client']\n\nimport grpc\n\nfrom etcd3.etcdrpc import rpc_pb2 as etcdrpc\nimport etcd3.exceptio... | python | edit | 1 | 1 | apache-2.0 | 1abe172a31805d26a02b4c57d940c9afcc60ce78 | kragniz/python-etcd3 | etcd3/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# No shebang line, this module is meant to be imported\n#\n# Copyright 2014 Ambient Entertainment GmbH & Co. KG\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with t... | python | edit | 1 | 0 | apache-2.0 | d0728b29514c0731dedee662ce19e73181bc4c34 | pyfarm/pyfarm-master,pyfarm/pyfarm-master,pyfarm/pyfarm-master | pyfarm/models/gpu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport socket\nimport atexit\nimport pygame\nfrom message import Message\n\n\nPRECISION = 3\n\nhost = \"localhost\"\nport = 9999\n\n# create a socket object and connect to specified host/port\ns = socket.socket(soc... | python | edit | 1 | 1 | mit | a64221bbf3ebc2c1be24c82870f1f233bac10cd4 | thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x | app_v2/client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 - *-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport examples.basic_usage\nimport examples.dataset\nimport examples.variant_ts_difficulties\nimport examples.variants\n\n\ndef test_datas... | python | edit | 1 | 1 | mit | 4c69afe07533c37c3780b653d343e795cc515c5c | cihai/cihai,cihai/cihai-python,cihai/cihai | tests/test_examples.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# File: badgeeventreminder.py\n# Version: 1\n# Description: Easter egg\n# License: MIT\n# Authors: Renze Nicolai <<EMAIL>>\n\nimport virtualtimers, time, appglue, badge\n\n# Tue Aug 8 13:30:00 2017 (CEST)\nwhenToTrigger = 1502191800 - 600\... | python | edit | 1 | 3 | mit | c55b587667887732f7b64b6dcf3a8c806c1c85c0 | SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32 | esp32/modules/tasks/badgeeventreminder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib.request\nimport json\n\nclass Wikia:\n wiki_name = \"\"\n\n def __init__(self, wiki):\n self.wiki_name = wiki\n\n def search(self, term, limit=1):\n # Search for a page on Wikia\n # TODO: make lim... | python | edit | 1 | 1 | apache-2.0 | 215e02ea7a5aecd73fcef39f7aac3e6622dcf906 | StarbotDiscord/Starbot,dhinakg/BitSTAR,StarbotDiscord/Starbot,dhinakg/BitSTAR | api/wikia.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# tests.__init__\n\nimport os\nimport os.path\nimport shutil\nimport tempfile\nimport yvs.shared as yvs\nfrom mock import patch\n\n\nyvs.ALFRED_DATA_DIR = os.path.join(tempfile.gettempdir(), 'yvs')\nyvs.PREFS_PATH = os.path.join(yvs.ALFRED_... | python | edit | 1 | 2 | mit | f90467edaf02ae66cdfd01a34f7e03f20073c12d | caleb531/youversion-suggest,caleb531/youversion-suggest | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import migrations\n\n\ndef drop_events(apps, schema_editor):\n Event = apps.get_model('logging', 'Event')\n Event.objects.filter(event_type='openstack_security_group_rule_pulled').delete()\n\n\nclass Migration(migration... | python | edit | 1 | 0 | mit | 5d7a70d2d5e5934d1804d7aac69fd6c79d2ac9a7 | opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind | src/waldur_core/logging/migrations/0008_drop_sec_group_rules_pulling_events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\n__version__ = \"0.1.0-1\"\n\ndef _try_init_git_attrs():\n try:\n _init_git_commit()\n except (OSError, subprocess.CalledProcessError):\n pass\n else:\n try:\n _init_gi... | python | edit | 1 | 3 | apache-2.0 | 49e89bee4a7c5e241402766072ae60697c136ca6 | guildai/guild,guildai/guild,guildai/guild,guildai/guild | guild/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom django.db.models import Manager\nfrom django.template.loader import render_to_string\nimport re\n\n\nclass TermManager(Manager):\n def replace_dict(self):\n t = 'terms/term_replace.html'\n d = {}\n ... | python | edit | 1 | 2 | bsd-3-clause | 3a80d6670b32912e091c6f5ca102e33899de117e | philippeowagner/django-terms,BertrandBordage/django-terms,philippeowagner/django-terms,BertrandBordage/django-terms | terms/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nscrapple.utils.exceptions\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFunctions related to handling exceptions in the input arguments\n\"\"\"\n\nimport re\n\nclass InvalidType(ValueError):\n\t\"\"\"Exception class for invalid type in arguments.\"... | python | edit | 1 | 12 | mit | 587cfa978eb2d2d6708061016836710ca7e3057b | AlexMathew/scrapple,AlexMathew/scrapple,scrappleapp/scrapple,scrappleapp/scrapple,AlexMathew/scrapple | scrapple/utils/exceptions.py | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom werkzeug.exceptions import ServiceUnavailable\nfrom werkzeug.datastructures import MultiDict\nfrom werkzeug.urls import url_parse\n\nfrom flask import current_app, request, redirect, flash, Markup\n\nfrom .. import m... | python | edit | 3 | 3 | mit | 667182bf3460e2237255b00b0eea20a1cf4a83ab | alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend | app/main/views/feedback.py | rejected_duplicate | Near-duplicate of sample 4666 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom wordbridge.html import HtmlBuilder\n\nhtml = HtmlBuilder()\n\ndef top_level_element(tag_name):\n return TopLevelElement(tag_name)\n\nclass TopLevelElement(object):\n def __init__(self, tag_name):\n self._tag_name = tag_nam... | python | edit | 1 | 3 | bsd-2-clause | c191101ff26a9931c8aeb92bc6ff68f7a0baf95a | mwilliamson/wordbridge | wordbridge/mappings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from future_builtins import *\nexcept ImportError:\n pass\n\ntry:\n input = raw_input\n range = xrange\nexcept NameError:\n pass\n\ntry:\n string_types = basestring\nexcept NameError:\n string_types = str\n \n... | python | edit | 1 | 3 | mit | b75751d1c4ec58027173c66a869eac1319a36d7a | AnyBody-Research-Group/AnyPyTools | src/anypytools/utils/py3k.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pygame\n\n\nclass Graphic:\n car_color = (255, 50, 50)\n car_width = 3\n road_color = (255, 255, 255)\n road_width = 6\n draw_methods = {\n 'Car': 'draw_car',\n 'Road': 'draw_road',\n }\n\n def __in... | python | edit | 1 | 2 | mit | ee3b11a7a15535ffe52a6bdd493819fbd76b2300 | thibault/vroom | vroom/graphics.py | rejected_duplicate | Near-duplicate of sample 930 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('logger', '0005_instance_xml_hash'),\n ]\n\n # ... | python | edit | 1 | 0 | bsd-2-clause | 66f467c64a0dbfcbb81d9edc74e506c076aac439 | kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat | onadata/apps/logger/migrations/0006_add-index-to-instance-uuid_and_xform_uuid.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom openxc.sources import UsbDataSource, DataSourceError\n\nclass UsbDataSourceTests(unittest.TestCase):\n def setUp(self):\n super(UsbDataSourceTests, self).setUp()\n\n def test_create(self):\n def c... | python | edit | 4 | 1 | bsd-3-clause | 5fd879dbd5278d54a6659eb060f959af36556e1e | openxc/openxc-python,openxc/openxc-python,openxc/openxc-python | tests/test_usb.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom core.models import ApplicationVersion as ImageVersion\nfrom rest_framework import serializers\nfrom api.v2.serializers.summaries import LicenseSerializer\nfrom api.v2.serializers.summaries import ImageVersionSummarySerializer\nfrom api... | python | edit | 1 | 0 | apache-2.0 | df8c19fe4679aa0d4fff90a15efcf4183a8ec8c1 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | api/v2/serializers/details/image_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\ninstall_requires = (\n 'html2text',\n 'matterhook',\n 'exchangelib',\n)\n\nsetup(name='calendarBot',\n version='0.1',\n description='Mattermost cale... | python | edit | 1 | 0 | mit | 44ff13234dcc8452d525eb0c648b350243b81ddb | mharrend/matterbot-calendarBot,mharrend/matterbot-calendarBot | calendarBotModule/setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.