messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport sys\n\nfrom dataactcore.models.baseInterface import databaseSession\nfrom dataactbroker.fsrs import (\n configValid, fetchAndReplaceBatch, GRANT, PROCUREMENT)\n\n\nlogger = logging.getLogger(__name__)\n\n\nif __nam... | python | edit | 1 | 0 | cc0-1.0 | a234b8dfc45d9e08a452ccc4f275283eb1eb5485 | fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend | dataactbroker/scripts/loadFSRS.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf8\nfrom __future__ import unicode_literals, print_function\n\nfrom os import path\n\nfrom ..language import Language\nfrom ..attrs import LANG\nfrom ..tokens import Doc\n\nfrom .language_data import *\n\n\nclass Japanese(Lang... | python | edit | 5 | 3 | mit | d730eb0c0df2fb6784f7adcce479c4c9588764b9 | raphael0202/spaCy,recognai/spaCy,explosion/spaCy,Gregory-Howard/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,honnibal/spaCy,recognai/spaCy,raphael0202/spaCy,explosion/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,aikramer2/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,raphael0202/s... | spacy/ja/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom db.models.searches import Search\n\n\nclass SearchSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = Search\n fields = ['id', 'name', 'query', 'meta']\n\n```\n\... | python | edit | 1 | 2 | apache-2.0 | c814fe264c93dfa09276474960aa83cdb26e7754 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon/api/searches/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#encoding:utf-8\n#author:dbr/Ben\n#project:tvnamer\n#repository:http://github.com/dbr/tvnamer\n#license:Creative Commons GNU GPL v2\n# http://creativecommons.org/licenses/GPL/2.0/\n\n\"\"\"Test tvnamer's filename pars... | python | edit | 7 | 3 | unlicense | 57d3b3cf0309222aafbd493cbdc26f30e06f05c1 | m42e/tvnamer,lahwaacz/tvnamer,dbr/tvnamer | tests/test_parsing.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nsetup(\n version='4.0.2',\n name='incuna-groups',\n packages=find_packages(),\n include_package_data=True,\n install_requires=[\n 'django_crispy_forms>=1.4.0,<2',\n ... | python | edit | 1 | 0 | bsd-2-clause | 8eb936799a320e9b68bffe58b04da941eba2268e | incuna/incuna-groups,incuna/incuna-groups | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom rest_framework.serializers import HyperlinkedModelSerializer\n\nfrom trex.models.project import Projec... | python | edit | 1 | 0 | mit | 8c0f87858b1dc58d23006cd581cfa74d23096a44 | bjoernricks/trex,bjoernricks/trex | trex/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom cupy import cuda\nfrom cupy.testing import attr\n\n\n@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')\nclass TestNCCL(unittest.TestCase):\n\n @attr.gpu\n def test_single_proc_ring(self):\n ... | python | edit | 1 | 1 | mit | 49c60d069da48cd83939a4e42e933e9a28e21dd2 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | tests/cupy_tests/cuda_tests/test_nccl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\norg = \"servo\"\n\nignore_repos = [\"skia\", \"skia-snapshots\", \"cairo\", \"libpng\", \"libcss\",\n \"libhubbub\", \"libparserutils\", \"libwapcaplet\", \"pixman\"]\ncount_forks = [\"glutin\",\"rust-openssl\"]\n\n\n# Path t... | python | edit | 1 | 0 | mit | 8033b00ebbcb8e294f47ee558e76ee260ec18d2b | servo/servo-org-stats,servo/servo-org-stats,servo/servo-org-stats | orglog-config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nHERE = os.path.abspath(os.path.dirname(__file__))\nPROJECT_ROOT = os.path.abspath(os.path.join(HERE, os.pardir))\n\n\nclass Config:\n SECRET_KEY = os.environ.get('SECRET_KEY', 'secret-key')\n SQLA... | python | edit | 1 | 0 | mit | 75e7008e65cb731cc2a7a24dfa86f02049032b44 | zhoux10/pdfhook,zhoux10/pdfhook,zhoux10/pdfhook | src/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nimport derpibooru\n\nsetup(\n name = \"DerPyBooru\",\n description = \"Python bindings for Derpibooru's API\",\n url = \"https://github.com/jo... | python | edit | 3 | 0 | bsd-2-clause | a0b75e48cad0be6028e6ff12873d1bd73307734c | joshua-stone/DerPyBooru | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\ncdir = os.path.dirname(os.path.abspath(__file__))\nsourcedir = os.path.join(cdir, 'src')\ntargetdir = '~'\n\nfor dotfile in os.listdir(sourcedir):\n source = os.path.join(sourcedir, dotfile)\n target = ... | python | edit | 1 | 0 | mit | 6838e21d03060d23eefaaf4336214d04d98afe96 | jaylynch/dotfiles,jaylynch/dotfiles | install.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Coordination chatroom game.\"\"\"\n\nimport dallinger as dlgr\nfrom dallinger.config import get_config\ntry:\n unicode = unicode\nexcept NameError: # Python 3\n unicode = str\n\nconfig = get_config()\n\n\ndef extra_settings():\... | python | edit | 1 | 2 | mit | 0241e253c68ca6862a3da26d29a649f65c27ae36 | Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger | demos/chatroom/experiment.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import current_app\nfrom flask_admin.contrib.fileadmin import FileAdmin\nfrom flask_admin import AdminIndexView, expose, Admin\nfrom flask_admin.contrib.sqla import ModelView\nfrom atomicpress import mo... | python | edit | 1 | 1 | mit | 4735804f4951835e4e3c7d116628344bddf45aa3 | marteinn/AtomicPress,marteinn/AtomicPress,marteinn/AtomicPress,marteinn/AtomicPress | atomicpress/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n \"gtr.services.funds.Funds\"\n]\n__version__ = \"0.1.0\"\n\nfrom gtr.services.base import _Service\nfrom gtr.services.funds import Funds\nfrom gtr.services.organisations import Organisations\nfrom gtr.services.persons impor... | python | edit | 11 | 0 | apache-2.0 | 4aeb2e57a05491973c761eb169a42cb5e1e32737 | nestauk/gtr | gtr/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\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#\n# http://www.apache.org/licenses/LICE... | python | edit | 1 | 1 | apache-2.0 | 0461fad1a3d81aa2d937a1734f1ebb07b3e81d79 | openstack/tripleo-common,openstack/tripleo-common | undercloud_heat_plugins/server_update_allowed.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template_string\nimport jinja2\n\ndef test_undefined_variable__no_error():\n app = Flask(__name__)\n assert issubclass(app.jinja_env.undefined, jinja2.Undefined)\n\n @app.route('/')\n def endpoint... | python | edit | 1 | 1 | mit | 42db9ceae490152040651a23d397e7ad4c950712 | imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning,imsardine/learning | flask/flask/tests/test_template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom optparse import make_option\nfrom django.core.management.base import BaseCommand\n\n\nclass Command(BaseCommand):\n\n help = \"Init the static site project\"\n\n args = '[directory]'\n\n option_list = (\n mak... | python | edit | 1 | 3 | mit | 5d3d47e0fae9ddb9f445972e5186429163aabf40 | MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator | statirator/core/management/commands/init.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Password Hashing Module for Linux\n# Author: Dave Russell Jr (drussell393)\n\nfrom getpass import getpass\nimport crypt\n\n# If you like Python 2, please to be importing.\nimport os\nimport binascii\n\npassword = ge... | python | edit | 1 | 0 | mit | 614a5de89a5746e95dc14f371d001c5a9056f646 | drussell393/Linux-Password-Hash | passwordhash.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2015 Chris Fordham\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 | 1 | apache-2.0 | e459a42af1c260986c7333047efd40294dbd23d3 | flaccid/akaudit | akaudit/clidriver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n#DEBUG = True\nSECRET_KEY = \"change secret key in production\"\nSESSION_COOKIE_HTTPONLY = True\nSESSION_COOKIE_SECURE = True\n#PERMANENT_SESSION_LIFETIME = timedelta(minutes=10)\n\n```\n\nApply this change: Add u... | python | edit | 1 | 0 | mit | d8573d7d2d1825253dab6998fc70dd829399c406 | JohnSounder/AP-API,kuastw/AP-API,JohnSounder/AP-API,kuastw/AP-API | src/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"onserver URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.10/topics/http/urls/\nExamples:\nFunction views\n 1. Add ... | python | edit | 1 | 0 | mit | f604979e94fab59eb1b422d4e62ad62d3360c2ac | on-server/on-server-api,on-server/on-server-api | onserver/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom config import *\nfrom slackminion.bot import Bot\n\n\ndef main():\n level = logging.DEBUG if DEBUG else logging.INFO\n logging.basicConfig(level=level, format='%(asctime)s %(name)s %(levelname)s: %(message)s')\n... | python | edit | 4 | 2 | mit | 19b7946dd57b79e49d1d54d980d295435793e465 | arcticfoxnv/slackminion,arcticfoxnv/slackminion | slackminion/__main__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom image import ImageWithWCS\nimport numpy as np\nfrom os import path\n\n\ndef shift_images(files, source_dir, output_file='_shifted'):\n \"\"\"Align images based on astrometry.\"\"\"\n\n ref = files[0] # TODO: make reference image... | python | edit | 2 | 2 | bsd-3-clause | 573bf086a09da16925fe01c3016161a478e5a2af | mwcraig/msumastro | shifter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Database management and migration functionality.\"\"\"\n\n# pylint: disable=no-name-in-module,import-error\nfrom flask.ext.script import Manager\nfrom flask.ext.migrate import Migrate, MigrateCommand\n# pylint: enable=no-name-in-modul... | python | edit | 1 | 0 | isc | d260eefb8dc8ca8bc71c548c1389853e49eafd28 | textbook/flask-forecaster,textbook/flask-forecaster | scripts/manage_db.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, current_app, url_for, redirect, request, flash\n\nbp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')\n\n@bp.route('/')\ndef in... | python | edit | 1 | 3 | mit | 22d08aa11216d8ee367f8b4a11a14e08b3917dfd | soasme/flask-perm,soasme/flask-perm,soasme/flask-perm | flask_perm/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport changes\n\nsetup(\n name=changes.__name__,\n version=changes.__version__,\n description=changes.__doc__,\n author=changes.__author__\n author_email=changes.__email__,\n url=changes.__ur... | python | edit | 1 | 0 | mit | 2936906f54529f0df61dd44796042fe131842d01 | goldsborough/changes | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport twitter\nimport urllib2\n\nNOAA_URL = \"http://weather.noaa.gov/pub/data/observations/metar/stations/*station_id*.TXT\"\n\ndef retrieve_and_post(conf):\n post = False\n\n pull_url = NOAA_URL.replace('*station_id*', conf['statio... | python | edit | 1 | 4 | bsd-3-clause | ad757857b7878904c6d842e115074c4fac24bed7 | adamfast/python-tweetar | tweetar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport threading\nimport queue\n\nclass Routine(threading.Thread):\n def __init__(self):\n threading.Thread.__init__(self)\n self.queue = queue.Queue()\n self.manager = None\n self.no_wait = False\n sel... | python | edit | 1 | 9 | mit | 8184354179bf6cf88304ebd743b2236258e46522 | amm0nite/unicornclient,amm0nite/unicornclient | unicornclient/routine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding:utf-8 -*-\nimport os\nfrom flask import Flask\n\n#-- create app --\napp = Flask(__name__)\napp.config.from_object(\"rrd.config\")\n\n@app.errorhandler(Exception)\ndef all_exception_handler(error):\n print \"exception: %s\" %e... | python | edit | 2 | 2 | apache-2.0 | c566fa8f49ea826b29937c9c128350494eb10bf6 | Cepave/dashboard,Cepave/dashboard,Cepave/dashboard,Cepave/dashboard | rrd/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name = 'marquee-composer',\n version = '0.2.3-dev',\n description = '',\n long_description = file('README.md').read(),\n url ... | python | edit | 2 | 0 | unlicense | 181983f9d79816d7b0d706ad58a497889175a945 | marquee/composer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nimport logging\n\nfrom dotenv import load_dotenv, find_dotenv\nfrom grazer.config import Config\nfrom grazer.core import crawler\n\n\n@click.command()\n@click.option(\"--env\", default=find_dotenv())\n@click.option(\"--config\... | python | edit | 1 | 3 | mit | ee43700a05d2f4943d255b98f624de0e649cfa0c | CodersOfTheNight/verata | grazer/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import url_for\n\n\ndef register_template_utils(app):\n \"\"\"Register Jinja 2 helpers (called from __init__.py).\"\"\"\n\n @app.template_test()\n def equalto(value, other):\n return value == other\n\n @app.tem... | python | edit | 1 | 1 | mit | e9eb8e0c4e77525d31c904e7f401a0d388a3fbf6 | hack4impact/women-veterans-rock,hack4impact/women-veterans-rock,hack4impact/women-veterans-rock | app/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport mpld3\nfrom mpld3 import plugins\n\n\ndef create_plot():\n fig, ax = plt.subplots()\n ax.plot([1, 3], [1, 2])\n fmtr = matplotlib.ticker.StrMethodFormatter(\"{x:.2f}\")\n ... | python | edit | 3 | 1 | bsd-3-clause | 9ca260d508a8d7ed742251cc7f80541fbd32882f | mpld3/mpld3,jakevdp/mpld3,jakevdp/mpld3,mpld3/mpld3 | mpld3/test_plots/test_tickformat_str_method.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport glob, os.path, sys\n\nversion = sys.version.split(\" \")[0]\nmajorminor = version[0:3]\n\n# Add path to hiredis.so load path\npath = glob.glob(\"build/lib*-%s/hiredis/*.so\" % majorminor)[0]\nsys.path.insert(0, os.path.dirname(path))... | python | edit | 6 | 1 | bsd-3-clause | 75fd4aadedb4bcdcfe41f9ae61bf62282ffdadea | redis/hiredis-py,charsyam/hiredis-py,badboy/hiredis-py-win,badboy/hiredis-py-win,badboy/hiredis-py-win,redis/hiredis-py,charsyam/hiredis-py | test/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Offer forward compatible imports of datastore_rpc and datastore_query.\n\nimport logging\n\ntry:\n from google.appengine.datastore import datastore_rpc\n from google.appengine.datastore import datastore_query\n logging.info('Imported o... | python | edit | 3 | 0 | apache-2.0 | cc8f0760aa5497d2285dc85c6f3c17c6ce327c35 | GoogleCloudPlatform/datastore-ndb-python,GoogleCloudPlatform/datastore-ndb-python | core/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# from distutils.core import setup\nfrom setuptools import setup, find_packages\nimport multiprocessing # nopep8\n\nsetup(name='orlo',\n version='0.0.1',\n description='Deployment data capture API',\n ... | python | edit | 3 | 0 | mit | 6d2fb88570a627e255792cbb2bb5ff38e9b6cf3c | eBayClassifiedsGroup/orlo,al4/sponge,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/sponge,al4/orlo,al4/orlo,eBayClassifiedsGroup/sponge,eBayClassifiedsGroup/orlo,al4/sponge,al4/sponge | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nSAVE_PASSWORD_HASHED = True\nMAX_RETRIES_DOWNLOAD_FROM_SAME_FARMER = 3\nMAX_RETRIES_UPLOAD_TO_SAME_FARMER = 3\nMAX_RETRIES_NEGOTIATE_CONTRACT = 10\nMAX_RETRIES_GET_FILE_POINTERS = 10\n\nFILE_POINTERS_REQUEST_DELAY... | python | edit | 1 | 0 | mit | 6f50381e2e14ab7c1c90e52479ffcfc7748329b3 | lakewik/storj-gui-client | UI/resources/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/env python\n#\n# cat_StartdLog.py\n#\n# Print out the StartdLog for a glidein output file\n#\n# Usage: cat_StartdLog.py logname\n#\n\nimport sys\nSTARTUP_DIR=sys.path[0]\nsys.path.append(os.path.join(STARTUP_DIR,\"lib\"))\nimport gWf... | python | edit | 2 | 2 | bsd-3-clause | e8b1d0aff6333d6f8cfb4c81262550c670ea7e86 | bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,holzman/glideinwms-old,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS | factory/tools/cat_StartdLog.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jinja2 import Markup\n\n\ndef null_formatter(value):\n \"\"\"\n Return `NULL` as the string for `None` value\n\n :param value:\n Value to check\n \"\"\"\n return Markup('<i>NULL</i>')\n\n\ndef empty_fo... | python | edit | 1 | 2 | bsd-3-clause | 55b7b07986590c4ab519fcda3c973c87ad23596b | mrjoes/flask-admin,janusnic/flask-admin,Kha/flask-admin,wuxiangfeng/flask-admin,litnimax/flask-admin,HermasT/flask-admin,quokkaproject/flask-admin,Kha/flask-admin,flabe81/flask-admin,porduna/flask-admin,Junnplus/flask-admin,ibushong/test-repo,janusnic/flask-admin,jschneier/flask-admin,closeio/flask-admin,chase-seibert/... | flask_admin/model/typefmt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='zeit.push',\n version='1.21.0.dev0',\n author='gocept, Zeit Online',\n author_email='<EMAIL>',\n url='http://www.zeit.de/',\n description=\"Sending push notif... | python | edit | 1 | 0 | bsd-3-clause | 6dfe73163224d6d129fef2c6ac8545611f90e7fc | ZeitOnline/zeit.push,ZeitOnline/zeit.push | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n \n # url(r'^macnamer/'... | python | edit | 1 | 0 | apache-2.0 | de02f354e406e5b9a3f742697d3979d54b9ee581 | grahamgilbert/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,grahamgilbert/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,squarit/Crypt-Server,grahamgilbert/Crypt-Server,grahamgilbert/Crypt-Server | fvserver/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='Juju XaaS CLI',\n version='0.1.0',\n author='Justin SB',\n author_email='<EMAIL>',\n packages=['jxaas'],\n url='http://pypi.python.org/pypi/jxaas/',\n license='LICENSE.... | python | edit | 1 | 0 | apache-2.0 | 6058bc795563d482ce1672b3eb933e1c409c6ac8 | jxaas/cli | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Taken from txircd:\n# https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/utils.py#L9\ndef _enum(**enums):\n return type('Enum', (), enums)\n\nModeType = _enum(LIST=0, PARAM_SET=1, PARAM_UN... | python | edit | 1 | 3 | mit | 5b2e74cdc50a6c3814879f470d8992267fa06a62 | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | heufybot/utils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom nymms import registry\nfrom nymms.resources import Command, MonitoringGroup\nfrom weakref import WeakValueDictionary\n\nclass TestRegistry(unittest.TestCase):\n def test_empty_registry(self):\n self.assertE... | python | edit | 3 | 1 | bsd-2-clause | 13df4b7ba5c706e1fddbd17ac9edf3894e9a7206 | cloudtools/nymms | nymms/tests/test_registry.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\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# ... | python | edit | 1 | 0 | apache-2.0 | 4f170397acac08c6fd8a4573ead1f66d631ac8dc | DataBiosphere/dsub,DataBiosphere/dsub | dsub/_dsub_version.py | rejected_duplicate | Near-duplicate of sample 2591 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# TBD: Some animations mutate a pattern: shift it, fade it, etc.\n# Not all animations need a pattern\n# I need a rainbow pattern for fun\n\n# TBD: How do you do random pixels? is it a pattern that is permuted by the\n# animation? YES; patt... | python | edit | 1 | 2 | mit | 06c2fe1bd836f4adfcff4eb35cc29203e10a729d | jonspeicher/blinkyfun | blinkytape/animation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os.path import abspath, dirname\n\nimport django\nfrom django.conf import settings\n\n\nsys.path.insert(0, abspath(dirname(__file__)))\n\n\nif not settings.configured:\n settings.configure(\n ... | python | edit | 1 | 3 | mit | 98eead2549f4a2793011ffe8107e64530ddbf782 | treyhunner/django-relatives,treyhunner/django-relatives | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding=utf8\n\nfrom setuptools import setup\n\nsetup(\n name='django-form-designer-ai',\n version='0.9.2',\n url='http://github.com/andersinno/django-form-designer-ai',\n license='BSD',\n maintainer='Anders Innovations Lt... | python | edit | 1 | 0 | bsd-3-clause | 01bacd50f41e3c40254a15953bf7a9f0120755ec | andersinno/django-form-designer-ai,andersinno/django-form-designer,andersinno/django-form-designer-ai,kcsry/django-form-designer,kcsry/django-form-designer,andersinno/django-form-designer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for main.py\"\"\"\nfrom ..main import _solve_weight_vector\nimport numpy as np\nfrom nose.tools import assert_raises, assert_equal, assert_true\n\n\ndef test_solve_weight_vector():\n # smoke test\n n_nodes = 4\n n_commu... | python | edit | 1 | 1 | mit | dbbd29a1cdfcd3f11a968c0aeb38bd54ef7014e3 | mvdoc/gfusion | gfusion/tests/test_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nodeconductor.core.permissions import StaffPermissionLogic\n\n\nPERMISSION_LOGICS = (\n ('logging.Alert', StaffPermissionLogic(any_permission=True)),\n ('logging.SystemNotification', StaffPermissionLogic(any_permission=True)),\n)... | python | edit | 1 | 0 | mit | 8c551fe51ed142305945c0cef530ac84ed3e7eb9 | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/logging/perms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\nfrom setuptools import setup, Extension\n\nfrom ifconfigpy import get_version\n\nmodules = []\n\nif os.uname()[0].lower().startswith('freebsd'):\n modules.append(\n... | python | edit | 3 | 0 | bsd-2-clause | 47f49f41944310ccfaa4f41f79e6fb3172962f99 | williambr/ifconfigpy,williambr/ifconfigpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Asks the user for input of the word and makes it lower case.\nnormStr = raw_input(\"Enter the word:\\n\").lower();\n# Inverts the string so it can compare it with the original input.\ninvertStr = normStr[::-1];\n\n\n```\n\nApply this chan... | python | edit | 3 | 0 | mit | c4903f5b631bba21e17be1b7deb118c0c9571432 | lgomie/dt228-3B-cloud-repo | Lab3/PalindromeExercise.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom isort import SortImports\nimport itertools\nimport mothermayi.colors\nimport mothermayi.errors\n\ndef plugin():\n return {\n 'name' : 'isort',\n 'pre-commit' : pre_commit,\n }\n\ndef do_sort(filename):\n... | python | edit | 1 | 5 | mit | 0f62dc9ba898db96390658107e9ebe9930f8b90a | EliRibble/mothermayi-isort | mmiisort/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\n Copyright 2015 University of Auckland\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 ... | python | edit | 1 | 2 | apache-2.0 | 20929dd2e1ddd0909afc3e25b040bfdcdc2c9b00 | alan-wu/neon | src/opencmiss/neon/core/problems/biomeng321lab1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\n\nfrom infcommon import Factory\nfrom infcommon.postgres.postgres import PostgresClient\n\ndef postgres_client_from_connection_parameters(user, password, host, port, db_name):\n connection_uri = 'pos... | python | edit | 1 | 1 | mit | 4853e42c080bcb065da16e1d613a73a835afbaf6 | aleasoluciones/infcommon,aleasoluciones/infcommon | infcommon/postgres/factory.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nversion = '0.1'\n\nsetup(\n name='python-editor',\n version=version,\n description=\"Programmatically open an editor, capture the result.\",\n #long_description='',\n classifiers=[\n 'De... | python | edit | 1 | 0 | apache-2.0 | 9a3a32548a864c623aa4af22875f7142420d9410 | hguemar/python-editor,fmoo/python-editor | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nlong_description = open('./README.rst').read()\n\nsetup(\n name='ebi',\n version='0.6.2',\n install_requires=[\n 'awsebcli==3.7.3',\n 'boto3==1.2.6',\n ],\n descrip... | python | edit | 1 | 0 | mit | 6af50ebf7ea3c63109ceb4be8f8b1c0ba9c3fcd0 | hirokiky/ebi | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyshelf.cloud.stream_iterator import StreamIterator\nfrom flask import Response\n\n\nclass ArtifactListManager(object):\n def __init__(self, container):\n self.container = container\n\n def get_artifact(self, path):\n ... | python | edit | 3 | 4 | mit | e69a23abc438b1f527cf9247bc210874eb227253 | kyle-long/pyshelf,kyle-long/pyshelf,not-nexus/shelf,not-nexus/shelf | pyshelf/artifact_list_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim:fileencoding=utf-8:noet\nfrom __future__ import (unicode_literals, division, absolute_import, print_function)\n\nimport os\nimport sys\n\n\nsys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(os.getcwd()))))\nsys.path.i... | python | edit | 1 | 0 | mit | 80b50733a01c70058353815f6db7c621e7868a73 | Liangjianghao/powerline,bartvm/powerline,junix/powerline,wfscheper/powerline,areteix/powerline,EricSB/powerline,blindFS/powerline,dragon788/powerline,dragon788/powerline,prvnkumar/powerline,s0undt3ch/powerline,russellb/powerline,dragon788/powerline,s0undt3ch/powerline,xxxhycl2010/powerline,xfumihiro/powerline,Liangjian... | docs/source/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nimport sys\nsys.path.append('..')\nfrom pyrabbit import http\n\n\n\nclass TestHTTPClient(unittest.TestCase):\n \"\"\"\n Except for the init test, thes... | python | edit | 1 | 1 | bsd-3-clause | 4daefdb0a4def961572fc22d0fe01a394b11fad9 | ranjithlav/pyrabbit,bkjones/pyrabbit,NeCTAR-RC/pyrabbit,chaos95/pyrabbit,switchtower/pyrabbit | tests/test_httpclient.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nsetuptools.setup(\n name=\"{{ cookiecutter.package_name }}\",\n version=\"{{ cookiecutter.package_version }}\",\n url=\"{{ cookiecutter.package_url }}\",\n\n author=\"{{ cookiecutter.author_name }}\",\n a... | python | edit | 1 | 0 | mit | affcc28c652b5d31b52f7f520ca72a060bc2661d | kragniz/cookiecutter-pypackage-minimal | {{cookiecutter.package_name}}/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import division, unicode_literals\n\n\"\"\"\nThis module defines some useful design patterns.\n\"\"\"\n\n\n__author__ = \"Shyue Ping Ong\"\n__copyright__ = \"Copyright 2011, The Materials Project\"\n__vers... | python | edit | 1 | 2 | mit | d4003a3b07e4ead9bccbc6a9c8ff835970ad99a3 | xhqu1981/pymatgen,tallakahath/pymatgen,fraricci/pymatgen,aykol/pymatgen,mbkumar/pymatgen,ndardenne/pymatgen,czhengsci/pymatgen,blondegeek/pymatgen,czhengsci/pymatgen,czhengsci/pymatgen,gVallverdu/pymatgen,nisse3000/pymatgen,dongsenfo/pymatgen,aykol/pymatgen,johnson1228/pymatgen,montoyjh/pymatgen,gpetretto/pymatgen,Bism... | pymatgen/core/design_patterns.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ndjango-email-bandit is a Django email backend for hijacking email sending in a test environment. \n\"\"\"\n\n__version_info__ = {\n 'major': 0,\n 'minor': 2,\n 'micro': 0,\n 'releaselevel': 'final',\n}\n\ndef get_versio... | python | edit | 1 | 3 | bsd-3-clause | a16fd23027b5d3f1378f5b9f75958d0f3ef2a124 | caktus/django-email-bandit,vericant/django-email-bandit,caktus/django-email-bandit | bandit/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom unipath import Path\nimport subprocess\n\nTHIS_FOLDER = Path(__file__).parent\n\ndef reset_database(host):\n subprocess.check_call(['fab', 'reset_database', '--host={}'.format(host)],\n cwd=THIS_FOL... | python | edit | 1 | 1 | mit | e7bda027780da26183f84f7af5c50cd37649c76b | XeryusTC/projman,XeryusTC/projman,XeryusTC/projman | functional_tests/remote.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"halaqat URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app imp... | python | edit | 1 | 0 | mit | da69fff2d104c9cccd285078c40de05ea46fdb4d | EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat | halaqat/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Added end_date to full text index events\n\nRevision ID: 573faf4ac644\nRevises: 342fa3076650\nCreate Date: 2015-03-06 17:26:54.718493\n\"\"\"\n\nimport sqlalchemy as sa\nfrom alembic import op\n\n\n# revision identifiers, used by Alem... | python | edit | 1 | 1 | mit | fb7754f15a8f0803c5417782e87d6fe153bf6d20 | OmeGak/indico,mvidalgarcia/indico,pferreir/indico,indico/indico,DirkHoffmann/indico,indico/indico,mic4ael/indico,ThiefMaster/indico,ThiefMaster/indico,mvidalgarcia/indico,mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,indico/indico,OmeGak/indico,DirkHoffmann/indico,mvidalgarcia/indico,DirkHoffmann/... | migrations/versions/201503061726_573faf4ac644_added_end_date_to_full_text_index_events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\n\nurlpatterns = patterns(\"symposion.proposals.views\",\n url(r\"^submit/$\", \"proposal_submit\", name=\"proposal_submit\"),\n url(r\"^submit/(\\w+)/$\", \"proposal_submit_kind\", name=\"pro... | python | edit | 1 | 0 | bsd-3-clause | 0855f9b5a9d36817139e61937419553f6ad21f78 | njl/pycon,pyconjp/pyconjp-website,njl/pycon,Diwahars/pycon,smellman/sotmjp-website,pyconjp/pyconjp-website,pyconjp/pyconjp-website,PyCon/pycon,osmfj/sotmjp-website,njl/pycon,Diwahars/pycon,PyCon/pycon,pyconjp/pyconjp-website,osmfj/sotmjp-website,osmfj/sotmjp-website,PyCon/pycon,osmfj/sotmjp-website,smellman/sotmjp-webs... | symposion/proposals/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests that migrations are not missing\n\"\"\"\n\ntry:\n from io import StringIO\nexcept ImportError:\n from StringIO import StringIO\n\nimport pytest\n\nfrom django.core.management import call_command\n\n\ndef test_no_missing_... | python | edit | 3 | 1 | bsd-2-clause | 756860e325edd06eb98bed7c6fd5fa6c4a78243e | bennylope/django-organizations,bennylope/django-organizations | tests/test_migrations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (C) 2012 Lukas Lalinsky\n# Distributed under the MIT license, see the LICENSE file for details.\n\nimport re\nfrom contextlib import closing\nfrom acoustid.script import run_script\nfrom acoustid.data.st... | python | edit | 6 | 4 | mit | e55c5b80d67edcde6c6f31665f39ebfb70660bc1 | lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server | scripts/update_lookup_stats.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Script to generate coverage data.\n\"\"\"\n\nimport os\nimport subprocess\n\nfrom django.conf import settings\n\nfrom main.models import get_dataset_with_type\nfrom main.models import AlignmentGroup\nfrom main.models import Dataset\nf... | python | edit | 3 | 1 | mit | fc9fdd2115b46c71c36ba7d86f14395ac4cf1e3e | woodymit/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone,churchlab/millstone,churchlab/millstone,churchlab/millstone | genome_designer/scripts/generate_coverage_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport abc\nimport re\n\n\nclass Matcher(object):\n __metaclass__ = abc.ABCMeta\n\n @abc.abstractmethod\n def assert_request_matched(self, request):\n \"\"\"\n Assert that the request matched the spec in this matcher ... | python | edit | 1 | 2 | bsd-3-clause | 460a2430fbd8832f3fada1a74b754d71a27ac282 | kevinjqiu/mockingjay | mockingjay/matcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.trial import unittest\n\nfrom better_od import OrderedSet\n\n\nclass TestOrderedSet(unittest.TestCase):\n def setUp(self):\n self.values = 'abcddefg'\n self.s = OrderedSet(self.values)\n\n def test_order(sel... | python | edit | 1 | 1 | mit | 2728f33a0c8477d75b3716ea39fe2e3c8db9378d | JustusW/BetterOrderedDict,therealfakemoot/collections2 | tests/test_OrderedSet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport xlrd\nfrom ..exceptions import TableTooBigException, EmptyTableException\nfrom ..configuration import config\nfrom ..utilities import header_population\nfrom ..compat import range\n\n\ndef xlsx_xlrd(fp):\n \"\"\"Read and convert a... | python | edit | 1 | 9 | apache-2.0 | 164b07fefdd8db74ccce7ff44c33a6120cd98c86 | mfraezz/modular-file-renderer,rdhyee/modular-file-renderer,AddisonSchiller/modular-file-renderer,mfraezz/modular-file-renderer,TomBaxter/modular-file-renderer,rdhyee/modular-file-renderer,AddisonSchiller/modular-file-renderer,CenterForOpenScience/modular-file-renderer,felliott/modular-file-renderer,AddisonSchiller/modu... | mfr/ext/tabular/libs/xlrd_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import print_function\nimport os\n\n\n# This is to figure out the astroquery version, rather than using Astropy's\nfrom . import version\n\n\n# this contains i... | python | edit | 8 | 0 | bsd-3-clause | a2eb2ad96562f5b740338d9acb68dc72f72031a2 | ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery,imbasimba/astroquery | astroquery/conftest.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.contrib.auth import models as auth_app\nfrom django.db.models.signals import post_syncdb\n\n\ndef create_demo_user(app, created_models, verbosity, ... | python | edit | 2 | 4 | bsd-2-clause | d16d3d9b74f4fdfe06b660fa3d5221614beb2eed | nikolas/mezzanine,sjuxax/mezzanine,biomassives/mezzanine,dekomote/mezzanine-modeltranslation-backport,saintbird/mezzanine,guibernardino/mezzanine,jjz/mezzanine,christianwgd/mezzanine,gbosh/mezzanine,agepoly/mezzanine,wyzex/mezzanine,vladir/mezzanine,viaregio/mezzanine,sjdines/mezzanine,christianwgd/mezzanine,wbtuomela/... | mezzanine/core/management.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, TestCase\nfrom grammpy import Rule\n\n\nclass NoRuleSpecifiedTest(TestCase):\n pas... | python | edit | 3 | 1 | mit | 3335c8c9ce8419d9d1d1034903687aa02983280d | PatrikValkovic/grammpy | tests/rules_tests/NoRuleSpecifiedTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport Transaction\n\nimport unittest\n\nclass TestTransaction(unittest.TestCase) :\n\n def setUp(self) :\n self.test_object = Transaction.Transaction()\n\n def tearDown(self) :\n pass\n\n def test_not_None(self) :\n ... | python | edit | 2 | 1 | apache-2.0 | 3f9623766b58c02b21abb967315bfe30a2b3974f | mattdeckard/wherewithal | tests/TestTransaction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .model_policy_Slice import *\nfrom .model_policy_User import *\nfrom .model_policy_Network import *\nfrom .model_policy_Site import *\nfrom .model_policy_SitePrivilege import *\nfrom .model_policy_SlicePrivilege import *\nfrom .model_p... | python | edit | 12 | 0 | apache-2.0 | b5133e7a3e7d51a31deef46e786b241b63ebd7de | wathsalav/xos,wathsalav/xos,wathsalav/xos,wathsalav/xos | planetstack/model_policies/__init__.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom indy_common.types import Request\n\n\ndef test_request_all_identifiers_returns_empty_list_for_request_without_signatures():\n req = Request()\n\n assert req.all_identifiers == []\n```\n\nApply this change: Fix wrong import in tes... | python | edit | 1 | 1 | apache-2.0 | 0ed9e159fa606c9dbdb90dfc64fcb357e9f9cedb | evernym/zeno,evernym/plenum | plenum/test/test_request.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bayeslite.api import barplot\nfrom bayeslite.api import cardinality\nfrom bayeslite.api import draw_crosscat\nfrom bayeslite.api import estimate_log_likelihood\nfrom bayeslite.api import heatmap\nfrom bayeslite.api import histogram\nfr... | python | edit | 1 | 0 | apache-2.0 | 7bf4083ef44585116f0eff86753080612a26b374 | probcomp/bdbcontrib,probcomp/bdbcontrib | src/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport jsonschema\n\n\ndef validate(data, schema):\n try:\n jsonschema.validate(data, schema)\n except jsonschema.exceptions.ValidationError:\n return False\n\n if schema[\"type\"] == \"object\":\n allowed = li... | python | edit | 1 | 6 | mit | ddf0ff2c72a8026c6cf90bc51b1c9fc8d68a003f | meezio/apicore,meezio/apicore | apicore/oasschema.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom registries.models import Organization\nfrom gwells.models import ProvinceState\n\nclass DrillerListSerializer(serializers.ModelSerializer):\n province_state = serializers.ReadOnlyField()\n\n ... | python | edit | 3 | 0 | apache-2.0 | 365411abd73275a529dc5ca7ec403b994c513aae | bcgov/gwells,rstens/gwells,bcgov/gwells,bcgov/gwells,rstens/gwells,rstens/gwells,rstens/gwells,bcgov/gwells | registries/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom jedi import api\n\n\ndef make_definitions():\n return api.defined_names(\"\"\"\n import sys\n\n class C:\n pass\n\n x = C()\n\n def f():\n pass\n \"\"\")\n\n\n@pytest.mark.parametrize('d... | python | edit | 1 | 1 | mit | 956ad502766eddbaf3c81672a30e58c814ba8437 | WoLpH/jedi,jonashaag/jedi,tjwei/jedi,flurischt/jedi,dwillmer/jedi,jonashaag/jedi,mfussenegger/jedi,flurischt/jedi,tjwei/jedi,mfussenegger/jedi,dwillmer/jedi,WoLpH/jedi | test/test_api_classes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\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#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | python | edit | 1 | 1 | apache-2.0 | 613a6f7947b46b9a6c4c679b638d1c4d946b644d | openstack/neutron,mahak/neutron,mahak/neutron,mahak/neutron,openstack/neutron,openstack/neutron | neutron/conf/policies/network_ip_availability.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib2 import urlopen\nimport csv\nimport lxml.builder as lb\nfrom lxml import etree\n\n# Returns CSV of all wikipedias, ordered by number of 'good' articles\nURL = \"https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&... | python | edit | 2 | 0 | apache-2.0 | 2088b3df274fd31c28baa6193c937046c04b98a6 | Wikinaut/wikipedia-app,carloshwa/apps-android-wikipedia,dbrant/apps-android-wikipedia,creaITve/apps-android-tbrc-works,reproio/apps-android-wikipedia,anirudh24seven/apps-android-wikipedia,reproio/apps-android-wikipedia,wikimedia/apps-android-wikipedia,BrunoMRodrigues/apps-android-tbrc-work,BrunoMRodrigues/apps-android-... | scripts/generate_wiki_languages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python3\n# -*- coding-utf-8 -*-\n\n\"\"\"\nThis script transform a md into a plain html in the context of a\ndocumentation for Kit&Pack.\n\"\"\"\n\nimport mmap\nimport yaml\n\nprint(\"---------------------------- geo --\")\nprin... | python | edit | 1 | 2 | mit | 376b8aa5b77066e06c17f41d65fe32a3c2bdef1f | a2ohm/geo | geo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!python\n\n# Load libraries\nimport sys, getopt\n\nimport pysam\n\nimport libPipeline\n\n# Set constants\nhelpMsg ='''\nSYNOPSIS\nparseSAMOutput\nparseSAMOutput [OPTIONS] SAMFILE\n#\nDESCRIPTION\nparseSAMOutput.py\n\n Parses SAM alignme... | python | edit | 6 | 0 | apache-2.0 | 1b20116059b21905688b7fd6153ecd7c42bdc4a1 | awblocker/paired-end-pipeline,awblocker/paired-end-pipeline | parseSAMOutput.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport requests\nfrom requests.exceptions import ConnectionError, Timeout\n\nlog = logging.getLogger(__name__)\n\n\nclass MailNotifier(object):\n url = None\n api_key = None\n sender = None\n\n @classmethod\n ... | python | edit | 1 | 2 | mit | 4ed027756885c060d0e8b14c2b0c17b2b85dcb59 | josuemontano/api-starter,josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/API-platform,josuemontano/API-platform,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter | demonstrare/mailer/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jinja2 import Markup\nfrom flask import current_app, request\n\nclass _pagedown(object):\n def include_pagedown(self):\n if request.is_secure:\n protocol = 'https'\n else:\n protocol = 'http'\n ... | python | edit | 3 | 2 | mit | 04df5c189d6d1760c692d1985faf558058e56eb2 | miguelgrinberg/Flask-PageDown,miguelgrinberg/Flask-PageDown | flask_pagedown/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nPROJECT_NAME = \"lightning-talks\"\n\nMONGO_DATABASE = 'lightningtalk-dev'\n\nVOTING = False\n\nENVIRONMENTS = {\n \"prd\": {\n \"hosts\": ['104.236.202.196']\n }\n}\n```\n\nApply this change: Change DB location to... | python | edit | 3 | 0 | mit | ab4d640923e0e556ba3a9f64cc122c95ba4fc52c | ireapps/lightning-talks,ireapps/lightning-talks,ireapps/lightning-talks,ireapps/lightning-talks | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pathlib import Path\nfrom typing import Union, Dict, Any, List, Tuple\nfrom collections import OrderedDict\n\n\n# fmt: off\nFilePath = Union[str, Path]\n# Superficial JSON input/output types\n# https://github.com/python/typing/issues/1... | python | edit | 1 | 4 | mit | d90f249e0865dab0cc9a224f413ea90df8a648ed | explosion/srsly,explosion/srsly,explosion/srsly,explosion/srsly | srsly/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nclass Api(object):\n def __init__(self, server='http://localhost/zabbix'):\n self.session = requests.Session()\n self.session.headers.update({\n 'Content-Type': 'application/json'\n })\n... | python | edit | 3 | 4 | apache-2.0 | e8dd4ca8bd51b84d5d7d5a6a1c4144475e066bf1 | supasate/PythonZabbixApi | zabbix.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: DOC: Add doc for pynifti package."
},
{
"role": "assistant",
"content": "\"\"\"\nNifti\n=====\n\n Python bindings for the nifticlibs. Access through the NiftiImage class.\n\n See help for pyniftiio.nifti.NiftiImage\n\n\"\"... | python | new_file | 3 | 0 | bsd-3-clause | 85809e34f1d8ad3d8736e141f3cb2e6045260938 | alexis-roche/nipy,alexis-roche/register,nipy/nireg,alexis-roche/register,nipy/nipy-labs,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/niseg,arokem/nipy,arokem/nipy,alexis-roche/nipy,nipy/nireg,bthirion/nipy,alexis-roche/nireg,alexis-roche/niseg,bthirion/nipy,bthirion/nipy,bthirion/nipy,alexis-roche/nireg,arokem/nipy,al... | neuroimaging/externals/pynifti/nifti/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='qmpy',\n version='0.4.9a',\n author='S. Kirklin',\n author_email='<EMAIL>',\n license='LICENSE.txt',\n classifiers=[\"Programming Language :: Python :: 2.7\"],\... | python | edit | 1 | 0 | mit | 37c85b21311098fc4746924edfbb0c478255ca8c | wolverton-research-group/qmpy,wolverton-research-group/qmpy,wolverton-research-group/qmpy,wolverton-research-group/qmpy,wolverton-research-group/qmpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .request import url\n\nclass Search(object):\n def __init__(self, key=None, q=[], sf=\"created_at\", sd=\"desc\"):\n self._parameters = {\n \"key\": key,\n \"q\": q,\n \"sf\": sf,\n \"sd\": sd\n }\n\n @prope... | python | edit | 1 | 3 | bsd-2-clause | 214511a6fbdd0763667e740735d0876f78a3b244 | joshua-stone/DerPyBooru | derpibooru/query.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom argparse import ArgumentParser\nimport asyncio\n\nfrom .protocol import connect_inotify\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef main():\n parser = ArgumentParser()\n parser.add_argument(\n '-ll',... | python | edit | 1 | 3 | apache-2.0 | 12b1b7a477cc99e1c3ec3405269999c7974677b6 | mwfrojdman/aioinotify | aioinotify/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\"\n setup\n ~~~~~\n\n :copyright: 2014 by Daniel Neuhäuser\n :license: BSD, see LICENSE.rst for details\n\"\"\"\nfrom setuptools import setup\n\n\nsetup(\n name='oore',\n description='Object-Oriente... | python | edit | 1 | 0 | bsd-3-clause | f2d29dc5bf44581dd1850b2be70fc5ae4b5fac35 | DasIch/oore | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport warnings\n\nfrom django.core.urlresolvers import resolve, reverse\nfrom django.test import TestCase\n\n\nclass URLTestMixin(object):\n def assert_url_matches_view(self, view, expected_url, url_name,\n ... | python | edit | 3 | 2 | bsd-2-clause | 052a29030c0665f5724b0fe83550ce7d81202002 | incuna/incuna-test-utils,incuna/incuna-test-utils | incuna_test_utils/testcases/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nUtility functions for dhcp2nest\n\"\"\"\nfrom queue import Queue\nfrom subprocess import Popen, PIPE\nfrom threading import Thread\n\n\ndef follow_file(fn, max_lines=100):\n \"\"\"\n Return a Queue that is fed lines (up to max... | python | edit | 1 | 2 | mit | 27f503ef57a1582f7cc792d61f537bec71a4b02c | jbalonso/dhcp2nest | dhcp2nest/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef gcf(a, b):\n while b:\n a, b = b, a % b\n\n return a\n\n\ndef xgcf(a, b):\n s1, s2 = 1, 0\n t1, t2 = 0, 1\n\n while b:\n q, r = divmod(a, b)\n a, b = b, r\n s2, s1 = s1 - q * s2, s2\n t2... | python | edit | 1 | 2 | mit | 81a03d81ece17487f7b7296f524339a052d45a0d | all3fox/algos-py | src/gcf.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.