messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport logging\nimport argparse\nimport numpy as np\n\nimport emission.pipeline.scheduler as eps\n\nif __name__ == '__main__':\n try:\n intake_log_config = json.load(open(\"conf/log/intake.conf\", \"r\"))\n except:... | python | edit | 1 | 0 | bsd-3-clause | d32710e53b89e1377a64427f934053c3b0d33802 | sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server | bin/intake_multiprocess.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for craigomatic project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\"\"\"\nimport os\nfrom os.path import abspath, dirname\nfrom sys import path\n\nfrom django.core.wsgi import ge... | python | edit | 1 | 0 | mit | 82b45c3ec1344bed87ac7d572d82f43a4320492c | rgreinho/craigomatic,rgreinho/craigomatic,rgreinho/craigomatic,rgreinho/craigomatic | craigomatic/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAdd capped collections for real time data\n\"\"\"\nimport logging\n\nlog = logging.getLogger(__name__)\n\n\ndef up(db):\n capped_collections = [\n \"fco_realtime_pay_legalisation_post\",\n \"fco_realtime_pay_legalis... | python | edit | 1 | 1 | mit | f0371f68fc0ece594710ad9dbbdbfdab00a22e49 | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | migrations/003_add_capped_collections.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n# Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox\nallowable_sandbox_tokens = set(\n [\n \"allow-downloads-without-user-activation\",\... | python | edit | 1 | 4 | mit | 459e8ba9ecfd16276d7a623b5f6e61ac9fcedcee | indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri | kolibri/plugins/html5_viewer/options.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens... | python | edit | 2 | 0 | apache-2.0 | f7b1d233ed39eed24e3c1489738df01f700112e3 | paolodedios/tensorflow,lukeiwanski/tensorflow,alshedivat/tensorflow,kobejean/tensorflow,frreiss/tensorflow-fred,Xeralux/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alsrgv/tensorflow,nburn42/tensorflow,meteorcloudy/tensorflow,Xeralux/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,gaut... | tensorflow/contrib/tensorrt/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport warnings\n\nwarnings.filterwarnings(\"ignore\")\n\n\n###\n# REVIEWER NOTE: THE ORIGINAL IMPLEMENTATION WAS HEAVY HANDED AND I BELIEVE WAS A TEMPORARY WORKAROUND.\n# PLEASE CAREFULLY REVIEW TO ENSURE REMOVING THIS DOES... | python | edit | 1 | 1 | apache-2.0 | dd21586d910dded2932f96b98d6d0588c18d2f58 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | great_expectations/cli/cli_logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the license block and BaseConnection"
},
{
"role": "assistant",
"content": "# ***** BEGIN LICENSE BLOCK *****\n# Version: MPL 1.1/GPL 2.0\n#\n# The contents of this file are subject to the Mozilla Public License\n# Version 1.... | python | new_file | 6 | 0 | bsd-3-clause | e6210d4d3fcdff4c9b4b22946e03062e01efd830 | skftn/pika,shinji-s/pika,Zephor5/pika,zixiliuyue/pika,reddec/pika,pika/pika,renshawbay/pika-python3,vrtsystems/pika,knowsis/pika,fkarb/pika-python3,jstnlef/pika,Tarsbot/pika,vitaly-krugl/pika,hugoxia/pika,benjamin9999/pika | pika/adapters/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom scikits.image._build import cython\n\nimport os.path\n\nbase_path = os.path.abspath(os.path.dirname(__file__))\n\ndef configuration(parent_package='', top_path=None):\n from numpy.distutils.misc_util import ... | python | edit | 1 | 1 | bsd-3-clause | db7583b62aad9eaf10c67e89cd46087b36c77d81 | ClinicalGraphics/scikit-image,emmanuelle/scikits.image,juliusbierk/scikit-image,Hiyorimi/scikit-image,almarklein/scikit-image,newville/scikit-image,SamHames/scikit-image,ClinicalGraphics/scikit-image,almarklein/scikit-image,youprofit/scikit-image,jwiggins/scikit-image,Britefury/scikit-image,pratapvardhan/scikit-image,c... | scikits/image/io/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Integrate tests of prepared geoms into main test suite.\n\ngit-svn-id: 1a8067f95329a7fca9bad502d13a880b95ac544b@1508 b426a367-1105-0410-b9ff-cdf4ab011145"
},
{
"role": "assistant",
"content": "from unittest import TestSuite\n\nim... | python | new_file | 1 | 1 | bsd-3-clause | 25f26842b8371b13b3fc9f4abf12dfba0b0408bc | mindw/shapely,mindw/shapely,mouadino/Shapely,mouadino/Shapely,abali96/Shapely,jdmcbr/Shapely,abali96/Shapely,jdmcbr/Shapely | shapely/tests/__init__.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 print_function\nimport json\nimport click\nfrom wensleydale import parser\n\n\n@click.command()\n@click.argument('path', type=str)\n@click.argument('query', type=str)\... | python | edit | 1 | 1 | mit | 356cb63327ce578d31a0c0ee5201423a8ed0e9d2 | RishiRamraj/wensleydale | wensleydale/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport requests\nfrom sys import stderr, exit\nfrom resources import get_resource_root\n\ndef get_key(platform):\n if platform == \"TI73\": return 0x02\n if platform == \"TI83p\" or platform == \"TI83pSE\": return 0x04\n ... | python | edit | 7 | 7 | mit | 3efd5bb62a6b6a6f62c74f3dba9f8b2833b76473 | KnightOS/sdk,KnightOS/sdk,KnightOS/sdk | knightos.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ast import AST\nimport yaml\n\n\nclass ASTTranslator:\n\n def __init__(self, tree):\n self.tree = tree\n\n def translate(self):\n return yaml.dump({'type': 'program', 'code': []})\n\n```\n\nApply this change: Add a ... | python | edit | 1 | 6 | mit | 7eff20d706eb35513d8d1f420e59879e80400417 | alehander42/pseudo-python | pseudon/ast_translator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, request, jsonify, send_from_directory\nimport os\nimport uuid\napp = Flask(__name__)\nUPLOAD_FOLDER = \"uploads/\"\n\n@app.route(\"/\")\ndef index():\n return send_from_directory('static/', 'index.html')\n\n@app.... | python | edit | 1 | 3 | mit | 27eea99e2ca78f7af3fb308f91d377e70c53e3c4 | spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Django\nfrom django.contrib.auth.models import BaseUserManager\n\n\nclass UserManager(BaseUserManager):\n\n def create_user(self, email, password='', person, **kwargs):\n user = self.model(\n email=email,\n ... | python | edit | 1 | 1 | bsd-2-clause | df027db957b38656e3acf42d6065af34509ea053 | barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore | project/api/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django import template\nfrom ..generate import image_url as url\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef image_url(image_url, **kwargs):\n return url(image_url... | python | edit | 1 | 3 | mit | 0c6a27b483fdfaf04c0481151d2c3e282e4eca4f | jeanmask/opps,williamroot/opps,opps/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps | opps/images/templatetags/images_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom discord.ext.commands import Bot, CommandInvokeError\r\nfrom discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument\r\n\r\nclass BeattieBot(Bot):\r\n async def reply(self, ctx, message):\r\n return await c... | python | edit | 3 | 4 | mit | fb9a16917ba8f26caa0d941b181fa083fcb7a2da | BeatButton/beattie-bot,BeatButton/beattie | bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This is a documentation block with several lines\n# so I can test how it works.\n\nimport cv2\n\ndef main():\n print(\"cvui main\");\n\nif __name__ == '__main__':\n main()\n\ndef random_number_generator(arg1, arg2):\n \"\"\"\n ... | python | edit | 1 | 1 | mit | 33a1df824ef3b339874e0a24d1c84ad05ebcb9e1 | Dovyski/cvui,Dovyski/cvui,Dovyski/cvui | cvui.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nsentry.tasks.base\n~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nfrom celery.task import task\nfrom django_statsd.clients im... | python | edit | 1 | 2 | bsd-3-clause | 3fed93e1c0c12dd98a1be7e024a4c637c5751549 | gencer/sentry,korealerts1/sentry,JTCunning/sentry,fuziontech/sentry,wujuguang/sentry,jean/sentry,mvaled/sentry,jean/sentry,BuildingLink/sentry,zenefits/sentry,drcapulet/sentry,ewdurbin/sentry,TedaLIEz/sentry,fotinakis/sentry,nicholasserra/sentry,looker/sentry,gencer/sentry,BayanGroup/sentry,BuildingLink/sentry,mvaled/s... | src/sentry/tasks/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport socket\n\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((\"localhost\", 5001))\ns.send(\"imei:123456789012345,tracker,151030080103,,F,000101.000,A,5443.3834,N,02512.9071,E,0.00,0;\")\n\nwhile T... | python | edit | 2 | 0 | apache-2.0 | 4a2bd50b6747eb00ddedd0d3e26f28cc43980b11 | 5of9/traccar,jssenyange/traccar,tananaev/traccar,duke2906/traccar,AnshulJain1985/Roadcast-Tracker,tsmgeek/traccar,stalien/traccar_test,renaudallard/traccar,orcoliver/traccar,AnshulJain1985/Roadcast-Tracker,tsmgeek/traccar,joseant/traccar-1,ninioe/traccar,tananaev/traccar,5of9/traccar,renaudallard/traccar,al3x1s/traccar... | tools/test-commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#main/contexts.py\nfrom django.core.urlresolvers import resolve\n\nfrom cl_module.cl_module import ModuleManager\nfrom flags.registry import get_flag_registry\nfrom pyalp.skin import get_skin\n\n\ndef app_name(request):\n return {'app_na... | python | edit | 1 | 3 | mit | fdb56c41b5151e9fc4ce3eb997b2bb88d16594c1 | Mause/pyalp,Mause/pyalp,Mause/pyalp,Mause/pyalp | pyalp/pyalp/contexts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom os import getenv\nfrom webapp import create_app\nfrom argparse import ArgumentParser\n\n\napp = create_app(getenv('FLASK_CONFIG') or 'development')\n\n\ndef main():\n parser = ArgumentParser()\n parser.add_argument(\"-p\", \"--... | python | edit | 1 | 2 | bsd-3-clause | 9e7d3c35857600445cb6df42ba18d289dc0e37a9 | aleksandergurin/news,aleksandergurin/news,aleksandergurin/news | wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n\nurlpatterns = patterns('projects.views',\n url(r'^add/$', 'add_project', name='add_project'),\n url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'),\n url(r'^statu... | python | edit | 1 | 0 | mit | f048d62b7831f0364093025c6bf9e3458d1a7b11 | Hackfmi/Diaphanum,Hackfmi/Diaphanum | projects/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom parser import Parser\nimport json\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef index():\n parser = Parser()\n data = parser.parse_all()\n print json.dumps(data)\n return render_... | python | edit | 3 | 1 | mit | 7ef1d2fc9a99f0ac190206d5cb721dced0de5ad4 | ruralocity/speedchart,ruralocity/speedchart | speedchart.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc... | python | edit | 4 | 0 | mit | 841da00ffa000acec3e287b8b2af91147271b728 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | cupy/array_api/_typing.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport konstrukteur.Konstrukteur\nimport jasy.asset.Manager2 as AssetManager\n\n@task\ndef build(regenerate = False):\n\t\"\"\"Generate source (development) version\"\"\"\n\n\t# Initialize assets\n\tAssetManager.AssetManager(profile, sessio... | python | edit | 4 | 1 | mit | 18998011bb52616a3002ca298a64ea61c5727a76 | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | skeleton/website/jasyscript.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport pytest\nimport sys\n\n# This line allows the tests to run if you just naively run this script.\n# But the preferred way is to use run_tests.sh\nsys.path.insert(0,'../MultiQC')\n\nfrom multiqc.modules.ccs.ccs... | python | edit | 3 | 1 | mit | 0c1ecf09d892e15ae02a92a1643e7cdb4ae95069 | ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData,ewels/MultiQC_TestData | unit_tests/test_ccs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport http.client\n\nclass TestStringMethods(unittest.TestCase):\n\n def test_404NoConfig(self):\n connRouter = http.client.HTTPConnection(\"localhost\", 8666)\n connRouter.request(\"GET\", \"/google\")\n ... | python | edit | 1 | 1 | apache-2.0 | 9d5c534339c417842428d2a4dcca6c1745fb9770 | dhiaayachi/dynx,dhiaayachi/dynx | test/test_integration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test suite for optimizers.constant.\"\"\"\n\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport ast\n\nimport pytest\n\nfro... | python | edit | 1 | 1 | apache-2.0 | fe442d84140b0a588c6a8490b58a10995df58f17 | kevinconway/pycc,kevinconway/pycc | tests/optimizers/test_constant_optimizer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Mael Beuget, Pierre Monnin & Thibaut Smith'\n\nfrom BaseHandler import *\nimport logging\nfrom XMLAnalyser import XMLAnalyser\nfrom google.appengine.api import memcache\n\nclass StudentsListHandler(BaseHandler):\n def __ini... | python | edit | 3 | 5 | mit | f68daf88cd7fb6cad64a72ef48af5b9b616ca4c6 | Videl/absentees-blackboard,Videl/absentees-blackboard | StudentsListHandler.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 migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('wagtailimages', '0... | python | edit | 1 | 0 | mit | 7e4a8698532a79ec6338961e91e71c54c155f02a | pgovers/oscar-wagtail-demo,pgovers/oscar-wagtail-demo | demo/apps/catalogue/migrations/0011_auto_20160616_1335.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom utils import absolute_magnitude, plDensity, hz\n\n\ndef test_absolute_magnitude():\n m = 10\n assert isinstance(absolute_magnitude(1, 1), float)\n assert absolute_magnitude(1, m) > m\n asser... | python | edit | 1 | 3 | mit | 8bcc4fe29468868190dcfcbea5438dc0aa638387 | DanielAndreasen/SWEETer-Cat,DanielAndreasen/SWEETer-Cat | sweetercat/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import render_template, request, Blueprint\nimport json\n\nfrom app.state import state\n\n\nPROGRAMS_LIST = [\n [\"ascii_text\", \"ASCII Text\"],\n [\"cheertree\", \"Cheertree\"],\n [\"cross\", \"Cro... | python | edit | 4 | 2 | mit | 310cab802d7040dfb914ed60529d38011aa83ae8 | njbbaer/unicorn-remote,njbbaer/unicorn-remote,njbbaer/unicorn-remote | app/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\n\nimport requests\nimport rethinkdb as r\n\nfrom flask import Blueprint, current_app\n\nfrom utils.decorators import validate, require\nfrom utils.validators import validate_url\n\nfrom krunchr.vendors.rethinkdb impo... | python | edit | 1 | 3 | apache-2.0 | 0df8a958b479e01d9c931bd4ca185c68720e14e6 | vtemian/kruncher | analyser/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom .models import ContentItem, Profile, Comment, Hashtag, ContentHashTag, Like\nfrom rest_framework import serializers\n\n\nclass UserSerializer(serializers.HyperlinkedModelSerializer):\n cl... | python | edit | 1 | 0 | mit | f300f3b31dcdefa91fa8fe46bdaab2d2490ac06a | SNDjango/server,SNDjango/server,SNDjango/server | snd/image_board/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nIS_PY3K = False\n\ntry:\n if sys.version_info[0] >= 3:\n IS_PY3K = True\nexcept AttributeError:\n pass #Not all versions have sys.version_info\n\n\nif IS_PY3K:\n # noinspection PyUnresolvedReferences\n from... | python | edit | 9 | 0 | apache-2.0 | b2396e90d9da252766979c154e6f98707dda6e0c | orekyuu/intellij-community,MER-GROUP/intellij-community,semonte/intellij-community,da1z/intellij-community,slisson/intellij-community,xfournet/intellij-community,youdonghai/intellij-community,wreckJ/intellij-community,blademainer/intellij-community,robovm/robovm-studio,lucafavatella/intellij-community,salguarnieri/inte... | python/helpers/profiler/_prof_imports.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\nif on_rtd:\n subprocess.call('cd ..; doxygen', shell=True)\n\nimport sphinx_rtd_theme\n\nhtml_th... | python | edit | 1 | 1 | bsd-3-clause | 1fd2aef4fcaabddcb533ffe2f999e55d1e3ce7fe | xtensor-stack/xtl,xtensor-stack/xtl | docs/source/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\n\n\"\"\"\nusage: mfh.py [-h] [-c | --client [PORT]] [-u] [-v]\n\nServe some sweet honey to the ubiquitous bots!\n\noptional arguments:\n -h, --help show this help message and exit\n -c launch client wi... | python | edit | 1 | 1 | mit | 11df95a61f93a8654817f9837226a33c98f34af8 | Zloool/manyfaced-honeypot | arguments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef Fun():\n pass\n\nclass A:\n def __init__(self):\n pass\n def Fun(self):\n pass\n\ntry:\n print(Fun.__name__)\n print(A.__init__.__name__)\n print(A.Fun.__name__)\n print(A().Fun.__name__)\nexcept Attri... | python | edit | 1 | 1 | mit | 4102320e908dfa6e2fc320d73f118670ad5b1501 | pozetroninc/micropython,adafruit/circuitpython,MrSurly/micropython,henriknelson/micropython,selste/micropython,kerneltask/micropython,trezor/micropython,pozetroninc/micropython,selste/micropython,pozetroninc/micropython,pramasoul/micropython,kerneltask/micropython,henriknelson/micropython,henriknelson/micropython,tobba... | tests/basics/fun_name.py | rejected_duplicate | Near-duplicate of sample 12850 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom Measurement import Measurement\n\nclass Recorder(object):\n def __init__(self, recorderType):\n self.recorderType = recorderType\n\n def record(self, measure: Measurement):\n None\n\nclass PrintRecorder(Recorder):\n... | python | edit | 1 | 1 | mit | 8cef502afb45638d74306b2fcebec37f445b13c6 | hectortosa/py-temperature-recorder | Recorders.py | rejected_duplicate | Near-duplicate of sample 1752 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom zope.interface import implements\n\nfrom twisted.plugin import IPlugin\nfrom twisted.application.service import IServiceMaker\nfrom twisted.application import internet\n\nfrom oauth_proxy import oauth_proxy\n\nclass OAuthProxyServiceMa... | python | edit | 16 | 3 | bsd-3-clause | bc74780d42dd63a1dee005fe78db45cc994392d2 | mojodna/oauth-proxy | twisted/plugins/proxy.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os.path\nimport nose.tools as nose\nimport pep8\n\n\ndef test_pep8():\n '''all Python files should comply with PEP 8'''\n for subdir_path, subdir_names, file_names in os.walk('.'):\n if '.git' in... | python | edit | 1 | 6 | mit | 91fc886bf302f9850977c8d88abba3bffd51928b | caleb531/ssh-wp-backup,caleb531/ssh-wp-backup | tests/test_compliance.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom lektor.quickstart import get_default_author\nfrom lektor.quickstart import get_default_author_email\nfrom lektor.utils import locate_executable\n\n\ndef test_default_author(os_user):\n assert get_default_author() ==... | python | edit | 1 | 1 | bsd-3-clause | 315ad5f2f31f82f8d42d2a65fe4f056b4e3fcfd7 | lektor/lektor,lektor/lektor,lektor/lektor,lektor/lektor | tests/test_quickstart.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 The Chromium 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\n\"\"\"Top-level presubmit script for catapult.\n\nSee https://www.chr... | python | edit | 1 | 1 | bsd-3-clause | 61be68b330c6e37a4f53b2441370c96c9aa13777 | sahiljain/catapult,catapult-project/catapult,danbeam/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,catapult-project/catapult,dstockwell/catapult,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,benschmaus/catapult,benschmaus/catapult,scottmcmaster/catapult,benschmaus/catapult,0x90sled/catapult,cata... | PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom six.moves.urllib_parse import urlencode\n\nfrom .oauth import OAuth2Test\n\n\nclass DatagouvfrOAuth2Test(OAuth2Test):\n backend_path = 'social_core.backends.udata.DatagouvfrOAuth2'\n user_data_url = 'https://www.da... | python | edit | 1 | 1 | bsd-3-clause | ce2f07e7fa5ac38235cbb6ea6c4fee3a60031246 | python-social-auth/social-core,python-social-auth/social-core | social_core/tests/backends/test_udata.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nimport gevent\nimport gevent.wsgi\nimport simplejson as json\n\nfrom butler import service\nfrom butler.options import Options\nfrom butler.routing imp... | python | edit | 1 | 2 | mit | f0c0f8816f93ec56cf16db3f5c2298a95e7e9181 | knrafto/butler,knrafto/butler,knrafto/butler | server/butler/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport telegram\n\nfrom leonard import Leonard\n\nif __name__ == '__main__':\n os.chdir('../')\n telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])\n bot = Leonard(telegram_client)\n i = 0\n while True:\n ... | python | edit | 1 | 0 | mit | f529c9f5092262f9089ad51831a8545d8f8650fa | sevazhidkov/leonard | workers/subscriptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nfrom django.core import management\n\napps = sys.argv[1:]\n\nif not apps:\n apps = [\n 'resources',\n 'forms',\n 'base',\n ]\n\nm... | python | edit | 1 | 0 | bsd-2-clause | cad612fff70f89307cb4601e4dfca2c3b4a0b420 | chop-dbhi/serrano,chop-dbhi/serrano | test_suite.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache License, Version 2.0. See the LICENSE file for details.\nfrom wtforms.validators impor... | python | edit | 1 | 4 | apache-2.0 | b6f51e8873d1905da53027b73614f2eeb4c4ed3d | agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft | web/form/fields/validators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\n\nimport pytest\nfrom redis import Redis\n\nfrom minique.utils import get_random_pronounceable_string\n\n\ndef pytest_configure() -> None:\n logging.basicConfig(datefmt=\"%Y-%m-%d %H:%M:%S\", level=logging.INFO... | python | edit | 1 | 2 | mit | aed365f2f86090c22640c05e9fb2f821a6ab12a5 | valohai/minique | minique_tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n wispy.tree\n ~~~~~~~~~~\n\n Contains the AST nodes defined by *wispy*.\n\"\"\"\n# pylint: disable=no-init, too-few-public-methods, missing-docstring\n\nclass Node:\n \"\"\" Base class for all CST nodes.\n\n Exports a... | python | edit | 1 | 2 | apache-2.0 | 72fe5252a05f8afc8b2cc4e2f10a0572acb1a629 | RoPython/wispy | wispy/tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.\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 Licen... | python | edit | 1 | 1 | apache-2.0 | 038bc954ed63db6df192de50483f218b037c2438 | openstack/searchlight,openstack/searchlight,openstack/searchlight | searchlight/cmd/listener.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3... | python | edit | 3 | 2 | bsd-2-clause | 7a855a5cd09785a23061af1be13135ad23c4daf1 | mlavin/django-selectable,affan2/django-selectable,mlavin/django-selectable,mlavin/django-selectable,affan2/django-selectable,affan2/django-selectable | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom app import app\nfrom flask import render_template, request\nfrom .looper import getNextLink\n\n@app.route('/')\ndef index_page():\n return render_template('index.html')\n\n@app.route('/loop')\ndef loop_request():\n link = request... | python | edit | 2 | 2 | mit | 6c57f18e9f40f5dd54fc35ef2f34924ccc50ee76 | kartikanand/wikilooper,kartikanand/wikilooper,kartikanand/wikilooper | app/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom share.provider import OAIProviderAppConfig\n\n\nclass AppConfig(OAIProviderAppConfig):\n name = 'providers.org.ttu'\n version = '0.0.1'\n title = 'ttu'\n long_title = 'Texas Tech Univeristy Libraries'\n home_page = 'http... | python | edit | 1 | 0 | apache-2.0 | 1b31a86fcf5a449c67c20e4c971e6cb8b6bba126 | CenterForOpenScience/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE,laurenbarker/SHARE,aaxelb/SHARE,laurenbarker/SHARE,zamattiac/SHARE,zamattiac/SHARE,aaxelb/SHARE,laurenbarker/SHARE,zamattiac/SHARE | providers/org/ttu/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\nurlpatterns = [\n url(r'^admin/', admin.site.urls),\n url(r'^edtf/', include('edtf.urls', namespace='edtf'))\n]\n\n```\n\nApply this change: Remove admin s... | python | edit | 1 | 0 | bsd-3-clause | 0c47a60185122dbea6ded2118305094d6917afb1 | unt-libraries/django-edtf,unt-libraries/django-edtf,unt-libraries/django-edtf | tests/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Adapted from https://raw.githubusercontent.com/hzy/django-polarize/master/runtests.py\n\nimport sys\n\nfrom django.conf import settings\nfrom django.core.management import execute_from_command_line\n\n\nif not set... | python | edit | 1 | 1 | bsd-3-clause | e4f4ad313cb9d89114a1189861405148ef6f19ae | funkybob/django-flatblocks,funkybob/django-flatblocks | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for humbug project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``runse... | python | edit | 1 | 0 | apache-2.0 | 044b08b4097f5c1739ed8d212d1815edfc1468d1 | bowlofstew/zulip,EasonYi/zulip,so0k/zulip,jeffcao/zulip,babbage/zulip,souravbadami/zulip,krtkmj/zulip,Diptanshu8/zulip,sup95/zulip,easyfmxu/zulip,brockwhittaker/zulip,deer-hope/zulip,firstblade/zulip,esander91/zulip,johnny9/zulip,easyfmxu/zulip,peiwei/zulip,vaidap/zulip,lfranchi/zulip,Galexrt/zulip,guiquanz/zulip,dawra... | humbug/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nINTERVAL = int(os.environ.get('INTERVAL', 60))\nAWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID']\nAWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY']\nAWS_REGION = os.environ.get('AWS_REGION', 'us-west-2')\nALERTS = ... | python | edit | 1 | 0 | mit | 0cd5deefc61f56351af24f6597a1509ea4b4b567 | lorden/right-now-alerts | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDemonstration files --- :mod:`pbxplore.demo`\n============================================\n\nPBxplore bundles a set of demonstration files. This module ease the access to\nthese files.\n\nThe path to the demonstration files is stor... | python | edit | 1 | 3 | mit | 10379c2210b39d507af61530c56c1dbfa8cf5307 | jbarnoud/PBxplore,jbarnoud/PBxplore,pierrepo/PBxplore,HubLot/PBxplore,pierrepo/PBxplore,HubLot/PBxplore | pbxplore/demo/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import JsonResponse\nfrom django.utils.decorators import method_decorator\nfrom django.utils.translation import ugettext_lazy as _\nfrom graphene_django.views import GraphQLView\nfrom rest_framework import status\nfrom rest... | python | edit | 1 | 6 | mit | f96902bc16a4e3da7b85dd3d55371a6927dc0472 | wis-software/office-manager | src/office/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Build the project on AppVeyor.\n\nimport os\nfrom download import Downloader\nfrom subprocess import check_call\n\nbuild = os.environ['BUILD']\ncmake_command = ['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE='... | python | edit | 1 | 0 | bsd-2-clause | f9e1c2bd5976623bcebbb4b57fb011eb4d1737bc | lightslife/cppformat,blaquee/cppformat,mojoBrendan/fmt,alabuzhev/fmt,alabuzhev/fmt,wangshijin/cppformat,nelson4722/cppformat,cppformat/cppformat,cppformat/cppformat,alabuzhev/fmt,blaquee/cppformat,wangshijin/cppformat,Jopie64/cppformat,nelson4722/cppformat,lightslife/cppformat,cppformat/cppformat,seungrye/cppformat,Jop... | support/appveyor-build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\n\nLearningObject = collections.namedtuple(\n 'LearningObject',\n ['text', 'image'])\n\nclass Model(object):\n def __init__(self, name):\n self._name = name\n self._objs = []\n\n def add_object(self, text, image... | python | edit | 1 | 3 | apache-2.0 | b8e085c538b9eda06a831c78f55219ac4612a5da | faskiri/google-drive-extract-images | model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Provide the ModAction class.\"\"\"\nfrom typing import TYPE_CHECKING\n\nfrom .base import PRAWBase\n\nif TYPE_CHECKING: # pragma: no cover\n from ... import praw\n\n\nclass ModAction(PRAWBase):\n \"\"\"Represent a moderator act... | python | edit | 1 | 1 | bsd-2-clause | c87b5f8392dc58d6fa1d5398245b4ffe9edb19c8 | praw-dev/praw,praw-dev/praw | praw/models/mod_action.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:... | python | edit | 8 | 0 | apache-2.0 | dd0405965f816a2a71bfb6d7a3f939691a6ab6d8 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Run this file to check your python installation.\n\"\"\"\nfrom os.path import dirname, join\n\nHERE = dirname(__file__)\n\ndef test_import_pandas():\n import pandas\n\n\ndef test_pandas_version():\n import pandas\n version_f... | python | edit | 7 | 2 | mit | bdd2570f9ba8963edb6fa1a57b3f0ad5b1703a13 | jonathanrocher/pandas_tutorial,jonathanrocher/pandas_tutorial,jonathanrocher/pandas_tutorial | check_env.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\n\nclass AlgoliaEndpoint(object):\n \"\"\"Class used to call the Algolia API and parse the response.\"\"\"\n\n URL = \"http://hn.algolia.com/api/v1/search_by_date\"\n\n @staticmethod\n def get(tag, since, until=None, p... | python | edit | 1 | 3 | bsd-2-clause | cff7bb0fda7e126ce65701231cab0e67a5a2794c | NiGhTTraX/hackernews-scraper | endpoints.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom selinon import StoragePool\nfrom cucoslib.models import WorkerResult, Analysis\n\nfrom .base import BaseHandler\n\n\nclass CleanPostgres(BaseHandler):\n \"\"\" Clean JSONB columns in Postgres \"\"\"\n def execute(self):\n ... | python | edit | 1 | 6 | apache-2.0 | ba3655a8771978edcf73083446c47adafc677afc | fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs | bayesian_jobs/handlers/clean_postgres.py | rejected_duplicate | Near-duplicate of sample 5528 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport unittest\n\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\nimport flask_featureflags as feature_flags\nfrom flask_featureflags.contrib.sqlalchemy import SQLAlchemyFeatureFlags\n\nfrom tests.fixtures import ap... | python | edit | 1 | 1 | apache-2.0 | 05e9c3e9c58732e68eacc0462f949c2525d670fe | jskulski/Flask-FeatureFlags,iromli/Flask-FeatureFlags,trustrachel/Flask-FeatureFlags | tests/contrib/test_sqlalchemy_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nimport sys\nimport os\n\n\n# Taken from legacy python unittest\nclass WritelnDecorator:\n \"\"\"Used to decorate file-like objects with a handy 'writeln' method\"\"\"\n def __init__(self, st... | python | edit | 4 | 2 | mit | 2718256bfbf57eba36c3f083dace32afbc101fd3 | kjc/python_koans,erikld/Bobo,haroldtreen/python_koans,welenofsky/python_koans,EavesofIT/python_koans,bordeltabernacle/python_koans,gregmalcolm/python_koans,bohdan7/python_koans,Sam-Rowe/python-koans,Sam-Rowe/python-koans,PaulFranklin/python_koans,kimegitee/python-koans,kjc/python_koans,rameshugar/koans,PaulFranklin/pyt... | python2/runner/writeln_decorator.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ntry:\n from jose.backends.cryptography_backend import CryptographyRSAKey as RSAKey # noqa: F401\nexcept ImportError:\n try:\n from jose.backends.pycrypto_backend import RSAKey # noqa: F401\n except ImportError:\n ... | python | edit | 1 | 0 | mit | cc17f806e3fcbc6974a9ee13be58585e681cc59a | mpdavis/python-jose | jose/backends/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport datapackage\n\n\nclass TestDataPackage(object):\n def test_schema(self):\n descriptor = {}\n schema = {'foo': 'bar'}\n dp = datapackage.DataPackage(descriptor, schema=schema)\n assert dp.... | python | edit | 1 | 1 | mit | 0e9acfe35396582f95c22994e061be871fdaf865 | okfn/datapackage-model-py,sirex/datapackage-py,sirex/datapackage-py,okfn/datapackage-model-py,okfn/datapackage-py,datapackages/datapackage-py,datapackages/datapackage-py,okfn/datapackage-py | tests/test_datapackage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom random import seed as srand, randint\nfrom time import time\n\nsrand(time())\n\nclass Card:\n types = (\"def\", \"atk\")\n limits = {\"def\": (1, 25), \"atk\": (1, 40)}\n\n def __init__(self, type = None, value = None):\n ... | python | edit | 4 | 3 | mit | a46bc83eb16888e374f5f24080581818617539a2 | TheUnderscores/card-fight-thingy | src/cards.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.core.cache import cache\nfrom django.conf import settings\n\nfrom .utils import bitgroup_cache_key\n\n\nclass BitGroupManager(models.Manager):\n\n def get_group(self, slug):\n \"\"\" Retri... | python | edit | 1 | 2 | bsd-3-clause | 063a655327cf0872e01170653604db6901d5aacd | nngroup/django-pagebits,nngroup/django-pagebits | pagebits/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom models import Page\n\nurlpatterns = patterns('kcdc3.apps.pinata.views',\n\n\turl(r'^$', 'page_view'),\n\turl(r'^[0-9a-zA-Z_-]+/$', 'page_view'),\n\n)\n\n```\n\nApply this change: All... | python | edit | 4 | 0 | mit | 3c1f2c46485aee91dbf4c61b7b096c2cc4b28c06 | knowledgecommonsdc/kcdc3,knowledgecommonsdc/kcdc3,knowledgecommonsdc/kcdc3,knowledgecommonsdc/kcdc3,knowledgecommonsdc/kcdc3,knowledgecommonsdc/kcdc3 | kcdc3/apps/pinata/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The WaveBlocks Project\n\nVarious small utility functions.\n\n@author: R. Bourquin\n@copyright: Copyright (C) 2012 R. Bourquin\n@license: Modified BSD License\n\"\"\"\n\nfrom numpy import squeeze, asarray\n\n\ndef meshgrid_nd(arrays):... | python | edit | 1 | 7 | bsd-3-clause | 0610628771df849119e6ed316dfa0f8107d8fe6e | WaveBlocks/WaveBlocksND,WaveBlocks/WaveBlocksND | src/WaveBlocksND/Utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom six.moves import configparser as CP\nfrom sqlalchemy.engine.url import URL\nfrom sqlalchemy.engine import create_engine\nimport os\nimport pandas as pd\n\ndef get_odbc_engine(name, odbc_filename='/etc/odbc.ini', database=None):\n \"... | python | edit | 1 | 6 | mit | abc95f3a10cd27ec67e982b187f7948d0dc83fe3 | log0ymxm/corgi | corgi/sql.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom akhet.urlgenerator import URLGenerator\nimport pyramid.threadlocal as threadlocal\nfrom pyramid.exceptions import ConfigurationError\n\nfrom .lib import helpers\n\ndef includeme(config):\n \"\"\"Configure all application-specific su... | python | edit | 3 | 3 | mit | fb9999b8dfcbc67da3a14ecbfed8fcd5676c0ea3 | Pylons/akhet,Pylons/akhet,hlwsmith/akhet,hlwsmith/akhet,hlwsmith/akhet | akhet/demo/subscribers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright (c) 2015 Red Hat\n# Licensed under The MIT License (MIT)\n# http://opensource.org/licenses/MIT\n#\n\"\"\"\nExtra Django settings for test environment of pdc project.\n\"\"\"\n\nfrom settings import *\n\n\n# Database settings\... | python | edit | 2 | 0 | mit | 65d3e588606f533b2d2934bf52439e586a01f2b4 | release-engineering/product-definition-center,release-engineering/product-definition-center,product-definition-center/product-definition-center,product-definition-center/product-definition-center,product-definition-center/product-definition-center,product-definition-center/product-definition-center,release-engineering/... | pdc/settings_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom socket import *\nfrom time import localtime, strftime\n\ndef main():\n if len(sys.argv) < 4:\n print \"completion_logger_server.py <listen address> <listen port> <log file>\"\n exit(1)\n\n hos... | python | edit | 3 | 4 | apache-2.0 | 264b7f26b872f4307c70cf6c68d84fdce620f5bb | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... | utils/CIndex/completion_logger_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom datetime import datetime\n\nfrom citools.mongo import get_database_connection\nfrom citools.git import get_last_revision\n\nclass TestLastStoreRetrieval(TestCase):\n\n def setUp(self):\n TestC... | python | edit | 4 | 1 | bsd-3-clause | 9a850232e187080222e7d245c65264e9b3484ee8 | ella/citools,ella/citools | tests/test_git_mongo.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# The Header class contains the data structure of the Header class, and methods includes encapsulate, and decapsulate.\n\nimport struct\nimport random\nfrom MessageType import MessageType\n\nclass Header:\n \"\"\"docstring for Header\"\"... | python | edit | 7 | 1 | mit | d623b9904e4fa1967d8f83b45d39c9b57d2a4b0e | CharKwayTeow/ddsp | DDSP/Header.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom cobe.tokenizer import MegaHALTokenizer\n\nclass testMegaHALTokenizer(unittest.TestCase):\n def setUp(self):\n self.tokenizer = MegaHALTokenizer()\n\n def testSplitEmpty(self):\n self.assertEquals(... | python | edit | 1 | 1 | mit | 70138da1fa6a28d0e7b7fdf80ab894236c0f5583 | LeMagnesium/cobe,tiagochiavericosta/cobe,pteichman/cobe,wodim/cobe-ng,meska/cobe,wodim/cobe-ng,meska/cobe,tiagochiavericosta/cobe,DarkMio/cobe,DarkMio/cobe,pteichman/cobe,LeMagnesium/cobe | tests/test_tokenizer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.utils.html import mark_safe\n\nregister = template.Library()\n\n\n@register.simple_tag(takes_context=True)\ndef render_plugin(context, plugin):\n \"\"\"\n Render a single plugin. See :mod:`fein... | python | edit | 1 | 2 | bsd-3-clause | c15875062be2b59c78fca9a224b0231986a37868 | matthiask/feincms3,matthiask/feincms3,matthiask/feincms3 | feincms3/templatetags/feincms3_renderer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='ohmysportsfeedspy',\n packages=['ohmysportsfeedspy'],\n version='0.1.2',\n author = ['Brad Barkhouse', 'MySportsFeeds'],\n author_email='<EMAIL>',\n url='https://github.co... | python | edit | 1 | 0 | mit | fe5a980dd36c24008efe8e4900a675b568e5fb9d | MySportsFeeds/mysportsfeeds-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='lightstep',\n version='4.1.0',\n description='LightStep Python OpenTracing Implementation',\n long_description='',\n author='LightStep',\n license='',\n inst... | python | edit | 1 | 0 | mit | 91550be5f866cd53bdff019f1be02af00a20a3e0 | lightstephq/lightstep-tracer-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\ndef read(filename):\n full_path = os.path.join(os.path.dirname(__file__), filename)\n with open(full_path) as fd:\n return fd.read()\n\n\nsetup(\n name='nymms',\n ... | python | edit | 1 | 1 | bsd-2-clause | 682c02b01775a443ce17aa5ea9805e5be6fd120b | cloudtools/nymms | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nsetup(\n name=\"sbq\",\n packages=[\"sbq\"],\n version=\"0.2.0\",\n description=\"Low-dependency package for automating bigquery queries.\",\n author=\"Colin Fuller\",\n author_email=\"<EMAIL>... | python | edit | 1 | 0 | mit | 0e97763d49f449a9f0399ef1fded9e6c5997d8b0 | cjfuller/sbq | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nfrom dichalcogenides import __version__\n\nwith open('README.rst', 'r') as f:\n long_description = f.read()\n\nsetup(\n name='dichalcogenides',\n version=__version__,\n author='Evan... | python | edit | 1 | 0 | mit | 327b4558d77256dd45f0e32be014960eb66734ff | razor-x/dichalcogenides | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages \nimport journal\n\nsetup(\nname = 'jou... | python | edit | 1 | 0 | mit | 6e3d80d13864510cf2def7a20660a40daa793e5e | askedrelic/journal | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nsetup(name=\"django-image-cropping\",\n version=\"0.6.4\",\n description=\"A reusable app for cropping images easily and non-destructively in Django\",\n lon... | python | edit | 1 | 0 | bsd-3-clause | 94ed3cdb5234a79bc754c54721f41eaeec51b846 | winzard/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\n\nREQUIREMENTS = [\n \"nose==1.3.0\",\n \"python-dateutil==1.5\",\n]\n\n\nif __name__ == \"__main__\":\n setuptools.setup(\n name=\"jsond\",\n version=\"0.0.1\",\n author=\"EDITD\",\n ... | python | edit | 1 | 0 | mit | 5610f1eaea6f7e2c72c823c9cf2f29b423ce1209 | EDITD/jsond | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Haze\n#\n# Author: Joe Block <<EMAIL>>\n# License: Apache 2.0\n\nfrom setuptools import setup, find_packages\n\nname = \"haze\"\nrequirements = map(str.strip, open(\"requirements.txt\").readlines())\n\nsetup(\n name = name,\n descriptio... | python | edit | 1 | 0 | apache-2.0 | 721089bfa4fb6316344b41355a1a0bf9611e96a4 | unixorn/haze | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: iso-8859-1 -*-\n\nfrom setuptools import setup\n\nsetup(\n name = 'TracMasterTickets',\n version = '2.1.1',\n packages = ['mastertickets'],\n package_data = { 'mastertickets': ['templates/*.h... | python | edit | 1 | 0 | bsd-3-clause | b1fc016fa56ffc801659f6ba2d807694529cfa57 | SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin,SpamExperts/trac-masterticketsplugin | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.6\n\"\"\"Setup file for r53.\"\"\"\n\n__author__ = '<EMAIL>'\n\nfrom setuptools import setup\n\nsetup(\n name='r53',\n version='0.1',\n description='Command line script to synchronize Amazon Route53 DNS data.',\n... | python | edit | 1 | 0 | mit | 15d0e080225586f06044a25dec485a5ebb65b799 | coops/r53 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom setuptools import find_packages, setup\n\n\ndef read(filename):\n with open(os.path.join(os.path.dirname(__file__), filename)) as f:\n return f.read()\n\n\nsetup(\n name=\"devsoc-content... | python | edit | 1 | 1 | bsd-3-clause | 98ff82c3ad36ef6dbcc40005b6f88d9c0d569744 | blancltd/blanc-contentfiles | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2.6\n\nimport setuptools\n\n\nsetuptools.setup(\n name='clicast',\n version='0.4.5',\n\n author='Max Zheng',\n author_email='maxzheng.os @t gmail.com',\n\n description=open('README.rst').read(),\n\n entry_points={... | python | edit | 1 | 0 | mit | 9df7efa09e5d27ef0b238b6f4091e99d63fadd82 | maxzheng/clicast | setup.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 setuptools import setup, find_packages\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as history_file:\n history = history_fi... | python | edit | 1 | 0 | mit | 254bea654189dea4ce6d20c981670b775e2f4318 | CloudHeads/lambda_utils | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Distutils import build_ext\n\nimport numpy\n\nALGPATH = \"clusterpy/core/toolboxes/cluster/componentsAlg/\"\nALGPKG = \"clusterpy.core.toolboxes.cluste... | python | edit | 3 | 0 | bsd-3-clause | 450a1f64a21afce008392e321fff2d268bb9fc41 | clusterpy/clusterpy,clusterpy/clusterpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom sys import version\nif version < '2.6.0':\n raise Exception(\"This module doesn't support any version less than 2.6\")\n\nimport sys\nsys.path.append(\"./test\")\n\nwith open('README.rst', 'r') as f:\... | python | edit | 1 | 0 | bsd-3-clause | 23f5297ab47328a7f9c881530a00cc24461b5d98 | keitaoouchi/seleniumwrapper | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport data\nfrom client import authentication_request_url, GoogleAPIClient\n\n\nc = GoogleAPIClient()\n\nif c.access_token is None:\n print 'Open the following URL in your Web browser and grant access'\n print authentication_request_... | python | edit | 4 | 0 | mit | 7f4d233c48bcdcd327286f3c2ce4f3e2942e6c3c | drkitty/metatube,drkitty/metatube | data_test.py | rejected_lint | Too many lint violations: 4 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.