messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cx_Freeze import setup, Executable\n\n# Dependencies are automatically detected, but it might need\n# fine tuning.\nbuild_exe_options = {\n \"excludes\": [\n \"numpy\"\n ],\n \"bin_includes\": [\n \"libcrypto.so.... | python | edit | 1 | 0 | mit | 8e3abcd310b7e932d769f05fa0a7135cc1a53b76 | igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport latex_table\nimport table_to_file\n\nif __name__ == \"__main__\":\n # Parse arguments\n import argparse\n parser = argparse.ArgumentParser()\n parser.add_argument(\"input\", help=\"the LaT... | python | edit | 3 | 0 | mit | 716c0c4ab08266ce42f65afc0cd4bd8e0ed191e0 | knutzk/parse_latex_table | table_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport stomp\nimport urlparse\nimport json\n\nurlparse.uses_netloc.append('tcp')\n\nclass ZKillboardStompListener(object):\n\n def __init__(self, bot):\n self.bot = bot\n self.conn = None\n\n def on_error(self, headers, ... | python | edit | 2 | 5 | mit | ed09054447b17a88b902dcff95dee89772867cf7 | nikdoof/dropbot,nikdoof/dropbot | dropbot/stomp_listener.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport boto3\nimport botocore.exceptions\nimport logging\nimport requests\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef format_results_subject(cid, registry_action):\n '''Format the \"subject\" part of the harvesting mess... | python | edit | 4 | 3 | bsd-3-clause | 4d6c580f5dcf246bd75b499ee7a630eaf024b4d0 | barbarahui/harvester,mredar/harvester,ucldc/harvester,barbarahui/harvester,mredar/harvester,ucldc/harvester | harvester/sns_message.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nimport gutter\n\nsetup(\n name = u'gutter',\n version = gutter.__version__,\n author = gutter.__author__,\n author_email = u'<EMAIL>',\n url = u'https://gutter.readthedocs.org/',\n descr... | python | edit | 1 | 0 | mit | 1c15f3f6aeed2384353c3e1efc5bcf7551b88850 | williamjacksn/python-rainwave-client | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"NL-specific Form helpers.\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom django.utils import six\n\nfrom .nl_provinces import PROVINCE_CHOICES\nfrom .validators import NLBSN... | python | edit | 1 | 3 | bsd-3-clause | 910d1288adddd0c8dd500c1be5e488502c1ed335 | django/django-localflavor,rsalmaso/django-localflavor | localflavor/nl/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django.contrib.auth.decorators import login_required\nfrom django.utils.translation import ugettext as _\nfrom django.views... | python | edit | 10 | 3 | mit | 0b6e0e09abd007dad504693ca8cae4c7b0222765 | underlost/GamerNews,underlost/GamerNews | gamernews/apps/threadedcomments/views.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom aldryn_client import forms\n\nclass Form(forms.BaseForm):\n\n def to_settings(self, cleaned_data, settings_dict):\n settings_dict['MIDDLEWARE_CLASSES'].append(\n 'country_segment.middlewa... | python | edit | 2 | 4 | bsd-3-clause | 224269d0794d1037213b429c0fcb7c5953129230 | aldryn/aldryn-country-segment | aldryn_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom unittest import TestCase\nfrom rover import Rover\n\nclass TestRover(TestCase):\n\n def setUp(self):\n self.rover = Rover()\n\n def test_rover_compass(self):\n assert self.rover.compass == ['N', 'E', 'S', 'W']\n\n... | python | edit | 1 | 1 | mit | 968b862f6e437b627776b9b8ccf6204434493101 | authentik8/rover | tests/test_rover_instance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport halospectra as hs\nimport randspectra as rs\nimport sys\n\nsnapnum=sys.argv[1]\nsim=sys.argv[2]\n#base=\"/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo\"+str(sim)+\"_V6/L25n512/output/\"\n#... | python | edit | 3 | 0 | mit | 1e07e9424a1ac69e1e660e6a6f1e58bba15472c1 | sbird/vw_spectra | make_spectra.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | a0c5589060725004b6baadaa32cc0d23d157bacf | Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf8\nimport unittest\n\n\nclass TagTest(unittest.TestCase):\n \"\"\"Testing ..tag.Tag.\"\"\"\n\n def test_from_code_generates_a_tag_object_equal_to_its_source(self):\n from ..tag import Tag\n tag = Tag(u'Vipra... | python | edit | 1 | 1 | bsd-3-clause | 52ddec80be8e2c90807a7b07425a6f260c9e86e0 | ZeitOnline/zeit.retresco | src/zeit/retresco/tests/test_tag.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport subprocess\n\nsetup(\n name='colorguard',\n version='0.01',\n packages=['colorguard'],\n install_requires=[\n 'tracer',\n 'harvester',\n 'simuvex'... | python | edit | 3 | 0 | bsd-2-clause | cf30c07be85cf6408c636ffa34f984ed652cd212 | mechaphish/colorguard | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .. import db\n\nclass Question(db.Model):\n\tid = db.Column(db.Integer, primary_key=True)\n\ttext = db.Column(db.String(240), unique=True, index=True)\n\tanswer = db.Column(db.Numeric)\n```\n\nApply this change: Add model to keep track... | python | edit | 1 | 0 | mit | ef11a6388dabd07afb3d11f7b097226e68fdf243 | rahimnathwani/measure-anything | project/estimation/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup\n\npackages = [\n 'ardupi_weather',\n 'ardupi_weather.arduino',\n 'ardupi_weather.database',\n 'ardupi_weather.flaskfiles.app'\n]\n\nextras = {\n 'rpi':['... | python | edit | 1 | 0 | mit | 26cc2332c2531ebde3e831d6513b93f2f021bc51 | jordivilaseca/ardupi-weather,jordivilaseca/ardupi-weather,jordivilaseca/ardupi-weather | RaspberryPi/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nsetup(\n name='yamlicious',\n packages=find_packages(),\n scripts=[os.path.join('bin', p) for p in os.listdir('bin')],\n)\n\n```\n\nApply this change: Add YAML as a dep."
},
{... | python | edit | 1 | 0 | bsd-2-clause | b6b9a926704ffe570bd4cedf6cabd9920dc41cad | derrley/yamlicious,derrley/yamlicious | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport re\n\n\ndef get_version():\n init_py = open('pykka/__init__.py').read()\n metadata = dict(re.findall(\"__([a-z]+)__ = '([^']+)'\", init_py))\n return metadata['version']\n\n\nsetup(\n nam... | python | edit | 1 | 1 | apache-2.0 | 77f8e99ca67489caa75aceb76f79fd5a5d32ded8 | jodal/pykka,tamland/pykka,tempbottle/pykka | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nimport subprocess\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\nlog = logging.getLogger()\n\nwith open(sys.argv[1], 'r') as handle:\n for line in handle:\n if line.startsw... | python | edit | 4 | 0 | mit | e452bee7b2babeec427a84e82ee3b4046f242bfc | galaxyproject/cargo-port,galaxyproject/cargo-port,erasche/community-package-cache,erasche/community-package-cache,gregvonkuster/cargo-port,erasche/community-package-cache,gregvonkuster/cargo-port,gregvonkuster/cargo-port | process_urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext\nfrom django.contrib.contenttypes.models import ContentType\n\n\nfrom geotagging.models import Point\n... | python | edit | 1 | 4 | bsd-3-clause | 88647bd762da9619c066c9bd79e48cb234247707 | uclastudentmedia/django-geotagging,uclastudentmedia/django-geotagging,uclastudentmedia/django-geotagging | geotagging/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.config_defaults\n~~~~~~~~~~~~~~~~~~~~~~\n\nDefault configuration values\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom datetime import timedelta\nfrom pathlib i... | python | edit | 1 | 0 | bsd-3-clause | 9f05a8917ee6fd01a334ef2e1e57062be8ef13af | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | byceps/config_defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Chart(models.Model):\n\ttitle = models.CharField(max_length=50)\n\turl = models.CharField(max_length=1024)\n\n\tdef __unicode__(self):\n\t\treturn self.title\n\n\nclass Page(models.Model):\n\ttitle = ... | python | edit | 1 | 1 | bsd-2-clause | 7a308233707e7e024311a3767367875921c6217b | jwineinger/django-graphiter | graphiter/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\n\nurlpatterns = [\n url('^admin/', include(admin.site.urls)),\n]\n\n```\n\nApply this change: Fix tests for Django 2.0"
},
{
"role": "assistant",
"c... | python | edit | 1 | 0 | apache-2.0 | 595f6cb2ff5431d252c838e87750f2fb5f38c5f7 | edoburu/django-staff-toolbar,edoburu/django-staff-toolbar | staff_toolbar/tests/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nfrom codecs import open # To use a consistent encoding\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the relevan... | python | edit | 1 | 1 | mit | c464887817334cd1dbc3c4587f185ec7ea598fda | agrav/freesif | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nfrom unittest import defaultTestLoader, TextTestRunner, TestSuite\n\nTESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n')\n\ndef make_suit... | python | edit | 1 | 3 | bsd-3-clause | a4184edab35890673b8b6a67e68a73e6ab7f0b89 | jmagnusson/wtforms,cklein/wtforms,Xender/wtforms,pawl/wtforms,Aaron1992/wtforms,pawl/wtforms,subyraman/wtforms,wtforms/wtforms,skytreader/wtforms,hsum/wtforms,Aaron1992/wtforms,crast/wtforms | tests/runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Formatter(object):\n name = None\n description = None\n\n def __init__(self, stream, config):\n self.stream = stream\n self.config = config\n\n def uri(self, uri):\n pass\n\n def feature(self, featu... | python | edit | 1 | 1 | bsd-2-clause | 84942c895343d7803144b0a95feeabe481fe0e3d | hugeinc/behave-parallel,metaperl/behave,KevinOrtman/behave,KevinOrtman/behave,connorsml/behave,Gimpneek/behave,charleswhchan/behave,charleswhchan/behave,vrutkovs/behave,mzcity123/behave,Gimpneek/behave,spacediver/behave,KevinMarkVI/behave-parallel,jenisys/behave,memee/behave,allanlewis/behave,vrutkovs/behave,mzcity123/... | behave/formatter/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport spi_serial\n\nif __name__ == \"__main__\":\n ss = spi_serial.SpiSerial()\n\ttime.sleep(3)\n\t\n cmd = [1]\n ss.write(cmd)\n if ss.inWaiting() > 0:\n print(''.join(chr(k) for k in ss.read(0)))\n cmd =... | python | edit | 1 | 0 | mit | 859c67eff781285473b92f6e363c9c3a3aaed33e | EnhancedRadioDevices/915MHzEdisonExplorer_SW | ExplorerTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import flow\n\n\nclass FlowExecutor:\n \"\"\"\n This class is responsible for flow execution\n \"\"\"\n\n def __init__(self, yaml_data):\n self.flow = flow.Flow(yaml_data)\n\n def execute(self):\n (exit_c... | python | edit | 1 | 5 | mit | 6837986db77c9c9bd85392a74faebc019c1395a1 | unix-beard/swen,unix-beard/swen,unix-beard/swen | swen/flowexecutor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\nimport shutil\nimport tempfile\nimport threading\nimport sys\n\nimport nanomsg as nn\n\n\ndef ping(url, event):\n with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url):\n event.wait()\n soc... | python | edit | 1 | 3 | mit | 96fd8b71fd425d251e9cc07e8cc65b4fc040d857 | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | samples/nanomsg/hello_world.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport sys\nimport os\nfrom sh import cd, hg\n\n\ndef _get_subdirectories(current_dir):\n return [directory for directory in os.listdir(current_dir) \n if os.path.isdir(os.path.join(curre... | python | edit | 4 | 4 | mit | 15f482fbb7b1b98b48545f6e5ab3986859c38e55 | alephmelo/watchman | watchman/main.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n:mod:`zsl.interface.webservice.performers.method`\n-------------------------------------------------\n\n.. moduleauthor:: Martin Babka\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\nfrom importlib import import_... | python | edit | 1 | 5 | mit | 21a6ddca55c8b5da70d806afa18f08ac20cb04c0 | AtteqCom/zsl,AtteqCom/zsl | src/zsl/interface/webservice/performers/method.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom marionette_driver import By\nfrom marionette_driver.errors import MarionetteException\n\nfrom marionette_harness import MarionetteTestCase\n\nimport testsuite\n\nclass Test(MarionetteTestCase):\n def setUp(self):\n Marionette... | python | edit | 4 | 2 | bsd-3-clause | 6891edfe6228654940808a93fd36bfa6d24ae935 | boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite | marionette/tor_browser_tests/test_screenshots.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom re import search\nfrom flask import g\nfrom flask_restplus import abort\nfrom flask_httpauth import HTTPBasicAuth\nfrom app.models.user import User\nfrom instance.config import Config\n\nauth = HTTPBasicAuth()\n\n\ndef validate_email(e... | python | edit | 1 | 2 | mit | a08483b5fc55556b46c08e988ac297b1dffaed48 | Elbertbiggs360/buckelist-api | app/utils/utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef start(count):\n return 'SETUP APP'\n\n\nif __name__ == '__main__':\n app.run(host=\"172.31.27.41\", port=8080)\n```\n\nApply this change: Add base methods for ... | python | edit | 1 | 6 | mit | 89fd94bb06e81f38b40bd75d793107599a1b7c48 | cludtk/freedomain,cludtk/freedomain | freedomain.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# NOTE: local.py must be an empty file when using this configuration.\n\nfrom .defaults import *\n\n# Put jenkins environment specific overrides below.\n\nINSTALLED_APPS += ('django_jenkins',)\n\nSECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6... | python | edit | 3 | 0 | bsd-3-clause | 8460b1249d1140234798b8b7e482b13cde173a1e | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | bluebottle/settings/jenkins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom nodeconductor.core import filters as core_filters\n\nfrom . import models\n\n\nclass ExpertProviderFilter(django_filters.FilterSet):\n customer = core_filters.URLFilter(view_name='customer-detail', name='cus... | python | edit | 1 | 0 | mit | b367e2919c0de02f3514dfac5c890ffd70603918 | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur | src/nodeconductor_assembly_waldur/experts/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\n\nfrom pyp2rpm import settings\n\ndef memoize_by_args(func):\n \"\"\"Memoizes return value of a func based on args.\"\"\"\n memory = {}\n\n @functools.wraps(func)\n def memoized(*args):\n if not args in ... | python | edit | 1 | 5 | mit | 5c405745c954c2aa6121ddd82fb13ffef11b3150 | henrysher/spec4pypi | pyp2rpm/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom noopy import lambda_functions\nfrom noopy.endpoint import Endpoint\nfrom noopy.endpoint import methods\n\n\ndef dispatch(event, context):\n print event\n\n if event['type'] == 'APIGateway':\n path = event['path']\n ... | python | edit | 2 | 6 | mit | 09edd3b548baaa4f6d1e31d5a9891f2b6eef45d6 | acuros/noopy | noopy/project_template/dispatcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTest tools required by multiple suites.\n\"\"\"\n\n__author__ = 'mbach'\n\n\nimport contextlib\nimport shutil\nimport subprocess\nimport tempfile\n\n\n@contextlib.contextmanager\ndef devpi_server(port=2414):\n server_dir = tempfi... | python | edit | 1 | 3 | bsd-3-clause | 6bdbbf4d5e100856acbaba1c5fc024a9f7f78718 | tylerdave/devpi-builder | tests/tools.py | accepted | null | true |
[
{
"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, unicode_literals\n\nimport datetime\n\nfrom flask import render_template, Blueprint\n\nfrom zhihudaily.utils import make_request\nfrom zhihudaily.cach... | python | edit | 1 | 1 | mit | 2f8c3ab7ecd0606069d524192c551e7be77ca461 | lord63/zhihudaily,lord63/zhihudaily,lord63/zhihudaily | zhihudaily/views/with_image.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom nailgun.test.base import BaseHandlers\n\n\nclass TestPluginStateMachine(BaseHandlers):\n\n def test_attrs_creation(self):\n pass\n\n```\n\nApply this change: Implement plugin test on exception handlin... | python | edit | 1 | 1 | apache-2.0 | c07234bb3142df96dc9e02a236975bc3de2415cc | SmartInfrastructures/fuel-main-dev,ddepaoli3/fuel-main-dev,zhaochao/fuel-main,zhaochao/fuel-main,huntxu/fuel-main,prmtl/fuel-web,huntxu/fuel-web,huntxu/fuel-main,SmartInfrastructures/fuel-main-dev,huntxu/fuel-web,teselkin/fuel-main,ddepaoli3/fuel-main-dev,teselkin/fuel-main,SmartInfrastructures/fuel-web-dev,SergK/fuel-... | nailgun/nailgun/test/test_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nImport Wokingham Polling stations\n\"\"\"\n\nfrom data_collection.management.commands import BaseShpImporter, import_polling_station_shapefiles\n\nclass Command(BaseShpImporter):\n \"\"\"\n Imports the Polling Station data fro... | python | edit | 1 | 1 | bsd-3-clause | bd193b0fdb7fec412aed24ad8f4c6353372d634f | chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations | polling_stations/apps/data_collection/management/commands/import_westberks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER\nfrom spinach.contrib.datadog import register_datadog_if_module_patched\n\nfrom ...apps import spin\n\n\nclass Command(Bas... | python | edit | 1 | 1 | bsd-2-clause | 593c00153b8634e4ea3817de2ef3592fe0540e58 | NicolasLM/spinach | spinach/contrib/spinachd/management/commands/spinach.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom nose.plugins.attrib import attr\n\n@attr('webservice')\ndef test_rest_api_responsive():\n stmt_str = '{\"statements\": [{\"sbo\": \"http://identifiers.org/sbo/SBO:0000526\", \"type\": \"Complex\", \"id\": \"acc6d47c... | python | edit | 1 | 1 | bsd-2-clause | 56446567f764625e88d8efdbfa2849e0a579d5c4 | sorgerlab/belpy,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,pvtodorov/indra,bgyori/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,johnbachman/indra,johnbachman/indra | indra/tests/test_rest_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\n\ndef fast_distance(lat1, lon1, lat2, lon2):\n '''Compute the arc distance assuming the earth is a sphere.'''\n g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2)\n return np.arccos(np.m... | python | edit | 1 | 1 | mit | 0ecff906f8d504576f00f28c46be6d4594008f38 | OceanPARCELS/parcels,OceanPARCELS/parcels | parcels/interaction/distance_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '0.4.3.dev0'\n\n# this should ensure that we can still import constants.py as climlab.constants\nfrom climlab.utils import constants\nfrom climlab.utils import thermo, legendre\n# some more useful shorcuts\nfrom climlab.model.... | python | edit | 24 | 0 | mit | f46a0cdf869b8629a1e4a08105a065933d4199f9 | cjcardinale/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab,brian-rose/climlab | climlab/__init__.py | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom wsme import types as wtypes\n\nfrom mirantas.resource import Resource\n\nclass BaseAPI(Resource):\n # TODO: Does URI need a custom type?\n uri = wtypes.text\n name = wtypes.text\n description = wtypes.text\n id = wtypes.... | python | edit | 1 | 0 | apache-2.0 | b22b8c2249dc64d99e297dfe2ca24abbf30ec00d | punalpatel/st2,lakshmi-kannan/st2,armab/st2,StackStorm/st2,jtopjian/st2,emedvedev/st2,pixelrebel/st2,alfasin/st2,Plexxi/st2,pinterb/st2,Itxaka/st2,pixelrebel/st2,nzlosh/st2,nzlosh/st2,peak6/st2,grengojbo/st2,pinterb/st2,emedvedev/st2,lakshmi-kannan/st2,alfasin/st2,Itxaka/st2,punalpatel/st2,StackStorm/st2,StackStorm/st2... | st2common/st2common/models/api/stormbase.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Gitless - a version control system built on top of Git.\n# Licensed under GNU GPL v2.\n\n\"\"\"gl switch - Switch branches.\"\"\"\n\n\nfrom __future__ import unicode_literals\n\nfrom clint.textui import colored\n\... | python | edit | 3 | 2 | mit | 4a37feed87efa3dd05e38ad6f85afe392afd3a16 | sdg-mit/gitless,sdg-mit/gitless | gitless/cli/gl_switch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nTODO: Modify module doc.\n\"\"\"\n\nfrom __future__ import division\n\n__author__ = \"Shyue Ping Ong\"\n__copyright__ = \"Copyright 2012, The Materials Virtual Lab\"\n__version__ = \"0.1\"\n__maintainer__ = ... | python | edit | 1 | 0 | bsd-3-clause | 356c56d7ebb2cc8e837308536c085b8dd399b01f | materialsvirtuallab/flamyngo,materialsvirtuallab/flamyngo,materialsvirtuallab/flamyngo | run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport testinfra.utils.ansible_runner\n\ntestinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(\n os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')\n\n\ndef test_hosts_file(host):\n f = host.file('/etc/host... | python | edit | 1 | 1 | apache-2.0 | 33dd6ab01cea7a2a83d3d9d0c7682f716cbcb8b2 | brucellino/cvmfs-client-2.2,brucellino/cvmfs-client-2.2,AAROC/cvmfs-client-2.2,AAROC/cvmfs-client-2.2 | molecule/default/tests/test_default.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom tastypie.resources import ModelResource\nfrom tastypie import fields\nfrom tastypie.authentication import BasicAuthentication\nfrom tastypie.authorization import DjangoAuthorization, Authori... | python | edit | 6 | 0 | mit | 7930f968830efd40e1fb200ef331f0c4d955db65 | d0ugal/readthedocs.org,atsuyim/readthedocs.org,clarkperkins/readthedocs.org,soulshake/readthedocs.org,agjohnson/readthedocs.org,SteveViss/readthedocs.org,jerel/readthedocs.org,raven47git/readthedocs.org,rtfd/readthedocs.org,johncosta/private-readthedocs.org,ojii/readthedocs.org,Carreau/readthedocs.org,sid-kap/readthedo... | api/base.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nVERSION = (0, 4, 3)\n__version__ = VERSION\n__versionstr__ = '.'.join(map(str, VERSION))\n\nfrom elasticsearch.client import Elasticsearch\nfrom elasticsearch.transport import Transport\nfrom elasti... | python | edit | 14 | 0 | apache-2.0 | 6454372da6550455735cbcb3a86a966e61c134a1 | veatch/elasticsearch-py,chrisseto/elasticsearch-py,Garrett-R/elasticsearch-py,brunobell/elasticsearch-py,tailhook/elasticsearch-py,AlexMaskovyak/elasticsearch-py,brunobell/elasticsearch-py,mjhennig/elasticsearch-py,thomdixon/elasticsearch-py,kelp404/elasticsearch-py,gardsted/elasticsearch-py,elastic/elasticsearch-py,el... | elasticsearch/__init__.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nClient for Swift\n\nCopyright 2012 Gregory Holt\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n h... | python | edit | 1 | 0 | apache-2.0 | 1e7306d31cc9f5423f9594257b631d5f1a6c0ced | dpgoetz/swiftly,rackerlabs/swiftly,gholt/swiftly | swiftly/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out\n# RUN: FileCheck < %t.results.out %s\n\n# CHECK: {\n# CHECK: \"__version__\"\n# CHECK: \"elapsed\"\n# CHECK-NEXT: \"tests\": [\n# CHECK-NEXT: {\n# CHECK-NEXT: ... | python | edit | 1 | 0 | apache-2.0 | eeb8057fb5ff65eb89e3b5a8ff94bf58adc511ee | llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llv... | utils/lit/tests/test-output.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Application configuration for the chapters application.\"\"\"\n\nfrom django.apps import AppConfig\n\n\nclass UsersAppConfig(AppConfig):\n \"\"\"Configuration object for the chapters application.\"\"\"\n\n name = \"users\"\n ... | python | edit | 1 | 1 | mit | f3efb01c530db87f48d813b118f80a2ee1fd5996 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/users/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Import salt libs\nfrom salt.utils.winservice import Service, instart\nimport salt\n\n# Import third party libs\nimport win32serviceutil\nimport win32service\nimport winerror\nimport win32api\n\n# Import python libs\nimport sys\n\n\nclass ... | python | edit | 1 | 4 | apache-2.0 | 8a544ac2db71d4041c77fdb0ddfe27b84b565bb5 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/utils/saltminionservice.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n# Authentication and Authorisation\nfrom functools import wraps\nfrom . import http\n\ndef permit(test_func):\n '''Decorate a handler to control access'''\n def decorator(view_func):\n ... | python | edit | 1 | 2 | bsd-3-clause | 0ceadc93f0798bd04404cb18d077269f19111438 | MarkusH/django-nap,limbera/django-nap | nap/auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nfrom contextlib import suppress\nfrom os import close\nfrom os import remove\nfrom tempfile import mkstemp\n\n\ndef create_tempfilename() -> str:\n file_descriptor, filename = mkstemp()\n close(f... | python | edit | 1 | 2 | apache-2.0 | abfe0538769145ac83031062ce3b22d2622f18bf | ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver | opwen_email_server/utils/temporary.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name = 'pymoira',\n version = '0.9',\n description = 'Client library for MIT Moira service managment system protocol',\n author = 'Victor Vasiliev',\n au... | python | edit | 1 | 0 | mit | f84846b223bbf903de0dd261dd2c02f7a971d929 | vasilvv/pymoira | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint\nfrom flask import (jsonify)\nfrom sqlalchemy.exc import DataError\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom app.dao.templates_dao import get_model_templates\nfrom app.schemas import (template_schema,... | python | edit | 1 | 5 | mit | e2e494c30b2305b736423ce903103c3b7a459270 | alphagov/notifications-api,alphagov/notifications-api | app/template/rest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport webapp2\nimport settings\n\n\nclass SampleIndex(webapp2.RequestHandler):\n \"\"\"Stub request handler\"\"\"\n\n def get(self):\n self.response.headers['Content-Type'] = 'text/plain'\n self.response.out.write(\"hel... | python | edit | 2 | 1 | apache-2.0 | 2147df557bfb922fd640e2da1b105a60644dece0 | rbanffy/testable_appengine,rbanffy/testable_appengine | src/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Create the profile.\n\nCopyright (c) 2015 Francesco Montesano\nMIT Licence\n\"\"\"\n\nimport shutil\n\nimport dodocs.logger as dlog\nimport dodocs.utils as dutils\n\n\ndef remove(args):\n \"\"\"Remove profile(s)\n\n Parameters\n... | python | edit | 1 | 5 | mit | 7873017564570dd993a19648e3c07f0d2e79ec19 | montefra/dodocs | dodocs/profiles/remove.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom util import __version__\n\nsetup(\n name=\"util\",\n author=\"Olav Vahtras\",\n author_email=\"<EMAIL>\",\n version=__version__,\n url=\"https://github.com/vahtras/util\",\n packages=[\"u... | python | edit | 1 | 0 | mit | 9c9319516875875707f1d922d9dd20d9f2c1ce6e | vahtras/util | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom PIL import Image\nimport json, StringIO, requests\nimport time\n\nservice = \"http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/\"\nresp = requests.get(service + \"info.json\")\njs = json.loads(resp.text)\nh = js['height']\nw = j... | python | edit | 2 | 0 | apache-2.0 | c4103c00b51ddb9cb837d65b43c972505e533bdc | azaroth42/iiif-harvester | tilescraper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom app.views.export import write_all_measurements_csv\nimport tempfile\nimport os\n\nf = open(\"{0}/app/static/exports/AllMeasurements_inprogress.csv\".format(os.path.dirname(os.path.realpath(__file__))), \"w\")\n\n... | python | edit | null | null | mit | ddb64a0b7a09203c8367c47d34ac29a82af012c0 | rabramley/telomere,rabramley/telomere,rabramley/telomere | produceEports.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nrequires = [\n 'requests',\n 'rauth'\n]\n\nsetup(\n name='fatsecret',\n version='0.2.1',\n description='Python wrapper for F... | python | edit | 1 | 0 | mit | 9487887223be3a321c507e65210c2b651060fac3 | walexnelson/pyfatsecret | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Genshi template loader that supports dotted names.\"\"\"\n\nfrom os.path import exists, getmtime\nfrom jinja2.exceptions import TemplateNotFound\nfrom jinja2.loaders import FileSystemLoader\nfrom tg import config\n\nclass JinjaTemplat... | python | edit | 2 | 4 | mit | 7a17facf68a90d246b4bee55491c9495a8c5ca50 | lucius-feng/tg2,lucius-feng/tg2 | tg/dottednames/jinja_lookup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\n\nfrom rest_framework_json_api import serializers\nfrom rest_framework_json_api.renderers import JSONRenderer\n\n\nclass ResourceSerializer(serializers.ModelSerializer):\n class Meta:\n ... | python | edit | 2 | 1 | bsd-2-clause | d154cd852bdb02743e9752179559a91b9f1a7f8c | django-json-api/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,scottfisk/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,leo-naeka/rest_framework_ember,django-json-api/django-rest-fram... | example/tests/unit/test_renderer_class_methods.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nimport distutils.core\nimport sys\n\ntry:\n import setuptools\nexcept ImportError:\n pass\n\ntry:\n license = open('LICENSE').read()\nexcept:\n license = None\n\n\ndef read(fname):\n return... | python | edit | 4 | 2 | mit | 259396028862e4c7b2a00e2c908be2b8ffeee991 | codepython/sockjs-tornado,ImaginationForPeople/sockjs-tornado,codepython/sockjs-tornado,barseghyanartur/sockjs-tornado,mrjoes/sockjs-tornado,ImaginationForPeople/sockjs-tornado,DexterInd/sockjs-tornado,codepython/sockjs-tornado,MrJoes/sockjs-tornado,DexterInd/sockjs-tornado,pjknkda/sockjs-tornado,DexterInd/sockjs-torna... | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 Scalyr Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or... | python | edit | 1 | 1 | apache-2.0 | 23ee65e3eaa52e8e4ffcc294d2160bdd5451d490 | imron/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2 | scalyr_agent/tests/run_monitor_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date as vanilla_date, timedelta\n\nfrom overflow import OverflowDate\n\n\ndef iso_to_gregorian(year, week, weekday):\n if week < 1 or week > 54:\n raise ValueError(\n \"Week number %d is invalid for... | python | edit | 1 | 3 | apache-2.0 | f783d8ac4314923f1259208eb221c8874c03884a | jwg4/qual,jwg4/calexicon | calexicon/fn/iso.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(name='steamfootbridge',\n version='0.0.1',\n packages=['steamfootbridge'],\n scripts=['bin/steamfootbridge'],\n)\n\n```\n\nApply this change: Convert Python installation to PyPi\n\nTh... | python | edit | 1 | 0 | mit | 8d034ca0c30166ec3972d0f8db83e00ff4f8055f | sirnuke/steamfootbridge,sirnuke/steamfootbridge | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, sys\n\nimport json as _json\n\nfrom flask import Flask, Response, request\napp = Flask(__name__)\napp.debug = True\n\nimport lib\n\n@app.route(\"/\", methods=[\"HEAD\", \"GET\", \"POST\", \"DELETE\", \"PUT\"])\ndef adapter():\n ... | python | edit | 1 | 3 | apache-2.0 | b4e879e6bbfae9bf5692df2fb3b715f9e376041d | robhaswell/powerstrip-restrict-image-user | app/priu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import Flask\nimport os\nimport psycopg2\nfrom contextlib import closing\n\nDB_SCHEMA = \"\"\"\nDROP TABLE IF EXISTS entries;\nCREATE TABLE entries (\n id serial PRIMARY KEY,\n title VARCHAR (127) N... | python | edit | 1 | 4 | mit | 29e4dc4b11f691a8aaf4b987e6a9e74214f19365 | lfritts/learning_journal,lfritts/learning_journal | journal.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, url_for, redirect, request\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n return render_template('login.html')\n\n\n\n@app.route('/save', methods=['POST'])\ndef save():\n import... | python | edit | 4 | 2 | mit | 7572df6e558479ebbe1c78f5671dc92450310330 | mkiterian/bucket-list-app,mkiterian/bucket-list-app,mkiterian/bucket-list-app | app.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mongrel2.config import *\n\n\nmain = Server(\n uuid=\"f400bf85-4538-4f7a-8908-67e313d515c2\",\n access_log=\"/logs/access.log\",\n error_log=\"/logs/error.log\",\n chroot=\"./\",\n default_host=\"localhost\",\n name=\... | python | edit | 6 | 0 | bsd-3-clause | fcfceb59cbd368ddaee87906d3f53f15bbb30072 | solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2 | examples/tornado/auth_demo.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport sys\r\nimport os.path\r\nimport codecs\r\nimport dfstrings\r\nimport time\r\n\r\ndef make_js_from_po(path):\r\n strings = []\r\n for po in [p for p in dfstrings.get_po_strings(path)... | python | edit | 5 | 5 | apache-2.0 | e155d7b96c5b834f4c062b93cbd564a5317905f1 | operasoftware/dragonfly,operasoftware/dragonfly,operasoftware/dragonfly,operasoftware/dragonfly | tools/po2js.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport decimal\nimport sqlalchemy\n\n\nclass AlchemyJSONEncoder(json.JSONEncoder):\n def default(self, o):\n # if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):\n if issubclass(o.__class__,\n ... | python | edit | 1 | 5 | mit | 1bdf4e29daaf896fb6bf3416e0cae65cd8144e6f | Vnet-as/falcon-hateoas | falcon_hateoas/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nexec([l for l in open(\"flask_mwoauth/__init__.py\") if l.startswith('__version__')][0])\n\nsetup(name='flask-mwoauth',\n version=__version__,\n description='Flask blueprint to connect to a MediaWik... | python | edit | 2 | 0 | mit | ef1e44cb6a815b3fc86faf4d90fba407270aa02b | sitic/flask-mwoauth,valhallasw/flask-mwoauth,sitic/flask-mwoauth,valhallasw/flask-mwoauth | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n# coding: utf-8\n\nfrom collections import namedtuple\nimport matplotlib.pyplot as plt\n\nBCand = namedtuple('BCand', ['m', 'merr', 'pt', 'p'])\n\nbs = []\n\nwith open('B.txt') as f:\n for line in f.readlines()[1... | python | edit | 1 | 0 | mit | 60625877a23e26e66c2c97cbeb4f139ede717eda | bixel/python-introduction | B.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A virtual serial port data source.\"\"\"\nfrom __future__ import absolute_import\n\nimport logging\n\ntry:\n import serial\nexcept ImportError:\n LOG.debug(\"serial library not installed, can't use serial interface\")\n\nfrom .b... | python | edit | 1 | 4 | bsd-3-clause | 7f5d6e4386e3a80db5cfcbf961c7603b0c78cc52 | openxc/openxc-python,openxc/openxc-python,openxc/openxc-python | openxc/sources/serial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*-coding:utf-8-*-\n\nfrom setuptools import setup\n\nsetup(\n name=\"rocketchat_API\",\n version=\"1.12.0\",\n packages=[\"rocketchat_API\", \"rocketchat_API.APIExceptions\"],\n url=\"https://github.com/jadolg/rocketchat_API\... | python | edit | 1 | 0 | mit | 7f72ac060bef98faa09fc729707cee5d0bafbf87 | jadolg/rocketchat_API | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom keras.layers import Convolution2D, Merge\nfrom keras.layers.advanced_activations import PReLU\nfrom keras.engine.topology import merge\n\nfrom eva.layers.masked_convolution2d import MaskedConvolution2D\n\ndef ResidualBlock(model, filte... | python | edit | 3 | 2 | apache-2.0 | 14f4fe95be0501142f929a9b7bec807fd14e3d6f | israelg99/eva | eva/layers/residual_block.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved.\n# Use of this source code is governed by a BSD-style license (see the COPYING file).\n\"\"\" This module contains a few funct... | python | edit | 1 | 2 | bsd-3-clause | 09be419960d208967771d93025c4f86b80ebe4e9 | aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild | python/qibuild/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom setuptools import setup, find_packages\n\nimport querylist\n\n\nunittest2_module = ''\n\nif sys.version_info < (2, 7):\n # spec causes python setup.py test to fail. This import fixes that for\n # some reason.\n i... | python | edit | 1 | 0 | mit | e05a0bbe3b49c1e90aa245c52aab982ef49c8c26 | thomasw/querylist | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import join\n\nimport osgtest.library.core as core\nimport osgtest.library.files as files\nimport osgtest.library.condor as condor\nimport osgtest.library.osgunittest as osgunittest\nimport osgtest.library.service as service\n\... | python | edit | 1 | 2 | apache-2.0 | c7cb6c1441bcfe359a9179858492044591e80007 | efajardo/osg-test,efajardo/osg-test | osgtest/tests/test_10_condor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nfrom git_release import errors, git_helpers\n\ndef _parse_tag(tag):\n major, minor = tag.split('.')\n return int(major), int(minor)\n\ndef _increment_tag(tag, release_type):\n major, minor = _parse_tag(tag)\n ... | python | edit | 3 | 3 | mit | 7b935b23e17ef873a060fdfbefbfdf232fe8b8de | Authentise/git-release | git_release/release.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.tools import istest, assert_equal\n\nfrom spur import LocalShell\n\nshell = LocalShell()\n\n@istest\ndef output_of_run_is_stored():\n result = shell.run([\"echo\", \"hello\"])\n assert_equal(\"hello\\n\", result.output)\n\n@... | python | edit | 1 | 1 | bsd-2-clause | 6fc5a47efbd4b760672b13292c5c4886842fbdbd | mwilliamson/spur.py | tests/local_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport yaml\n\naction_meta = {\n \"name\": \"\",\n \"parameters\": {\n \"action\": {\n \"type\": \"string\",\n \"immutable\": True,\n \"default\": \"\"\n },\n \"kwargs\": {\n ... | python | edit | 1 | 2 | apache-2.0 | d8b477083866a105947281ca34cb6e215417f44d | pidah/st2contrib,StackStorm/st2contrib,psychopenguin/st2contrib,lmEshoo/st2contrib,armab/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,digideskio/st2contrib,digideskio/st2contrib,armab/st2contrib,tonybaloney/st2contrib,pearsontechnology/st2contrib,lmEshoo/st2contrib,tonybaloney/st2contrib,psychopenguin/... | packs/salt/actions/lib/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport sys\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n user_options = [('pytest-args=', 'a', \"... | python | edit | 1 | 1 | mit | 48cd23e15cad7ce6a3db916d2287df7dcd98b482 | gaqzi/py-gocd-cli,gaqzi/gocd-cli | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom traits.api import HasTraits, Int, Str, Tuple, Array, Range\r\n\r\n\r\nclass CameraError(Exception):\r\n def __init__(self, msg, cam):\r\n self.msg = msg\r\n self.camera_number = cam\r\n\r\n def __str__(self):\r\n ... | python | edit | 1 | 1 | mit | 2fb0678363479c790e5a63de8b92a19de3ac2359 | ptomato/Beams | src/Camera.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import apps as global_apps\nfrom django.db import migrations\nfrom django.db.utils import OperationalError\nsql = '''\n\n'''\n\nreverse_sql = '''\n\n'''\n\ndef forwards(app, schema_editor):\n models = app.all_models['api... | python | edit | 5 | 4 | bsd-2-clause | 2916006bf7dc9a689a9ab5678d37a858d380345e | chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal | api/migrations/0002_migrate_legacy.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# Code Fights Add Border Problem\n\n\ndef arrayReplace(inputArray, elemToReplace, substitutionElem):\n pass\n\n\ndef main():\n pass\n\n\nif __name__ == '__main__':\n main()\n\n```\n\nApply this change: Solv... | python | edit | 1 | 3 | mit | e9e632008db1eb2bbdbd989584b82255a10f8944 | HKuz/Test_Code | CodeFights/arrayReplace.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom test.integration.base import DBTIntegrationTest, use_profile\nimport textwrap\nimport yaml\n\n\nclass TestBigqueryCopyTableFails(DBTIntegrationTest):\n\n @property\n def schema(self):\n return \"bigquery_test_022\"\n\n ... | python | edit | 1 | 1 | apache-2.0 | 16eb7232c3bf8470ca37c5e67d1af7d86b5c7b14 | analyst-collective/dbt,analyst-collective/dbt | test/integration/022_bigquery_test/test_bigquery_copy_failing_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('README.md').read()\n\nsetup (\n name = 'pyvault',\n ve... | python | edit | 1 | 0 | mit | 9e871bbce34af7d1150181af550e994ba26730e8 | gabfl/vault | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\nPACKAGE_VERSION = '0.3'\n\n\ndef version():\n def version_file(mode='r'):\n return open(os.path.dirname(os.path.abspath(__file__), 'version.txt'), mode)\n\n if os.getenv('TRAVIS'):\n... | python | edit | 1 | 2 | apache-2.0 | e3ca5971d7a1cefccb7b412fe17fa5951b5cdc58 | odin-public/osaAPI | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport os\nimport collections\n\nimport data\nimport figs\n\nclass Counter(collections.Counter):\n year_range = range(2004, 2016)\n\n def restrict_to_year_range(self, multiplier=1):\n output =... | python | edit | 2 | 2 | unlicense | 67ade89e301d11ca4c7ebfe6746cc262631b6cce | datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business | src/neighborhood_flow.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom markdown import Markdown\nfrom markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE\n\nfrom ..models import Image\n\n\nclass ImageLookupImagePattern(ImagePattern):\n\n def sanitize_url(self, url):\n if url.startswith(\"... | python | edit | 1 | 4 | mit | e29b1f6243fb7f9d2322b80573617ff9a0582d01 | swilcox/pinax-blog,pinax/pinax-blog,miurahr/pinax-blog,miurahr/pinax-blog,swilcox/pinax-blog,easton402/pinax-blog,pinax/pinax-blog,pinax/pinax-blog,easton402/pinax-blog | pinax/blog/parsers/markdown_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name = \"ideone\",\n version = \"0.0.1\",\n author = \"Joe Schafer\",\n author_email... | python | edit | 1 | 1 | bsd-3-clause | 26f1506607a2042d508dc69f5a155ed88668d22a | jschaf/ideone-api | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\"\"\"Add private column to programs table.\n\nRevision ID: 49c670c7d705\nRevises: a3afeab3302\nCreate Date: 2013-12-09 16:44:54.222398\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '49c670c7d705'\ndown_revision = 'a3a... | python | edit | 1 | 1 | apache-2.0 | 10aaa22cbcbb844a4393ac9eae526c3e50c121ab | hyperNURb/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,jmakov/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,hasanalom/ggrc-core,vladan-m/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,andrei-karalionak/g... | src/ggrc/migrations/versions/20131209164454_49c670c7d705_add_private_column_t.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import *\nfrom fabric.colors import *\n\nenv.colorize_errors = True\nenv.hosts = ['sanaprotocolbuilder.me']\nenv.user = 'root'\nenv.project_root = '/opt/sana.protocol_builder'\n\ndef prepare_deploy():... | python | edit | 21 | 1 | bsd-3-clause | 813dd27a2057d2e32726ff6b43ab8ca1411303c7 | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | fabfile.py | rejected_lint | Too many lint violations: 21 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.