messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ConfigParser import SafeConfigParser\n\nclass ConfReader(object):\n def __init__(self, fn):\n defaults = {\n 'nick': 'pollirio',\n 'channel': '#polloalforno',\n 'server_addr': 'calvino.freenod... | python | edit | 1 | 4 | mit | 753aba188bcd8afa195c76886f11423e5761cf68 | dpaleino/pollirio,dpaleino/pollirio | pollirio/confreader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport kerneltest\n\nclass IRkernelTests(kerneltest.KernelTests):\n kernel_name = \"ir\"\n\n language_name = \"R\"\n\n code_hello_world = \"print('hello, world')\"\n\n completion_samples = [\n {\n ... | python | edit | 1 | 0 | mit | 8564a355473afe76c307701c5c347d58d0f7ca18 | ibm-et/IRkernel,ibm-et/IRkernel | test_ir.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# MIT License\n# Copyright (c) 2017 MassChallenge, Inc.\n\nfrom __future__ import unicode_literals\n\nfrom django.test import TestCase\n\nfrom accelerator.tests.factories import ProgramCycleFactory\n\n\nclass TestProgramCycle(TestCase):\n ... | python | edit | 1 | 4 | mit | ef695f9bbd24c88fd3b802c8964313c5a182fed5 | masschallenge/django-accelerator,masschallenge/django-accelerator | accelerator/tests/test_program_cycle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Headers\n__author__ = 'Somsubhra Bairi'\n__email__ = '<EMAIL>'\n\n# All imports\nfrom extras import Logger\n\nfrom nltk import PorterStemmer\n\n\n# Classify according to document frequency\nclass ITFIDFClassifier:\n\n # Constructor for... | python | edit | 3 | 5 | mit | f852fb6a8b0a64d6385cba32fd911cb8bad7f300 | Somsubhra/Enrich,Somsubhra/Enrich,Somsubhra/Enrich | src/classifiers/itfidf_classifier.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n#\n# setup.py\n# anytop\n#\n# Created by Lars Yencken on 2011-10-09.\n# Copyright 2011 Lars Yencken. All rights reserved.\n#\n\nfrom setuptools import setup\n\nsetup(\n name='anytop',\n version='0.2.1',\n ... | python | edit | 1 | 0 | isc | 05f6eb49cd16b56324606afe525fe4476db4a998 | larsyencken/anytop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the README file\nwith open(path.join(here, 'README.md'), encoding='utf-8') as f:\n ... | python | edit | 1 | 0 | mit | c4dd53c2d476a9daaed5c630c95c7e558a347ce3 | sveint/flask-swagger-ui,sveint/flask-swagger-ui,sveint/flask-swagger-ui | setup.py | rejected_duplicate | Near-duplicate of sample 16017 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom hypothesis import given\nfrom hypothesis.strategies import integers, text\n\nfrom datatyping.datatyping import validate\n\n\n@given(string=text())\ndef test_simple(string):\n assert validate(str, string) is None\n\n\n... | python | edit | 1 | 1 | mit | c092a9a836046aa098b8ac10f63bc60f70da9e76 | Zaab1t/datatyping | tests/test_str.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport argparse\n\nfrom wp.main import WordPath\n\n\ndef run(first_word, last_word):\n word_path = WordPath()\n word_path.load_word_list('tests/functional/misc/words', len(first_word))\n chain = word_path.find(first_word, last_wo... | python | edit | 1 | 1 | mit | dec2d1ce9bf0be0fa8e00b004ee59bfb66d4444a | reinaldons/word_paths,reinaldons/word_paths | wordpaths.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.paginator import EmptyPage\nfrom django.core.paginator import PageNotAnInteger\nfrom django.core.paginator import Paginator\nfrom mrbelvedereci.build.models import Build\n\ndef paginate(build_list, request):\n page = req... | python | edit | 1 | 4 | bsd-3-clause | 4e8c3e66b6956c88adcf275d771d06fad0c0bb34 | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | mrbelvedereci/build/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name='windpowerlib',\n version='0.1.2dev',\n description='Creating time series of win... | python | edit | 1 | 1 | mit | f6dca8d01660c77f64ea1ed0e004fb6e14f69115 | wind-python/windpowerlib | setup.py | rejected_duplicate | Near-duplicate of sample 5713 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nsetup(\n name = \"prometheus_client\",\n version = \"0.0.18\",\n author = \"Brian Brazil\",\n author_email = \"<EMAIL>\",\n description = (\"Python client for the Prometheus monitori... | python | edit | 3 | 0 | apache-2.0 | 0c1220aae6e95e6ec8d93f0605819aa4a29959ad | prometheus/client_python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom capstone.game import TicTacToe\nfrom capstone.player import MonteCarlo, RandPlayer\nfrom capstone.util import play_series\n\ngame = TicTacToe()\nplayers = [MonteCarlo(), RandPlayer()]\nn_matches = 10\nplay_series(game, players, n_match... | python | edit | 1 | 0 | mit | ab98637aa949a02618f6b119983f40bcbde80d43 | davidrobles/mlnd-capstone-code | examples/play_series_montecarlo_vs_random.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\n# Django REST Framework\nfrom rest_framework import pagination\nfrom rest_framework.utils.urls import replace_query_param\n\n\nclass Pagination(pagination.PageNumberPagination):\... | python | edit | 1 | 4 | apache-2.0 | 08edbb1b723880ac81b63e5d1ca31c331f79b0a8 | snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx | awx/api/pagination.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom rest_framework import mixins\n\nfrom nodeconductor.core.models import SynchronizableMixin, SynchronizationStates\nfrom nodeconductor.core.exceptions import IncorrectStateException\n\n\nclass L... | python | edit | 1 | 5 | mit | 3c44db39295945d544ba5a9fc20b2c5dddf4346d | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/core/mixins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(name='scattertext',\n version='0.0.2.22',\n description='An NLP package to visualize interesting terms in text.',\n url='https://github.com/JasonKessler/scattertext',\n ... | python | edit | 1 | 0 | apache-2.0 | b55676c4cfb2d662c9a82d17504db091449e3992 | JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\n\nclass SplitNavigationCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit, direction):\n\t\twin = self.view.window()\n\t\tnum = win.num_groups()\n\t\tact = win.active_group()\n\t\tif direction == \"up... | python | edit | 3 | 3 | mit | b6ccc6b6ae6c5fab45f7a27dbecbda88cc8775b8 | oleander/sublime-split-navigation,oleander/sublime-split-navigation | SplitNavigation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport time\n\n\ndef trigger(updateq):\n current_time = datetime.datetime.now()\n delta = datetime.timedelta(seconds=10)\n while True:\n time.sleep(10)\n current_time += delta\n updateq.put(\"u... | python | edit | 1 | 2 | mit | 05c203f5ec79054c6616a8f822ff20f2db0ae07b | Zloool/manyfaced-honeypot | trigger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef read(filename):\n return open(os.path.join(os.path.dirname(__file__), filename)).read()\n\n\nsetup(\n name='gears-coffeescript',\n version='0.1',\n url='https://git... | python | edit | 1 | 1 | isc | e5d31386cc8e37a4d2b7863865659dd3e956200f | gears/gears-coffeescript,gears/gears-coffeescript | setup.py | rejected_duplicate | Near-duplicate of sample 4828 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration.\"\"\"\n\nimport logging\nimport os\nimport re\n\nfrom google.appengine.ext.appstats import recording\n\nlogging.info('Loading %s from %s', __name__, __file__)\n\n# Custom webapp middleware to add Appstats.\ndef webapp_a... | python | edit | 1 | 8 | apache-2.0 | 66e0e8e2cb202ca3f4832bf728bfd53c084d6f62 | rietveld-codereview/rietveld,openlabs/cr.openlabs.co.in,salomon1184/rietveld,foolonhill/rietveld,andyzsf/rietveld,arg0/rietveld,google-code-export/rietveld,berkus/rietveld,aungzanbaw/rietveld,v3ss0n/rietveld,DeanHere/rietveld,draem0507/rietveld,rietveld-codereview/rietveld,andyzsf/rietveld,dushmis/rietveld,robfig/rietv... | appengine_config.py | rejected_duplicate | Near-duplicate of sample 13598 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(name = 'OWSLib',\n version = '0.1.0',\n description = 'OGC Web Service utility library',\n license = 'GPL',\n keywords = 'gis ogc ows wfs wms capabiliti... | python | edit | 1 | 0 | bsd-3-clause | af406d09ded10dbdfcc1d752f1cfe1d4bfe8f7d5 | daf/OWSLib,datagovuk/OWSLib,kalxas/OWSLib,bird-house/OWSLib,kwilcox/OWSLib,datagovuk/OWSLib,KeyproOy/OWSLib,Jenselme/OWSLib,b-cube/OWSLib,QuLogic/OWSLib,robmcmullen/OWSLib,geopython/OWSLib,daf/OWSLib,jaygoldfinch/OWSLib,mbertrand/OWSLib,ocefpaf/OWSLib,tomkralidis/OWSLib,dblodgett-usgs/OWSLib,JuergenWeichand/OWSLib,daf/... | setup.py | rejected_duplicate | Near-duplicate of sample 11757 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='beets-alternatives',\n version='0.8.3-dev',\n description='beets plugin to manage multiple files',\n long_description=open('README.md').read(),\n author='Thomas Scholtes',\n a... | python | edit | 1 | 0 | mit | ed3bc448cf3d9d9c4562df0d9dbe20de01e5f104 | geigerzaehler/beets-alternatives | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='tattle',\n version='0.1.2',\n packages=[\n 'tattle',\n ],\n url='https://github.com/cloudify-cosmo/tattle',\n author='Gigaspaces',\n author_email='<EMAIL>',\n ent... | python | edit | 1 | 0 | apache-2.0 | 5bee4a276cdfa221345b88c80e29fcb4c68fe1cc | cloudify-cosmo/tattle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nreadme = open('README.rst').read()\n\nrequirements = {\n \"package\": [\n \"PyYAML\",\n ],\n \"test\": [\n \"nose\",... | python | edit | 1 | 0 | mit | 4a119842061152700f16fe24ba10c07cdf706d3a | KyleJamesWalker/yamlsettings | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\nimport io\n\ncurrent_dir = os.path.dirname(os.path.abspath(__file__))\n\nwith io.open(os.path.join(current_dir, \"README.rst\"), \"rt\") as f:\n long_desc = f.read()\n\nsetup(\n ... | python | edit | 1 | 0 | mit | dfe29829fc64f07fb8c3c5fbf8739b9bdb89e721 | davidwaroquiers/monty,materialsvirtuallab/monty,gmatteo/monty,davidwaroquiers/monty,materialsvirtuallab/monty,gmatteo/monty | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='mypytools',\n version='0.1.13',\n description='A bundle of tools to make using mypy easier',\n url='https://github.com/nylas/mypy-tools',\n license='MIT',\n install_requir... | python | edit | 1 | 0 | mit | db4214890b2f71c9bb7da760d726924a831eb609 | nylas/mypy-tools,nylas/mypy-tools | 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# pypi doesn't like markdown\n# https://github.com/pypa/packaging-problems/issues/46\ntry:\n import pypandoc\n description = pypandoc.convert('README.md', 'rst')\nexcept (IOErro... | python | edit | 1 | 0 | unlicense | 2b418376d455ec0645a16f5d6e8ed0e7da54d2b5 | gdevenyi/qbatch,pipitone/qbatch | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nreadme = open('README.rst').read()\nhistory = open('HISTORY.rst').read().replace('.. :changelog:', '')\n\nsetup(... | python | edit | 1 | 0 | bsd-3-clause | 0f7e40d28d932db7e87c40c32ddcbd0d59ae9edf | audreyr/binaryornot,audreyr/binaryornot,audreyr/binaryornot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef read_file(filename):\n \"\"\"Read a file into a string\"\"\"\n path = os.path.abspath(os.path.dirname(__file__))\n filepath = os.path.join(path, filename)\n try:\n ... | python | edit | 1 | 2 | mit | cbb72c027df55d2c9098eea7c89b756564d73b08 | katylava/django-hijackemail,zhuyue1314/django-hijackemail | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='polygraph',\n version='0.1.0',\n description='Python library for defining GraphQL schemas',\n url='https://github.com/yen223/polygraph/',\n author='Wei Yen, Lee',\n author_e... | python | edit | 1 | 0 | mit | b17a248e0ffc3992cabd19552697d60ee34eac91 | polygraph-python/polygraph | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name = 'infosystem',\n version = '0.1.13',\n summary = 'Infosystem Framework',\n url = 'https://github.com/samueldmq/infosystem',\n author = 'Samuel de Medeiros Queiro... | python | edit | 1 | 0 | apache-2.0 | ec975fa105eb2238661d6e29e7cb004560a5ede7 | samueldmq/infosystem | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(\n name='Pydm',\n version='0.1.1',\n description='Python Distributed Make',\n author='Kiran Garimella',\n author_email='<EMAIL>',\n packages=['dmpy'],\n)\n\n```\... | python | edit | 1 | 0 | mit | 3b2247729d7079f885ac3cebcf6581c23f0d550b | kvg/dmpy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py\n\n.. codeauthor:: John Lane <<EMAIL>>\n\n\"\"\"\n\nfrom setuptools import setup\nfrom pytest_needle import __author__, __email__, __license__, __version__\n\n\nsetup(name='pytest-needle',\n version=__version__,\n d... | python | edit | 1 | 0 | mit | 9f17c731fca8c5339c86ed03336cefa756c6c98a | jlane9/pytest-needle,jlane9/pytest-needle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport urllib2\nimport getopt\nimport time\n\ntarget = ''\ndepth = 10\nfile = 'etc/passwd'\n\nhtml = ''\nprefix = ''\nurl = ''\n\ndef usage():\n\t\tprint \"usage function\"\n\n\ntry:\n\t\topts,args = getopt.getopt(sys.argv[1:],\... | python | edit | 4 | 1 | apache-2.0 | 2fbead7ee90847a5c47d152f086d4a96f52733ce | KaiyiZhang/Secipt,KaiyiZhang/Secipt,KaiyiZhang/Secipt | LFI.TESTER.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Chris Krycho'\n__copyright__ = '2013 Chris Krycho'\n\nfrom logging import error\nfrom os import path, walk\nfrom sys import exit\n\ntry:\n from markdown import Markdown\n from mixins import DictAsMember\n\nexcept ImportE... | python | edit | 1 | 3 | mit | c745a6807a26173033bdbea8387e9c10275bb88d | chriskrycho/step-stool,chriskrycho/step-stool | step_stool/content.py | rejected_duplicate | Near-duplicate of sample 19814 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom flask import Response\n\n\ndef build_response(output, status=200, mimetype='application/json',\n headers={}):\n return Response(\n json.dumps(output),\n mimetype=mimetype\n ), status, ... | python | edit | 4 | 1 | mit | 77346899a001be6cee1f2bda50156647e6bca87a | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | deployer/views/util.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport psycopg2\nimport sys\nimport os\n\ndef parse_connection_uri():\n here, _ = os.path.split(__file__)\n with open(os.path.join(here, '../portal/application.cfg'), 'r') as fh:\n conn_strings = [l for l in ... | python | edit | 3 | 4 | bsd-3-clause | d24cd893e3969eba6b23ee98ff0787622685f8c6 | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | bin/testconnection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.views.generic import CreateView\n\nfrom .forms import AbstractPipelineCreateForm\n\n\nclass AbstractPipelineFormView(LoginRequiredMixin, CreateView):\n\n form_class =... | python | edit | 1 | 1 | mit | 10494456af67270f28853872dd8072f01872b6db | ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai,ccwang002/biocloud-server-kai | src/pipelines/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, include, url\n\nurlpatterns = patterns('django_actions.views',\n url(r'^(?P<app_n_model>[\\w\\.]+)/$', 'act', name='url_act'),\n)\n\n```\n\nApply this change: Change URL for something clear... | python | edit | 3 | 0 | bsd-2-clause | 31a342983029923bedc8301210cea6fd8cd278fa | qdqmedia/django-actions,qdqmedia/django-actions | django_actions/urls.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 = '1.5.2'\n\ninstall_requires = [\n # -*- Extra requirements: -*-\n ]\n\nif sys.version_info < (2,6,):\n install_requires.append(\"simplejson>=1.7.1\")\n\nsetup... | python | edit | 4 | 0 | mit | 2544f892f93ab2ddf95ef3634c39e7c3840fb03a | tytek2012/twitter,adonoho/twitter,durden/frappy,Adai0808/twitter,hugovk/twitter,miragshin/twitter,sixohsix/twitter,jessamynsmith/twitter | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name=\"exec-wrappers\",\n version='1.0.3',\n author=\"Guilherme Quentel Melo\",\n author_email=\"<EMAIL>\",\n url=\"https://github.com/gqmelo/exec-wrappers\",\... | python | edit | 1 | 0 | mit | 796eac9b38601214279debc8afaf4e82e9c5548d | gqmelo/exec-wrappers,gqmelo/exec-wrappers | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nwith open('README.rst') as readme:\n long_description = ''.join(readme).strip()\n\n\nsetup(\n name='rsocks',\n version='0.3.3',\n author='Jiangge Zhang',\n author_email='<EMAIL... | python | edit | 1 | 0 | mit | cdefa2089cad46884d8cf9c3e4e5f475a1beed58 | tonyseek/rsocks,tonyseek/rsocks | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nimport marquise.marquise\nextension = marquise.marquise.ffi.verifier.get_extension()\n\nwith open('VERSION', 'r') as f:\n\tVERSION = f.readline().strip()\n\n\n# These notes suggest that there's not yet any \"... | python | edit | 1 | 0 | mit | 43211ec5368a119cf829bde926aa9b262c6dfef8 | anchor/pymarquise,anchor/pymarquise | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='pyserializer',\n version='0.9.1',\n description='Simple python serialization library.',\n author='LocalMed',\n author_email='<EMAIL>, <EMAIL>, <EMAIL>', # NOQA\... | python | edit | 1 | 0 | mit | ab957908f578946fd748a28ff0a7fd1c49f53b9f | localmed/pyserializer,localmed/pyserializer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys, os\n\ntry:\n import Cython\nexcept ImportError:\n pass\n\nfrom setuptools import setup\n\nfrom pymantic import version\n\nimport setupinfo\n\nsetup(name='pymantic',\n version=version,\n description=\"Semantic Web... | python | edit | 4 | 0 | bsd-3-clause | 6c3c0dd1e725583a8465b2e986ebfa1e363fb478 | SYSTAP/blazegraph-python,blazegraph/blazegraph-python,syapse/pymantic,igor-kim/blazegraph-python,SYSTAP/blazegraph-python,blazegraph/blazegraph-python,igor-kim/blazegraph-python | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\nimport os\n\n__version__ = '0.1.4'\n\ndef read(*paths):\n \"\"\"Build a file path from *paths* and return the contents.\"\"\"\n with open(os.path.join(*paths), 'r') as f:\n r... | python | edit | 1 | 1 | mit | 7ef4a4df9da3d14ddb0e813720999fbaaa9d45d6 | codebynumbers/ftpretty | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup\nfrom beanstalkc import __version__ as version\n\npkg_version = version\ngit_version = os.popen('git describe --tags --abbrev=6').read().strip()[7:]\nif git_version:\n pkg_ve... | python | edit | 3 | 0 | apache-2.0 | c79c518c15be430aaf3da8d628096cd52c07c6bd | yetone/beanstalkc,bcho/beanstalkc,earl/beanstalkc,seveas/beanstalkc | 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='click-man',\n version='0.2.1',\n license='MIT',\n description='Generate man pages for click based CLI applications',\n author='Timo Furrer',\n author_email='<EM... | python | edit | 1 | 0 | mit | b3453f31b0e7e4be117a4c0379202cd0a440ce60 | click-contrib/click-man | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nwith open('README.md') as f:\n readme = f.read()\n\nsetup(\n name=\"pykwalify\",\n version=\"1.7.0\",\n description=... | python | edit | 3 | 0 | mit | 2a294c70c4e1b94b185e1c58bd1868e1c9d675b6 | grokzen/pykwalify | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='pypardiso',\n version=\"0.3.1\",\n packages=['pypardiso'],\n install_requires=['mkl', 'mkl-service', 'numpy', 'scipy', 'psutil'],\n author=\"Adrian Haas\",\n license=open('LIC... | python | edit | 1 | 0 | bsd-3-clause | 612006dbfdf05c120467c31319a9e089c82dbb86 | haasad/PyPardisoProject | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nPACKAGE_VERSION = '0.1'\ndeps = []\n\nsetup(name='wptserve',\n version=PACKAGE_VERSION,\n description=\"Python webserver intended for in web browser testing\",\n long_description=open(\"README.... | python | edit | 1 | 0 | bsd-3-clause | 2a820e1ed31e601a6c5b72a1a83f290b351a31ec | youennf/wptserve | setup.py | rejected_duplicate | Near-duplicate of sample 11237 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# The MIT License\n#\n# Copyright (c) 2008 Bob Farrell\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software ... | python | edit | 1 | 1 | mit | 6469a486847823d36a8e804755c6165d0f2fd670 | 5monkeys/bpython | bpython/__init__.py | rejected_duplicate | Near-duplicate of sample 14090 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Setup ACAPI package.\"\"\"\n\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__name__), \"README.md\")) as f:\n long_description = f.read()\n\nsetup(\n name=\"acapi\",\... | python | edit | 1 | 0 | mit | 7c26bd1281a36b72d457fadb4c656661c5355c4e | skwashd/python-acquia-cloud | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup, find_packages\n\n\nif sys.version_info <= (2, 5):\n raise Exception('Requires Python Version 2.6 or above..... | python | edit | 1 | 0 | apache-2.0 | 7858a49b4544bdfde2d55f4ce401bf208eaea17e | jonparrott/gcloud-python,jbuberel/gcloud-python,googleapis/google-cloud-python,googleapis/google-cloud-python,jonparrott/gcloud-python,waprin/google-cloud-python,blowmage/gcloud-python,jgeewax/gcloud-python,jgeewax/gcloud-python,tseaver/gcloud-python,tseaver/google-cloud-python,GoogleCloudPlatform/gcloud-python,GoogleC... | 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\nsetup(\n name='od',\n version='2.0.0',\n description='Shorthand syntax for building OrderedDicts',\n license='MIT',\n url='https://github.com/epsy/od',\n author='Yan... | python | edit | 1 | 0 | mit | 09f96a8c3dd9fdf605c17cc85b4b7ab66af30aeb | epsy/od | 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\nimport os\nimport codecs\nfrom setuptools import setup\n\n\ndef read(fname):\n file_path = os.path.join(os.path.dirname(__file__), fname)\n return codecs.open(file_path, encoding='utf-... | python | edit | 1 | 1 | mit | 51810ebc49b135a8b2fb0ae40555ab4d3419a4a4 | hackebrot/pytest-cookies | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom setuptools import setup, find_packages\nimport tom_lib\n\n__author__ = \"Adrien Guille, Pavel Soriano\"\n__email__ = \"<EMAIL>\"\nversion = tom_lib.__version__\n\nsetup(\n name='tom_lib',\n version=version,\n ... | python | edit | 1 | 0 | mit | a0b2e2422ab1cf8ac6220b3bb12c94295e69961d | AdrienGuille/TOM,AdrienGuille/TOM | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom fancypages import __version__\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-fancypages',\n version=__version__,\n url='https://github.com/tangentlabs/django-fancypages',\n au... | python | edit | 1 | 0 | bsd-3-clause | 0069f97b940cf5d9ac128ad6dc87cdd3931219b5 | tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages | 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\nfrom catkin_pkg.python_setup import generate_distutils_setup\n\nd = generate_distutils_setup(\n packages=['xacro'],\n package_dir={'': 'src'},\n scripts=['scripts/xacro.py'... | python | edit | 1 | 0 | bsd-3-clause | 3193abd844bae92159258a5cc80221e9a7d16b06 | ros/xacro,ros/xacro | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urlparse\n\nfrom django.test import TestCase, override_settings\nfrom django.conf import settings\nfrom mock import patch, Mock\n\nfrom opendebates.context_processors import global_vars\nfrom opendebates.tests.factories import Submis... | python | edit | 3 | 1 | apache-2.0 | 09c0c2302460c6e32419f640b341c4b968d4227a | caktus/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates | opendebates/tests/test_context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#coding:utf-8\nimport os\nimport cStringIO\nimport gzip\nimport hashlib\n\nfrom cactus.utils.helpers import checksum\n\n\nclass FakeTime:\n \"\"\"\n Monkey-patch gzip.time to avoid changing files every time we deploy them.\n \"\"\"... | python | edit | 3 | 3 | bsd-3-clause | fa1a08aed5bc6659304097d5ad7e653c553c1b11 | koenbok/Cactus,danielmorosan/Cactus,juvham/Cactus,dreadatour/Cactus,Bluetide/Cactus,chaudum/Cactus,koobs/Cactus,chaudum/Cactus,PegasusWang/Cactus,juvham/Cactus,eudicots/Cactus,Knownly/Cactus,danielmorosan/Cactus,page-io/Cactus,juvham/Cactus,fjxhkj/Cactus,koobs/Cactus,ibarria0/Cactus,PegasusWang/Cactus,danielmorosan/Cac... | cactus/utils/file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport logging\n\nfrom django.core.management.base import BaseCommand\n\nfrom blog.models import Post\n\nlogger = logging.getLogger('app')\n\n\nclass Command(BaseCommand):\n help = 'Check posts state'\n\n def handle(self, *... | python | edit | 1 | 9 | bsd-3-clause | 34b80fdca9387c05cf9000cd2c19b619aadff6e9 | manti-by/M2MICRO,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/M2-Blog-Engine,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/m2,manti-by/m2,manti-by/m2,manti-by/M2MICRO,manti-by/M2-Blog-Engine,manti-by/m2 | app/blog/management/commands/check_posts_state.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A main program for Byterun.\"\"\"\n\nimport argparse\nimport logging\n\nfrom . import execfile\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-m', dest='module', action='store_true')\nparser.add_argument('-v', dest='verbo... | python | edit | 1 | 0 | mit | 133c6063e2da153c99512757b6771564d67ed28f | sukwon0709/byterun,sukwon0709/byterun,nedbat/byterun,sukwon0709/byterun,kostyll/byterun,sukwon0709/byterun,djhenderson/byterun,sukwon0709/byterun | byterun/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib import quote\n\nfrom pylons import c, g\n\nfrom r2.lib.pages import Ads as BaseAds\n\n\nclass Ads(BaseAds):\n def __init__(self):\n BaseAds.__init__(self)\n\n url_key = \"adzerk_https_url\" if c.secure else \"ad... | python | edit | 1 | 3 | bsd-3-clause | 11ac44c41d9cd3431b7f2cc833656665c8a9947b | madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk | reddit_adzerk/adzerkads.py | rejected_duplicate | Near-duplicate of sample 15076 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.views.generic import TemplateView\n\nfrom blogs.views import PostCreationView, PostDetailView, PostUpdateView, PostListView\n\nurlpatterns = patterns('',\n url(r'^new/?$', ... | python | edit | 4 | 0 | mit | fa25c9c738376824a6d14fcf303d6ff867365588 | ericmok/djangosimpleblog,ericmok/djangosimpleblog,ericmok/djangosimpleblog | blogs/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n###################################################################################################\n#\n# chrome_extensions.py\n# Adds the name and description of each Chrome extension found in a URLItem to the Interpretation field\n#\n# ... | python | edit | 1 | 7 | apache-2.0 | f1ac6853d9502023462b5d55dc16c45658733a4a | obsidianforensics/hindsight,obsidianforensics/hindsight | plugins/chrome_extensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef positive(weight):\n weight.data *= weight.data.ge(0).float()\n\ndef negative(weight):\n weight.data *= weight.data.le(0).float()\n\ndef positive_except_self(weight):\n pos = weight.data.ge(0).float()\n if pos.size()[2] % 2... | python | edit | 1 | 4 | mit | d816c7207d21c2c379f9409eebc42f4feb88afd9 | fabiansinz/attorch,atlab/attorch,eywalker/attorch | attorch/constraints.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Example use of jupyter_kernel_test, with tests for IPython.\"\"\"\n\nimport unittest\nimport jupyter_kernel_test as jkt\n\n\nclass OctaveKernelTests(jkt.KernelTests):\n kernel_name = \"octave\"\n\n language_name = \"octave\"\n\n... | python | edit | 1 | 0 | bsd-3-clause | 3b773f6b046215e8ef1a8cc701f9200bc7078964 | Calysto/octave_kernel,Calysto/octave_kernel | test_octave_kernel.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom viper.interactive import *\nfrom viper.lexer import lex_file\nfrom viper.grammar import GRAMMAR\n\n\nif __name__ == '__main__':\n import argparse\n parser = argparse.ArgumentParser()\n parser.add_argu... | python | edit | 4 | 0 | apache-2.0 | 35b8dd77be54872bcf17b62e288cd4a2b5a37e5a | pdarragh/Viper | viper.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# following PEP 440\n__version__ = \"1.5\"\n\nVERSION = (1, 5)\n\nimport django\nif django.VERSION < (1,9):\n # Make sure the ``{% print %}`` is always available, even without a {% load debugtools_tags %} call.\n # This feature is no ... | python | edit | 1 | 0 | apache-2.0 | 42bd3f35445e5995b0affc61c4b5a4c226587ae4 | edoburu/django-debugtools,edoburu/django-debugtools,edoburu/django-debugtools | debugtools/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport xmlrpclib\n\nfrom shutil import rmtree\nfrom subprocess import check_call\n\nTEMP_DIR = 'tmp'\nPROJECT_NAME = 'cctrl'\nDIST_DIR = os.path.join(TEMP_DIR, 'dist')\n\n\ndef main():\n if is_current_version():\n ... | python | edit | 3 | 2 | apache-2.0 | f9cc9e73774f2d3f4a9525e174976b912ba2bbba | cloudControl/cctrl,cloudControl/cctrl | ci/release.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom textwrap import dedent\n\nfrom autosort.sorting import sort_imports\n\n\ndef test_regular():\n path = os.path.abspath('test.py')\n rv = sort_imports(dedent('''\n from tokenize import COMMENT, INDENT, ENDMARKER\n ... | python | edit | 1 | 1 | mit | d71b2f3b8943465ebe04aa9926cba0159402da96 | fbergroth/autosort | tests/test_sorting.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport couchdb\n\nfrom cloudly.memoized import Memoized\nimport cloudly.logger as logger\n\nlog = logger.init(__name__)\n\n\n@Memoized\ndef get_server(hostname=None, port=5984, username=None, password=None):\n port = 5984\n ... | python | edit | 1 | 7 | mit | 8415776bb4d5b402aef43ab777072060420bd6b4 | ooda/cloudly,ooda/cloudly | cloudly/ccouchdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 AnsibleWorks, Inc.\n# All Rights Reserved.\n\n\"\"\"\nWSGI config for AWX project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://doc... | python | edit | 4 | 0 | apache-2.0 | 3764bd2303df873d93a2d75311b27c9c632409b4 | snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx | awx/wsgi.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n_defaults = {\n 'api_url': 'api/v3',\n}\n\nfrom .apirequest import ApiRequest, RequestType\nfrom .users import Users\n\nclass Pyglab(object):\n def __init__(self, url, token, api_url=_defaults['api_url']):\n self._base_url = ur... | python | edit | 2 | 5 | mit | f70e0ec9ac51928fbd5ff9159859a9116227c3b9 | sloede/pyglab,sloede/pyglab | pyglab/pyglab.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom pyuploadcare.dj.models import FileField, ImageField, ImageGroupField\n\n\nclass Gallery(models.Model):\n\n title = models.CharField(max_length=255)\n\n def __unicode__(self):\n return self.t... | python | edit | 1 | 1 | mit | 75075e85ef82aabee2a261b6a58502b32c60d348 | uploadcare/pyuploadcare | tests/test_project/gallery/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\n# The base domain name for this installation. Used to control linking to\n# sub-domains.\nSERVER_NAME = \"warehouse.loc... | python | edit | 1 | 0 | bsd-2-clause | f49857658b992240eaf6627d153afb4808e366fb | davidfischer/warehouse | warehouse/defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport pyglet\nfrom pyglet import gl\n\nimport imgui\nfrom imgui.integrations.pyglet import PygletRenderer\n\n\ndef main():\n\n window = pyglet.window.Window(width=800, h... | python | edit | 1 | 4 | bsd-3-clause | 31f1685d2e2471cf272f7b249e59ef59829ed47f | swistakm/pyimgui,swistakm/pyimgui,swistakm/pyimgui,swistakm/pyimgui | doc/examples/pyglet_.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport time\n\nlogger = logging.getLogger(__name__)\n\n\nclass RequestLoggerMiddleware(object):\n def process_request(self, request):\n self.request_t... | python | edit | 1 | 2 | mit | ae629597067817457db9e86121dde7f6ee3a2b7d | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | stagecraft/libs/request_logger/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url, include\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.core.urlresolvers import reverse_lazy\nfrom django.views.generic.base import RedirectView\n\nimport competi... | python | edit | 1 | 0 | bsd-3-clause | e69b43a559044ecde0ffa79ea3ea4773aa527a88 | michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition | project/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == '__main__':\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conductor.settings.development')\n\n if 'test' in sys.argv:\n # For now, fake setting the environment... | python | edit | 1 | 0 | bsd-2-clause | 272ece1774cebaf8d6d6ae9e0dfb5fe0cce97083 | mblayman/lcp,mblayman/lcp,mblayman/lcp | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# A linter to warn for ASSERT macros which are separated from their argument\n# list by a space, which Clang's CPP barfs on\n\nfrom linter import run_linters, RegexpLinter\n\nlinters = [\n RegexpLinter(r'WARN\\s... | python | edit | 1 | 0 | bsd-3-clause | bd9fc1b2adea718be089b8370d2e82ea55af6539 | sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc | .gitlab/linters/check-cpp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"Basic class-based demonstration application.\n\nApplications can be as simple or as complex and layered as your needs dictate.\n\"\"\"\n\n\nclass Root(object):\n def __init__(self, context):\n self._ctx ... | python | edit | 2 | 3 | mit | e824d8ad284603b73df48f1a413b129280318937 | marrow/WebCore,marrow/WebCore | examples/annotation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nfrom basin.routers import api_router\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^$', 'basin.views.index'),\n url(r'^display/',... | python | edit | 1 | 0 | mit | edc3a902a64c364168df6c10ebb825bd9e65a974 | Pringley/basinweb,Pringley/basinweb | basin/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Generated by Django 3.1.4 on 2020-12-14 14:08\n\nfrom django.conf import settings\nimport django.contrib.gis.db.models.fields\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migr... | python | edit | 1 | 0 | bsd-2-clause | cec10f55b280311161033ad3c9457b20822f7353 | GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek | geotrek/outdoor/migrations/0003_auto_20201214_1408.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport abc\nimport six\n\n\n@six.add_metaclass(abc.ABCMeta)\nclass Player(object):\n '''Interface for a Player of a Game'''\n\n @abc.abstractmethod\n def choose_move(self, move):\n pass\n\n```\n\nApply this change: Rename mo... | python | edit | 1 | 1 | mit | 1c76ec9c600b6a85f7a9a48b72c1c6c4f447ec24 | davidrobles/mlnd-capstone-code | capstone/player.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom django.http import Http404\nfrom gargoyle import gargoyle\nfrom contacts.models import Book\n\nsentry = logging.getLogger('sentry')\n\nclass ContactBookMiddleware(object):\n\n def process_view(self, request, view_fun... | python | edit | 2 | 9 | mit | a6702e839eec2b4d6d75f4126ed975456e9795dc | phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts | contacts/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom sklearn import preprocessing as pp\n\nprint('normalization function imported')\n\n#normalize data in respect with keys in dictionary\ndef normalize_data(data):\n # get keys from original data\n gestures = list... | python | edit | 3 | 2 | mit | ca321b449f16d966bccf3d30680819b6dafa00bc | JustinShenk/sonic-face,JustinShenk/sonic-face | normalize_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom bencodepy import encode as bencode\n\nfrom xirvik.util import verify_torrent_contents, VerificationError\n\n\ndef create_torrent(path, save_to=None, piece_length=256):\n pass\n\n\ndef create_random_data_file(path,... | python | edit | 4 | 1 | mit | 1406d59a2588bc796404d8dde906f85e8169dc6f | Tatsh/xirvik-tools | xirvik/test/test_util.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\n\nAPP_TOKEN = None\nDEBUG = False\nDEBUG_REQUESTS = DEBUG\nDEBUG_HEADERS = False\nTESTING = False\nETAGS = True\nCACHE = None\n\n\ntry:\n from django.conf import settings\nexcep... | python | edit | 1 | 0 | mit | b13a92bb9c7c2aa495a3f1dc1ddf10235868b068 | pagepart/chinup | chinup/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# (C) Copyright 2014 Hewlett Packard Enterprise Development Company LP\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 t... | python | edit | 1 | 4 | apache-2.0 | e288e8a52df0ac67a24271c40e23ae054e39fa52 | openstack/python-monascaclient,stackforge/python-monascaclient,sapcc/python-monascaclient,sapcc/python-monascaclient,stackforge/python-monascaclient,openstack/python-monascaclient | monascaclient/common/monasca_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom datetime import datetime\nfrom werkzeug.security import generate_password_hash, check_password_hash\nfrom ._base import db\n\n\nclass User(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Col... | python | edit | 1 | 2 | mit | f13c08b2793b72f373785d2fa5b004ec79da93d6 | 1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost | flask_boost/project/application/models/user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport mechanicalsoup\n\n# Connect to Google\nbrowser = mechanicalsoup.StatefulBrowser()\nbrowser.open(\"https://www.google.com/\")\n\n# Fill-in the form\nbrowser.select_form('form[action=\"/search\"]')\nbrowser[\"q\"] = \"Mechan... | python | edit | 1 | 0 | mit | 1991dc4c60a338c2a5c3548684160e6ff9e858a2 | MechanicalSoup/MechanicalSoup,hemberger/MechanicalSoup,hickford/MechanicalSoup | examples/expl_google.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nlog = logging.getLogger(__name__)\n\nfrom pyramid.config import Configurator\nfrom sqlalchemy import engine_from_config\n\nfrom .models import DBSession\n\nrequired_settings = [\n 'pyramid.secret.session',\n 'p... | python | edit | 1 | 4 | isc | 355b78dfa8be2000a1e3198231088c7b3cec0d18 | bertjwregeer/alexandria,bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,cdunklau/alexandria | alexandria/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -----------------------------------------------------------------------------\n# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.\n# Distributed under the (new) BSD License.\n# ---------------------------------------------... | python | edit | 6 | 1 | bsd-3-clause | 3ff24c90c9f50c849ea22e7d2d0a5fa11d1e777a | glumpy/glumpy,glumpy/glumpy | examples/hello-world.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom cms.models.pluginmodel import CMSPlugin\n\n\nclass SimpleMarkdownPlugin(CMSPlugin):\n markdown_text = models.TextField(verbose_name=_('text'))\n\... | python | edit | 1 | 1 | bsd-3-clause | e0f6dba294e062d0a93b7cdf8a6c8fc1557671a2 | Alir3z4/cmsplugin-simple-markdown,Alir3z4/cmsplugin-simple-markdown | cmsplugin_simple_markdown/models.py | rejected_duplicate | Near-duplicate of sample 17475 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Utility functions for NeuroDSP plots.\"\"\"\n\nimport matplotlib.pyplot as plt\n\n###################################################################################################\n###################################################... | python | edit | 1 | 3 | apache-2.0 | fe362e1950e8cc6c993223d7b7236e285e7a368f | voytekresearch/neurodsp,srcole/neurodsp,srcole/neurodsp | neurodsp/plts/utils.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\nfrom telemetry.page import page as page_module\nfrom telemetry import sto... | python | edit | 1 | 1 | bsd-3-clause | fb13bc1a5735912b28026a80f7698cb0c299151f | lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStrea... | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/reenable_after_bypass.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for the uploader module\"\"\"\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom builtins import open\n\nfrom future imp... | python | edit | 5 | 1 | mit | b785fdc041a41f06c10e08d1e4e4b2bd4a5e5f90 | openspending/gobble | tests/test_uploader.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import env, local, run, sudo\nenv.user = 'root'\n#env.hosts = ['204.232.205.6']\n\nenv.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'\nenv.virtualenv = '/home/docs/sites/readthedocs.org'\nenv.rundir ... | python | edit | 1 | 1 | mit | a80d20fd0419e7e6aa9a9d83145fcab2987e286c | tddv/readthedocs.org,sils1297/readthedocs.org,tddv/readthedocs.org,sunnyzwh/readthedocs.org,asampat3090/readthedocs.org,titiushko/readthedocs.org,clarkperkins/readthedocs.org,raven47git/readthedocs.org,emawind84/readthedocs.org,kdkeyser/readthedocs.org,kenwang76/readthedocs.org,techtonik/readthedocs.org,d0ugal/readthed... | deploy/fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom uplink.clients.io.interfaces import (\n Client,\n Executable,\n IOStrategy,\n RequestTemplate,\n)\nfrom uplink.clients.io.execution import RequestExecutionBuilder\nfrom uplink.clients.io.templates import CompositeRequestTem... | python | edit | 1 | 1 | mit | 41478d9ef0f8506ebe11ea5746450fe6dca02982 | prkumar/uplink | uplink/clients/io/__init__.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.