messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport subprocess\nimport sys\n\n\ndef build(pkgpath):\n os.chdir(pkgpath)\n targets = [\n 'build',\n 'package',\n 'install',\n 'clean',\n 'clean-depends',\n ]\... | python | edit | 2 | 2 | isc | 1f4ee4e9d978322938579abc4c6723fdc783937d | eliteraspberries/minipkg,eliteraspberries/minipkg | build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport glob\nimport os\nimport SCIRunPythonAPI; from SCIRunPythonAPI import *\n\ndef allFields(path):\n\tnames = []\n\tfor dirname, dirnames, filenames in os.walk(path):\n\t\tfor filename in filenames:\n\t\t\tif filename.endswith(\"fld\"):\... | python | edit | 11 | 4 | mit | 0d50f6663bbc7f366c9db6a9aeef5feb0f4cb5f2 | moritzdannhauer/SCIRunGUIPrototype,jessdtate/SCIRun,jessdtate/SCIRun,jessdtate/SCIRun,jcollfont/SCIRun,jcollfont/SCIRun,ajanson/SCIRun,jessdtate/SCIRun,ajanson/SCIRun,moritzdannhauer/SCIRunGUIPrototype,collint8/SCIRun,moritzdannhauer/SCIRunGUIPrototype,moritzdannhauer/SCIRunGUIPrototype,ajanson/SCIRun,jessdtate/SCIRun,... | src/ExampleNets/readAllFields.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCartoDB Services Python Library\n\nSee:\nhttps://github.com/CartoDB/geocoder-api\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='cartodb_services',\n\n version='0.13.0',\n\n description='CartoDB Ser... | python | edit | 1 | 0 | bsd-3-clause | fc1e05658eb7e1fb2722467b5da5df622145eece | CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/geocoder-api | server/lib/python/cartodb_services/setup.py | rejected_duplicate | Near-duplicate of sample 468 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Red Hat, Inc. <http://www.redhat.com>\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 Lice... | python | edit | 1 | 1 | apache-2.0 | df6642256806e0a501e83c06e64b35f187efaf60 | pandeyop/rally,go-bears/rally,vefimova/rally,aplanas/rally,group-policy/rally,amit0701/rally,shdowofdeath/rally,ytsarev/rally,go-bears/rally,vefimova/rally,group-policy/rally,shdowofdeath/rally,openstack/rally,gluke77/rally,ytsarev/rally,redhat-openstack/rally,varunarya10/rally,amit0701/rally,gluke77/rally,vganapath/ra... | rally/benchmark/scenarios/authenticate/authenticate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This is just a kludge so that bdist_rpm doesn't guess wrong about the\n# distribution name and version, if the egg_info command is going to alter\n# them, another kludge to allow you to build old-style non-egg RPMs.\n\nfrom distutils.comm... | python | edit | 1 | 2 | mit | 58eb4b2b034d90f45b3daa12900f24a390bb4782 | pypa/setuptools,pypa/setuptools,pypa/setuptools | setuptools/command/bdist_rpm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport string\n\nif __name__ == '__main__':\n patch_file = 'example.patch'\n base_name, _ = os.path.splitext(patch_file)\n\n values = {\n 'name': 'kpatch-module-{}'.format(base_name),\n 'patch_file': patch_... | python | edit | 1 | 1 | mit | c12cbae226f42405a998b93c6fd7049aadc6a19c | centos-livepatching/kpatch-package-builder | build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Chord(object):\n # TODO: doctring\n def __init__(self, root_note):\n # TODO: doctring\n # TODO: validation\n self.notes = [root_note]\n \n def root(self):\n # TODO: doctring\n # TODO: tes... | python | edit | 1 | 5 | mit | d295575284e712a755d3891806a7e40b65377a69 | charlottepierce/music_essentials | music_essentials/chord.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This is just a kludge so that bdist_rpm doesn't guess wrong about the\n# distribution name and version, if the egg_info command is going to alter\n# them, another kludge to allow you to build old-style non-egg RPMs.\n\nfrom distutils.comm... | python | edit | 1 | 2 | mit | ab81837b707280b960ca02675a85da7918d17fec | pypa/setuptools,pypa/setuptools,pypa/setuptools | setuptools/command/bdist_rpm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport os\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\nSECRET_KEY = '$1B&VUf$OdUEfMJXd40qdakA36@%2NE_41Dz9tFs6l=z4v_3P-'\nDATABASES = {\n 'default': {\n 'ENGI... | python | edit | 2 | 0 | mit | 200f3a0bd0edd5a7409f36769cc8401b468bdb64 | dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server | puzzlehunt_server/settings/travis_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Site container for an HTTP server.\n\nA Web Site Process Bus object is used to connect applications, servers,\nand frameworks with site-wide services such as daemonization, process\nreload, signal handling, drop privileges, PID file m... | python | edit | 1 | 0 | bsd-3-clause | 1f2d8fadd114106cefbc23060f742163be415376 | Safihre/cherrypy,Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cherrypy | cherrypy/process/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test the blob filter.\"\"\"\nfrom pathlib import Path\nfrom typing import Sequence, Tuple\nfrom unittest.mock import MagicMock\n\nimport pytest\n\nfrom git.index.typ import BlobFilter, StageType\nfrom git.objects import Blob\nfrom git... | python | edit | 1 | 1 | bsd-3-clause | da59d7481668a7133eebcd12b4d5ecfb655296a6 | gitpython-developers/GitPython,gitpython-developers/gitpython,gitpython-developers/GitPython,gitpython-developers/gitpython | test/test_blob_filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nr\"\"\"\nTests for QtAwesome.\n\"\"\"\n# Standard library imports\nimport subprocess\n\n# Test Library imports\nimport pytest\n\n# Local imports\nimport qtawesome as qta\nfrom qtawesome.iconic_font import IconicFont\n\n\ndef test_segfault_i... | python | edit | 1 | 3 | mit | 431ca4f2d44656ef9f97be50718712c6f3a0fa9b | spyder-ide/qtawesome | qtawesome/tests/test_qtawesome.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n'''This adds a \"slugify\" command to be invoked by Sublime Text. It is made\navailable as \"Slugify\" in the command palette by Default.sublime-commands.\nParts of these commands are borrowed from the sublime-slug pack... | python | edit | 3 | 4 | mit | 432233a99d9036f358716b48a0e26054a7e217bf | alimony/sublime-slugify | SlugifyCommand.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.user.event_service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom datetime import datetime\nfrom typing import Sequ... | python | edit | 1 | 2 | bsd-3-clause | de1ff8a480cc6d6e86bb179e6820ab9f21145679 | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | byceps/services/user/event_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ast\n\nimport click\n\nfrom parsing.parser import FileVisitor\n\n\n@click.command()\n@click.argument('code', type=click.File('rb'))\n@click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each c... | python | edit | 1 | 4 | mit | d2c2208b39c5715deebf8d24d5fa9096a945bdcd | LaurEars/codegrapher | script.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe FVCOM Python toolbox (PyFVCOM)\n\n\"\"\"\n\n__version__ = '1.6.1'\n__author__ = 'Pierre Cazenave'\n__credits__ = ['Pierre Cazenave']\n__license__ = 'MIT'\n__maintainer__ = 'Pierre Cazenave'\n__email__ = '<EMAIL>'\n\nimport inspe... | python | edit | 18 | 0 | mit | 6bf26f15855ee6e13e11a2b026ee90b9302a68a7 | pwcazenave/PyFVCOM | PyFVCOM/__init__.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Shamelessly borrowed from\n# http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app/3851333#3851333\nimport os\nimport sys\nfrom django.conf import settings\n\nDIRNAME = os.path.dirname(__file__)\nsettings.... | python | edit | 1 | 0 | cc0-1.0 | dd021344c081d47f51212165584ad646868f5720 | fna/owning-a-home-api,amymok/owning-a-home-api,cfpb/owning-a-home-api | test_standalone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013, Sascha Peilicke <<EMAIL>>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2 as\n# published by the Free Software Foundation.\n#... | python | edit | 5 | 1 | apache-2.0 | bb896ed1723ca01ed18d1110eb51ca1661135db6 | saschpe/rapport | rapport/plugins/launchpad.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import generics\nfrom rest_framework import permissions\nfrom rest_framework.response import Response\nfrom rest_framework.decorators import api_view\nfrom django.views.decorators.clickjacking import xframe_options_exemp... | python | edit | 1 | 2 | apache-2.0 | b62c8c905cdd332a0073ce462be3e5c5b17b282d | erinspace/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,fabianvf/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,felliott/scrapi | api/webview/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport addict\n\nSHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'\nLONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attrib... | python | edit | 1 | 0 | mit | e6cbf0c51e3bd0f639584a3bbd97c394bd844c57 | mewwts/addict | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 The Flutter Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport sys\n\nimport argparse\nimport errno\nimport os\nimport subprocess\... | python | edit | 1 | 4 | bsd-3-clause | 0255a9cc22999d3111076155feab85ebe3198492 | chinmaygarde/flutter_engine,rmacnak-google/engine,devoncarew/engine,devoncarew/engine,chinmaygarde/flutter_engine,devoncarew/engine,rmacnak-google/engine,rmacnak-google/engine,rmacnak-google/engine,flutter/engine,chinmaygarde/flutter_engine,chinmaygarde/flutter_engine,flutter/engine,chinmaygarde/flutter_engine,rmacnak-... | impeller/tools/build_metal_library.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Top-level module for scaper\"\"\"\n\nfrom .core import *\n\n__version__ = '0.1.0'\n\n\n\n```\n\nApply this change: Add sound_event namespace to jams during init"
},
{
"role": "assistant",
"content": ... | python | edit | 2 | 0 | bsd-3-clause | a57f7c43bc7749de5acd42b6db95d77074308cef | justinsalamon/scaper | scaper/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport fnmatch\nimport logging\nimport sys\n\nimport ee\n\n\ndef delete(asset_path):\n root = asset_path[:asset_path.rfind('/')]\n all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]\n filtered_names = fnmatch.filte... | python | edit | 1 | 6 | apache-2.0 | 8eca7b30865e4d02fd440f55ad3215dee6fab8a1 | tracek/gee_asset_manager | gee_asset_manager/batch_remover.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.conf.urls.defaults import *\r\n\n\nurlpatterns = patterns(\"core.views\",\n url(\"^airport_list/(?P<south>.*)/(?P<west>.*)/(?P<north>.*)/(?P<east>.*)/\", \n \"airports_for_boundary\", name=\"airports_for_boundary\"),... | python | edit | 4 | 0 | bsd-2-clause | 83bc5fbaff357b43c49f948ec685e7ab067b8f78 | stephenmcd/ratemyflight,stephenmcd/ratemyflight | core/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# SpatialDB scons tool\n#\n# It builds the library for the SpatialDB C++ class library,\n# and provides CPP and linker specifications for the header \n# and libraries.\n#\n# SpatialDB depends on SqliteDB, which provides the interface to \n#... | python | edit | 9 | 2 | bsd-3-clause | 27ffcae96c5dce976517035b25a5c72f10e2ec99 | ncareol/spatialdb,ncareol/spatialdb | tool_spatialdb.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest \n\nfrom datetime import date as vanilla_date, timedelta\n\nfrom calexicon.dates import DistantDate\n\nclass TestDistantDate(unittest.TestCase):\n def test_subtraction(self):\n dd = DistantDate(10000, 1, 1)\n ... | python | edit | 1 | 1 | apache-2.0 | e4b2d60af93fd84407eb7107497b2b500d79f9d7 | jwg4/qual,jwg4/calexicon | calexicon/dates/tests/test_distant.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.7 on 2016-08-30 19:59\nfrom __future__ import unicode_literals\n\nimport common.mixins\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependenc... | python | edit | 1 | 0 | mit | 0f1f7963c2ea80604593644e1c04643031561970 | teamtaverna/core | app/timetables/migrations/0004_course.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport json\nimport logging\nimport socket\nimport traceback\n\nfrom threading import Thread\nfrom splunklib import client\n\n_client = None\n\n\nclass SplunkFilter(logging.Filter):\n \"\"\"\n A logging filter for Spl... | python | edit | 4 | 3 | mit | 931d6e4f4ce2cf0d3ea53a3e18ac050e2004741e | zach-taylor/splunk_handler,sullivanmatt/splunk_handler | splunk_handler/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom retry.api import retry_call\nfrom config import config\n\nfrom tests.pages import UploadCsvPage\n\nfrom tests.postman import (\n send_notification_via_csv,\n get_notification_by_id_via_api,\n)\n\nfrom tests.test_utils import asse... | python | edit | 3 | 1 | mit | 1eacbac722ca949518e1a8e9d6a0a957e193ba9e | alphagov/notifications-functional-tests,alphagov/notifications-functional-tests | tests/functional/staging_and_prod/test_admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils import timezone\nfrom django.db import models\n\nfrom users.models import Course, BaseModel, User\n\n\nclass Pledge(BaseModel):\n user = models.ForeignKey(User)\n course = models.ForeignKey(Course)\n money = model... | python | edit | 1 | 0 | mit | bbf22dc68202d81a8c7e94fbb8e61d819d808115 | TejasM/wisely,TejasM/wisely,TejasM/wisely | wisely_project/pledges/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\"\"\"Launch the flask-forecaster application.\"\"\"\nimport os\n\nfrom flask_forecaster import app\n\nif __name__ == '__main__':\n app.run(host='0.0.0.0', port=int(os.getenv('PORT')))\n\n```\n\nApply this change... | python | edit | 1 | 0 | isc | 7127520c3539bd65c6241d6c4a36e3cb6bfe6195 | textbook/flask-forecaster,textbook/flask-forecaster | scripts/launch_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom datetime import date, datetime, timedelta\nfrom .models import Event\n\ndef index(request):\n if date.today().isoweekday() in [5,6,7]:\n weekend_start = date.today()\n ... | python | edit | 3 | 2 | mit | 2b74c8714b659ccf5faa615e9b5c4c4559f8d9c8 | coreymcdermott/artbot,coreymcdermott/artbot | artbot_website/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.blueprints.authorization.decorators\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom functo... | python | edit | 1 | 2 | bsd-3-clause | 2b70879e2d73453d81ed738f34cf20d39afdc3ad | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | byceps/blueprints/authorization/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nfrom warehouse import script\n\n\ndef main():\n script.run()\n\n\nif __name__ == \"__main__\":\n main()\n\n```\n\nAppl... | python | edit | 2 | 3 | bsd-2-clause | bc15058cc95916788250d660d5560b69a82e0b89 | davidfischer/warehouse | warehouse/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-\n# -*- encoding: utf-8 -*-\n\nfrom twisted.python import log\nfrom twisted.internet.defer import inlineCallbacks, Deferred\n\nfrom vumi.message import Message\nfrom vumi.service ... | python | edit | 3 | 1 | bsd-3-clause | a5130e32bffa1dbc4d83f349fc3653b690154d71 | TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi | vumi/workers/vas2nets/workers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nimport unittest\n\nfrom mopidy import config, ext\n\n\nclass ExtensionTest(unittest.TestCase):\n\n def setUp(self): # noqa: N802\n self.ext = ext.Extension()\n\n def ... | python | edit | 1 | 1 | apache-2.0 | f814e945d3e62c87c5f86ef5ac37c5feb733b83d | mokieyue/mopidy,bencevans/mopidy,ZenithDK/mopidy,jodal/mopidy,quartz55/mopidy,pacificIT/mopidy,pacificIT/mopidy,quartz55/mopidy,ali/mopidy,swak/mopidy,tkem/mopidy,bencevans/mopidy,mopidy/mopidy,SuperStarPL/mopidy,dbrgn/mopidy,hkariti/mopidy,glogiotatidis/mopidy,mokieyue/mopidy,ali/mopidy,bacontext/mopidy,glogiotatidis/... | tests/test_ext.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nFile : pyhaystackTest.py (2.x)\nThis module allow a connection to a haystack server\nFeautures provided allow user to fetch data from the server and eventually, to post to it.\n\nSee http://www.project-hayst... | python | edit | 1 | 0 | apache-2.0 | 1e8f9a95badc1e2b558bae7570ef9bc23f26a0df | ChristianTremblay/pyhaystack,vrtsystems/pyhaystack,ChristianTremblay/pyhaystack | pyhaystack/info.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nDEBUG = True\n\nLOCAL_DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql',\n 'NAME': 'circle_test',\n 'USER': 'circleci',\n 'PASSWORD': '',\n 'HOST': 'loc... | python | edit | 1 | 0 | mit | 7241801672c9ff40526b558366ba8869ba86cf36 | magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3 | project/circleci_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Routes configuration\n\nThe more specific and detailed routes should be defined first so they\nmay take precedent over the more generic routes. For more information\nrefer to the routes manual at http://routes.groovie.org/docs/\n\"\"\... | python | edit | 1 | 1 | bsd-3-clause | 92aa388d1b58c0e88979d299cc8deabab811f926 | obeattie/pylons,obeattie/pylons | tests/test_webapps/filestotest/rest_routing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nimport django\n\n\ndef get_app_template_dirs():\n if django.VERSION < (1, 8):\n # noinspection PyUnresolvedReferences\n from django.template.loaders.app_directories import app_template_dirs... | python | edit | 1 | 4 | mit | 9d2124e81e62ab508de197aac4f29193ef15d4d2 | bpeschier/django-compressor-requirejs,bpeschier/django-compressor-requirejs | requirejs/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom click.testing import CliRunner\nimport pytest\n\nfrom cibopath.cli import main\nfrom cibopath import __version__\n\nrunner = CliRunner()\n\n\n@pytest.fixture(params=['-V', '--version'])\ndef version_cli_flag(... | python | edit | 1 | 1 | bsd-3-clause | 37a0cb41a88114ab9edb514e29447756b0c3e92a | hackebrot/cibopath | tests/test_cli.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\nimport jsonfield.fields\nimport uuid\n\ntry:\n from django.db.models import UUIDField\nexcept ImportError:\n from django_dbq... | python | edit | 1 | 0 | bsd-2-clause | d7f3ea41bc3d252d786a339fc34337f01e1cc3eb | dabapps/django-db-queue | django_dbq/migrations/0001_initial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport unittest\n\ndef main():\n\tif sys.version_info[0] >= 3:\n\t\tfrom unittest.main import main\n\t\tmain(module=None)\n\telse:\n\t\tunittest.main()\n\nif __name__ == '__main__':\n\tmain()\n\n```\n\nApply this change: Drop Py... | python | edit | 1 | 0 | bsd-3-clause | 01e62119750d0737e396358dbf45727dcbb5732f | retext-project/pymarkups,mitya57/pymarkups | tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef env_or_default(var, default=None):\n \"\"\"Get environment variable or provide default.\n\n Args:\n var (str): environment variable to search for\n default (optional(str)): default to return\n \"\"\... | python | edit | 1 | 2 | mit | b339c25068e849dbbf769f22893125b15325eb66 | theherk/figgypy | figgypy/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Sergey Margaritov\n# Copyright (c) 2013 Sergey Margaritov\n#\n# License: MIT\n#\n\n\"\"\"This module exports the scss-lint plugin lin... | python | edit | 4 | 2 | mit | dcd9f381bc7eeaa0ffad72d286bb6dc26ebf37a4 | attenzione/SublimeLinter-scss-lint | linter.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom os import path\nimport glob\nimport json\nimport subprocess\n\n\nclass Snippet(object):\n\n def __init__(self, config, username, snippet_id):\n self.config = config\n self.username = username\n self.s... | python | edit | 1 | 5 | mit | f896d0fa40250a580fee584217c5a4c1d39d7388 | mesuutt/snipper | snipper/snippet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\n\nclass Puzzle:\n def get_all_exits(self, graph):\n exits = []\n for key, value in graph.items():\n for item in value:\n if 'Exit' in item:\n exits += item\... | python | edit | 1 | 7 | mit | 77b87f5657583a5418d57f712b52bbcd6e9421aa | aaronshaver/graph-unique-paths | puzzle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urlparse\n\nfrom django.test import TestCase, override_settings\nfrom mock import patch, Mock\n\nfrom opendebates.context_processors import global_vars\nfrom opendebates.tests.factories import SubmissionFactory\n\n\nclass NumberOfVot... | python | edit | 1 | 1 | apache-2.0 | fff234587be9b63270b345345f607df381031bdc | caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates | opendebates/tests/test_context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom optparse import make_option\n\nfrom go.billing.models import Account\nfrom go.billing.tasks import month_range, generate_monthly_statement\nfrom go.base.command_utils import BaseGoCommand, get_user_by_ema... | python | edit | 1 | 3 | bsd-3-clause | 5f72b6edc28caa7bf03720ed27a9f3aa32c8323e | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/billing/management/commands/go_gen_statements.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sklearn.linear_model import LinearRegression\nfrom bs4 import BeautifulSoup\nimport numpy\n\ndef from_pmml(self, pmml):\n \"\"\"Returns a model with the intercept and coefficients represented in PMML file.\"\"\"\n\n model = self(... | python | edit | 1 | 5 | mit | 3964cb1645c2d0f1a7080c195ff33c36a590358a | jeenalee/sklearn_pmml | sklearn_pmml/extensions/linear_regression.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nimport authentication_app.views\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'gettingstarted.views.home', n... | python | edit | 6 | 0 | mit | c84e22824cd5546406656ecc06a7dcd37a013954 | mvpgomes/shopit-app,mvpgomes/shopit-app,mvpgomes/shopit-app,mvpgomes/shopit-app | shopit_app/urls.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Suggest creating symbolic link if hard link is not allowed.\n\nExample:\n> ln barDir barLink\nln: ‘barDir’: hard link not allowed for directory\n\n--> ln -s barDir barLink\n\"\"\"\n\nimport re\nfrom thefuck.specific.sudo import sudo_s... | python | edit | 1 | 2 | mit | 77ad68b04b66feb47116999cf79892f6630d9601 | lawrencebenson/thefuck,mlk/thefuck,nvbn/thefuck,PLNech/thefuck,scorphus/thefuck,nvbn/thefuck,SimenB/thefuck,Clpsplug/thefuck,SimenB/thefuck,mlk/thefuck,scorphus/thefuck,lawrencebenson/thefuck,Clpsplug/thefuck,PLNech/thefuck | thefuck/rules/ln_no_hard_link.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport base64\nimport json\nimport pickle\n\n\ndef decode_message(message):\n message_body = message.get_body()\n json_body = json.loads(message_body)\n if 'task' in message_body:\n return json_body\n else:\n # Fal... | python | edit | 1 | 2 | mit | b18bdf11141cf47319eed9ba2b861ebc287cf5ff | spulec/PyQS | pyqs/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\nimport {{ project.repo_name }}\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nif sys.argv[-1] == 'publish':\n os.system('python se... | python | edit | null | null | bsd-2-clause | a163d7970edbd4a483ddf7d8e20a7c0ab682e0c7 | rockymeza/cookiecutter-djangoapp,aeroaks/cookiecutter-pyqt4,rockymeza/cookiecutter-djangoapp | package/setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom flask import Blueprint, jsonify\n\nfrom me_api.configs import Config\n\n\nme = Blueprint('me', __name__)\n\n\n@me.route('/')\ndef index():\n ... | python | edit | 1 | 2 | mit | e91a923efd7cff36368059f47ffbd52248362305 | lord63/me-api | me_api/middleware/me.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport shutil\nimport os\nfrom setuptools import setup, find_packages\nimport cobwebs\nimport subprocess\n\n\nif len(sys.argv) > 0:\n if sys.argv[1] in (\"install\", \"develop\"):\n try:\n os.mkdir(\"/etc/sp... | python | edit | 1 | 0 | apache-2.0 | 0d3322de1944a1a64d6c77d4b52452509979e0c1 | asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider | src/cobwebs/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport virtool.http.routes\nimport virtool.utils\nfrom virtool.api.utils import json_response\n\nroutes = virtool.http.routes.Routes()\n\n\n@routes.get(\"/api/processes\")\nasync def find(req):\n db = req.app[\"db\"]\n\n documents = [... | python | edit | 1 | 2 | mit | ad73789f74106a2d6014a2f737578494d2d21fbf | virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool | virtool/api/processes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ssl\n\nLDAP_SERVER = 'ldap.rserver.de'\nLDAP_PORT = 3389\nLDAP_SSL_PORT = 6636\nLDAP_REQUIRE_CERT = ssl.CERT_NONE\n\n```\n\nApply this change: Fix travis unit test for python 3.3"
},
{
"role": "assistant",
"content": "imp... | python | edit | 1 | 0 | bsd-2-clause | d3a203725d13a7abef091f0070f90826d3225dbc | rroemhild/flask-ldapconn | settings_travis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\nimport hgtools.managers\r\n\r\n# use hgtools to get the version\r\nhg_mgr = hgtools.managers.RepoManager.get_first_valid_manager()\r\n\r\nextensions = [\r\n 'sphinx.ext.autodoc',\r... | python | edit | 1 | 0 | mit | c18b8b5e545032ae512bad505255c0f72390b633 | pytest-dev/pytest-runner | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Usage: chronicler [-c CHRONICLE]\n\nThe Chronicler remembers…\n\nOptions:\n -c, --chronicle CHRONICLE chronicle file to use [default: chronicle.txt]\n\n\"\"\"\nimport docopt\nimport hjson\nimport jsonschema\nimport chronicle\n\n\... | python | edit | 1 | 7 | unlicense | 5f2ffbbbf145653b853a4f67308bc28da6839dba | elwinar/chronicler | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add docstring explaining how to run benchmarks"
},
{
"role": "assistant",
"content": "\"\"\"Benchmarks for graphql\n\nBenchmarks are disabled (only executed as tests) by default in setup.cfg.\nYou can enable them with --benchmark... | python | new_file | 1 | 0 | mit | d0ad6a4310e37a3d6dc853d2930640053f89ae05 | graphql-python/graphql-core | tests/benchmarks/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nHandlers for fetching upload templates.\n\"\"\"\n\nfrom django.shortcuts import render\n\n\nCONTENT_TYPE__CSV = 'text/csv'\n\nTEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER = 'sample_list_targets_template.csv'\n\nTEMPLATE__SAMPLES_BATCH... | python | edit | 1 | 1 | mit | b906446bfed0f716b3337fbf33d0b6ded7854669 | churchlab/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone,woodymit/millstone | genome_designer/main/upload_template_views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\n\n\ndef user_new_str(self):\n return self.username if self.get_full_name() == \"\" else self.get_full_name()\n\n\n# Replace the __str__ method in the User class with our new implementation\nUs... | python | edit | 1 | 2 | mit | 7527ce1b48f769d33eb5ede3d54413e51eb2ac12 | lubegamark/senkumba | senkumba/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom nap.api import Api\n\nfrom . import HttpServerTestBase\n\n\nclass TestNap(HttpServerTestBase):\n\n def test_unallowed_method(self):\n \"\"\"Tries to use non-existent HTTP method\"\"\"\n api = Api('http://localhost:88... | python | edit | 1 | 1 | mit | 1e62c328bb42ec123e75b5c66fb29f002cd57db2 | kimmobrunfeldt/nap | tests/test_nap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\n\nimport pytest\nimport kombu\n\nfrom .common import BasicFunctionality\n\n\ndef get_connection(\n hostname, port, vhost):\n return kombu.Connection('amqp://{}... | python | edit | 1 | 1 | bsd-3-clause | 49606a1a14696f41a03c7b69cbcf382cab50210c | ZoranPavlovic/kombu,ZoranPavlovic/kombu,celery/kombu | t/integration/test_py_amqp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport io\nimport os\n\nimport legofy\nfrom PIL import Image\nfrom flask import Flask, render_template, request, redirect, send_file\n\nBRICK_PATH = os.path.join(os.path.dirname(legofy.__file__), \"assets\", \... | python | edit | 1 | 3 | mit | 27864fd59c12127bc35f3da2578c77efd8315629 | aaronkurtz/bricky,aaronkurtz/bricky | brickit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom asgiref.sync import async_to_sync\nfrom channels.layers import get_channel_layer\n\nfrom .consumers import PRESENCE_ROOM\nfrom .models import Campaign\n\n\ndef connect_info_object(sender, **kwargs):\n reference = kwargs.get('referen... | python | edit | 1 | 7 | mit | 1d32debc1ea2ce8d11c8bc1abad048d6e4937520 | okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign | froide_campaign/listeners.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# py3status module for playerctl\n\nimport subprocess\n\ndef run(*cmdlist):\n return subprocess.run(cmdlist, stdout=subprocess.PIPE).stdout.decode()\n\ndef player_args(players):\n if not players:\n return 'playerctl',\n else... | python | edit | 1 | 3 | unlicense | 5b282d9322a676b4185fcd253f338a342ec5e5ce | louisswarren/dotfiles,louisswarren/dotfiles | .config/i3/py3status/playerctlbar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom werkzeug.contrib.fixers import ProxyFix\nfrom flask import Flask, redirect, url_for\nfrom flask_dance.contrib.google import make_google_blueprint, google\nfrom raven.contrib.flask import Sentry\n\napp = Flask(__name__)\napp.... | python | edit | 1 | 2 | mit | 6f42f03f950e4c3967eb1efd7feb9364c9fbaf1f | singingwolfboy/flask-dance-google | google.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2016 University of Chicago\n# Licensed under the APL 2.0 license\n\nimport log\nimport log.handlers\nimport os\n\n\nLOG_FILENAME = '~/logs/fsurf.log'\nMAX_BYTES = 1024*1024*50 # 50 MB\nNUM_BACKUPS = 10 ... | python | edit | 1 | 1 | apache-2.0 | 9614fe5657c478c32dcbc4c6b6b0127adac55009 | OSGConnect/freesurfer_workflow,OSGConnect/freesurfer_workflow | python/fsurfer/log.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"URLs module\"\"\"\nfrom django.conf import settings\ntry:\n from django.conf.urls import patterns, url\nexcept ImportError:\n # Django < 1.4\n from django.conf.urls.defaults import patterns, url\n\n\nfrom social.utils import ... | python | edit | 3 | 0 | bsd-3-clause | 6694a9e8d554c9450cdf6cd076bb56a324048b44 | cmichal/python-social-auth,cmichal/python-social-auth,cmichal/python-social-auth | social/apps/django_app/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport nose\n\n\ndef start(argv=None):\n sys.exitfunc = lambda: sys.stderr.write('Shutting down...\\n')\n\n if argv is None:\n argv = [\n 'nose... | python | edit | 1 | 2 | mit | a1f118f2d4068d0aeffc1b02efcd7337de6ffab1 | inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails | tests/run_tests.py | rejected_duplicate | Near-duplicate of sample 2533 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport os\nimport logging\n\nfrom workspace.commands import AbstractCommand\nfrom workspace.commands.helpers import ProductPager\nfrom workspace.scm import stat_repo, repos, product_name, all_branches... | python | edit | 1 | 13 | mit | 291923f4ad1fc0041284a73d6edad43e6047fafc | maxzheng/workspace-tools | workspace/commands/status.py | rejected_complexity | Cyclomatic complexity too high: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\npaths = (\n '/home/simon/sites/djangopeople.net',\n '/home/simon/sites/djangopeople.net/djangopeoplenet',\n '/home/simon/sites/djangopeople.net/djangopeoplenet/djangopeople/lib',\n)\nfor path in p... | python | edit | 1 | 0 | mit | ceb75d6f58ab16e3afdf3c7b00de539012d790d5 | brutasse/djangopeople,django/djangopeople,polinom/djangopeople,brutasse/djangopeople,polinom/djangopeople,brutasse/djangopeople,polinom/djangopeople,django/djangopeople,polinom/djangopeople,django/djangopeople,brutasse/djangopeople | djangopeoplenet/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSECRET_KEY = \"TODO-change-this\"\n\nSQLALCHEMY_DATABASE_URI = \"postgresql://postgres:postgres@localhost/cifer\"\nUSERNAME = \"postgres\"\nPASSWORD = \"postgres\"\n\n```\n\nApply this change: Use Heroku database connection settings"
},
... | python | edit | 1 | 0 | mit | de1142300a7628289d62f6686833bb795c124979 | uva-financial-engineering/cifer-tournament,uva-financial-engineering/cifer-tournament | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_pycookiecheat\n----------------------------------\n\nTests for `pycookiecheat` module.\n\"\"\"\n\nfrom pycookiecheat import chrome_cookies\nfrom uuid import uuid4\nimport pytest\n\ndef test_raises_on_... | python | edit | 3 | 2 | mit | f35163ad752a52983d7d5ff9bfd383e98db06f0b | fxxkhand/pycookiecheat,n8henrie/pycookiecheat | tests/test_pycookiecheat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom event import Event\n\n\nclass EventTest(unittest.TestCase):\n def test_a_listener_is_notified_when_event_is_raised(self):\n called = False\n\n def listener():\n nonlocal called\n ... | python | edit | 1 | 1 | mit | 5e3c6d6ab892a87ca27c05c01b39646bd339b3f2 | bsmukasa/stock_alerter | tests/test_event.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom trac.db import Table, Column, Index, DatabaseManager\r\nfrom trac.core import TracError\r\nfrom trac.versioncontrol.cache import CACHE_YOUNGEST_REV\r\n\r\ndef do_upgrade(env, ver, cursor):\r\n \"\"\"Modify the repository cache schem... | python | edit | 6 | 3 | bsd-3-clause | 02ca3946662fd996f77c30d9e61d8fc8d9243de7 | exocad/exotrac,dokipen/trac,moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,moreati/trac-gitsvn,exocad/exotrac,moreati/trac-gitsvn | trac/upgrades/db20.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\n\n\"\"\"\nTODO:\npylokit.lokit.LoKitExportError: b'no output filter found for provided suffix'\nRaised when trying to export to unsupported dest (eg. pptx -> txt)\n\"\"\"\n\nSUPPORTED_FORMATS = { \n \"pdf\": {\n \"... | python | edit | 1 | 0 | mit | d362b066f2c577d731adb0643799e47d30ae2f91 | docsbox/docsbox | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport logging\nimport sys\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor.packaging import specifiers\nfrom pip._vendor.packaging import version\n\nlogger = logging.getLogger(__name__)\n... | python | edit | 1 | 4 | mit | f7373a4c2adc74fc2ff18a7c441a978b6982df89 | pradyunsg/pip,fiber-space/pip,atdaemon/pip,RonnyPfannschmidt/pip,techtonik/pip,rouge8/pip,xavfernandez/pip,fiber-space/pip,rouge8/pip,pradyunsg/pip,zvezdan/pip,techtonik/pip,pypa/pip,sigmavirus24/pip,sigmavirus24/pip,RonnyPfannschmidt/pip,zvezdan/pip,benesch/pip,rouge8/pip,atdaemon/pip,pfmoore/pip,pypa/pip,sbidoul/pip,... | pip/utils/packaging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nSciStack: the web app to build docker containers for reproducable science\n\n\n\"\"\"\nimport os\nimport flask\n\napp = flask.Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n re... | python | edit | 1 | 1 | mit | 3d5fd3233ecaf2bae5fbd5a1ae349c55d2f4cdc7 | callaghanmt/research-stacks,callaghanmt/research-stacks,callaghanmt/research-stacks | scistack/scistack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom .models import ObjectSet\n\n\ndef objectset_form_factory(Model, queryset=None):\n \"\"\"Takes an ObjectSet subclass and defines a base form class.\n\n In addition, an optional queryset can be supplied to... | python | edit | 1 | 4 | bsd-2-clause | 72539e1a83eba8db9adfdeef6099081475ef8d86 | chop-dbhi/django-objectset,chop-dbhi/django-objectset | objectset/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\n\nclass Entry(models.Model):\n content = models.TextField()\n author = models.ForeignKey(User)\n created = models.DateTimeField()\n\n\nclass Comment(model... | python | edit | 1 | 0 | bsd-3-clause | bde09206bf308167a11bcb012753d10d845dc810 | juanique/django-chocolate,juanique/django-chocolate,juanique/django-chocolate | test_project/blog/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='synapse',\n version='0.1.0a1',\n description='Synapse Distributed Key-Value Hypergraph Analysis Framework',\n author='Invisigoth Kenshoto',\n... | python | edit | 1 | 0 | apache-2.0 | 8312ac22c444b895bab9f2a3707e4d4a7ccc40b2 | vertexproject/synapse,vertexproject/synapse,vertexproject/synapse | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Functions common to other modules.\"\"\"\nimport json\nimport os\nimport re\nimport time\nimport urllib.request\n\nfrom settings import net\n\n\ndef clean(name):\n \"\"\"Strip all [^a-zA-Z0-9_] characters and convert to lowercase.\... | python | edit | 1 | 3 | bsd-2-clause | cdd32dd3e346f72f823cc5d3f59c79c027db65c8 | chingc/DJRivals,chingc/DJRivals | common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Unittest of command entry point.\"\"\"\n# Copyright 2015 Masayuki Yamamoto\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 obta... | python | edit | 1 | 1 | apache-2.0 | 9a33ac3f563ad657129d64cb591f08f9fd2a00a2 | ma8ma/yanico | tests/test_command.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef ensureFocusHandler():\n JS(\"\"\"\n return (focusHandler !== null) ? focusHandler : (focusHandler =\n @{{createFocusHandler}}());\n \"\"\")\n\ndef createFocusHandler():\n JS(\"\"\"\n return function(evt) {\n ... | python | edit | 4 | 1 | apache-2.0 | d37f91f50dd6c0c3202258daca95ee6ee111688f | gpitel/pyjs,spaceone/pyjs,lancezlin/pyjs,spaceone/pyjs,lancezlin/pyjs,pombredanne/pyjs,pyjs/pyjs,Hasimir/pyjs,gpitel/pyjs,pyjs/pyjs,spaceone/pyjs,pyjs/pyjs,Hasimir/pyjs,lancezlin/pyjs,pyjs/pyjs,pombredanne/pyjs,gpitel/pyjs,Hasimir/pyjs,gpitel/pyjs,spaceone/pyjs,pombredanne/pyjs,lancezlin/pyjs,pombredanne/pyjs,Hasimir/p... | pyjswidgets/pyjamas/ui/Focus.oldmoz.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport copy\nimport json\nimport requests\nimport html5lib\nfrom application import APPLICATION as APP\n\n# Be compatible with python 2 and 3\ntry:\n from urllib import urlencode\nexcept ImportError:\n from urllib.parse import urlenco... | python | edit | 1 | 5 | mit | f45b3e73b6258c99aed2bff2e7350f1c797ff849 | EmilStenstrom/nephele | providers/provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\ntry:\n import spotpy\nexcept ImportError:\n import sys\n sys.path.append(\".\")\n import spotpy\n\n\nfrom spotpy.examples.spot_setup_hymod_python import spot_setup\n\n\n\nclass TestFast(unittest.TestCase):\n ... | python | edit | 1 | 1 | mit | 52d76647b1fa50a2649335b65f22f88d7877e9d3 | bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy,thouska/spotpy,bees4ever/spotpy,thouska/spotpy | spotpy/unittests/test_fast.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='acc_provision',\n version='1.9.6',\n description='Tool to provision ACI for ACI Containers Controller',\n author=\"Cisco Systems, Inc.\",\n author_email=\"<EMAIL>\... | python | edit | 1 | 0 | apache-2.0 | c69ea05755ecdc6fc0c05e39e5746445376d163a | noironetworks/aci-containers,noironetworks/aci-containers | provision/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom flask import Flask\nfrom model.base import db\nfrom route.base import blueprint\n\n# Register models and routes\nimport model\nimport route\n\nlogging.basicConfig(level=logging.INFO)\n\napp = Flask(__name__)\... | python | edit | 4 | 1 | mit | d1ccd3e93043d11a22e873e7ccdb76d749746151 | hexa4313/velov-companion-server,hexa4313/velov-companion-server | api/app/app.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.paginator import Paginator, InvalidPage\nfrom django.conf import settings\nfrom django.http import Http404\nfrom django.shortcuts import render\nfrom .forms import SearchForm\nfrom... | python | edit | 1 | 3 | bsd-3-clause | 1da2c0e00d43c4fb9a7039e98401d333d387a057 | mociepka/saleor,jreigel/saleor,itbabu/saleor,maferelo/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,KenMutemi/saleor,tfroehlich82/saleor,jreigel/saleor,KenMutemi/saleor,itbabu/saleor,car3oon/saleor,maferelo/saleor,car3oon/saleor,UITools/saleor,maferelo/saleor,i... | saleor/search/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\nimport urllib.request\nimport argparse\nimport pwd\nimport sys\n\n\ndef key_for_user(user):\n url = 'https://github.com/%s.keys' % user\n with urllib.request.urlopen(url) as f:\n return f.read().decode('utf-... | python | edit | 1 | 3 | apache-2.0 | e378902b85bf865e0b020bd4afe0e12d593a95a8 | yuvipanda/github-ssh-auth | github-keys-check.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom us_ignite.snippets.models import Snippet\n\n\nFIXTURES = [\n {\n 'slug': 'home-box',\n 'name': 'Up next:',\n 'body': '',\n 'url_text': 'Get involved'... | python | edit | 3 | 3 | bsd-3-clause | b590ddd735131faa3fd1bdc91b1866e1bd7b0738 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/snippets/management/commands/snippets_load_fixtures.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport stat\nfrom StringIO import StringIO\nfrom types import StringTypes\n\nimport paramiko as ssh\n\n\nclass FakeFile(StringIO):\n def __init__(self, value=None, path=None):\n init = lambda x: StringIO.__init__(self, ... | python | edit | 1 | 3 | bsd-2-clause | 88e5ecad9966057203a9cbecaeaecdca3e76b6da | kxxoling/fabric,rodrigc/fabric,qinrong/fabric,elijah513/fabric,bspink/fabric,MjAbuz/fabric,cmattoon/fabric,hrubi/fabric,felix-d/fabric,askulkarni2/fabric,SamuelMarks/fabric,mathiasertl/fabric,tekapo/fabric,StackStorm/fabric,ploxiln/fabric,kmonsoor/fabric,raimon49/fabric,haridsv/fabric,bitprophet/fabric,fernandezcuesta/... | tests/fake_filesystem.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'helpdesk.views.home', name='home'),\n # url(r'^blog/', include('blog.urls')),\n\n ... | python | edit | 1 | 0 | mit | 7d34b407a35fe917e919fc01b3a6c736a7bdc372 | rosti-cz/django-emailsupport | helpdesk/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom django.conf import settings\nfrom django.core.management import execute_from_command_line\nimport django\nimport os\nimport sys\n\nif not settings.configured:\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE... | python | edit | 1 | 1 | apache-2.0 | 8bfe6e791228ccbc3143f3a8747c68d2e8b0cbb5 | AdrianLC/django-parler-rest,edoburu/django-parler-rest | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import getenv\n\nclass Config(object):\n API_KEY = getenv('API_KEY')\n DAEMON_SLEEP_INTERVAL = 6 # hours\n MAIL_DEBUG = False\n MAIL_DEFAULT_SENDER = getenv('SENDER_EMAIL', 'dynamite@example.com')\n MAIL_PASSWORD = ge... | python | edit | 1 | 0 | mit | a3b108bdb03a74be5156a6b34219758f04b75fe8 | taeram/dynamite,taeram/dynamite | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.test import Client\nfrom noveltorpedo.models import *\nimport unittest\nfrom django.utils import timezone\n\nclient = Client()\n\n\nclass SearchTests(TestCase):\n\n def test_that_the_front_pa... | python | edit | 5 | 1 | mit | 543fc894120db6e8d854e746d631c87cc53f622b | NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo,NovelTorpedo/noveltorpedo | website/noveltorpedo/tests.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\n# -*- coding: utf-8 -*-\n\nimport scrapy\n\n\nclass Post(scrapy.Item):\n \"\"\"\n A model representing a single Reddit post.\n \"\"\"\n id = scrapy.Field()\n\n\nclass Comment(scrapy.Item):\n \"\"\"\n... | python | edit | 1 | 0 | mit | 6cd7e79fc32ebf75776ab0bcf367854d76dd5e03 | rfkrocktk/subreddit-scraper | src/redditsubscraper/items.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.