messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#\n# Copyright 2011-2015 Jeff Bush\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 a... | python | edit | 1 | 0 | apache-2.0 | eb2f720d53ea4ff3450e78a30e1cdb53cd3357bb | jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor | tests/render/texture/runtest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gevent import monkey\nmonkey.patch_all() # noqa\nimport sys\nimport time\n\nfrom ethereum import slogging\n\nfrom raiden.network.transport import UDPTransport\nfrom raiden.network.sockfactory import socket_factory\n\n\nclass DummyProt... | python | edit | 3 | 1 | mit | 758ca0f2308f2545a76f90a0f30c180c87ce3674 | charles-cooper/raiden,charles-cooper/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden | transport_tester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ntestfixtures.shop_order\n~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom byceps.services.shop.order.models.order import Order\nfrom byceps.servi... | python | edit | 1 | 1 | bsd-3-clause | a04f3d167011e6d0e50d6a088f5877769fbedaa2 | homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps | testfixtures/shop_order.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pkg_resources import get_distribution, DistributionNotFound\ntry:\n __version__ = get_distribution('kbcstorage').version\nexcept DistributionNotFound:\n # package is not installed\n pass\n\n```\n\nApply this change: Make packa... | python | edit | 1 | 0 | mit | c073bc3290bbe33ede95a23354062b48b68ca23f | Ogaday/sapi-python-client,Ogaday/sapi-python-client | kbcstorage/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\n\nkeysym_re = re.compile(r\"^#define\\s+(XF86)?XK_(\\w+)\\s+(\\S+)\")\n\n\nclass Keysyms(object):\n __slots__ = ('name_to_code', 'code_to_name', '__dict__')\n\n def __init__(self):\n self.name_to_code = {}... | python | edit | 1 | 8 | mit | 3b71f6600d437a4e5f167315683e7f0137cd3788 | tailhook/tilenol,tailhook/tilenol | tilenol/xcb/keysymparse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\n\nfrom lazy_tags.decorators import lazy_tag\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef test():\n return '<p>hello world</p>'\n\n\n@register.simple_tag\n@lazy_tag\ndef test_decorator():\... | python | edit | 1 | 1 | mit | 0cad0060afcc5936541b3739ff03c06b8a773ec8 | grantmcconnaughey/django-lazy-tags,grantmcconnaughey/django-lazy-tags | tests/templatetags/test_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass WeatherType:\n def __init__(self, weathers, temperature_range, temperature_night_offset,\n wind_range, humidity_range):\n self.__weathers = weathers\n self.__min_temp_day, self.__max_temp_day = \\\n ... | python | edit | 1 | 1 | mit | 56448179cb1e93670c478f45258a261ec972385d | foxpy/random-weather-bot,foxpy/random-weather-bot | weathergenerator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Author: balicanta\n# @Date: 2014-11-01 21:02:00\n# @Last Modified by: balicanta\n# @Last Modified time: 2014-11-01 21:02:00\n\n```\n\nApply this change: Add initi for beautiful API"
}... | python | edit | 3 | 0 | mit | 7b8ba30efc8853ab19dfd95a97f56c8329ddfb4b | Lab-317/NewsParser | newsParser/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport git\nimport os\n\nfrom django.conf import settings\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import render\n\nclass SaveContentMixin():\n \n \"\"\"Save exam or question content to a git repository and... | python | edit | 1 | 4 | apache-2.0 | bc9f4d4e5022f4219727e9085164982f9efb005e | numbas/editor,numbas/editor,numbas/editor | editor/views/generic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom twobuntu.articles.models import Article, ScheduledArticle\n\n\nclass EditorForm(forms.ModelForm):\n \"\"\"\n Form for entering or editing articles.\n \"\"\"\n\n class Meta:\n model = Artic... | python | edit | 1 | 0 | apache-2.0 | 0a718ccee8301f28e86791e06159e6ed8a2674b4 | 2buntu/2buntu-blog,2buntu/2buntu-blog,2buntu/2buntu-blog | twobuntu/articles/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport commands\nimport re\nimport signal\nimport os\nimport logging\n\n_logger = logging.getLogger(__name__)\n\nTARGET_DIR='test/target'\nPORT='27018'\n\ndef startup():\n _logger.info(\"about to start mongod\")\n p... | python | edit | 1 | 2 | mit | e12a4504da0b40ad66e116aa9a0373d1abc6d160 | idbentley/MongoTest | mongo_test/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"API errors.\"\"\"\nfrom werkzeug.exceptions import HTTPException\n\n\nclass Error(Exception):\n status = 500\n error = \"internal server error\"\n\n def __init__(self, error=None, status=None):\n \"\"\"Create an API er... | python | edit | 1 | 3 | bsd-3-clause | 1224e7e2f12b455ffa1f8c102b30012d63716cae | JsonChiu/flask-bracket | flask_bracket/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os, re\nimport tenma\n\nfrom django.conf import settings\nfrom django.core import management\nfrom django.utils.crypto import get_random_string\nfrom shutil import copyfile, move\n\nBASE_DIR... | python | edit | 4 | 3 | mit | e15484bc57b47513545b2be423f24d4dd0312590 | Tenma-Server/Tenma,hmhrex/Tenma,Tenma-Server/Tenma,hmhrex/Tenma,Tenma-Server/Tenma,hmhrex/Tenma | comics/management/commands/generatesecretkey.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nDjango forms data generators\n\n\"\"\"\nfrom django import forms\nfrom django_any import xunit\n\nclass FormFieldDataFactory(object):\n def __init__(self):\n self.registry = {}\n\n def register(... | python | edit | 2 | 3 | mit | 06d0f52608f79f675847e903577e20be03189041 | kmmbvnr/django-any,abakar/django-whatever,abakar/django-whatever | django_any/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nUse lldb Python API to disassemble raw machine code bytes\n\"\"\"\n\nimport os, time\nimport re\nimport unittest2\nimport lldb, lldbutil\nfrom lldbtest import *\n\nclass DisassembleRawDataTestCase(TestBase):\n\n mydir = TestBase.... | python | edit | 3 | 3 | apache-2.0 | 111dc7a749e783af2bd9bb391520cf5b8f846027 | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb | test/python_api/disassemble-raw-data/TestDisassembleRawData.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\n\nfrom pkit.slot import get_slot_pool\n\n\ndef acquire(pool_name):\n \"\"\"Actor's method decorator to auto-acquire a slot before execution\"\"\"\n def decorator(method):\n @functools.wraps(method)\n de... | python | edit | 1 | 4 | mit | e3c7322b0efe10041ba9c38963b9e9f188d9a54a | botify-labs/process-kit | pkit/slot/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'Scrypt for Python'\n\n__version__ = '1.1.0'\n\n# First, try loading libscrypt\n_done = False\ntry:\n from pylibscrypt import *\nexcept ImportError:\n pass\nelse:\n _done = True\n\n# If that didn't work, try the scrypt module\nif n... | python | edit | 11 | 0 | isc | 4029da285fff38524cd30212475868ccda457df6 | jvarho/pylibscrypt,jvarho/pylibscrypt | pylibscrypt/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom apscheduler.schedulers.background import BackgroundScheduler\n\n\nclass Scheduler(BackgroundScheduler):\n\n def __init__(self):\n super().__init__()\n self.start()\n\n def schedule(self, callback, **kwargs):\n ... | python | edit | 1 | 2 | apache-2.0 | d73492a62e5ddc1eb85f4b17a6a0e6ce88410070 | samueldmq/infosystem | infosystem/scheduler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nTRAJECTORY = 'squared'\nCONTROLLER = 'pid'\n\n# control constants\nK_X = 0.90\nK_Y = 0.90\nK_THETA = 0.90\n\n# PID control constants\nK_P_V = 0.2\nK_I_V = 1.905\nK_D_V = 0.00\n\nK_P_W = 0.45\nK_I_W = 1.25\nK_D_W = 0.0... | python | edit | 1 | 0 | mit | 86a357e9a954348aa59626a37d61fdb43c143142 | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time as _time\nimport subprocess\nimport sys\nimport redisdl\nimport unittest\nimport json\nimport os.path\nfrom . import util\nfrom . import big_data\n\nclass RaceDeletingKeysTest(unittest.TestCase):\n def setUp(self):\n i... | python | edit | 5 | 2 | bsd-2-clause | efc9013bff8251fc910ecb70d546a8508ed0f7ec | p/redis-dump-load,hyunchel/redis-dump-load,hyunchel/redis-dump-load,p/redis-dump-load | tests/race_deleting_keys_test.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\nfrom StringIO import StringIO\n\nfrom csvkit import convert\nfrom csvkit.unicsv import UnicodeCSVReader\nfrom django.core import exceptions\n\nfrom .transformers import TRANSFORMERS\n\n\ndef convert_to_csv_reader(filename, s... | python | edit | 1 | 2 | apache-2.0 | 3edff34538855e6916c8185fe271c6574a76fb08 | texastribune/tx_salaries,texastribune/tx_salaries | tx_salaries/utils/transformer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport unittest\n\nclass CompareErrorMessages(unittest.TestCase):\n def test_missing_file_return_code_the_same_as_ls(self):\n args = ['./lss.sh', 'foo']\n ret = subprocess.call(args)\n args2 = ['ls... | python | edit | 1 | 2 | bsd-3-clause | ac7e966e22c9919ef3b3235ee2c69ee30d83c41f | jwg4/les,jwg4/les | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport importlib\n\n__all__ = [\"linalg\", \"single_parameter\"]\n\nfor m in __all__:\n importlib.import_module(\"continuate.\" + m)\n\n```\n\nApply this change: Change manual listing of submodules to automatic... | python | edit | 1 | 0 | mit | 6477768e3040ed43fb10072730b84c29bef1e949 | termoshtt/continuate | continuate/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport types\nfrom query_builder import FILTER_FIELDS, TEXT_FIELDS\nfrom conversions import strip_and_lowercase\n\n\ndef process_values_for_matching(request_json, key):\n values = request_json[key]\n\n if isinstance(values, types.List... | python | edit | 2 | 5 | mit | 48a2eb277d234219dd116d9a0dec5a559b22aff8 | RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api | app/main/services/process_request_json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass BufferFullException(Exception):\n pass\n\n\nclass BufferEmptyException(Exception):\n pass\n\n\nclass CircularBuffer(object):\n def __init__(self):\n pass\n\n```\n\nApply this change: Add parameter capacity to circular-... | python | edit | 1 | 1 | mit | 052de49807dcb9895608e3882b799642b0b08d18 | jmluy/xpython,mweb/python,mweb/python,pheanex/xpython,exercism/xpython,jmluy/xpython,exercism/xpython,smalley/python,behrtam/xpython,behrtam/xpython,exercism/python,N-Parsons/exercism-python,exercism/python,N-Parsons/exercism-python,pheanex/xpython,smalley/python | exercises/circular-buffer/circular_buffer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport datetime\n\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom pontoon.administration.utils.files import (\n update_from_repository,\n extract_to_database,\n)\n\nfrom pontoon.base.models import Project\... | python | edit | 2 | 4 | bsd-3-clause | 33a4f91981373b284e005b245d19fae0000f9201 | m8ttyB/pontoon,mozilla/pontoon,mastizada/pontoon,mastizada/pontoon,sudheesh001/pontoon,Jobava/mirror-pontoon,mozilla/pontoon,Osmose/pontoon,sudheesh001/pontoon,yfdyh000/pontoon,mozilla/pontoon,m8ttyB/pontoon,mathjazz/pontoon,participedia/pontoon,mastizada/pontoon,mathjazz/pontoon,sudheesh001/pontoon,Osmose/pontoon,mozi... | pontoon/administration/management/commands/update_projects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport zirc\nimport ssl\nimport socket\nimport utils\nimport commands\n\n\ndebug = False\n\nclass Bot(zirc.Client):\n def __init__(self):\n self.connection = zirc.Socket(family=socket.AF_INET6,\n ... | python | edit | 3 | 2 | mit | 0263189433456f23bdcbb1921d2f710b045cd5ba | wolfy1339/Python-IRC-Bot | bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\nimport random\n\nimport requests\n\nfrom PIL import Image\n\n# GLOBALS\n\nendpoint = \"https://www.googleapis.com/customsearch/v1\"\nsearchid = \"013060195084513904668:z7-hxk7q35k\"\n\n# Retrieve my API key from a se... | python | edit | 1 | 1 | mit | 19a508aad7c42469923c6f62acef67113e280501 | The-Penultimate-Defenestrator/memefarm | memefarm/imagesearch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nfrom os import path\nfrom unittest import TestCase\n\nfrom dictdiffer import diff\nfrom jsontest import JsonTest\nfrom mock import patch\n\nfrom canaryd_packages import six\n\nfrom canaryd.plugin impor... | python | edit | 1 | 2 | mit | 1f5ee2f729b947a31ab2b04a72ae8c40616db73a | Oxygem/canaryd,Oxygem/canaryd | tests/test_plugin_states.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyinfra.api import FactBase\n\nfrom .util.packaging import parse_packages\n\nPACMAN_REGEX = r'^([0-9a-zA-Z\\-]+)\\s([0-9\\._+a-z\\-]+)'\n\n\nclass PacmanUnpackGroup(FactBase):\n '''\n Returns a list of actual packages belonging t... | python | edit | 1 | 1 | mit | 5f2c7e34bb681fb611f6ba068fc02953d26ab424 | Fizzadar/pyinfra,Fizzadar/pyinfra | pyinfra/facts/pacman.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\n\nfrom tenhou.client import TenhouClient\nfrom utils.settings_handler import settings\n\n\nlogger = logging.getLogger('tenhou')\n\n\ndef connect_and_play():\n logger.info('Bot AI enabled: {}'.form... | python | edit | 1 | 4 | mit | 095f2a78416b12f23b4f59d6415103bd4873a86b | MahjongRepository/tenhou-python-bot,huangenyan/Lattish,huangenyan/Lattish,MahjongRepository/tenhou-python-bot | project/tenhou/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport argparse\n\nticks = ('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')\n\ndef scale_data(data):\n m = min(data)\n n = (max(data) - m) / (len(ticks) - 1)\n\n # if every element ... | python | edit | 2 | 4 | mit | f6a65fb602fb13c01ad2d9ee7cf50415df9ffa7e | mmichie/sparkback | sparkback/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add read image in color"
},
{
"role": "assistant",
"content": "import numpy as np\nimport cv2\n\n# Load an image in color\nimg = cv2.imread(\"doge.jpeg\", 1)\ncv2.imshow(\"image\", img)\nkey = cv2.waitKey(0)\n\ncv2.destroyAllWind... | python | new_file | 3 | 0 | mit | 82c4ade1727a044946b0ebf148fe4e015d8dd7af | maximest-pierre/opencv_example,maximest-pierre/opencv_example | python/ImageDisplay.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom crawlers.one337x import One337x\n\n\nif __name__ == '__main__':\n crawler = One337x()\n torrents = list(crawler.fetch_torrents('arrow'))\n\n```\n\nApply this change: Add API layer using Flask :dancers:"
},
{
"role": "assi... | python | edit | 3 | 1 | mit | f5c1255739fa50218af066f2bf690cc46424a38d | fayimora/osprey,fayimora/osprey,fayimora/osprey | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.contrib.auth.decorators import login_required\nfrom django.views.decorators.http import require_http_methods\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom go.api.go_api impor... | python | edit | 1 | 1 | bsd-3-clause | 062c46ca8b83dd7791cfed1305c2ba58872601af | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/api/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport factory\n\nfrom django.contrib.auth import get_user_model\n\n\nclass UserFactory(factory.DjangoModelFactory):\n FACTORY_FOR = get_user_model()\n name = factory.Sequence(lambda i: 'Test User {}'.format(i))\n email = factory.S... | python | edit | 1 | 2 | bsd-2-clause | fa2ac624bc33add0e88f158c525885eef8bf555b | incuna/django-user-management,incuna/django-user-management | user_management/models/tests/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3.5\n# -*- coding: utf-8 -*-\n\nimport sys\n\ndef check_dependencies():\n deps = [\"PyQt5\", \"unicorn\", \"capstone\", \"keystone\", \"pygments\"]\n for d in deps:\n try:\n __import__(d)\n ex... | python | edit | 1 | 3 | mit | 9742935bf5dbc58ffa7fa0ab4d23a920aec60837 | hugsy/cemu,hugsy/cemu,hugsy/cemu | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef get_monthly_anomaly(ts, start, end):\n \"\"\"\n Get monthly anomaly.\n\n Monthly anomalies calculated from the mean of the data between the specified start and end dates.\n\n :param ts: Pandas timeseries, will be... | python | edit | 1 | 2 | bsd-3-clause | 4de18ece5ac2f563c6d8a6a247a77cdc8a45881e | amacd31/hydromet-toolkit,amacd31/hydromet-toolkit | hydromet/anomaly.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Utilities to manipulate numpy arrays \"\"\"\n\nimport sys\n\nimport numpy as np\n\nfrom nibabel.volumeutils import endian_codes, native_code, swapped_code\n\n\ndef as_native_array(arr):\n \"\"\" Return `arr` as native byteordered ... | python | edit | 4 | 2 | bsd-3-clause | 86197635800e6b19a6b95e9be932999c79042720 | matthieudumont/dipy,JohnGriffiths/dipy,FrancoisRheaultUS/dipy,matthieudumont/dipy,StongeEtienne/dipy,villalonreina/dipy,FrancoisRheaultUS/dipy,JohnGriffiths/dipy,nilgoyyou/dipy,villalonreina/dipy,nilgoyyou/dipy,StongeEtienne/dipy | dipy/utils/arrfuncs.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2016 Canonical Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# ... | python | edit | 1 | 2 | apache-2.0 | f0deb22062930918e497d494aa5e76224f88b5ea | lxc/pylxd,lxc/pylxd | pylxd/containerState.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"delphi URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app impo... | python | edit | 1 | 0 | mit | 49a182c2b6b7c5e5a7be8452d1ccc262b0d45782 | VulcanoAhab/delphi,VulcanoAhab/delphi,VulcanoAhab/delphi | delphi/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nimport os\nimport fcntl\n\n\nclass FileLock(object):\n\n def __init__(self, fd):\n\n # the fd is borrowed, so do not close it\n self.fd = fd\n\n def acquire(self, write=False, block=False):\n... | python | edit | 3 | 4 | mit | 2bde683bcfbdc7149a114abd609a3c91c19cac0f | huangjunwen/tagcache | tagcache/lock.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport verify\n\nclass Tree:\n def __init__(self, elements):\n self._elements = elements\n\n def count(self):\n return len(self._elements)\n\n def elements(self):\n result = []\n for element in self._elements:\n if eleme... | python | edit | 1 | 9 | apache-2.0 | 612a411d0d4b2323bcbb3c3bdd41df945a075f53 | jkingdon/jh2gh | tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport glob\nimport inspect\nimport saw.items\n\ncurr_path = os.path.dirname(__file__)\n__all__ = [ os.path.basename(f)[:-3] for f in glob.glob(curr_path + \"/*.py\")]\n\nclass Filter:\n _filters = dict()\n\n @classmethod\n... | python | edit | 1 | 7 | mit | 1c60efdf0b0e2c1b49024ab14b8c012a1acaa71d | diNard/Saw | saw/filters/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The search command.\"\"\"\n\nfrom paci.helpers import display_helper, cache_helper\nfrom .base import Base\n\n\nclass Search(Base):\n \"\"\"Searches for a package!\"\"\"\n\n def run(self):\n pkg_name = self.options[\"<pac... | python | edit | 1 | 2 | mit | ca5877d66698179a3c26d12938dfac10cd19d932 | tradebyte/paci,tradebyte/paci | paci/commands/search.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom linkcheck.utils import unignore\n\n\nclass Command(BaseCommand):\n\n help = \"Goes through all models registered with Linkcheck and records any links found\"\n\n def execute(... | python | edit | 1 | 1 | bsd-3-clause | 402e9c8f5d25ac4f9011176d3714193e6fe92c77 | DjangoAdminHackers/django-linkcheck,DjangoAdminHackers/django-linkcheck | linkcheck/management/commands/unignore_links.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Triangle Project Code.\n\n# Triangle analyzes the lengths of the sides of a triangle\n# (represented by a, b and c) and returns the type of triangle.\n#\n# It returns:\n# 'equilateral' ... | python | edit | 1 | 9 | mit | 3156cfcfb4bd642fe742bb36909e7b9b87e15963 | JesusMtnez/devexperto-challenge,JesusMtnez/devexperto-challenge | jesusmtnez/python/koans/koans/triangle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.conf import settings\n\nfrom tenant.utils import parse_connection_string\nfrom tenant.utils import connect_tenant_provider, disconnect_tenant_provider\nfrom tenant import settings as tenant_settings... | python | edit | 10 | 1 | bsd-3-clause | 78c100ac31c00f4b1c90eb897df2fd5062bf4b0f | allanlei/django-multitenant | tenant/models.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n This example demonstrates a client fetching images from a server running img_server.py.\n\n The first packet contains the number of chunks to expect, and then that number of chunks is read.\n Lost pa... | python | edit | 1 | 0 | mit | 41eb6c371bb334acac25f5b89be1bb3312d77cc1 | thusoy/nuts-auth,thusoy/nuts-auth | examples/img_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom astropy.tests.helper import remote_data\nfrom astroquery.dace import Dace\n\nHARPS_PUBLICATION = '2009A&A...493..639M'\n\n\n@remote_data\nclass TestDaceClass(unittest.TestCase):\n\n def test_should_get_radial_veloci... | python | edit | 1 | 4 | bsd-3-clause | b618912444a1f30423432347c1ae970f28799bea | imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery | astroquery/dace/tests/test_dace_remote.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '2.0.0'\n\ndef get_account(using=None):\n from django.conf import settings\n accounts = settings.SMSGATEWAY_ACCOUNTS\n if using is not None:\n return accounts[using]\n else:\n return accounts[accounts... | python | edit | 1 | 3 | bsd-3-clause | 2261a15132a0b98821cb3e5614c044f1b41fbc73 | peterayeni/django-smsgateway,mvpoland/django-smsgateway,peterayeni/django-smsgateway,mvpoland/django-smsgateway,peterayeni/django-smsgateway,peterayeni/django-smsgateway,mvpoland/django-smsgateway | smsgateway/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\".\"\"\"\n\nclass AmplitudeLimiter(object):\n \"\"\".\"\"\"\n\n def __init__(self, f, *args, **kwargs):\n \"\"\"If thereareno decorator args the function tobe decorated is passed to the constructor.\"\"\"\n # print(... | python | edit | 1 | 2 | mit | 99b6e39a333801dc1cfc73665dde24459d244ae4 | DavidLutton/EngineeringProject | labtoolkit/Utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_wtf import FlaskForm\nfrom wtforms import StringField, TextAreaField, PasswordField, HiddenField\nfrom wtforms.validators import DataRequired, Length, URL, Optional\n\nclass LoginForm(FlaskForm):\n username = StringField('User... | python | edit | 3 | 0 | mit | cf0033ee371925218237efdb613bcd312c0faefa | tortxof/flask-password,tortxof/flask-password,tortxof/flask-password | forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, Response\nfrom sense_hat import SenseHat\n\n\nsense = SenseHat()\nsense.set_imu_config(True, True, True)\napp = Flask(__name__)\n\n\n@app.route('/')\ndef all_sensors():\n return \"Hello, world!\"\n\n\n@app.route(... | python | edit | 3 | 1 | mit | fe5c50c36170ed642f1ff3403d53e684e836483e | misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot | Sense/src/main/python/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom nose.tools import *\n\nfrom libeeyore.cpp.cppcompiler import CppCompiler\n\n\nclass FakeProcess( object ):\n def __init__( self, sys_op, retcode ):\n self.sys_op = sys_op\n self.returncode = retcode\n\n def commun... | python | edit | 6 | 2 | mit | 9a08ca765744f63e5711a5d745d82280eb48b8b5 | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper | src/test/testcppcompiler.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A plugin to format test names uniformly for easy comparison\n\nUsage:\n\n # collect django tests\n COLLECT_ONLY=1 ./manage.py test -v2 --settings=settings 2> tests-django.txt\n\n # collect nose tests\n ./manage.py test -v2... | python | edit | 1 | 6 | bsd-3-clause | 6814bed9918640346e4a096c8f410a6fc2b5508e | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/tests/noseplugins/uniformresult.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport logbook\n\n\nlogger = logbook.Logger(\"SimpleSQLie\")\nlogger.disa... | python | edit | 1 | 3 | mit | 0613c115f0ffccda8c6de9021c44d11085d84a1b | thombashi/SimpleSQLite,thombashi/SimpleSQLite | simplesqlite/_logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nThe management of salt command line utilities are stored in here\n'''\n# Import python libs\nimport optparse\nimport os\nimport sys\n\n# Import salt components\nimport salt.client\n\nclass SaltCMD(object):\n '''\n The execution o... | python | edit | null | null | apache-2.0 | 35e1ba57785734789357f03a738e4d65152bb775 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/cli/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nltk.tokenize import word_tokenize, sent_tokenize\nimport getopt\nimport sys\nimport os\nimport io\n\ndef load_data(dir_doc):\n\tdocs = {}\n\tfor dirpath, dirnames, filenames in os.walk(dir_doc):\n\t\tfor name in filenames:\n\t\t\tfile... | python | edit | 4 | 3 | mit | 7bc2d9f96a5e5bb677e8ea17bebe22516d78243c | ikaruswill/vector-space-model,ikaruswill/boolean-retrieval | index.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import gettext_lazy as _\nfrom django.urls import reverse\n\nfrom .menu import menu_registry, MenuItem\n\n\nclass AccountConfig(AppConfig):\n name = 'froide.account'\n v... | python | edit | 1 | 3 | mit | a6fc4d88d628fc86498ae7188350c915d514c3a7 | fin/froide,fin/froide,fin/froide,fin/froide | froide/account/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2007-2014 University Of Southern California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n... | python | edit | 1 | 0 | apache-2.0 | a870433fab72fe184f12353397ad916aabe5cb61 | pegasus-isi/pegasus-gtfar,pegasus-isi/pegasus-gtfar,pegasus-isi/pegasus-gtfar,pegasus-isi/pegasus-gtfar | pegasus/gtfar/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom deployer.celery import app\n\nif __name__ == '__main__':\n argv = sys.argv if len(sys.argv) > 1 else [__file__, '--loglevel=info']\n app.worker_main(argv=argv)\n\n```\n\nApply this change: Set concurrency to 2 for loc... | python | edit | 1 | 0 | mit | b89a6a10e2a1beafe893faa6eec6e2562ded7492 | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | local-celery.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nimport argparse\nfrom models import DiscussionMarker\nimport re\nfrom datetime import datetime\nfrom database import db_session\n\ndef main():\n parser = argparse.ArgumentPa... | python | edit | 1 | 5 | bsd-3-clause | 6c02e42db82b0dfa808ac904c79ce00ed1a0f549 | omerxx/anyway,njenia/anyway,njenia/anyway,esegal/anyway,esegal/anyway,hasadna/anyway,HamutalCohen3/anyway,njenia/anyway,OmerSchechter/anyway,esegal/anyway,hasadna/anyway,OmerSchechter/anyway,omerxx/anyway,boazin/anyway,HamutalCohen3/anyway,idogi/anyway,yosinv/anyway,idogi/anyway,boazin/anyway,idogi/anyway,yosinv/anyway... | load_discussions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\n\nclass Backend(object):\n \n def log(self, level, message):\n self.router.log(level, message)\n\n def start(self):\n raise NotImplementedError\n \n def sto... | python | edit | 1 | 1 | bsd-3-clause | c23cd25247974abc85c66451737f4de8d8b19d1b | dimagi/rapidsms,ehealthafrica-ci/rapidsms,eHealthAfrica/rapidsms,ken-muturi/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,unicefuganda/edtrac,catalpainternational/rapidsms,eHealthAfrica/rapidsms,ken-muturi/rapidsms,ken-muturi/rapidsms,lsgunth/rapidsms,unicefuganda/edtrac,lsgunth/rapidsms,ehealthafrica-ci/rapi... | lib/rapidsms/backends/backend.py | rejected_duplicate | Near-duplicate of sample 3142 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = \"Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento\"\n__date__ = \"Jun 28, 2012\"\n__version__ = \"2.0.0\"\n\n\"\"\"\nUseful aliases... | python | edit | 13 | 0 | mit | 19e84f0c528fd1c19dba709972f31343284c0a40 | gVallverdu/pymatgen,richardtran415/pymatgen,Bismarrck/pymatgen,fraricci/pymatgen,aykol/pymatgen,gpetretto/pymatgen,johnson1228/pymatgen,mbkumar/pymatgen,dongsenfo/pymatgen,gVallverdu/pymatgen,blondegeek/pymatgen,aykol/pymatgen,vorwerkc/pymatgen,dongsenfo/pymatgen,nisse3000/pymatgen,czhengsci/pymatgen,setten/pymatgen,gV... | pymatgen/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport abc\n\n\nclass PingParserInterface(object):\n\n @abc.abstractproperty\n... | python | edit | 1 | 1 | mit | 9d02361c034591e44e1a6d745911ef72a3591950 | thombashi/pingparsing,thombashi/pingparsing | pingparsing/_interface.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template import loader\nfrom django.template.backends.django import Template as DjangoTemplate\ntry:\n from django.template.backends.jinja2 import Template as Jinja2Template\nexcept ImportError:\n # Most likely Jinja2 isn'... | python | edit | 1 | 5 | isc | 5482bea32870b14fabc8a0c3b366371de5327873 | clokep/django-render-block,clokep/django-render-block | render_block/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'max'\n\nimport gpxpy\nimport pandas as pd\n\n\ndef parse_gpx(gpx_file_name):\n return gpxpy.parse(gpx_file_name)\n\n\ndef data_frame_for_track_segment(segment):\n seg_dict = {}\n\n for point in segment.points:\n ... | python | edit | 1 | 2 | mit | 6ea29a21a2bfd077891fbea1f60b97e92c33a32c | komax/gpx-pandas | gpxpandas/gpxreader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom operator import itemgetter\n\nimport numpy as np\nfrom lxml.etree import fromstring, XMLSyntaxError\n\n\ndef parse_lines(lines):\n for line in lines:\n try:\n xml_line = fromstring(line.encode('utf-8'))\n ex... | python | edit | 1 | 4 | mit | 8af8f3ab918a033fb250c06c4769ee3351ec9d5f | Mause/statistical_atlas_of_au | saau/utils/header.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add send_contact_{form,response} functions to mail init"
},
{
"role": "assistant",
"content": "__all__ = ['mail']\nfrom .mail import send_mail, SUBJECTS, send_contact_form, send_contact_response\n"
}
] | python | new_file | 7 | 0 | mit | b30d02bd077f1b7785c41e567aa4c4b44bba6a29 | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | backend/unimeet/mail/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport amqp\nfrom contextlib import closing\n\n\ndef __get_channel(connection):\n return connection.channel()\n\ndef __get_message(message_body):\n return amqp.Message(message_body)\n\ndef __declare_exchange(channel, exchange, type):\... | python | edit | 2 | 1 | mit | f649913f8941837e5de5ca7b5134c04858f52e32 | jdgillespie91/trackerSpend,jdgillespie91/trackerSpend | utils/publish_message.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\ncomparison.py - Comparison of analytic and calculated solutions\nCreated on 12 Aug 2010\n\n@author: Ian Huston\n'''\nfrom __future__ import division\n\nimport numpy as np\n\nimport analyticsolution\nimport calcedsolution\nimport fixtur... | python | edit | 1 | 1 | bsd-3-clause | f0bf059cfa7b6edc366a0b3246eac1f3ab68e865 | ihuston/pyflation,ihuston/pyflation | solutions/comparison.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import makedirs\nimport textwrap\n\nwith open('../resources/sounds/blip.wav', 'rb') as i:\n data = i.read()\n\nheader = \"\"\"\\\n#ifndef BLIP_H\n#define BLIP_H\n\n#include <cstdint>\n#include <vector>\n\nstatic std::vector<std::ui... | python | edit | 1 | 0 | mit | 42cb2842f38ab57daadb8f201815a028744db08c | lejar/SC8E,lejar/SC8E,lejar/SC8E | utils/wavconverter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nimport uuid\nfrom time import sleep\n\nif len(sys.argv) != 3:\n print \"Wrong number of args\"\n exit(1)\n \nworkflow_name = sys.argv[1]\nnum_runs = int(sys.argv[2])\n\nfor this_run in range(num_runs):\n \... | python | edit | 2 | 0 | mit | 18cc17e3f2ac36c0087b1867fcd18d0e876c34b8 | llevar/germline-regenotyper,llevar/germline-regenotyper | tracker/src/main/scripts/launch-workflow.py | rejected_duplicate | Near-duplicate of sample 13617 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Checkout Models\"\"\"\nimport functools\n\nfrom flask import redirect, url_for\nfrom fulfil_client.model import ModelType, StringType\nfrom shop.fulfilio import Model\nfrom shop.globals import current_cart, cu... | python | edit | 1 | 4 | bsd-3-clause | 9b54d728a245855cba724a91d372a15a4f4abb6d | joeirimpan/shop,joeirimpan/shop,joeirimpan/shop | shop/checkout/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 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\nimport logging\nimport time\nimport unittest\n\nfrom telemetry.core impor... | python | edit | 1 | 3 | bsd-3-clause | a5f4636e5bea14770253e646b94970c226669e50 | SummerLW/Perf-Insight-Report,benschmaus/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult,sahiljain/catapult,benschmaus/catapult,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,benschmaus/catapult,sahiljain/catapu... | telemetry/telemetry/core/platform/platform_backend_unittest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Banks' header configurations.\nStored in a dictionary where the keys are bank names in lowercase and\nonly alpha-characters. A bank's header should include \"date\" and\n\"amount\", otherwise it cannot be parsed since YNAB requires t... | python | edit | 1 | 3 | mit | 8a9e2666e173078ea98e52522442e6e943cc9e6e | adnilsson/Bank2YNAB | banks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport platform\n\n\nclass OSXDodger(object):\n allowed_version = \"10.12.1\"\n\n def __init__(self, applications_dir):\n self.app_dir = applications_dir\n\n def load_applications(self):\n \"\"\"\n Read all app... | python | edit | 1 | 3 | mit | a5fd2ece2f318030d7790014add66d1e5019ef0d | yoda-yoda/osx-dock-dodger,denisKaranja/osx-dock-dodger | dodge.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# IkaLog\n# ======\n# Copyright (C) 2015 Takeshi HASEGAWA, Junki MIZUSHIMA\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except ... | python | edit | 4 | 0 | apache-2.0 | b1aac6a0b29a6ed46b77aab37ff52c765a280ec6 | deathmetalland/IkaLog,hasegaw/IkaLog,deathmetalland/IkaLog,hasegaw/IkaLog,hasegaw/IkaLog,deathmetalland/IkaLog | ikalog/utils/matcher.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nversion = '0.5.1'\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.txt')).read()\n CHANGES = open(os.path.join(here, 'docs/HI... | python | edit | 1 | 0 | mit | 0b5e16ad77aebdde05dbffef78265755c779bb8b | TurboGears/tgext.admin,TurboGears/tgext.admin | setup.py | rejected_duplicate | Near-duplicate of sample 4650 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n##\n## $Id: __init__.py,v 1.10 2009/04/09 13:13:18 dmartinc Exp $\n##\n## This file is part of CDS Indico.\n## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.\n##\n## CDS Indico is free software; you can redi... | python | edit | 1 | 0 | mit | 6ebf55543e74771a80f4e871af5b3cfc8f845101 | OmeGak/indico,mvidalgarcia/indico,DirkHoffmann/indico,mic4ael/indico,mic4ael/indico,pferreir/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,mic4ael/indico,DirkHoffmann/indico,pferreir/indico,OmeGak/indico,pferreir/indico,mic4ael/indico,indico/indico,mvidalgarcia/indico,ThiefMaster/indico,DirkHoffmann/indico,i... | indico/MaKaC/plugins/Collaboration/RecordingManager/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages # This setup relies on setuptools since distutils is insufficient and badly hacked code\n\nversion = '3.0.0'\nauthor = 'David-Leon Pohl, Jens Janssen'\nauthor_email = '<EMA... | python | edit | 1 | 0 | mit | 329fc2bce695e8e750c82d9508fa4f31698e4303 | SiLab-Bonn/pixel_clusterizer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nfrom setuptools import setup\n\nsetup(\n name='sseclient',\n version='0.0.7',\n author='Brent Tubbs',\n author_email='<EMAIL>',\n py_modules=['sseclient'],\n install_requires=['requests>=1.2.0', 'six'],\... | python | edit | 1 | 0 | mit | 65691f0781253b68f67faa71b0e81d3ae1d0c363 | btubbs/sseclient | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport codecs\nfrom setuptools import setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n # intentionally *not* adding an encoding option to open\n return codecs.open(os.path.join(here, *part... | python | edit | 1 | 1 | apache-2.0 | dfc12de614ba1cff12d2fb2654234af1a9a8e862 | nir0s/backtrace | 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 setup\nimport versioneer\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(here, \"README.md\"), encoding=\"utf-8\") as f:\n long_description = f.read(... | python | edit | 1 | 0 | bsd-3-clause | b2f5b4d731cbed5094233b94cadc3a10fe9fe0c4 | intake/filesystem_spec,fsspec/filesystem_spec,fsspec/filesystem_spec | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom distutils.core import setup\n\nsetup(\n name='AMFM_decompy',\n version='1.0.4',\n author='Bernardo J.B. Schmitt',\n author_email='<EMAIL>',\n packages=['amfm_decompy'],\n scripts=['bin/AMFM_... | python | edit | 1 | 0 | mit | 1f64bb362beb1e14f358e4018b553356eaf99ce7 | bjbschmitt/AMFM_decompy | 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='django-robots',\n version=__import__('robots').__version__,\n description='Robots exclusion application for Django, complementing Sitemaps.',\n long_description=open(... | python | edit | 1 | 0 | bsd-3-clause | db6b3342b77b3a490007761398873fbb0234ccd5 | pbs/django-robots,pbs/django-robots,pbs/django-robots | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport os\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(here, 'README')) as f:\n README = f.read()\n\nrequires = []\n\nsetup(name='pytho... | python | edit | 1 | 0 | mit | ec7d1b675d4c86ec852350c1ca3923aaa7c17670 | petertodd/dust-b-gone | setup.py | rejected_duplicate | Near-duplicate of sample 11235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\ntry:\n import md5 # fix for \"No module named _md5\" error\nexcept ImportError:\n # python 3 moved md5\n from hashlib import md5\n\ntests_require = [\n \"dill\",\n \"coverage\",\n... | python | edit | 3 | 0 | apache-2.0 | a5d7d05f83f0d7a5f3e6148f362b671434088e14 | mailgun/expiringdict | 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\nreadme = open('README.md').read()\nhistory = open('HISTORY.md').read().replace('.. :changelog:', '')\n\nrequirements = [\n 'Django<=1.9',\n]... | python | edit | 1 | 0 | mit | 03f2ec08fbf2133bcc78047bf5346939a5fe4315 | vijaykatam/django-cache-manager | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.20'\n\nsetup(name='velruse',\n version=version,\n description=\"Simplifying third-party authentication for web applications.\",\n long_description=\"... | python | edit | 4 | 0 | mit | 9e46b546dbaf5f56527f8f88b6fa3046c39a4f67 | ImaginationForPeople/velruse,bbangert/velruse,ImaginationForPeople/velruse,miedzinski/velruse,bbangert/velruse,miedzinski/velruse | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.mako',\n version='1.0a4.dev0',\n description='Tangled Mako integration',\n long_description=open('README.rst').read(),\n url='http://tangledframework.org/',\n downlo... | python | edit | 1 | 0 | mit | 18b249b7d7c195a96e3449e5c9bdfd70f1cd16d1 | TangledWeb/tangled.mako | setup.py | rejected_duplicate | Near-duplicate of sample 13317 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nsetup(\n name='d4rl',\n version='1.1',\n install_requires=['gym', \n 'numpy', \n 'mujoco_py', \n ... | python | edit | 1 | 0 | apache-2.0 | 010627a11aae19bfd6b486b747c8390a0ecbbfde | rail-berkeley/d4rl,rail-berkeley/d4rl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='fortdepend',\n version='0.1.0',\n description='Automatically generate Fortran dependencies',\n author='Peter Hill',\n author_email='<EMAIL>',\n url='https://github.com/Zed... | python | edit | 1 | 0 | mit | 40b9fd2252156a4bf21e23b197df3c1cb83d0a6e | ZedThree/fort_depend.py,ZedThree/fort_depend.py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(\n name = \"javasphinx\",\n packages = [\"javasphinx\"],\n version = \"0.9.8\",\n author = \"Chris Thunes\",\n author_email = \"<EMAIL>\",\n url = \"http://github.com/bronto/javasphi... | python | edit | 1 | 0 | apache-2.0 | 6652e642e2a7d6388b8a80f072b3161db6f66ee3 | socib/javasphinx,bronto/javasphinx,Zyzle/javasphinx | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPyLatex\n-------\n\nPyLatex is a Python library for creating LaTeX files. The point of this library\nis being an easy, but extensible interface between Python and Latex.\n\n\n\"\"\"\nfrom distutils.core import setup\nsetup(name='PyL... | python | edit | 1 | 0 | mit | 72b41b512f4413c456cd0bfde7da349b5094aadd | sebastianhaas/PyLaTeX,JelteF/PyLaTeX,ovaskevich/PyLaTeX,ovaskevich/PyLaTeX,sebastianhaas/PyLaTeX,JelteF/PyLaTeX,bjodah/PyLaTeX,votti/PyLaTeX,jendas1/PyLaTeX,votti/PyLaTeX,bjodah/PyLaTeX,jendas1/PyLaTeX | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def run(s... | python | edit | 1 | 1 | bsd-3-clause | c4db7397e5b91d0efd30b0b7549adb8a266cb8d4 | consbio/gis-metadata-parser | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport subprocess\n\nsetup(name=\"singer-python\",\n version='5.0.7',\n description=\"Singer.io utility library\",\n author=\"Stitch\",\n classifiers=... | python | edit | 3 | 0 | apache-2.0 | 5f64cad0de80d6ecbbe4397161ae3b04620547ab | singer-io/singer-python | setup.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='hawkular-client',\n version='0.4.0',\n description='Python client to communicate with Hawkular over HTTP(S)',\n author='Michael Burman',\n author_e... | python | edit | 3 | 0 | apache-2.0 | 78747b26f642af4d1404df5a3a6d08160f07d2f0 | hawkular/hawkular-client-python,burmanm/hawkular-client-python,burmanm/hawkular-client-python,hawkular/hawkular-client-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# /setup.py\n#\n# Installation and setup script for parse-shebang\n#\n# See /LICENCE.md for Copyright information\n\"\"\"Installation and setup script for parse-shebang.\"\"\"\n\nfrom setuptools import find_packages, setup\n\nsetup(name=\"p... | python | edit | 1 | 0 | mit | 8c0b5f03c53f8d38d6fb0c2fed8787ccb97d6207 | polysquare/python-parse-shebang | setup.py | rejected_duplicate | Near-duplicate of sample 14242 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.