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.contrib import admin\nfrom .models import Protocol, Topic, Institution\n\n\nclass ProtocolAdmin(admin.ModelAdmin):\n list_display = ['number', 'start_time', 'get_topics', 'information', 'majority', 'current_majority', 'get_ab... | python | edit | 1 | 0 | mit | c790e1dd756495f0e34ff3c2cdadb02b4d6ee320 | Hackfmi/Diaphanum,Hackfmi/Diaphanum | protocols/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import (Blueprint, render_template, request,\n flash, url_for, redirect, session)\nfrom flask.ext.mail import Message\n\nfrom ..extensions import db, mail\nfrom .forms import MakeAppoi... | python | edit | 4 | 9 | bsd-3-clause | 2db6e8e294059847251feb9610c42180ae44e05b | wpic/flask-appointment-calendar,wpic/flask-appointment-calendar | fbone/appointment/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\n\nimport numpy as np\n\n\nclass ArrayHeap(object):\n\n\n def __init__(self, sz, data = None):\n self.sz = sz\n self.cnt = 0\n self.heap = [0 for i in range(sz + 1)]\n if data is not ... | python | edit | 1 | 8 | apache-2.0 | f694b582e72412d4022d6ff21a97d32f77484b9b | free-free/algorithm,free-free/algorithm | heap/heap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport unittest\nimport subprocess\n\nclass TestWilkins(unittest.TestCase):\n\n def test_cliusage(self):\n output = subprocess.check_output(['./wilkins.py', '--word', 'remain', '--output', 'json'])\n se... | python | edit | 1 | 1 | mit | f075f083d002cb7ca3819ec1115eb82681b1e9b1 | az-labs/wilkins-python | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport xml.etree.ElementTree as ET\nfrom credentials import app_key, user_key, corp_id, report_id\n\nbase_url = 'https://prod3.agileticketing.net/api/reporting.svc/xml/render'\ndate = '&DatePicker=thisweek'\nreport = '&Memb... | python | edit | 3 | 1 | mit | 1ade5cef22e162ce07edb6d94859268727da4949 | deadlyraptor/reels | agile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys, os\nfrom paste.deploy import loadapp, loadserver\nimport logging\n\nif __name__ == '__main__':\n\tlogging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO)\n\trealfile = os.path.real... | python | edit | 1 | 0 | apache-2.0 | 5d6b729232e086212ea46590d80b02366ae5a236 | NCI-Cloud/reporting-api,NCI-Cloud/reporting-api,NeCTAR-RC/reporting-api,NeCTAR-RC/reporting-api | bin/start.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gem.settings import * # noqa: F401, F403\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'gem_test.db',\n }\n}\n\nDEBUG = True\nCELERY_ALWAYS_EAGER = True\n\nSTATICFILES_STORAGE ... | python | edit | 1 | 0 | bsd-2-clause | e598426d190fbe9ccd6a2f11e4fd75de6e749071 | praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem | test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# BULKSMS Config.\nCONFIG = {\n 'BULK_SMS': {\n 'AUTH': {\n 'USERNAME': '',\n 'PASSWORD': ''\n },\n 'URL': {\n 'SINGLE': 'https://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0',\n... | python | edit | 1 | 0 | mit | 62eea0104615b5d75183d5392fe250fa07d2a988 | tsotetsi/django-bulksms | src/bulksms/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\n\nfrom django.http import HttpResponse\n\nfrom corehq.apps.locations.permissions import user_can_access_location_id\nfrom custom.icds_core.view_utils import icds_pre_release_features\n\n\ndef can_access_location... | python | edit | 3 | 5 | bsd-3-clause | f6b40cbe9da0552b27b7c4c5d1a2d9bb0a75dafd | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | custom/icds_reports/permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport getpass\nimport os\n\nimport gnupg\n\n\nclass GPG(object):\n def __init__(self, keyid):\n self.gpg = gnupg.GPG(use_agent=False)\n self.keyid = keyid\n if not self.keyid:\n # Compat with how Freight ... | python | edit | 1 | 4 | apache-2.0 | d1a96f13204ad7028432096d25718e611d4d3d9d | coderanger/depot | depot/gpg.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom apistar import Route, Include\nfrom apistar.docs import docs_routes\nfrom apistar.statics import static_routes\nfrom project.views import welcome\n\nroutes = [\n Route('/', 'GET', welcome),\n Include('/docs', docs_routes),\n I... | python | edit | 1 | 0 | bsd-3-clause | a38e293d76beaa71893a8f5c4be2ea562d6d3fc2 | encode/apistar,rsalmaso/apistar,rsalmaso/apistar,encode/apistar,tomchristie/apistar,tomchristie/apistar,tomchristie/apistar,thimslugga/apistar,thimslugga/apistar,rsalmaso/apistar,encode/apistar,rsalmaso/apistar,encode/apistar,thimslugga/apistar,thimslugga/apistar,tomchristie/apistar | apistar/layouts/standard/project/routes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n... | python | edit | 1 | 3 | apache-2.0 | d4aab57bf6173334fa2dbd82eef74b786473ef3d | WebSpider/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,damienmarie-alation/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,bernii/djangosaml2,damienmarie-alation/djangosaml2,knaperek/djangosaml2,WebSpider/djangosaml2,writepython/djangosaml2,MiguelSR/djangosaml2,knaperek/djangosaml2,azavea/django... | djangosaml2/templatetags/idplist.py | rejected_duplicate | Near-duplicate of sample 8975 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on 1 jun. 2013\n\n@author: sander\n'''\nfrom .container_node import ContainerNode\n\n\nclass DDTContainerNode(ContainerNode):\n pass\n\n```\n\nApply this change: Add a bit of docs"
},
{
"role": "assistant",
"cont... | python | edit | 1 | 0 | bsd-3-clause | d636d8e74514bbda29170b18ef3de90dfbd96397 | steffann/pylisp | pylisp/application/lispd/address_tree/ddt_container_node.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom selenium.webdriver.support.ui import Select\nfrom page_objects import PageObject, PageElement, MultiPageElement\n\nclass SettingsPage(PageObject):\n return_link = PageElement(css='.mui--text-title a.appbar-c... | python | edit | 1 | 2 | mit | b6e9215457eba813f91c9eb4a8b96f8652bcd5fc | XeryusTC/projman,XeryusTC/projman,XeryusTC/projman | functional_tests/pages/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test report generation management command calls task correctly"
},
{
"role": "assistant",
"content": "import pytz\ntry:\n import mock\nexcept ImportError:\n from unittest import mock\n\ntry:\n from StringIO import String... | python | new_file | 3 | 1 | bsd-3-clause | bfad91e9685b94f7c1072126d44ef29c9235f973 | praekelt/hellomama-registration,praekelt/hellomama-registration | reports/management/commands/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"blueprint.py\"\"\"\n\nimport flask\nfrom werkzeug.exceptions import HTTPException\nfrom werkzeug.exceptions import default_exceptions\n\nfrom jsonrpcserver import exceptions\nfrom jsonrpcserver import logger\nfrom jsonrpcserver import... | python | edit | 1 | 2 | mit | 0e3da072c5ff62996ebed9d5d6909bbf9bb4b30f | bcb/jsonrpcserver | jsonrpcserver/blueprint.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport numpy as np\nimport neurokernel.LPU.utils.visualizer as vis\nimport networkx as nx\n\nnx.readwrite.gexf.GEXF.convert_bool = {'false':False, 'False':False,\n 'true':True, 'True':True}\n\nG = nx... | python | edit | 3 | 0 | bsd-3-clause | 154659f2126cd83e0a52af3d1a84620ca5c52409 | cerrno/neurokernel | examples/generic_lpu/visualize_output.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom threading import Semaphore\nfrom os.path import basename\nfrom rate import ratelimiter\nimport requests\n\n\nclass VirusTotal():\n\n def __init__(self, apikey, limit=4, every=60):\n self.semaphore = Semaphore(limit)\n ... | python | edit | 4 | 2 | mit | 68287347cacae6a7836698cfb11523c8819628c9 | enricobacis/playscraper | virustotal/vt.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nKnowledge provider that will respond to requests made by the rdf publisher or another bot.\n\"\"\"\nfrom sleekxmpp.plugins.base import base_plugin\nfrom rhobot.components.storage.client import StoragePayload\nfrom rdflib.namespace i... | python | edit | 1 | 3 | bsd-3-clause | 4a67ee6df306fa7907ef76647446e46ae1bfea99 | rerobins/rho_erudite | erudite/components/knowledge_provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass FormMixin(object):\n \"\"\"Mixin to provide form validation and data cleaning of GET or POST\n requests.\n \"\"\"\n form_class = None\n\n @property\n def form(self):\n \"\"\"Returns a validated form dict or an... | python | edit | 3 | 4 | bsd-3-clause | 7c0d68b1bce27d026b69e3a069c549ab560b0f3d | barseghyanartur/django-spillway,kuzmich/django-spillway,bkg/django-spillway | spillway/mixins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ophyd import PVPositionerPC, EpicsSignal, EpicsSignalRO\nfrom ophyd import Component as Cpt\n\n# Undulator\n\nclass Undulator(PVPositionerPC):\n readback = Cpt(EpicsSignalRO, '-LEnc}Gap')\n setpoint = Cpt(EpicsSignal, '-Mtr:2}Inp... | python | edit | 2 | 0 | bsd-2-clause | b2adc19e5f28c16bc7cfcd38ed35043d7b1fbe29 | NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd | profile_collection/startup/15-machines.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pymoku import Moku, MokuException, NoDataException\nfrom pymoku.instruments import *\nimport time, logging, traceback\n\nlogging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')\nlogging.getLogger('pymoku').setLeve... | python | edit | 4 | 0 | mit | e18153ba918592bedb1ae363afc2b437db7576db | benizl/pymoku,liquidinstruments/pymoku | examples/livestream_datalogger.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tornado import gen, web\n\nfrom remoteappmanager.handlers.base_handler import BaseHandler\n\n\nclass HomeHandler(BaseHandler):\n \"\"\"Render the user's home page\"\"\"\n\n @web.authenticated\n @gen.coroutine\n def get(self... | python | edit | 1 | 1 | bsd-3-clause | f62278c420429cfe9a3f2a8903f902ae24bdd95d | simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote | remoteappmanager/handlers/home_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom ..compat import NoReverseMatch, render, render_to_string, reverse\n\n\ndef render_embed(nodes=None, request=None):\n context = {}\n\n if nodes is None:\n ... | python | edit | 1 | 3 | bsd-3-clause | d5b068b2efc5fca30014ac7b4d58123461bfbdc1 | 5monkeys/djedi-cms,5monkeys/djedi-cms,5monkeys/djedi-cms | djedi/utils/templates.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject\nfrom .validators import boolean\n\n\nclass Graph(AWSObject):\n resource_type = \"AWS::Detective::Graph... | python | edit | 1 | 0 | bsd-2-clause | 248fda4f499375b24a2f670569259f0904948b7e | cloudtools/troposphere,cloudtools/troposphere | troposphere/detective.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Оповещение администратора о возникших ошибках \"\"\"\n\nfrom traceback import format_exception, format_exc\nfrom lib.config import emergency_id\nfrom lib.commands import vk, api\n\n\nclass ErrorManager:\n\t\"\"\" Упрощенное оповещени... | python | edit | 1 | 2 | mit | 916b86865acf0297293e4a13f1da6838f9b2711f | Varabe/Guild-Manager | scripts/lib/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015,2019 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Tools for reading, calculating, and plotting with weather data.\"\"\"\n\n# What do we wa... | python | edit | 1 | 0 | bsd-3-clause | 20ecbcf76581caca255572e634883bc3746fe41f | ShawnMurd/MetPy,Unidata/MetPy,dopplershift/MetPy,dopplershift/MetPy,Unidata/MetPy | src/metpy/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom .models import SitePermission\n\n\nadmin.site.register(SitePermission)\n\n```\n\nApply this change: Create AdminViewPermission on contrib multisite"
},... | python | edit | 1 | 2 | mit | 146e35f48774173c2000b8a9790cdbe6925ba94a | opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps | opps/contrib/multisite/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\n\ndef parse_opening_list(filename):\n with open(filename) as f:\n open_count = dict()\n openings = []\n for line in (raw.strip() for raw in f):\n open_count.setdefault(line... | python | edit | 1 | 7 | mit | 7e25a0097c3a4e7d37d75f6e90bcee2883df0a46 | MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess | analysis/opening_plot.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 models, migrations\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('contenttypes', '00... | python | edit | 1 | 0 | bsd-3-clause | dbe5c25e302b4b71603a94a9519e74605714284c | matagus/django-generic-links,matagus/django-generic-links | generic_links/migrations/0001_initial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\ntry:\n NullHandler = logging.NullHandler\nexcept AttributeError:\n class NullHandler(logging.Handler):\n def emit(self, record):\n pass\n\nlog = logging.getLogger(\"statzlogger\")\nlog.addHandler(Nu... | python | edit | 1 | 2 | isc | bc92988baee2186fe5b746751fb5d2e3ec6cb8d9 | whilp/statzlogger | statzlogger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom unittest import TestCase\n\nfrom byceps.application import create_app\nfrom byceps.database import db\n\n\nclass AbstractAppTestCase(TestCase):\n\n def setUp(self):\n self.app = create_app('test', i... | python | edit | 1 | 1 | bsd-3-clause | 9bdfdc860264aa200d74bcaf813c2f5055307a3b | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | webapp/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding:utf8 -*-\nfrom fabric.api import env\n\n\nclass RootUser(object):\n \"\"\"\n Class to define Root user.\n \"\"\"\n uid=0\n\n @classmethod\n def sudo_identity(cls):\n return None\n\n\nclass DeployUser(... | python | edit | 1 | 1 | bsd-2-clause | a3eb818fb9201d5fdf520ce87c9da1d11e1c7e75 | timsavage/denim | denim/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport urllib\nfrom celery import shared_task\nfrom apps.vacancies.parsers import VacancySync, YandexRabotaParser\n\n\n@shared_task(ignore_result=True)\ndef update_vacancies():\n fulltime = {\n 'rid': 213,\n ... | python | edit | 1 | 1 | bsd-3-clause | a5387c85a898717a5ae13dafe6f0f2b19f44e749 | moscowdjango/moscowdjango,moscowdjango/moscowdjango,moscowdjango/moscowdjango,VladimirFilonov/moscowdjango,moscowpython/moscowpython,VladimirFilonov/moscowdjango,moscowpython/moscowpython,VladimirFilonov/moscowdjango,moscowpython/moscowpython | apps/vacancies/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, os.path\n\nbase_dir = os.getcwd()\nscript_dir = os.path.realpath(os.path.dirname(__file__))\n\ndef get_crawl_dir():\n return os.path.join(base_dir, \"crawl\")\n\ndef revision_present(version, revision):\n return os.path.isd... | python | edit | 1 | 1 | mit | f9c1393b9773a5df993a98b877ce5178d44c8575 | flodiebold/crawl-versions | common.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\"\"\"Template\"\"\"\n\nimport peanut\nimport jinja2\nfrom os import path\nfrom jinja2 import FileSystemLoader\nfrom jinja2.exceptions import TemplateNotFound\n\n\nclass SmartLoader(FileSyst... | python | edit | 5 | 5 | mit | 50488976619795621b5eb6dd3e427f6f82188426 | zqqf16/Peanut,zqqf16/Peanut,zqqf16/Peanut | peanut/template.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2019 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nimport time\nimport numpy as np\nimport... | python | edit | 2 | 0 | bsd-3-clause | 9b4e803f68b33f193f0a41784e2f51672d69c4c2 | google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang | benchmarks/numpy-bench.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport numpy\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import functions\nfrom chainer import testing\n\n\nif cuda.available:\n cuda.init()\n\n\nclass TestDropout(unittest.TestCase):\n\n def setUp(sel... | python | edit | 1 | 2 | mit | 0281aaa0868d0bfa6ecb7368cff89b4af6b57129 | yanweifu/chainer,hvy/chainer,cupy/cupy,ysekky/chainer,woodshop/complex-chainer,niboshi/chainer,tkerola/chainer,kashif/chainer,kikusu/chainer,jnishi/chainer,okuta/chainer,niboshi/chainer,benob/chainer,chainer/chainer,AlpacaDB/chainer,sou81821/chainer,umitanuki/chainer,tscohen/chainer,cupy/cupy,laysakura/chainer,masia02/... | tests/functions_tests/test_dropout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n Tappy Terror Tests\n ------------------\n\n Tests Tappy Terror\n\n :license: MIT; details in LICENSE\n\"\"\"\n\nimport tappy\nimport unittest\n\nclass TappyTerrorTestCase(unittest.TestCase):\n ... | python | edit | 1 | 1 | mit | 169df99132c9f4d0d44a9207184e53537d0688ec | jculpon/tappy-flask,jculpon/tappy-flask | tappy_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.test import TestCase\n\nfrom fortuitus.fcore.factories import UserF\nfrom fortuitus.fcore.models import FortuitusProfile\n\n\nclass HomeViewTestCase(TestCase):\n def test_renders_... | python | edit | 1 | 1 | mit | bc05c56c60fa61f045079a4b3ef2dea185b213b4 | elegion/djangodash2012,elegion/djangodash2012 | fortuitus/fcore/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import List\n\nfrom pyosmo.algorithm.base import OsmoAlgorithm\nfrom pyosmo.history.history import OsmoHistory\nfrom pyosmo.model import TestStep\n\n\nclass WeightedAlgorithm(OsmoAlgorithm):\n \"\"\" Weighted random algorithm... | python | edit | 1 | 10 | mit | 2f44eb65e22672a894cced9c9de8d64f72d0fc39 | OPpuolitaival/pyosmo,OPpuolitaival/pyosmo | pyosmo/algorithm/weighted.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\n# defaults and constants\nfrom .utils import DEFAULT_PALETTE\nfrom ._chart_options import default_options as defaults\n\n# main components\nfrom ._chart import Chart\n\n# operations and attributes f... | python | edit | 14 | 0 | bsd-3-clause | 7a3325a7fe5c99116587751ae58480b3b83760d1 | aavanian/bokeh,philippjfr/bokeh,KasperPRasmussen/bokeh,phobson/bokeh,philippjfr/bokeh,ptitjano/bokeh,DuCorey/bokeh,ericmjl/bokeh,ptitjano/bokeh,msarahan/bokeh,justacec/bokeh,maxalbert/bokeh,draperjames/bokeh,timsnyder/bokeh,ChinaQuants/bokeh,KasperPRasmussen/bokeh,jakirkham/bokeh,DuCorey/bokeh,DuCorey/bokeh,dennisobrie... | bokeh/charts/__init__.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n================================================================================\n:mod:`header` -- XML handler for header\n================================================================================\n\n..... | python | edit | 1 | 3 | mit | e949f5cb8ad2a8e8642ce9307cb8eedf3caf1254 | pyhmsa/pyhmsa | src/pyhmsa/fileformat/xmlhandler/header.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date\n\nfrom base import Calendar\nfrom main import JulianCalendar\n\nclass JulianToGregorianCalendar(Calendar):\n def date(self, year, month, day):\n gregorian_date = date(year, month, day)\n if gregor... | python | edit | 1 | 2 | apache-2.0 | c108c418935b2b5ea8ec42696a8d11f97601e552 | jwg4/calexicon,jwg4/qual | qual/calendars/historical.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproject = u'beets'\ncopyright = u'2012, Ad... | python | edit | 1 | 0 | mit | e71caded81851c585dcfd2326f8aa4342d9fbd8b | mosesfistos1/beetbox,MyTunesFreeMusic/privacy-policy,PierreRust/beets,multikatt/beets,shamangeorge/beets,mathstuf/beets,diego-plan9/beets,ruippeixotog/beets,mathstuf/beets,parapente/beets,gabrielaraujof/beets,YetAnotherNerd/beets,shamangeorge/beets,kareemallen/beets,swt30/beets,marcuskrahl/beets,Dishwishy/beets,sadatay... | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n eve-swagger.swagger\n ~~~~~~~~~~~~~~~~~~~\n swagger.io extension for Eve-powered REST APIs.\n\n :copyright: (c) 2015 by Nicola Iarocci.\n :license: BSD, see LICENSE for more details.\n\"\"\"\... | python | edit | 1 | 2 | bsd-3-clause | bb6599477ffe696a5d37a781b33f02f5623dc1a2 | nicolaiarocci/eve-swagger | eve_swagger/swagger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\n\"\"\"\nTest tools required by multiple suites.\n\"\"\"\n\nimport contextlib\nimport shutil\nimport subprocess\nimport tempfile\n\nfrom devpi_builder import devpi\n\n\n@contextlib.contextmanager\ndef devpi_server(port=2414... | python | edit | 1 | 3 | bsd-3-clause | 5c8cd5be944da9d765f71e62c42e1525736b14a1 | tylerdave/devpi-builder | tests/tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n###\n# Copyright (c) 2012, spline\n# All rights reserved.\n#\n#\n###\n\nimport os\n\nimport supybot.conf as conf\nimport supybot.registry as registry\nfrom supybot.i18n import PluginInternationalization, internationalizeDocstring\n\n_ = Plu... | python | edit | 8 | 1 | mit | 44cec721b7a0a20059c143124a889f8f7a1fe615 | reticulatingspline/MLB | config.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom matasano.util.converters import hex_to_bytestr\nfrom Crypto.Cipher import AES\n\nif __name__ == \"__main__\":\n\n chal_file = open(\"matasano/data/c8.txt\", 'r');\n\n for line in chal_file:\n ct = hex_to_bytestr(line[:-1])... | python | edit | 3 | 0 | mit | d37f9646b13df624f04050a63d34b3d33e9e6e9e | TheLunchtimeAttack/matasano-challenges,TheLunchtimeAttack/matasano-challenges | python/matasano/set1/c8.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport rslinac\n\ndef run(ini_filename, input_filename, output_filename):\n rslinac.run_beam_solver(ini_filename, input_filename, output_filename)\n\n```\n\nApply this change: Add documentation to cli command arguments"
},
{
"rol... | python | edit | 1 | 1 | apache-2.0 | 886fac0476d05806c5d396f0740bc24f3fa343ed | elventear/rslinac,radiasoft/rslinac,radiasoft/rslinac,elventear/rslinac,elventear/rslinac,radiasoft/rslinac,radiasoft/rslinac,radiasoft/rslinac,elventear/rslinac,elventear/rslinac,elventear/rslinac | rslinac/pkcli/beam_solver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom billing.integrations.amazon_fps_integration import AmazonFpsIntegration as Integration\nfrom django.core.urlresolvers import reverse\nimport urlparse\n\nclass FpsIntegration(Integration):\n def transaction(self, request):\n \... | python | edit | 1 | 1 | bsd-3-clause | 02d1b76067a8c3b2de9abc09cd841fe8b8bd7605 | biddyweb/merchant,spookylukey/merchant,spookylukey/merchant,digideskio/merchant,mjrulesamrat/merchant,agiliq/merchant,SimpleTax/merchant,mjrulesamrat/merchant,biddyweb/merchant,SimpleTax/merchant,agiliq/merchant,digideskio/merchant | example/app/integrations/fps_integration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tornado.web\nimport tornado.escape\nimport json\nimport time\nimport os\n\nimport settings as global_settings\nfrom lib.handlers.base import BaseHandler\n\n\n\nclass EmbedTerminalHandler(BaseHandler):\n\n @tornado.web.authenticate... | python | edit | 6 | 2 | mit | 646bebdef900869c7a53997d6e9ab79150c0257c | SandstoneHPC/sandstone-ide,SandstoneHPC/OIDE,ResearchComputing/OIDE,ResearchComputing/OIDE,SandstoneHPC/OIDE,SandstoneHPC/sandstone-ide,ResearchComputing/OIDE,ResearchComputing/OIDE,SandstoneHPC/sandstone-ide,SandstoneHPC/OIDE | server/apps/webterminal/handlers.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport logging\n\nfrom elasticsearch import Elasticsearch\n\nfrom scrapi import settings\nfrom scrapi.processing.base import BaseProcessor\n\nes = Elasticsearch(\n settings.ELASTIC_URI,\n request_timeout=settings.ELASTIC_... | python | edit | 4 | 3 | apache-2.0 | 077016fbe6ee17c8eb3528b957b05eb4682b8d26 | jeffreyliu3230/scrapi,ostwald/scrapi,felliott/scrapi,felliott/scrapi,fabianvf/scrapi,erinspace/scrapi,fabianvf/scrapi,erinspace/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,icereval/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi | scrapi/processing/elastic_search.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import TheInternetTestCase\nfrom helium.api import go_to, S, get_driver\n\nclass AbTestingTest(TheInternetTestCase):\n\tdef get_page(self):\n\t\treturn \"http://the-internet.herokuapp.com/abtest\"\n\tdef test_ab_variates(self):\n\t\t... | python | edit | 1 | 2 | mit | d142bed6916d8b34509c12623b4802eca9206695 | bugfree-software/the-internet-solution-python | tests/test_ab_testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom genes.brew import commands as brew\nfrom genes.curl.commands import download\nfrom genes.debian.traits import is_debian\nfrom genes.directory import DirectoryBuilder\nfrom genes.mac.traits import is_osx\nfrom genes.tar.commands import ... | python | edit | null | null | mit | bceaa1ef82004076640381619ebc399513e83128 | hatchery/Genepool2,hatchery/genepool | genes/intellij/main.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nimport factory\nfrom django.contrib.auth.models import User\nfrom profiles.models import ImagerProfile\n\n\nclass UserFactory(factory.django.DjangoModelFactory):\n class Meta:\n model = User\n ... | python | edit | 1 | 1 | mit | 36288cf5357d58b0989b090965fd231bb01137ed | edpark13/django-imager | imager/profiles/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick\n# --------------------------------------------... | python | edit | 1 | 0 | mit | 8940d3805f9377654046ff8b00807472b6925149 | only4hj/fast-rcnn,only4hj/fast-rcnn,only4hj/fast-rcnn | lib/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport threading\nimport wx\nfrom styled_text_ctrl import StyledTextCtrl\n\nclass ThreadOutputCtrl(StyledTextCtrl):\n def __init__(self, parent, env, auto_scroll=False):\n StyledTextCtrl.__init__(self, parent, env)\n\n self... | python | edit | 1 | 3 | mit | 874a6eff186d1c1ca6f90d69fd24fad11180c5a9 | shaurz/devo | thread_output_ctrl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itertools import chain\n\ndef threes_and_fives_gen(num=1000):\n for i in range(num):\n if i % 3 == 0 or i % 5 == 0:\n yield i\n\ndef threes_and_fives_fun(n):\n return set(chain(range(3, n+1, 3), range(5, n+1, 5)... | python | edit | 2 | 4 | mit | 4753a6d19d00f9669e864f92730d56aaf31575da | dawran6/project-euler | 1-multiples-of-3-and-5.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.test import TestCase\n\nfrom reviewboard.admin import checks\n\n\nclass UpdateTests(TestCase):\n \"\"\"Tests for update required pages\"\"\"\n\n def tearDown(self):\n # Make sure we... | python | edit | 1 | 1 | mit | 8a73d31a9bbff831be3e92b73ddb0841e61b3457 | brennie/reviewboard,beol/reviewboard,sgallagher/reviewboard,custode/reviewboard,1tush/reviewboard,atagar/ReviewBoard,beol/reviewboard,1tush/reviewboard,davidt/reviewboard,brennie/reviewboard,1tush/reviewboard,Khan/reviewboard,davidt/reviewboard,1tush/reviewboard,Khan/reviewboard,atagar/ReviewBoard,custode/reviewboard,a... | reviewboard/admin/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom . import db\nfrom lazyblacksmith.models import Activity\n\n\nclass IndustryIndex(db.Model):\n\n solarsystem_id = db.Column(\n db.Integer, db.ForeignKey('solar_system.id'), primary_key=True\n )\n ... | python | edit | 1 | 7 | bsd-3-clause | f2005fadb9fb2e2bcad32286a9d993c291c1992e | Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith | lazyblacksmith/models/api/industry_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom odml import Property, Section, Document\n\n\nclass TestProperty(unittest.TestCase):\n\n def setUp(self):\n pass\n\n def test_value(self):\n p = Property(\"property\", 100)\n assert(p.value[0]... | python | edit | 4 | 1 | bsd-3-clause | 80503c24854e976fa4bc86319f6c11dc3a5186b2 | lzehl/python-odml | test/test_property.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# from django.shortcuts import render\nfrom rest_framework import viewsets\nfrom .models import Datapoint, Activity\nfrom .serializers import ActivitySerializer, DatapointSerializer\n\n# Create your views here.\n\n\nclass ActivityViewSet(vi... | python | edit | 1 | 1 | mit | 6047cab9c099c8a6740b7de1006f41e7d10f9f65 | jal-stats/django | jal_stats/stats/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# swift_build_support/diagnostics.py - Diagnostic Utilities -*- python -*-\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n# Licensed under Ap... | python | edit | 1 | 1 | apache-2.0 | 72f8249cb26ad38e77ac74a7d149839fb3a1cf95 | xwu/swift,aschwaighofer/swift,karwa/swift,sschiau/swift,shajrawi/swift,airspeedswift/swift,hooman/swift,devincoughlin/swift,stephentyrone/swift,jmgc/swift,rudkx/swift,rudkx/swift,xwu/swift,allevato/swift,xedin/swift,allevato/swift,apple/swift,benlangmuir/swift,atrick/swift,parkera/swift,tkremenek/swift,hooman/swift,nat... | utils/swift_build_support/swift_build_support/diagnostics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom process import Process\nfrom exit import err_exit\n\n\nclass Python(object):\n \"\"\"A Python interpreter path that can test itself.\"\"\"\n\n def __init__(self, defaults, process=None):\n self.process = process or Process... | python | edit | 1 | 3 | bsd-2-clause | 9d3889a67ff6de69cd539b688cf3c2b9db17f0cb | Jarn/jarn.mkrelease | jarn/mkrelease/python.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Work out now() - 7 days"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python2\n\nfrom datetime import datetime, timedelta\nfrom json import loads\nimport sys\n\nif len(sys.argv) < 2:\n raise Exception(\"Need an amount ... | python | new_file | 2 | 0 | bsd-2-clause | 53080f89af51340b0b2c1854e0a4bf38346c14a8 | bparafina/Shreddit,bparafina/Shreddit,ijkilchenko/Shreddit,ijkilchenko/Shreddit | kill.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Test __str__ methods. \"\"\"\nimport pexpect\n\nfrom . import PexpectTestCase\n\n\nclass TestCaseMisc(PexpectTestCase.PexpectTestCase):\n\n def test_str_spawnu(self):\n \"\"\" Exercise spawnu.__str__() \"\"\"\n # giv... | python | edit | 1 | 2 | isc | 011ad6090e183ce359c0a74bbd2f2530e1d5178c | nodish/pexpect,nodish/pexpect,nodish/pexpect | tests/test_repr.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gym\nimport pytest\n\n# Import for side-effect of registering environment\nimport imitation.examples.airl_envs # noqa: F401\nimport imitation.examples.model_envs # noqa: F401\n\nENV_NAMES = [env_spec.id for env_spec in gym.envs.reg... | python | edit | 1 | 4 | mit | ff12421cc6c3067bac11ece75cf4a16d11859ed0 | HumanCompatibleAI/imitation,humancompatibleai/imitation,humancompatibleai/imitation,HumanCompatibleAI/imitation | tests/test_envs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 *-*\nimport logging\nimport unittest\n\nfrom mongolog import MongoHandler\n\ntry:\n from pymongo import MongoClient as Connection\nexcept ImportError:\n from pymongo import Connection\n\n\nclass TestAuth(unittest.T... | python | edit | 1 | 1 | bsd-2-clause | 029bd1c15a489ab8833ffaff5130995bf4d31c5a | puentesarrin/mongodb-log,puentesarrin/mongodb-log | tests/test_auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom cStringIO import StringIO\n\nimport dbf\n\nfrom csvkit import table\n\ndef dbf2csv(f, **kwargs):\n \"\"\"\n Convert a dBASE .dbf file to csv.\n\n \"\"\"\n db = dbf.Table(f.name)\n\n headers = db.... | python | edit | 2 | 6 | mit | 2234cbdc78e81329c4110f4eb4e69f429d9b6fb5 | bradparks/csvkit__query_join_filter_CSV_cli,matterker/csvkit,unpingco/csvkit,kyeoh/csvkit,Jobava/csvkit,snuggles08/csvkit,dannguyen/csvkit,cypreess/csvkit,jpalvarezf/csvkit,archaeogeek/csvkit,gepuro/csvkit,haginara/csvkit,barentsen/csvkit,bmispelon/csvkit,wjr1985/csvkit,KarrieK/csvkit,onyxfish/csvkit,wireservice/csvkit... | csvkit/convert/dbase.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter4, a code checking framework for Sublime Text 3\n#\n# Written by Markus Liljedahl\n# Copyright (c) 2017 Markus Liljedahl\n#\n# License: MIT\n#\n\n\"\"\"This module exports the AnsibleLint plugin cla... | python | edit | 1 | 0 | mit | 4eff72987144a31ca1dee922a755adc8a5efefb8 | mliljedahl/SublimeLinter-contrib-ansible-lint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bs4 import BeautifulSoup\nfrom requests.auth import HTTPBasicAuth\nimport requests\nimport json\n\ndef parse_content():\n rs = requests.get('http://soundspectra.com/admin/', auth=HTTPBasicAuth('admin', 'h@ckm3'))\n html_data = rs... | python | edit | 2 | 8 | apache-2.0 | 61072f0054abcb50caa813fc35eff194be64727b | ekholabs/icecast_scraper | src/icecast_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom invoke import ctask as task\n\n\n@task(help={\n 'module': \"Just runs tests/STRING.py.\",\n 'runner': \"Use STRING to run tests instead of 'spec'.\",\n 'opts': \"Extra flags for the test runner\",\n 'pty': \"Whether to run ... | python | edit | 1 | 4 | bsd-2-clause | b3e892f476c743a6ed2e2518fd1c9c2bec4d56ae | mrjmad/invocations,singingwolfboy/invocations,pyinvoke/invocations | invocations/testing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport redis\n\nfrom urllib.parse import urlparse\n\nredis_url = os.environ.get('REDISCLOUD_URL', 'redis://localhost:6379') \nredis_url_parse = urlparse(redis_url)\nredis_client = redis.StrictRedis(host=redis_url_parse.hostname, ... | python | edit | 6 | 1 | mit | f495ecb5f9131c2c13c41e78cc3fc2e182bdc8fc | wearhacks/hackathon_hotline | hotline/db/db_redis.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom pylons import config, tmpl_context as c\nfrom pylons.controllers.util import abort\n\n# Conditionally import the trac components in case things trac isn't installed\ntry:\n import os\n os.environ['TRAC_ENV_PAREN... | python | edit | 1 | 3 | bsd-3-clause | 71b72c3f09af86da83a027502d28c9649db1cf86 | Pylons/kai,Pylons/kai | kai/controllers/tracs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jsonrpc import JSONRPCResponseManager\nfrom funcs import d\n\ndef app(environ, start_response):\n if 'POST'!=environ.get('REQUEST_METHOD'):\n if 'OPTIONS'==environ.get('REQUEST_METHOD'):\n start_response('200 OK',[... | python | edit | 1 | 4 | mit | 82d5276b6c9164e4b8bffe74dc3068ed3e6a967e | 1stop-st/jsonrpc-calculator | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\nfrom utils import download_file, create_temp_dir, zip_up_dir, delete_dir\nfrom annotations import sort_annotations_by_time\nfrom videoe... | python | edit | 1 | 3 | mit | 793332d42c6568a79b321a1474f7aca6834e082e | melonmanchan/achso-video-exporter,melonmanchan/achso-video-exporter | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._convert import convert\nfrom . import log\nfrom . import random\nfrom . import version\nfrom .version import module as __version__\nfrom .version import api as __api_version__\n\ndef get_include():\n \"\"\"Returns the directory cont... | python | edit | 7 | 3 | bsd-3-clause | d6e5b3835c7779a3fde7be7004b3d4975c4b9f1a | tiagofrepereira2012/bob.core,tiagofrepereira2012/bob.core,tiagofrepereira2012/bob.core | xbob/core/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom oscar.apps.checkout import session, exceptions\nfrom oscar_vat_moss import vat\n\n\nclass CheckoutSessionMixin(session.CheckoutSessi... | python | edit | 1 | 5 | bsd-3-clause | dcdfd994f1ab79a5fd8e50e7bf478100211a77aa | hastexo/django-oscar-vat_moss,fghaas/django-oscar-vat_moss,arbrandes/django-oscar-vat_moss,fghaas/django-oscar-vat_moss,hastexo/django-oscar-vat_moss,arbrandes/django-oscar-vat_moss | oscar_vat_moss/checkout/session.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, url_for, redirect\nfrom flask import session, escape, request\nfrom peewee import *\n#from datetime import date\n\napp = Flask(__name__)\n# http://docs.peewee-orm.com/en/latest/peewee/quickstart.htm... | python | edit | 6 | 2 | mit | 48213f561c802e5279770cc833a9a5a68575bf72 | lcdi/Inventory,lcdi/Inventory,lcdi/Inventory,lcdi/Inventory | inventory.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.auth.models import User\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\n\n\n# constants to make things clearer elsewhere\nACCEPTED = '... | python | edit | 1 | 1 | isc | 6fafe0e2d10229ac68fd5bc7857b938d7cd5b212 | CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer | wafer/talks/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n#a=[1,2,3,4,5,6,7,8,9,10]\n#print a[:3]\n#print a[-3:]\n#print a[:]\n#print a[::2]\n#print a[8:3:-1]\n#print [1,2,3]+[4,5,6]\n#print [\"Hi\"]*3\n#print 1 in a\n#print max(a)\n#print min(a)\n#print len(a)\n#print lis... | python | edit | 11 | 0 | apache-2.0 | 693f4f52bfed6d25fc32504fcfc8a57e466533a0 | Vayne-Lover/Python | list/list.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.importlib import import_module\n\nfrom linked_accounts import LINKED_ACCOUNTS_HANDLERS\n\n\nHANDLERS = getattr(\n settings,\n ... | python | edit | 1 | 2 | mit | 5d40ec75cd27e3bf9c5fad2a921db84f0b5d672d | zen4ever/django-linked-accounts,zen4ever/django-linked-accounts | linked_accounts/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom time import sleep\nfrom utils.mqtt import publish\nfrom weather import Weather\n\nw = Weather()\n\nwhile True:\n publish(w.basics(),\"stormfly\")\n sleep(600)\n\n```\n\nApply this change: FIX refresh dat... | python | edit | 1 | 0 | mit | 42d667c0478b5b500d765e3d70cc03ec7e7d84d3 | paulfantom/AGH-weather-mqtt | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport romanesco\nimport unittest\n\n\nclass TestSwiftMode(unittest.TestCase):\n def testSwiftMode(self):\n task = {\n 'mode': 'swift',\n 'script': \"\"\"\ntype file;\n\napp (file out) echo_app (string s)\n{\... | python | edit | 1 | 1 | apache-2.0 | cca7e512061948abe05fd25111974f41fa6fb6ec | girder/girder_worker,girder/girder_worker,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,girder/girder_worker | romanesco/plugins/swift/tests/swift_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#... | python | edit | 2 | 5 | apache-2.0 | 9bf6aec99ac490fce1af2ea92bea57b7d1e9acd9 | noironetworks/heat,ntt-sic/heat,openstack/heat,srznew/heat,dragorosson/heat,steveb/heat,gonzolino/heat,pratikmallya/heat,srznew/heat,redhat-openstack/heat,cryptickp/heat,pratikmallya/heat,cwolferh/heat-scratch,pshchelo/heat,NeCTAR-RC/heat,miguelgrinberg/heat,pshchelo/heat,dragorosson/heat,maestro-hybrid-cloud/heat,take... | heat/common/environment_format.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Custom Tinman Handlers add wrappers to based functionality to speed\napplication development.\n\n\"\"\"\nfrom tinman.handlers.session import SessionRequestHandler\n\n```\n\nApply this change: Make the base request handler available by... | python | edit | 4 | 0 | bsd-3-clause | 2f6e13a868f18a516f0eb79efa70f3ae527c4aad | lucius-feng/tinman,gmr/tinman,lucius-feng/tinman,gmr/tinman,lucius-feng/tinman | tinman/handlers/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n \n\"\"\"\n\nimport os\nfrom whaler.dataprep import IO\n\nclass Analysis():\n \"\"\"\n \"\"\"\n def __init__(self):\n self.loc = os.getcwd()\n self.structs = next(os.walk('.'))[1]\n print(self.loc)\n ... | python | edit | 3 | 2 | mit | d937e254ce3c806300ac7763e30bd4303661cba6 | tristanbrown/whaler | whaler/analysis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto3\nimport sys\nfrom colors import green, red\nfrom botocore.exceptions import ClientError\n\ns3_client = boto3.client('s3')\n\n\nclass InvalidTemplateError(BaseException):\n def __init__(self, m):\n self.m = m\n\n de... | python | edit | 1 | 2 | mit | f280bc260b8a48e7b9e5d5d6a4995ca721440712 | flou/brume,geronimo-iia/brume | brume/template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport SimpleHTTPServer, SocketServer\nimport urlparse, os\n\nPORT = 3000\n\nclass MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):\n def do_GET(self):\n\n # Parse query data to find out what was requested\n parsedParams ... | python | edit | 2 | 2 | mit | 1d9b7d855d633da6388daf663398449cfc0e6ab6 | OHIF/Viewers,OHIF/Viewers,OHIF/Viewers | StandaloneViewer/etc/redirectingSimpleServer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python3\n# Python Challenge - 2\n# http://www.pythonchallenge.com/pc/def/ocr.html\n# Keyword: equality\n\n\ndef main():\n alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'\n letters = []\n with open... | python | edit | 1 | 4 | mit | 6500d388fa894bb0ea8cb0ca1328a73cc54ba4e8 | HKuz/PythonChallenge | Challenges/chall_02.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport os\nimport logging\n\nfrom django.http import HttpResponse\nfrom django.views.generic.base import View\n\n\nfrom icalendar import Calendar, Event\n\nfrom wanikani.core import WaniKani, Radica... | python | edit | 1 | 4 | mit | 5631276591cf2c4e3c83920da32857e47286d9c9 | kfdm/wanikani,kfdm/wanikani | wanikani/django.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\ntry:\n import javascript\n import html\nexcept:\n from . import javascript\n from . import html\n\ndef expand(string, start, end, extension=None):\n\n if(re.compile(\"html|htm|xml\").search(extension)):\n return html.ex... | python | edit | 1 | 2 | mit | 878811a673625f9dbe0f41dd0196887f612ecf2e | johyphenel/sublime-expand-region,johyphenel/sublime-expand-region,aronwoost/sublime-expand-region | expand_region_handler.py | rejected_duplicate | Near-duplicate of sample 13996 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICEN... | python | edit | 3 | 1 | apache-2.0 | 7a4aeffc89120d0d5de53837a71f62ee21ba9bd6 | bcgov/gwells,bcgov/gwells,bcgov/gwells,bcgov/gwells | app/backend/wells/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport multiprocessing\nfrom os import getenv\nbind = '127.0.0.1:8001'\nworkers = multiprocessing.cpu_count() * 2\ntimeout = 60\nthreads = multiprocessing.cpu_count() * 2\nmax_requests = 1000\nmax_requests_jitter = 5\n# Read the DEBUG setti... | python | edit | 1 | 0 | apache-2.0 | 97badc176f4a8ac30eb3932359e2e132e36170c4 | sheagcraig/sal,chasetb/sal,sheagcraig/sal,erikng/sal,salopensource/sal,salopensource/sal,chasetb/sal,erikng/sal,chasetb/sal,erikng/sal,chasetb/sal,erikng/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal | docker/gunicorn_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nimport django\n\nsys.path.append(\"/var/projects/museum/\")\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"museum.settings\")\ndjango.setup()\n\nfrom museum_site.models import *\nfrom museum_site.common import... | python | edit | 6 | 3 | mit | d113fd75456c14f651cb9769d922d9394b369d63 | DrDos0016/z2,DrDos0016/z2,DrDos0016/z2 | tools/add_previews.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scoring_engine.engine.basic_check import CHECKS_BIN_PATH\n\nfrom tests.scoring_engine.engine.checks.check_test import CheckTest\n\n\nclass TestSMBCheck(CheckTest):\n check_name = 'SMBCheck'\n required_properties = ['share', 'file... | python | edit | 1 | 0 | mit | 15090b84e1c7359c49cb45aec4d9b4d492f855ac | pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine | tests/scoring_engine/engine/checks/test_smb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Eve W-Space\n# Copyright (C) 2013 Andrew Austin and other contributors\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# t... | python | edit | 1 | 2 | apache-2.0 | 582964f9da6029cd089117496babf9267c41ecd5 | evewspace/eve-wspace,nyrocron/eve-wspace,hybrid1969/eve-wspace,hybrid1969/eve-wspace,acdervis/eve-wspace,marbindrakon/eve-wspace,Unsettled/eve-wspace,proycon/eve-wspace,mmalyska/eve-wspace,evewspace/eve-wspace,gpapaz/eve-wspace,acdervis/eve-wspace,proycon/eve-wspace,marbindrakon/eve-wspace,Zumochi/eve-wspace,marbindrak... | evewspace/core/utils.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\n\nfrom ..semantics import mpq\nfrom .common import OPERATORS, ADD_OP, MULTIPLY_OP\n\n\ndef try_to_number(s):\n try:\n return mpq(s)\n except (ValueError, TypeError):\n ... | python | edit | 3 | 3 | mit | dcc2821cac0619fc2ca5f486ad30416f3c3cfda9 | admk/soap | ce/expr/parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport pandas as pd\n\nimport statsmodels.datasets as datasets\nfrom statsmodels.datasets import co2\nfrom statsmodels.datasets.utils import Dataset\n\n\ndef test_co2_python3():\n # this failed in pd.to_datetime on Py... | python | edit | 1 | 2 | bsd-3-clause | 920e75491f3aaa74980e11086cfebe911c2def4b | josef-pkt/statsmodels,ChadFulton/statsmodels,jseabold/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,jseabold/statsmodels,bashtage/statsmodels,ChadFulton/statsmodels,statsmodels/statsmodels,jseabold/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,statsmod... | statsmodels/datasets/tests/test_data.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.