messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!usr/bin/env python\n# coding: utf-8\n\n__author__ = \"Jérôme Kieffer\"\n__license__ = \"MIT\"\n__date__ = \"05/09/2017\"\n__copyright__ = \"2015, ESRF\"\n\nimport unittest\nfrom .test_all import suite\n\n\ndef run():\n runner = unittes... | python | edit | 1 | 2 | mit | 493637ace6881defedee22971f3bc39fe9a5bd0a | kif/freesas,kif/freesas,kif/freesas | freesas/test/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom configparser import ConfigParser\nfrom driver import BTRFSDriver\n\n\nclass Node:\n \"\"\"\n # Dummy config example\n [bk1-z3.presslabs.net]\n ssd = True\n \"\"\"\n def __init__(self, context):\n self._conf_pat... | python | edit | 1 | 3 | apache-2.0 | b3889bbdab80fb502c74b99b61cf36bae112ce2c | PressLabs/cobalt,PressLabs/cobalt | node/node.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pkg_resources import require\nrequire('pygelf==0.3.1')\nrequire(\"h5py==2.8.0\")\nrequire('pyzmq==16.0.2')\n```\n\nApply this change: Add new line to end of init file for Meta Writer application"
},
{
"role": "assistant",
"... | python | edit | 1 | 0 | apache-2.0 | ef03541b2b25ab9cf34deec554a19a32dad7fbec | percival-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,percival-det... | tools/python/odin_data/meta_writer/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom rest_framework import permissions, routers, serializers, generics, mixins\nfrom oauth2_provider.ext.rest_framework import TokenHasReadWriteScope\n\n\nclass UserSerializer(serializers.ModelSe... | python | edit | 1 | 4 | mit | 7d1463fc732cdc6aef3299c6d2bbe916418e6d6e | mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo | hkisaml/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nimport pygst\npygst.require('0.10')\nimport gst\nimport gobject\n\nfrom mopidy import config, ext\n\n\n__version__ = '1.0.0'\n\n\nclass Extension(ext.Extension):\n dist_name = 'Mopi... | python | edit | 1 | 1 | apache-2.0 | eaae2a1e88572e224621e242be1d15e92065f15e | ZenithDK/mopidy-primare,mopidy/mopidy-nad | mopidy_nad/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom ufal.udpipe import Model, Pipeline, ProcessingError\n\nclass Parser:\n MODELS = {\n \"swe\": \"data/swedish-ud-2.0-170801.udpipe\",\n }\n\n def __init__(self, language):\n model_path = self.MODELS.get(... | python | edit | 1 | 4 | mit | 15f22d7c0ac9ddce6cb14cb0cbb35c4d630605d2 | EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger | api/ud_helper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\nfrom os.path import basename, dirname\nimport subprocess\n\n\ndef parse_file_name(file_name):\n if file_name is None:\n title = \"Untitled\"\n basepath = None\n else:\n title... | python | edit | 1 | 4 | mit | f5de027e14e50ff5085ac1765bdfd2ee7646cabb | facelessuser/PyMdown,facelessuser/PyMdown,facelessuser/PyMdown | extras/sublime_mdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.apps import AppConfig\n\n\nclass PartConfig(AppConfig):\n name = 'part'\n\n```\n\nApply this change: Check for missing part thumbnails when the server first runs"
},
{
"role"... | python | edit | 1 | 5 | mit | 7fb89e4dbe2cbed4ef37e13073d4fa3f2a650049 | inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree | InvenTree/part/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2021 The Pigweed Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the License at\n#\n# https://ww... | python | edit | 1 | 2 | apache-2.0 | ba5edd102ddd53f2e95da8b673bf14bdd72dc012 | google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed | pw_cli/py/pw_cli/argument_types.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nimport logging\nfrom datetime import datetime, timedelta\nfrom celery.decorators import task\nfrom hr.utils import blacklist_values\nfrom django.contrib.auth.models import User\nfrom django.core.mail import... | python | edit | 6 | 6 | bsd-3-clause | 9783844b1597598fad833794b4b291fce49438d4 | nikdoof/test-auth | app/hr/tasks.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom celery import shared_task\nfrom twisted.internet import reactor\nfrom scrapy.crawler import Crawler\nfrom scrapy import log, signals\nfrom scrapy.utils.project import get_project_settings\nimport... | python | edit | 3 | 1 | mit | e6e0d96790d71caccb3f00487bfeeddccdc78139 | legco-watch/legco-watch,comsaint/legco-watch,comsaint/legco-watch,legco-watch/legco-watch,comsaint/legco-watch,legco-watch/legco-watch,comsaint/legco-watch,legco-watch/legco-watch | app/raw/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib.request\nimport http.cookiejar\nimport DeployUtil.toolsession as session\n\n#TODO: give an indicator of success\n#TODO: handle errors a bit better.\n\ndef do_pair(ip, pin, **_args):\n\t# IF YOU DON'T DO THIS OVER HTTPS YOU WIL... | python | edit | 1 | 1 | mit | 55983401814bc0e7158d213885ebdfdbc7e02e9b | loarabia/DeployUtil | DeployUtil/authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom .__version__ import __author__, __copyright__, __email__, __license__, __version__\nfrom ._common import (\n Platform,\n ascii_symbols,\n normalize_platform,\n ... | python | edit | 39 | 0 | mit | e71870736959efcde2188bdcbd89838b67ca8582 | thombashi/pathvalidate | pathvalidate/__init__.py | rejected_lint | Too many lint violations: 39 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = ['imshow', 'imread', 'imsave', '_app_show']\n\nimport warnings\n\nmessage = '''\\\nNo plugin has been loaded. Please refer to\n\nskimage.io.plugins()\n\nfor a list of available plugins.'''\n\n\ndef imshow(*args, **kwargs):\n w... | python | edit | 1 | 1 | bsd-3-clause | 99818f02ebc46debe349a6c1b6bba70be6e04968 | oew1v07/scikit-image,robintw/scikit-image,rjeli/scikit-image,vighneshbirodkar/scikit-image,Hiyorimi/scikit-image,paalge/scikit-image,juliusbierk/scikit-image,ofgulban/scikit-image,bennlich/scikit-image,bsipocz/scikit-image,chriscrosscutler/scikit-image,vighneshbirodkar/scikit-image,keflavich/scikit-image,oew1v07/scikit... | skimage/io/_plugins/null_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom p1tr.helpers import clean_string\nfrom p1tr.plugin import *\n\n@meta_plugin\nclass Irc(Plugin):\n \"\"\"Provides commands for basic IRC operations.\"\"\"\n\n @command\n @require_master\n def nick(self, server, channel, nick... | python | edit | 12 | 3 | mit | d36e17e3823af74b5a6f75191f141ec98fdf281f | howard/p1tr-tng,howard/p1tr-tng | plugins/irc/irc.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2018 OneLogin, Inc.\n# MIT License\n\nfrom setuptools import setup\n\n\nsetup(\n name='python-saml',\n version='2.4.1',\n description='Onelogin Python Toolkit.... | python | edit | 1 | 0 | mit | d8e0109e4c697f4a920ff4993c491eb5b0d38d55 | onelogin/python-saml,onelogin/python-saml | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nclass Noah(object):\n pass\n```\n\nApply this change: Add list and define functions."
},
{
"role": "assistant",
"content": "import json\n\nclass Noah(object):\n def __init__(self, dictionary_file):\n ... | python | edit | 3 | 4 | mit | 9ee9ba34e447e99c868fcb43d40ce905cebf5fb9 | maxdeviant/noah | noah/noah.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import viewsets\n\nfrom paranuara_api.models import Company, Person\nfrom paranuara_api.serializers import (\n CompanySerializer, CompanyListSerializer, PersonListSerializer,\n PersonSerializer\n)\n\nclass ... | python | edit | 1 | 1 | bsd-3-clause | da5a05c27f1c19c69ce23f5cd6cd0f09edb9d7f7 | jarvis-cochrane/paranuara | paranuara_api/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup\n\nfrom mongorm import VERSION\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nversion = '.'.join(map... | python | edit | 1 | 1 | bsd-2-clause | 76f254582243dc927ca25eebf2b47702ef43167b | rahulg/mongorm | 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\n\n# Match releases to redis-py versions\n__version__ = '2.9.0.11'\n\n# Jenkins will replace __build__ with a unique value.\n__build__ = ''\n\nsetup(name='mockredispy',\n ... | python | edit | 1 | 0 | apache-2.0 | 075488b6f2b33c211b734dc08414d45cb35c4e68 | locationlabs/mockredis | setup.py | rejected_duplicate | Near-duplicate of sample 22368 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# © 2017-2019 qsuscs, TobiX\n# Should still run with Python 2.7...\n\nfrom __future__ import print_function, unicode_literals\n\nimport os\nimport sys\nfrom glob import glob\n\nos.chdir(os.pa... | python | edit | 1 | 0 | isc | 4b3dc61e5cb46774cf647f8c640b280aae1e4e90 | TobiX/dotfiles,TobiX/dotfiles | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport platform, sys\nfrom distutils.core import setup\nfrom distextend import *\n\npackages, package_data = findPackages(\"countershape\")\nsetup(\n name = \"countershape\",\n version = \"0.1\",\n description = \"A fra... | python | edit | 6 | 0 | mit | cf16c64e378f64d2267f75444c568aed895f940c | mhils/countershape,samtaufa/countershape,cortesi/countershape,cortesi/countershape,samtaufa/countershape,mhils/countershape | setup.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nVERSION = '1.2.2'\n\nsetup(\n name='pkgconfig',\n version=VERSION,\n author='Matthias Vogelgesang',\n author_email='<EMAIL>',\n url='http://github.com/matze/pkgconfig',\n license='MIT',\n ... | python | edit | 1 | 0 | mit | f8c049e1b6a6309d494771e4038aa10b40bfbf76 | matze/pkgconfig | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom setuptools import setup, find_packages\n\nsetup(name = \"django-image-cropping\",\n version = \"0.3.0\",\n description = \"A reusable app for cropping images easily and non-destructively in Djang... | python | edit | 2 | 0 | bsd-3-clause | ca7df2103a2e53f0b401c7004a2a5e942bd3e7e1 | winzard/django-image-cropping,henriquechehad/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping | setup.py | rejected_duplicate | Near-duplicate of sample 20268 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\nimport piazza_api\n\n\ndef read(filename):\n \"\"\"Read and return `filename` in root dir of project and return string\"\"\... | python | edit | 1 | 1 | mit | 70be93343a985b4aa81944649c42c4138fece388 | hfaran/piazza-api | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Plex(object):\n def __init__(self, plex):\n self.plex = plex\n\n def get_watched_episodes(self, section_name):\n watched_episodes = set(self.plex.library.section(section_name).searchEpisodes(unwatched=False))\n ... | python | edit | 1 | 2 | mit | c0c3d63c6124549008a2dc17c1e691e799129444 | verdel/plex2myshows | plex2myshows/modules/plex/plex.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: UTF-8 -*-\n# Copyright (C) 2009 Itaapy, ArsAperta, Pierlis, Talend\n\n# Import from itools\nfrom itools.pkg import get_version\n\n\n__version__ = get_version()\n\n```\n\nApply this change: Fix a bad import (get_version)"
},
... | python | edit | 1 | 0 | apache-2.0 | d896082b282d17616573de2bcca4b383420d1e7a | Agicia/lpod-python,lpod/lpod-docs,Agicia/lpod-python,lpod/lpod-docs | python/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright Google\n\n# BSD License\n\nimport copy\nimport wash\n\n# from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python\nclass color:\n PURPLE = '\\033[95m'\n CYAN = '\\033[96m'\n DARKCYAN = '\\033[36m'\n ... | python | edit | 3 | 4 | bsd-2-clause | 90c82f0936addeb4469db2c42c1cd48713e7f3cf | adlr/wash-sale-calculator | progress_logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf8\n\nimport os\n\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name='legitfs',\n version='0.3dev... | python | edit | 1 | 1 | mit | e1cc4d49f37abbda308968b1bf4f49298a1c904e | mbr/legitfs | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Contains the unit tests for the inner directory package\"\"\"\n\nimport unittest\nimport os\n\nfrom classyfd import Directory\n\nclass TestDirectory(unittest.TestCase):\n def setUp(self):\n self.fake_path = os.path.abspath(\... | python | edit | 3 | 1 | mit | e47b7e5952d4001459aee5ba570a7cc6d4c10d43 | SizzlingVortex/classyfd | tests/unit/directory/test_directory.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport sys\nfrom setuptools import setup, find_packages\nfrom cement.utils import version\n\nVERSION = version.get_version()\n\nf = open('README.md', 'r')\nLONG = f.read()\nf.close()\n\nsetup(name='cement',\n version=VERSION,\n desc... | python | edit | 3 | 0 | bsd-3-clause | 047215a3e07e7cebf78e409602dd57a2709f8923 | datafolklabs/cement,datafolklabs/cement,datafolklabs/cement | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport os\nimport re\nfrom setuptools import setup\nfrom m2r import parse_from_file\nimport restructuredtext_lint\n\n# Parser README.md into reStructuredText format\nrst_readme = parse_from_file('README.md')\n\n# Validate... | python | edit | 1 | 0 | mit | 3450712ec629c1720b6a6af28835d95a91b8fce7 | jongracecox/anybadge,jongracecox/anybadge | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: style(comments): Add comments about security issue\n\n- Added comments about two security issues relating to the session secret key"
},
{
"role": "assistant",
"content": "from wKRApp import app\n # 2 security flaws, need to sort ... | python | new_file | 1 | 0 | mit | d043eef098be68690b9d6cd5790b667cdb2d825b | stuffy-the-dragon/wKRApp,bafana5/wKRApp,stuffy-the-dragon/wKRApp,stuffy-the-dragon/wKRApp,bafana5/wKRApp,bafana5/wKRApp | runserver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport pytest\n\nif __name__ == '__main__':\n sys.exit(pytest.main())\n\n```\n\nApply this change: TST: Clarify py.test arguments in run_test.py"
},
{
"role": "assistant",
"content": "#!/usr... | python | edit | 1 | 0 | bsd-3-clause | b78ce84f2a36789fc0fbb6b184b5c8d8ebb23234 | ericdill/bluesky,ericdill/bluesky | run_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom .views import admin_main_dashboard, admin_users_dashboard, \\\n admin_users_create, admin_users_edit, admin_users_edit_form, \\\n admin_users_delete_modal, admin_use... | python | edit | 1 | 0 | mit | 803368f1741a9558ea84092dc975c1a10f51fa79 | erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online | administracion/urls.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\n\n\ndef split_models(apps, schema_editor):\n # We can't import the Person model directly as it may be a newer\n # version th... | python | edit | 3 | 3 | bsd-3-clause | 1a18445482c67b38810e330065e5ff04e772af4a | ad-m/foundation-manager,pilnujemy/pytamy,pilnujemy/pytamy,pilnujemy/pytamy,ad-m/foundation-manager,ad-m/foundation-manager,pilnujemy/pytamy,ad-m/foundation-manager | foundation/letters/migrations/0009_auto_20151216_0656.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\nimport shutil\n\nimport setuptools.command.egg_info as egg_info_cmd\nfrom setuptools import setup, find_packages\n\nSETUP_DIR = os.path.dirname(__file__)\nREADME = os.path.join(SETUP_DIR, 'REA... | python | edit | 5 | 0 | apache-2.0 | 16d509f2ff1af0f7588f302323c883edcd4384b4 | common-workflow-language/cwltest,common-workflow-language/cwltest | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.sqlalchemy',\n version='0.1a3.dev0',\n description='Tangled SQLAlchemy integration',\n long_description=open('README.rst').read(),\n url='http://tangledframework.org/',... | python | edit | 1 | 0 | mit | 1ba7e00ac7ef7f22aed22833940d3666d7584deb | TangledWeb/tangled.sqlalchemy | setup.py | rejected_duplicate | Near-duplicate of sample 15462 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nsetup(\n name=\"celery-redbeat\",\n description=\"A Celery Beat Scheduler using Redis for persistent storage\",\n long_description=long_description,\n ... | python | edit | 1 | 0 | apache-2.0 | e2e6cdac88ee03f78713ac4a50d0003a471a0027 | sibson/redbeat | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\nlongDesc = \"\"\nif os.path.exists(\"README.md\"):\n\tlongDesc = open(\"README.md\").read().strip()\n\nsetup(\n name = \"pytesseract\",\n version = \"0.1.6\",\n author = \"Samuel Hoffsta... | python | edit | 1 | 0 | apache-2.0 | 6ab083eede68946f4a87d24732cd82be09734d52 | madmaze/pytesseract | setup.py | rejected_duplicate | Near-duplicate of sample 1059 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom os.path import relpath, join\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\ndef find_package_data(data_root, package_root):\n files = []\n f... | python | edit | 1 | 3 | mit | 9822e412eb23b4860bcb24996dc2a912eba07d9c | open-forcefield-group/openforcefield,openforcefield/openff-toolkit,openforcefield/openff-toolkit,open-forcefield-group/openforcefield,open-forcefield-group/openforcefield | setup.py | rejected_duplicate | Near-duplicate of sample 12402 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\nimport sys\n\nsetup(name=\"OnionLauncher\",\n\tversion=\"0.0.1\",\n\tdescription=\"Launcher for Tor\",\n\tlicense = \"BSD\",\n\tauthor=\"Neel Chauhan\",\n\tauthor_email=\"<EMAIL>\",\n\t... | python | edit | 1 | 0 | bsd-2-clause | fb166c2afa110b758efbc8aeae9ff177050bfa0c | neelchauhan/OnionLauncher | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup, Extension\n\nsetup(name='python-pytun',\n author='montag451',\n author_email='montag451 at laposte.net',\n maintainer='montag451',\n maintainer_email='montag451 at laposte.net',\n u... | python | edit | 1 | 0 | mit | 04a31c02c8186505e6e211e76903e5f1b62b3f90 | montag451/pytun,montag451/pytun | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2012-2014 MUJIN Inc\nfrom distutils.core import setup\ntry:\n from mujincommon.setuptools import Distribution\nexcept ImportError:\n from distutils.dist import Distribution\n\nversion = {}\nexe... | python | edit | 1 | 0 | apache-2.0 | 3352920f7e92e2732eb2914313bdee6b5ab7f549 | mujin/mujincontrollerclientpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.words.protocols import irc\nfrom txircd.modbase import Command\nimport string\n\nclass UserCommand(Command):\n def onUse(self, user, data):\n if not user.username:\n user.registered -= 1\n user.setUs... | python | edit | 1 | 5 | bsd-3-clause | fb3983017da558018fd0de7ef10a4c0e98bbb0ec | Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd | txircd/modules/cmd_user.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\n\nsetup(\n name=\"valideer\",\n version=\"0.4.1\",\n description=\"Lightweight data validation and adaptation library for Python\",\n long_description=open(\"... | python | edit | 1 | 0 | mit | 71acce577d1fc7d3366e1cc763433f18bbdfdc00 | gsakkis/valideer,podio/valideer | 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\n\n\nsetup(\n name='gallerize',\n version='0.3.1',\n description='Create a static HTML/CSS image gallery from a bunch of images.',\n author='Jochen Kupperschmidt',\n autho... | python | edit | 1 | 1 | mit | 52dc4fe9618aef6434f8f7d5fdaf592bb81c1fbe | homeworkprod/gallerize,homeworkprod/gallerize | setup.py | rejected_duplicate | Near-duplicate of sample 15892 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport account\n\n\nsetup(\n name=\"django-user-accounts\",\n version=account.__version__,\n author=\"Brian Rosner\",\n author_email=\"<EMAIL>\",\n description=\"a Django user ac... | python | edit | 1 | 0 | mit | 4d6fdc98fd681a78eeeff6041efdfe7107a9743c | GeoNode/geonode-user-accounts,ntucker/django-user-accounts,nderituedwin/django-user-accounts,mysociety/django-user-accounts,pinax/django-user-accounts,jawed123/django-user-accounts,pinax/django-user-accounts,ntucker/django-user-accounts,jpotterm/django-user-accounts,nderituedwin/django-user-accounts,jawed123/django-use... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nimport conveyor\n\n\ninstall_requires = [\n \"APScheduler\",\n \"forklift\",\n \"redis\",\n \"xmlrpc2\",\n]\n\nsetup(\n name=\"conveyor\",\n version=con... | python | edit | 1 | 0 | bsd-2-clause | 6da15fd8f95638d919e47fe1150acce5a9401745 | crateio/carrier | setup.py | rejected_duplicate | Near-duplicate of sample 14185 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='pyhaproxy',\n version='0.3.0',\n keywords=('haproxy', 'parse'),\n description='A Python library to parse haproxy configuration file',\n license='MIT License',\n ... | python | edit | 1 | 0 | mit | 9712dd202f4fe5ee3938dbea987ced267a5199e5 | imjoey/pyhaproxy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# test builtin hash function\n\nprint(hash(False))\nprint(hash(True))\nprint({():1}) # hash tuple\nprint({1 << 66:1}) # hash big int\nprint(hash in {hash:1}) # hash function\n\ntry:\n hash([])\nexcept TypeError:\n print(\"TypeError\")... | python | edit | 1 | 1 | mit | 7bab32ef89d760a8cf4aeb2700725ea88e3fc31c | martinribelotta/micropython,puuu/micropython,ganshun666/micropython,suda/micropython,EcmaXp/micropython,ChuckM/micropython,mgyenik/micropython,pramasoul/micropython,infinnovation/micropython,bvernoux/micropython,xyb/micropython,lbattraw/micropython,adafruit/circuitpython,blazewicz/micropython,tobbad/micropython,kostyll... | tests/basics/builtin_hash.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-ajax-utilities\",\n url = 'https://github.com/citylive/django-ajax-utilities',\n license = 'BSD',\n description = \"Pagination, xhr and tabbing utilities fo... | python | edit | 1 | 0 | bsd-3-clause | 0936621b0a4162589560cc112f4f8e4425fed652 | vikingco/django-ajax-utilities,vikingco/django-ajax-utilities,vikingco/django-ajax-utilities | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py - build script for parquet-python.\"\"\"\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='parquet',\n version='1.2',\n description='Python support... | python | edit | 1 | 0 | apache-2.0 | bfc85ac3d2b29e5287fa556e0e2215bc39668db5 | jcrobak/parquet-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\"\"\"\r\n:Author Patrik Valkovic\r\n:Created 23.06.2017 16:39\r\n:Licence GNUv3\r\nPart of grammpy\r\n\r\n\"\"\"\r\nfrom unittest import TestCase, main\r\nfrom grammpy.RawGrammar import RawGrammar\r\n\r\n\r\nclass ... | python | edit | 1 | 1 | mit | 85d2c012bfaeeb04fa8dd31cd05a04a8dc43c14e | PatrikValkovic/grammpy | tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\nimport time\nimport uuid\n\nfrom google.appengine.api import urlfetch\nfrom models import Profile\n\ndef getUserId(user, id_type=\"email\"):\n if id_type == \"email\":\n return user.email()\n\n if id_typ... | python | edit | 1 | 8 | apache-2.0 | d57161b9449faa1218e4dab55fe4b2bd6f0c3436 | swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app,swesterveld/udacity-nd004-p4-conference-organization-app | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom leak.version_parser import versions_split\n\n\ndef test_versions_split():\n pass\n\n\ndef test_wrong_versions_split():\n # too many dots\n assert versions_split('1.2.3.4') == [0, 0, 0]\n\n # test missing nu... | python | edit | 1 | 1 | mit | a52c84f092d89f89130c2696c98779e955f083dc | bmwant21/leak | tests/test_version_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\nimport argparse\n# from bioblend.galaxy import GalaxyInstance\nimport configparser\n\ndef upload_datasets_to_galaxy():\n # Arguments initialization\n parser = argparse.ArgumentParser(description=\"Script to upload ... | python | edit | 5 | 1 | mit | 2a7ed7c2d6f37c3b6965ad92b21cecc0a4abd91a | pajanne/galaxy-kickstart,pajanne/galaxy-kickstart | upload_datasets_to_galaxy.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Change save path to local path"
},
{
"role": "assistant",
"content": "import urllib\nurllib.urlretrieve('http://192.168.0.13:8080/photoaf.jpg', 'img.jpg')"
}
] | python | new_file | 1 | 0 | mit | e890ac9ef00193beac77b757c62911553cebf656 | adampiskorski/lpr_poc | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom website import settings\nfrom website.project import Node\nfrom website.project import utils\n\nfrom modularodm.query.querydialect import DefaultQueryDialect as Q\n\n\ndef activity():\n\n node_data = utils.get_node_data()\n if no... | python | edit | 1 | 2 | apache-2.0 | bc199a9eaa2416b35d1d691f580e6c9ca0b1a2ae | monikagrabowska/osf.io,binoculars/osf.io,monikagrabowska/osf.io,acshi/osf.io,laurenrevere/osf.io,cslzchen/osf.io,laurenrevere/osf.io,alexschiller/osf.io,monikagrabowska/osf.io,Johnetordoff/osf.io,alexschiller/osf.io,mluo613/osf.io,CenterForOpenScience/osf.io,chennan47/osf.io,mfraezz/osf.io,aaxelb/osf.io,alexschiller/os... | website/discovery/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport panoply\n\nKEY = \"panoply/2g866xw4oaqt1emi\"\nSECRET = \"MmM0NWNvc2wwYmJ4ZDJ0OS84MmY3MzQ4NC02MDIzLTQyN2QtODdkMS0yY2I0NTAzNDk0NDQvMDM3MzM1OTk5NTYyL3VzLWVhc3QtMQ==\" # noqa\n\nsdk = panoply.SDK(KEY, SECRET)\nsdk.write('r... | python | edit | 2 | 0 | mit | ac8d6210b1e48e7ce1131412b45d23846b7c73d2 | panoplyio/panoply-python-sdk | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ntry:\n import nose.commands\n extra_args = dict(\n cmdclass={'test': nose.commands.nosetests},\n )\nexcept ImportError:\n extra_args = dict()\n\nsetup(\n name='dear_astrid',\n version=... | python | edit | 1 | 0 | mit | 43dc6dc0a9b33de0db1f79f7470d69519192dc1f | rwstauner/dear_astrid,rwstauner/dear_astrid | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nEliot: An Opinionated Logging Library\n\n Suppose we turn from outside estimates of a man, to wonder, with keener\n interest, what is the report of his own consciousness about his doings or\n capacity: with what hindrances ... | python | edit | 1 | 0 | apache-2.0 | e968983001cced5391a163ab282ef2f2ded492f6 | ScatterHQ/eliot,ClusterHQ/eliot,ScatterHQ/eliot,iffy/eliot,ScatterHQ/eliot | eliot/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef jsonapi_exception_handler(exc, context):\n \"\"\"\n Custom exception handler that returns errors object as an array with a 'detail' member\n \"\"\"\n from rest_framework.views import exception_handler\n response = excep... | python | edit | 1 | 5 | apache-2.0 | 0c1b0a7787bd6824815ae208edab8f208b53af09 | Ghalko/osf.io,billyhunt/osf.io,wearpants/osf.io,asanfilippo7/osf.io,ticklemepierce/osf.io,kch8qx/osf.io,GageGaskins/osf.io,njantrania/osf.io,mluke93/osf.io,baylee-d/osf.io,alexschiller/osf.io,asanfilippo7/osf.io,wearpants/osf.io,kwierman/osf.io,leb2dg/osf.io,leb2dg/osf.io,chennan47/osf.io,arpitar/osf.io,leb2dg/osf.io,e... | api/base/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Mnemosyne configuration\n# =======================\n#\n# This file is a Python script. When run, the following variables will be\n# defined for you; you may change or add to them as you see fit.\n#\n# ``entries_dir``: a Maildir containing... | python | edit | 1 | 1 | isc | 4d46001296ad083df6827a9c97333f0f093f31bd | decklin/ennepe | example/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# markdown/__version__.py\n#\n# version_info should conform to PEP 386\n# (major, minor, micro, alpha/beta/rc/final, #)\n# (1, 1, 2, 'alpha', 0) => \"1.1.2.dev\"\n# (1, 2, 0, 'beta', 2) => \"1.2b2\"\nversion_info = (2, 6, 0, 'zds', 7)\n\... | python | edit | 1 | 5 | bsd-3-clause | 05c319f868215f832e97577f5e158edf82fab074 | zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown,zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown,zestedesavoir/Python-ZMarkdown,Situphen/Python-ZMarkdown | markdown/__version__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom nodes import Node\n\nclass Deduplicate(Node):\n char = \"}\"\n args = 1\n results = 2\n \n @Node.test_func([2], [4])\n @Node.test_func([1.5], [3])\n def double(self, inp: Node.number):\n ... | python | edit | 1 | 8 | mit | 68680b8b116e10ae4e35c39b8a62c0307ee65fe4 | muddyfish/PYKE,muddyfish/PYKE | node/deduplicate.py | rejected_duplicate | Near-duplicate of sample 18872 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#coding:utf-8\r\nimport urllib\r\nimport urllib2\r\nimport re\r\n\r\nfrom random import choice\r\n\r\nipList=['120.76.115.134:80','222.83.14.145:3128','119.188.94.145:80']\r\nthisIp=choice(ipList)\r\n\r\nkeyWord=urllib.quote('科学')\r\n\r\nur... | python | edit | 2 | 0 | mit | 10dc027ee15428d7ca210e0b74e5ae9274de0fa8 | YChrisZhang/PythonCrawler | lianXiangCi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom json_reader import *\nfrom config import *\n\ndef get_menus_data():\n\told_data = read_json_from_file(filenames[\"menus\"])\n\tif old_data == None or type(old_data) is not dict: # rewrite old_data and create ne... | python | edit | 5 | 5 | mit | 1421866ac3c4e4f1f09d17019d058aa903597df5 | Jntz/RuokalistaCommandLine | modules/menus_reader.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom builtins import range\nimport sys\nsys.path.insert(1,\"../../../\")\nimport h2o\nfrom tests import pyunit_utils\n##\n# Test out the cor() functionality\n# If NAs in the frame, they are skipped in calculation unless na.rm = F\n# If any ... | python | edit | 3 | 1 | apache-2.0 | ecc471f94dc2ca2931370e53948d9f674dd673d4 | mathemage/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,mathemage/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,michalkurka/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,jangorecki/h2o-3,michalkurka/h2o-3,h2o... | h2o-py/tests/testdir_munging/unop/pyunit_cor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nThese are some utilites used when writing and handling interpreters.\n'''\n\nimport shutil\nfrom cytoplasm import configuration\nfrom cytoplasm.errors import InterpreterError\n\ndef SaveReturned(fn):\n '''Some potential interpreters... | python | edit | 4 | 2 | mit | 4adb78fde502faed78350233896f3efd3f42816e | startling/cytoplasm | cytoplasm/interpreters.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file... | python | edit | 1 | 0 | apache-2.0 | 03fec45fa269a8badbe047b4911c655c3c952404 | alfasin/st2,Itxaka/st2,StackStorm/st2,StackStorm/st2,alfasin/st2,punalpatel/st2,punalpatel/st2,dennybaa/st2,alfasin/st2,punalpatel/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,peak6/st2,pixelrebel/st2,armab/st2,tonybaloney/st2,grengojbo/st2,Plexxi/st2,grengojbo/st2,emedvedev/st2,Plexxi/st2,nzlosh/st2,pixelrebel/... | st2client/st2client/models/action_alias.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, os.path\nimport random\nimport string\nimport json\n\nimport cherrypy\n\n\nfrom . import get_pic\n\n\n\nclass StringGenerator(object):\n @cherrypy.expose\n def index(self):\n return \"\"\"<html>\n <head>\n ... | python | edit | 4 | 1 | mit | c95bff54d8ff6534c40d60f34484f864cc04754a | DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat,DexterLB/bookrat | lib/web/web.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pytwitcherapi import chat\n\n\ndef test_eq_str(servers):\n assert servers[0] == '192.16.64.11:80',\\\n \"Server should be equal to the same address.\"\n\n\ndef test_noteq_str(servers):\n assert servers[0] != '192.16.64.50:... | python | edit | 1 | 1 | bsd-3-clause | 5934669c0edbd914d14612e16be7c88641b50bee | Pytwitcher/pytwitcherapi,Pytwitcher/pytwitcherapi | test/test_chat_chatserverstatus.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport begin\n\nimport twitterlib\n\n\n@begin.subcommand\ndef timeline():\n \"Display recent tweets from users timeline\"\n for status in begin.context.api.timeline:\n print u\"%s: %s\" % (status.user.scr... | python | edit | 4 | 2 | mit | 70181b3069649eddacac86dbcb49cb43733be0ec | aliles/cmdline_examples | tw_begins.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWrapper around linecache which decodes files to unicode according to PEP 263.\n\"\"\"\nimport functools\nimport linecache\nimport sys\n\nfrom IPython.utils import py3compat\nfrom IPython.utils import openpy\n\ngetline = linecache.ge... | python | edit | 5 | 1 | bsd-3-clause | ae916c1ee52941bb5a1ccf87abe2a9758897bd08 | ipython/ipython,ipython/ipython | IPython/utils/ulinecache.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport logging\n\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse as django_reverse, NoReverseMatch\nfrom django.contrib.staticfiles.storage import staticfiles_storage\n\nJINJA2_MUTE... | python | edit | 1 | 3 | bsd-3-clause | 31381728cb8d76314c82833d4400b4140fcc573f | akx/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja,akx/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,glogiotatidis/django-jinja,niwinz/django-jinja,akx/django-jinja,niwinz/django-jinja | django_jinja/builtins/global_context.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\nclass LowPassFilter(object):\n '''\n First order discrete IIR filter.\n '''\n def __init__(self, feedback_gain, initial_value=0.0):\n self.feedback_gain = np.ones_like(initial_value) * feedback_gain\... | python | edit | 1 | 2 | mit | 7f13b29cc918f63c4d1fc24717c0a0b5d2f5f8ad | jcsharp/DriveIt | filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hashlib\n\n\ndef get_gravatar_url(email):\n email_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()\n return \"http://www.gravatar.com/avatar/{}\".format(email_hash)\n\n```\n\nApply this change: Change gravatar url ... | python | edit | 1 | 1 | mit | 76829380376c31ea3f1e899770d1edffd1afc047 | SoPR/horas,SoPR/horas,SoPR/horas,SoPR/horas | apps/profiles/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Function to return a list of pvs from a given file\n\nimport pkg_resources\npkg_resources.require('aphla')\nimport aphla as ap\n\n\ndef get_pv_names(mode):\n ''' Given a certain ring mode as a string, return all available pvs '''\n ... | python | edit | 1 | 3 | apache-2.0 | 6dffa2d22fa5da3b2d8fbcdff04477ff0116bfc1 | razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects | utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 Rackspace Hosting\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 | b717696b5cff69e3586e06c399be7d06c057e503 | barnsnake351/nova,dawnpower/nova,alvarolopez/nova,JioCloud/nova_test_latest,joker946/nova,apporc/nova,cyx1231st/nova,dims/nova,klmitch/nova,mgagne/nova,openstack/nova,orbitfp7/nova,phenoxim/nova,rajalokan/nova,Stavitsky/nova,akash1808/nova_test_latest,apporc/nova,projectcalico/calico-nova,devendermishrajio/nova_test_la... | nova/tests/fake_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2017-02-21 02:55\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('see... | python | edit | 1 | 0 | mit | 3199b523a67f9c241950992a07fe38d2bbee07dc | RockinRobin/seednetwork,RockinRobin/seednetwork,RockinRobin/seednetwork | seedlibrary/migrations/0003_extendedview_fix.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2020, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\nfrom . import AWSObject, Tags\n\n\nVALID_CONNECTION_PROVIDERTYPE = ('Bitbucket')\n\n\ndef validate_connection_providertype(... | python | edit | 3 | 2 | bsd-2-clause | 02efde47b5cf20b7385eacaa3f21454ffa636ad7 | cloudtools/troposphere,cloudtools/troposphere | troposphere/codestarconnections.py | rejected_duplicate | Near-duplicate of sample 17059 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nImplementation of FTP-related features.\n\"\"\"\nfrom .core import BaseAgent\nfrom .common import address_to_host_port\n\n\nclass FTPAgent(BaseAgent):\n \"\"\"\n An agent that provides basic FTP functionality.\n \"\"\"\n ... | python | edit | 1 | 2 | apache-2.0 | dac0afb3db74b1e8cd144993e662dc8ac0622cb9 | opensistemas-hub/osbrain | osbrain/ftp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"PyPI\n\"\"\"\nfrom invoke import run\n\nfrom semantic_release import ImproperConfigurationError\n\n\ndef upload_to_pypi(\n dists: str = 'sdist bdist_wheel',\n username: str = None,\n password: str = None,\n ... | python | edit | 1 | 6 | mit | b628e466f86bc27cbe45ec27a02d4774a0efd3bb | relekang/python-semantic-release,relekang/python-semantic-release | semantic_release/pypi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom celery.signals import setup_logging\nimport orchestrator.logger\n\n__version__ = '0.5.1'\n__author__ = 'sukrit'\n\norchestrator.logger.init_logging()\nsetup_logging.connect(orchestrator.logger.in... | python | edit | 1 | 0 | mit | f6cad1777023ceb53db8599bc2e74bf0ab2aa0a7 | totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator | orchestrator/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport os\nfrom django.apps import apps, AppConfig\n\n\nAPPS_INCLUDE_DIRS = []\n\nclass SassProcessorConfig(AppConfig):\n name = 'sass_processor'\n verbose_name = \"S... | python | edit | 1 | 5 | mit | e76777897bed5b9396d126e384555ea230b35784 | jrief/django-sass-processor,jrief/django-sass-processor | sass_processor/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import session, redirect, url_for, g, jsonify, Response\nfrom flask.views import MethodView\nfrom server.models import Band\n\n\nclass RestrictedBandPage(MethodView):\n def dispatch_request(self, *args, **kwargs):\n if ... | python | edit | 1 | 5 | apache-2.0 | 569c056e016131ec4325185ee9fe814018d5e1fe | dennisausbremen/tunefish,dennisausbremen/tunefish,dennisausbremen/tunefish | server/bands/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom girder.api import access\nfrom girder.api.describe import Description\nfrom girder.api.rest import Resource\n\n\nclass TwoFishes(Resource):\n def __init__(self):\n self.resourceName = 'minerva_geocoder'\n ... | python | edit | 1 | 2 | apache-2.0 | f31e8215838e40960abff6c86be8c66cbf113c95 | Kitware/minerva,Kitware/minerva,Kitware/minerva | server/rest/twofishes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport argparse\nimport json\nfrom pathlib import Path\n\nfrom jinja2 import Template\nimport pyyaks.logger\n\n\ndef get_opt():\n parser = argparse.ArgumentParser(description='Get aimpoint drift data '... | python | edit | 1 | 1 | bsd-2-clause | 5d8e6e47964d80f380db27acd120136a43e80550 | sot/aimpoint_mon,sot/aimpoint_mon | aimpoint_mon/make_web_page.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\ndef move_data(apps, schema_editor):\n Product = apps.get_model('product', 'Product')\n ProductClass = apps.get_model('product', 'ProductClass')\n... | python | edit | 3 | 4 | bsd-3-clause | ec2456eac36a96c9819920bf8b4176e6a37ad9a5 | KenMutemi/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,tfroehlich82/saleor,tfroehlich82/saleor,car3oon/saleor,itbabu/saleor,KenMutemi/saleor,KenMutemi/saleor,UITools/saleor,UITools/saleor,jreigel/saleor,mociepka/saleor,tfroehlich82/saleor,itbabu/saleor,car3oon/saleor,UITools/saleor,... | saleor/product/migrations/0020_attribute_data_to_class.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n# Create your models here.\n\nclass AlignmentConsensus(models.Model):\n slug = models.SlugField(max_length=100, unique=True)\n alignment = models.BinaryField()\n```\n\nApply this change: Add field on ca... | python | edit | 1 | 0 | apache-2.0 | 3665b8859f72ec416682857ab22f7e29fc30f0df | cmunk/protwis,protwis/protwis,fosfataza/protwis,cmunk/protwis,fosfataza/protwis,protwis/protwis,protwis/protwis,fosfataza/protwis,cmunk/protwis,cmunk/protwis,fosfataza/protwis | alignment/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nfrom faker import Faker\nfrom .. import db\nfrom sqlalchemy.orm import validates\n\nclass CompletedApplication(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n student_profile_id = db.Column(\n db.Inte... | python | edit | 3 | 2 | mit | 78f3e210a105d4b096b48c33889ec1ed1f7fa1e9 | hack4impact/next-gen-scholars,hack4impact/next-gen-scholars,hack4impact/next-gen-scholars | app/models/completed_application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nimport json\n\nimport SocketExtend as SockExt\nimport config as conf\nimport parser as p\n\ndef ping(sock):\n\ttry:\n\t\trand = random.randint(1, 99999)\n\t\tdata = {'request':'ping', 'contents': {'value':rand}}\n\t\tSockExt.... | python | edit | 4 | 4 | bsd-2-clause | 80918b006ddf490096dbe4817162b3c1b8afd0d4 | mavroudisv/Crux | components/includes/utilities.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nimport pytest\n\nimport mbuild as mb\nfrom mbuild.utils.io import get_fn\nfrom mbuild.tests.base_test import BaseTest\nfrom mbuild.exceptions import MBuildError\n\n\nclass TestXYZ(BaseTest):\n def test_load_no_top(sel... | python | edit | 1 | 2 | mit | e90c7d034f070361893f77d7a257640d647be0c7 | iModels/mbuild,iModels/mbuild | mbuild/tests/test_xyz.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom katrid.conf.app_settings import *\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'katrid.db.backends.sqlite3',\n 'NAME': 'db.sqlite3',\n }\n}\n\nAUTH_USER_MODEL = 'base.user'\n\nINSTALLED_APPS.append('keops')\n\nSERIAL... | python | edit | 3 | 0 | bsd-3-clause | 350bd08bdea2df07928d8203680a8bc33d1a7eb1 | katrid/keops,katrid/keops,katrid/keops | keops/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nfrom redis import Redis\nimport time\nfrom messages import addSystemMessage\n\nSTARTTIME = 1302231346\nPING_PERIOD = 10\nSEARCH_PERIOD = 1\n\ndef getTime():\n return time.time() - STARTTIME\n\ndef getD(db, session, k... | python | edit | 3 | 2 | mit | 75d3ad43874e0db206958cdbd26fe4ab039d8d20 | MSPARP/MSPARP,MSPARP/MSPARP,MSPARP/MSPARP | reaper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDoes the following:\n\n1. Removes _version file and run versionner install if use_versionner == y\n\"\"\"\n\nfrom __future__ import print_function\nimport os\nfrom subprocess import call\n\n# Get the root project directory\nPROJECT_... | python | edit | 1 | 2 | mit | 5682c2a311dbaf94f0b7876b10cabbc90eb88628 | rlaverde/spyder-plugin-cookiecutter | hooks/post_gen_project.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom cabot.metricsapp.api import create_es_client\nfrom .base import MetricsSourceBase\n\n\nclass ElasticsearchSource(MetricsSourceBase):\n class Meta:\n app_label = 'metricsapp'\n\n def __str__(se... | python | edit | 1 | 2 | mit | 309e4a922729e38a855bd89982cef9b40ba55831 | Affirm/cabot,Affirm/cabot,Affirm/cabot,Affirm/cabot | cabot/metricsapp/models/elastic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import *\n\nurlpatterns = patterns('',\n \n (r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),\n (r'^upload/', 'signbank.video.views.addvideo'),\n (r'^delete/(?P<videoid>.*)$', 'signbank.video.view... | python | edit | 3 | 0 | bsd-3-clause | 5ac675b36c7c7ba9110b6b16e11a56f554ff8c8e | Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank | signbank/video/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='etlserver',\n version='0.1.0',\n packages=find_packages(),\n install_requires=[\n 'materials_commons==0.7.7b2',\n 'configparser',\n 'flask-api',\... | python | edit | 1 | 0 | mit | 0a4ee589b81c8d16bf3e0628081b45a7f67f670f | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/servers/etlserver/setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.