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# -*- coding: utf-8 -*-\n# Copyright 2011-2012 Antoine Bertin <<EMAIL>>\n#\n# This file is part of subliminal.\n#\n# subliminal is free software; you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public L... | python | edit | null | null | mit | 10f931ab6831f9fb403912a0d0d357d35561d099 | ofir123/subliminal,fernandog/subliminal,neo1691/subliminal,nvbn/subliminal,bogdal/subliminal,ravselj/subliminal,SickRage/subliminal,oxan/subliminal,t4lwh/subliminal,Elettronik/subliminal,kbkailashbagaria/subliminal,juanmhidalgo/subliminal,hpsbranco/subliminal,h3llrais3r/subliminal,ratoaq2/subliminal,getzze/subliminal,D... | subliminal/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.static import static\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.views.generic import Templat... | python | edit | 1 | 0 | bsd-2-clause | 88fbd428ceb79d6e176ff235256c8e5951815085 | refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector | inspector/inspector/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate\nscan = Scan()\nascan = AScan()\nascan.default_triggers = [bpm_cam_acq]\nascan.default_detectors = [bpm_tot5]\ndscan = DScan()\n\n# Use ct as a count which is a single s... | python | edit | 3 | 1 | bsd-2-clause | df43b7fc089abb2fff87841173c28b3f5849a3b1 | NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd | profile_xf11id/startup/50-scans.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCelery tasks for the User Profiles portion of RAPID.\n\"\"\"\n\nimport datetime\n\nimport logging\n\nfrom celery.schedules import crontab\nfrom celery.task import PeriodicTask\nfrom profiles.models import Profile\n\nLOGGER = logging... | python | edit | 1 | 1 | mit | 7cfb3d6be9e1fc24b5e86e3179e874bcbe01c47c | gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID | profiles/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom google.appengine.ext.webapp import template\n\nimport cgi\n\nfrom google.appengine.api import users\nfrom google.appengine.ext import webapp\nfrom google.appengine.ext.webapp.util import run_wsgi_a... | python | edit | 5 | 4 | bsd-3-clause | a5072cecb9be257399360f68d68389274431c8ca | andlima/fraseador | fraseador.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom urllib import parse\n\nDEBUG = False\n\nDATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')\n\nbits = parse.urlparse(DATABASE_SA)\n\nDATABASE = {\n 'user': bits.username,\n 'database': bits.path[1:],\n 'p... | python | edit | 1 | 0 | bsd-2-clause | 0684d3132271f6c08a511aa544c85b838e942910 | d0ugal/discode-server,d0ugal/discode-server,d0ugal/discode-server | discode_server/config/base_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2007 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#... | python | edit | 2 | 1 | mit | 967a0426a32f6bdb2e82ae055fca8080681ff891 | shickey/BearStatus,shickey/BearStatus,shickey/BearStatus | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom abc import ABCMeta, abstractmethod\nfrom pylease.logger import LOGME as logme # noqa\n\n\nclass Extension(object):\n\n __metaclass__ = ABCMeta\n\n _IGNORE_ME_VAR_NAME = 'ignore_me'\n ignore_me = False\n\n def __init__(self... | python | edit | 1 | 3 | mit | 796bea01d77abe421ac7db2e82a481b6d77002de | n9code/pylease | pylease/extension/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'tri'\nfrom controller.event_controller import EventController\nfrom controller.env_controller import EnvController\nfrom controller.main_controller import MainController\nimport pygame\n\n\nenv_controller = EnvController()\nev... | python | edit | 1 | 0 | apache-2.0 | 85d4496a5ce7cb801c09bacbc0dd4a67c084c504 | ductri/game_programming-ass1 | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | python | edit | 1 | 1 | bsd-3-clause | f0dde60a20bbbf750f6833c624c0c5bf20c7ac9c | bwhmather/cryptography,Ayrx/cryptography,kimvais/cryptography,skeuomorf/cryptography,Ayrx/cryptography,skeuomorf/cryptography,Hasimir/cryptography,kimvais/cryptography,kimvais/cryptography,sholsapp/cryptography,skeuomorf/cryptography,Hasimir/cryptography,Ayrx/cryptography,sholsapp/cryptography,Hasimir/cryptography,Ayrx... | tests/hazmat/bindings/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nDeprecated Library\n==================\n\nPython ``@deprecated`` decorator to deprecate old python classes, functions or methods.\n\n\"\"\"\n\n#: Module Version Number, see `PEP 396 <https://www.python.org/d... | python | edit | 3 | 0 | mit | b6a039369bc18456667c82b8e57f8b8621aed6d1 | tantale/deprecated | deprecated/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport sys\n\nfrom .processrunner import ProcessRunner\nfrom .writeout import writeOut\n\n\ndef runCommand(command, outputPrefix=\"ProcessRunner> \"):\n \"\"\"Easy invocation of a command with default IO streams\... | python | edit | 1 | 3 | mit | 599b0524d4228b41990c0b4e00106660589160c2 | arobb/python-processrunner,arobb/python-processrunner | processrunner/runcommand.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nlab_command = ' '.join([\n 'jupyter',\n 'lab',\n '--dev-mode',\n '--debug',\n '--no-browser',\n '--port={port}',\n '--ServerApp.ip=127.0.0.1',\n '--ServerApp.token=\"\"',\n '--ServerApp.base_url={base_url}lab-dev'... | python | edit | 4 | 0 | bsd-3-clause | 0f74660466392f3183b01ae0598e5081f112654a | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | binder/jupyter_notebook_config.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tryp import __\nfrom tryp.test import Spec # type: ignore\n\n\nclass Inner:\n\n def __init__(self, z) -> None:\n self.z = z\n\n @property\n def wrap(self):\n return Inner(self.z * 2)\n\n def add(self, a, b):\... | python | edit | 1 | 1 | mit | fe97ed6d7e7155e974f229235c509b32523d4117 | tek/amino | unit/anon_spec.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport platform\n\ndef config():\n genesis_txn_path = \"/opt/app-root/genesis\"\n platform_name = platform.system()\n if platform_name == \"Windows\":\n genesis_txn_path = os.path.realpath(\"./app-root/genesis\")\... | python | edit | 1 | 3 | apache-2.0 | 801c370ce88b3b2689da5890ebf09bae533089f4 | swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook | tob-api/tob_api/hyperledger_indy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport loaders\nloader = loaders.Lazy(\n '%s.models' % __name__,\n ('Upload',)\n)\n\nimport extensions\nfrom .functions import (\n delete,\n save,\n save_file,\n save_images,\n)\nfrom .models import Upload\n\n\ndef init(db... | python | edit | 1 | 2 | mit | 4e28e43fea2eaa08006eeb4d70159c8ebd3c83b4 | FelixLoether/flask-uploads,FelixLoether/flask-image-upload-thing | flask_uploads/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\napplication factory\n~~~~~~~~~~~~~~~~~~~\n\nCreate and initialize the application using a configuration specified by\nan environment variable.\n\n:Copyright: 2006-2016 Jochen Kuppers... | python | edit | 1 | 0 | bsd-3-clause | 8a5d52d388183000af4472afa47db1ddcec96331 | homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | byceps/application_factory.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make sure I/O functions appear in API docs"
},
{
"role": "assistant",
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nfrom .kepler import *\n"
}
] | python | new_file | 2 | 0 | bsd-3-clause | f25f08625d369d7737516971256140af26015235 | bsipocz/astropy,dhomeier/astropy,StuartLittlefair/astropy,MSeifert04/astropy,bsipocz/astropy,mhvk/astropy,dhomeier/astropy,stargaser/astropy,lpsinger/astropy,pllim/astropy,lpsinger/astropy,StuartLittlefair/astropy,mhvk/astropy,stargaser/astropy,MSeifert04/astropy,MSeifert04/astropy,larrybradley/astropy,dhomeier/astropy... | astropy/timeseries/io/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright ClusterHQ Inc. See LICENSE file for details.\n\n\"\"\"\nTest validation of keys generated by flocker-ca.\n\"\"\"\n\nfrom twisted.trial.unittest import SynchronousTestCase\n\nfrom .. import amp_server_context_factory, rest_api_c... | python | edit | 1 | 1 | apache-2.0 | d4a1a75407610caaad769c26131f7d34ef977a70 | hackday-profilers/flocker,achanda/flocker,mbrukman/flocker,LaynePeng/flocker,achanda/flocker,1d4Nf6/flocker,hackday-profilers/flocker,wallnerryan/flocker-profiles,LaynePeng/flocker,hackday-profilers/flocker,mbrukman/flocker,moypray/flocker,moypray/flocker,mbrukman/flocker,agonzalezro/flocker,Azulinho/flocker,wallnerrya... | flocker/ca/test/test_validation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport dash as _dash\nimport sys as _sys\n\ncurrent_path = os.path.dirname(os.path.abspath(__file__))\n\n_dash.development.component_loader.load_components(\n os.path.join(current_path, '../lib/metadata.json'),\n ['content'... | python | edit | 1 | 0 | mit | 52138f389d5b8ef3e2cd25179716b36170b94242 | plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash | packages/dash-html-components/dash_html_components/__init__.py | rejected_duplicate | Near-duplicate of sample 4681 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models\n\nclass PositiveBigIntegerField(models.PositiveIntegerField):\n \"\"\"Represents MySQL's unsigned BIGINT data type (works with MySQL only!)\"\"\"\n empty_strings_allowed = False\n... | python | edit | 1 | 2 | mit | bf006aa3dc8ee331eccb4abd8244a134949c8cc0 | mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth | bawebauth/apps/bawebauth/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom blo.DBControl import DBControl\n\n\nclass TestDBControl(unittest.TestCase):\n pass\n```\n\nApply this change: Add test pattern of initializer for file."
},
{
"role": "assistant",
"content": "import unitt... | python | edit | 1 | 1 | mit | 8e8a4360124a033ad3c5bd26bfe2b3896155f25a | 10nin/blo,10nin/blo | tests/TestDBControl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nItem Sets\n - ItemSet.dbc\n\"\"\"\n\nfrom .. import *\nfrom ..globalstrings import *\n\n\nclass ItemSet(Model):\n\tpass\n\nclass ItemSetTooltip(Tooltip):\n\tdef tooltip(self):\n\t\t\n\t\titems = self.obj.get... | python | edit | 8 | 3 | cc0-1.0 | d17b3f2da3daaea5b0a0468d231fa72ce043a6cc | jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow | game/itemsets/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\n\nfrom rest_framework import serializers\n\nfrom competition.models import Team\n\n\nclass TeamSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = Team\n fields = ... | python | edit | 1 | 2 | bsd-3-clause | 0ca48ecf091e2194aef962e8880447b59066e462 | michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition | src/competition/api/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"\n\nModule for tasks in the to-do list\n\n\"\"\"\n\n\nclass TodoTask:\n \"\"\"\n Represents a task in the to-do list\n \"\"\"\n\n def __init__(self, description):\n \"\"\"\n Initialize... | python | edit | 3 | 3 | mit | f82fe96cf520ec2f635f34f911bc8d4ccd78d776 | mes32/mfnd | mfnd/todotask.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\" Verifies that the configuration for each BuildFactory matches ... | python | edit | 1 | 1 | bsd-3-clause | 688292246b9db3eb0aa5be752612ae2df2fcff67 | Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Ti... | tools/tests/factory_configuration/factory_configuration_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create a Procedure model and an example Page model\n\nPage only contains a foreign key to a procedure for now."
},
{
"role": "assistant",
"content": "from django.db import models\nfrom django.contrib.auth.models import User\n\ncl... | python | new_file | 1 | 0 | bsd-3-clause | e977331dff6fc4f03eef42be504ec3d747e3f9ad | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | sana_builder/webapp/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport li\nimport unittest\n\n\nclass LIAPITestSequence(unittest.TestCase):\n\n def setup(self):\n pass\n\n def test_get_permits(self):\n \"\"\"Returns the first 1,000 most recent permits as a list/JSON\n \"\"\"\n... | python | edit | 1 | 1 | mit | 322cd948a7eef9d0af1d39de682c267094fb7324 | AxisPhilly/py-li | test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n\nThis script downloads and updates the module builder.\n\n\"\"\"\n\n\n# Dont checkout all files\nIGNORE_FILES = [\n \"__init__.py\",\n \".gitignore\",\n \"LICENSE\",\n \"README.md\",\n \"config.ini\",\n \"Source/c... | python | edit | 1 | 0 | mit | 56300ddbac1a47f9b2c9f7946c8810e55e19bb07 | eswartz/RenderPipeline,eswartz/RenderPipeline,eswartz/RenderPipeline | Code/Native/update_module_builder.py | rejected_duplicate | Near-duplicate of sample 18204 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom raven import Client\nfrom fluent import sender\nfrom raven.contrib.celery import register_signal\n\nfrom scrapi.settings.defaults import *\nfrom scrapi.settings.local import *\n\n\nlogging.basicConfig(level=logging.IN... | python | edit | 7 | 0 | apache-2.0 | fc3f2e2f9fdf8a19756bbf8b5bd1442b71ac3a87 | CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,mehanig/scrapi,fabianvf/scrapi,mehanig/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,alexgarciac/scrapi,fabianvf/scrapi,ostwald/scrapi,icereval/scrapi | scrapi/settings/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom daemon import Daemon, SerialDispatcher\nfrom serial import Serial\nfrom threading import Thread\nimport sys\n\ndef callback(event):\n if event:\n print(\"EVENT: {0.house}{0.unit}: {0.command}\".format(e... | python | edit | 1 | 3 | unlicense | f571c0754a519f1b2aa6a7ecc4f9de2c23ce0a0c | umbc-hackafe/x10-controller | x10d.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport pathlib\nimport sys\n\nimport toml\n\n# Allow autodoc to import listparser.\nsys.path.append(os.path.abspath(\"../src\"))\n\n\n# General configuration\n# ---------------------\n\n# Add any Sphinx extension module names her... | python | edit | 1 | 0 | mit | 37c3e8f804b508247d3899a63c861102d76d1593 | kurtmckee/listparser | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\nimport ogres\n\nrequirements = [\"tensorflow>=0.10\"]\nversion = ogres.__version__\n\n\nsetup(\n name=\"ogres\",\n version=version,\n url=\"https://github.com/butternutdog/ogres... | python | edit | 1 | 0 | mit | 9a8964281bfb5af0af2128e6d26968a92b110da3 | butternutdog/ogres | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\ntry:\n from setuptools import setup\nexcept:\n from distutils.core import setup\n\n\nsetup(name = \"clrsvsim\",\n version = \"0.0.2\",\n description = \"Color Genomics Structural Variant Simulator\",\n author =... | python | edit | 1 | 0 | apache-2.0 | c0549776224eaceda575c4eea37defa2acc0557b | color/clrsvsim | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom mdtoc import __version__\n\nlong_description = \"Adds table of contents to Markdown files\"\n\nsetup(\n name=\"mdtoc\",\n version=__version__,\n description=long_description,\n author=\"Scott... | python | edit | 1 | 0 | mit | 2d7be7f8344a928aecdb2bbfeb7531bb0c35aeee | scottfrazer/mdtoc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport signal\nimport sys\nimport serial\nimport sms\nfrom xbee import XBee\n\negg_was_present = False\n\ndef signal_handler(signal, frame):\n xbee.halt()\n serial_port.close()\n sys.exit(0)\n\ndef packet_received(packet):\n sam... | python | edit | 4 | 4 | mit | 9a0de77615c943de4344b4c74d5d5114b8baf0ab | jamespettigrew/eggsclaim | eggsclaim.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version < '2.7':\n print 'Python >= 2.7 required'\n sys.exit(1)\n\nfrom setuptools import setup\n\nlong_description = '''\nA simple Python package for using Twitter search functio... | python | edit | 2 | 0 | mit | e8c9c22c7c57ff2de8b9ef9e73ec8f339aa73fd7 | ShinNoNoir/twitterwebsearch | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='pyticketswitch',\n version='1.6.1',\n author='Matt Jared',\n author_email='<EMAIL>',\n packages=[\n 'pyticketswitch',\n 'pyticketswitch.test',\n 'pyticke... | python | edit | 1 | 0 | mit | 48418ac0fe75bbb331878b80d9d0903dde445838 | ingresso-group/pyticketswitch,ingtechteam/pyticketswitch,graingert/pyticketswitch | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nfrom hal.version import __version__ as version\n\nsetup(\n name='hal',\n packages=['hal'],\n version=version,\n description='Command Line Assistant',\n author='Anup Pokhrel',\n author_em... | python | edit | 1 | 0 | mit | 5782d01fa95624c784c6298486caefbe527fb76f | virtualanup/hal | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFlask-InfluxDB\n\"\"\"\nfrom setuptools import setup\n\nsetup(\n name=\"Flask-InfluxDB\",\n version=\"0.3\",\n url=\"http://github.com/btashton/flask-influxdb\",\n license=\"BSD\",\n author=\"Brennan Ashton\",\n au... | python | edit | 1 | 0 | bsd-3-clause | a22bdc548940218c408069218c4351941c68d296 | Ombitron/flask-influxdb,Ombitron/flask-influxdb | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ntry:\n\tfrom setuptools import setup, find_packages\nexcept ImportError:\n\tfrom ez_setup import use_setuptools\n\tuse_setuptools()\n\tfrom setuptools import setup, find_packages\n\nsetup(\n name='django-bleach',... | python | edit | 3 | 0 | bsd-2-clause | 5d5f5b2924a238452a19c1035a4d2eee9c857ceb | python-force/django-bleach | 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='exchangerates',\n version='0.1.01',\n description=\"A module to make it easier to handle historical exchange rates\",\n long_description=\"\",\n classifiers=[\n ... | python | edit | 1 | 0 | mit | fa6880c9a1da67097fb495339d1b62b3bcda854d | markbrough/exchangerates | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport re\n\n# get version from __init__.py\nINITFILE = \"toytree/__init__.py\"\nCUR_VERSION = re.search(r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\",\n ... | python | edit | 1 | 0 | bsd-3-clause | 3c8cea52ba0b4d6aadf34f1323cb54bf0238f394 | eaton-lab/toytree | 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 sys, os\n\nversion = '0.1.9.dev'\n\nsetup(name='testdroid',\n version=version,\n description=\"Testdroid API client for Python\",\n long_description... | python | edit | 4 | 0 | apache-2.0 | 56a7f8aac203d2d0d685c0472d74090dc2e4da0c | aknackiron/testdroid-api-client-python,bitbar/testdroid-api-client-python,teppomalinen/testdroid-api-client-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\n\nfrom setuptools import setup, find_packages\n\ntests_require = []\n\nsetup(\n name='ashlar',\n version='0.0.2',\n description='Define and validate schemas for metadata for geotemporal event records',\n a... | python | edit | 1 | 0 | mit | cccca9c2feba5cbcb439f6d829e1e930819cb9c1 | azavea/ashlar,flibbertigibbet/ashlar,azavea/ashlar,flibbertigibbet/ashlar | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='PyFVCOM',\n packages=['PyFVCOM'],\n version='2.1.0',\n description=(\"PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and... | python | edit | 1 | 0 | mit | c36d6b17be66c0dfd0a540205b24b22b97739fb9 | pwcazenave/PyFVCOM | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nsetup(name='cc.license',\n version='0.01',\n description=\"License selection based on ccREL-based metadata.\",\n classifiers=[],\n keywords='',\n author... | python | edit | 4 | 0 | mit | 3e04c7e86d92785ba07f30ed2c0ec4eb575d6218 | creativecommons/cc.license,creativecommons/cc.license | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name = 'tomso',\n packages = ['tomso'],\n version = '0.0.7',\n description = 'Tools for Modelling Stars and their Oscillations',\n author = 'Warrick Ball',\n author_email = '<EMAIL>... | python | edit | 1 | 0 | mit | c1218917e6169c9eaaf821f96610c1e9e6d81862 | warrickball/tomso | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist bdist_wininst upload ... | python | edit | 1 | 0 | mit | 5a7bf12879c637f72c78d5f0a3e45915dd08711a | danxshap/django-rest-surveys | setup.py | rejected_duplicate | Near-duplicate of sample 15516 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='udiskie',\n version='0.3.9',\n description='Removable disk automounter for udisks',\n author='Byron Clark',\n author_email='<EMAIL>',\n url='http://bitbucket.org/byronclar... | python | edit | 1 | 0 | mit | 80d4cd9008d70664e7981a5e6018565d6b63d07a | coldfix/udiskie,pstray/udiskie,pstray/udiskie,khardix/udiskie,coldfix/udiskie,mathstuf/udiskie | setup.py | rejected_duplicate | Near-duplicate of sample 9313 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nfrom kafka_info import __version__\n\n\nsetup(\n name=\"kafka_info\",\n version=__version__,\n author=\"Federico Giraud\",\n author_email=\"<EMAIL>\",\n description=\"Shows kafka cluster inform... | python | edit | 1 | 0 | apache-2.0 | 9cfa095f5f2aa0a62afc0572eb3605e81d607e10 | anthonysandrin/kafka-utils,Yelp/kafka-utils,anthonysandrin/kafka-utils,Yelp/kafka-utils | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nIS_PYTHON3 = sys.version_info[0] == 3\nif not IS_PYTHON3:\n print(\"Error: signac requires python version >= 3.x.\")\n sys.exit(1)\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='signac',\n version='... | python | edit | 1 | 0 | bsd-3-clause | 33f87d824118d07cf8a7379bc46f624da5e3b433 | csadorf/signac,csadorf/signac | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='flyingcloud',\n version='0.1.9',\n description='Build Docker images using SaltStack',\n author='CookBrite, Inc.',\n autho... | python | edit | 1 | 0 | apache-2.0 | 04fb3d2a7d9416fe91b069b92d8fa157ea3d657b | cookbrite/flyingcloud,cookbrite/flyingcloud | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# encoding: utf-8\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nREQUIREMENTS = [i.strip() for i in open(\"requirements.txt\").readlines()]\n\nsetup(\n na... | python | edit | 1 | 0 | mit | 065cc9310a93af251db7a8464f6562ef62e3961c | jeanmask/pagseguro-sdk | 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\n\nclassifiers = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: Apache Software License\",\n \"P... | python | edit | 1 | 0 | apache-2.0 | dd062287f182c1a4d7d32c3db365c0ee92eb4120 | tk0miya/testing.mysqld | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n migrations.swappable_dependency(settings.AU... | python | edit | 1 | 0 | bsd-2-clause | de5fbf7d63245e9d14844e66fdf16f88dbfae2e5 | ajaali/django-rest-framework,mgaitan/django-rest-framework,xiaotangyuan/django-rest-framework,wedaly/django-rest-framework,edx/django-rest-framework,uploadcare/django-rest-framework,brandoncazander/django-rest-framework,mgaitan/django-rest-framework,werthen/django-rest-framework,akalipetis/django-rest-framework,YBJAY00... | rest_framework/authtoken/migrations/0001_initial.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Rachiopy setup script.\"\"\"\nfrom setuptools import find_packages, setup\n\nVERSION = \"1.0.3\"\n\nGITHUB_USERNAME = \"rfverbruggen\"\nGITHUB_REPOSITORY = \"rachiopy\"\n\nGITHUB_PATH = f\"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}\"\nGITH... | python | edit | 1 | 0 | mit | abb49ae96786018c7a8a8cd3c8b30d612f710ed2 | rfverbruggen/rachiopy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import JNISimProcedure\nfrom ...engines.soot.values.arrayref import SimSootValue_ArrayRef\n\nclass GetArrayElements(JNISimProcedure):\n\n return_ty = 'reference'\n\n def run(self, ptr_env, array, ptr_isCopy):\n array_ref... | python | edit | 1 | 4 | bsd-2-clause | 60f87cb4c3523faf5c5cdbc5f16453cae755988b | schieb/angr,schieb/angr,angr/angr,angr/angr,iamahuman/angr,angr/angr,iamahuman/angr,schieb/angr,iamahuman/angr | angr/procedures/java_jni/GetArrayElements.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'q19420'\n\n\nsmtp_username = \"test\"\nsmtp_password = \"testpass\"\n```\n\nApply this change: Use None as username and password for SMTP."
},
{
"role": "assistant",
"content": "__author__ = 'weijia'\n\n\nsmtp_user... | python | edit | 1 | 0 | bsd-3-clause | 8e9fd28004c1f8daadc5ce7f51b40543c28720c0 | weijia/djangoautoconf,weijia/djangoautoconf | djangoautoconf/settings_templates/smtp_account_template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:... | python | edit | 2 | 0 | apache-2.0 | fe4f2fa1c64d40a15c49cc4183a59c912574fdff | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom api.test import BaseTestCase\nfrom api.models import BucketList\n\n\nclass TestDeleteBucketList(BaseTestCase):\n\n def test_delete_bucket_list(self):\n bucket_list_one = {\n \"description\": \"Movies... | python | edit | 1 | 1 | mit | c98ac4ca313606c966dc45dbe7861898177f2f04 | EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list | api/tests/test_delete_bucket_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport sys\nfrom xml.sax import make_parser, handler\n\nif len(sys.argv) < 3:\n print \"This script expects two arguments: \\n1. The path to a posts.xml file from a Stack Overflow data dump.\\n2. A URL prefix to search for.\"\... | python | edit | 3 | 5 | bsd-3-clause | 36d7a5f754fef3bdab0103229fe8b5ee267f9376 | alnorth/stackdoc,alnorth/stackdoc,alnorth/stackdoc | scripts/urls-starting-with.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version_info__ = (1, 1, 0, None)\n\n\n# Dot-connect all but the last. Last is dash-connected if not None.\n__version__ = '.'.join([str(i) for i in __version_info__[:-1]])\nif __version_info__[-1] is not None:\n __version__ += ('-%s' % ... | python | edit | 1 | 1 | apache-2.0 | 8974832551f48ef3fbd3023cc2c26836aa01de1c | Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django | derrida/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\n\ndef is_image_file(f):\n known_extensions = ('.jpg', '.jpeg', '.png')\n return os.path.isfile(f) and f.lower().endswith(known_extensions)\n\n\ndef get_files_list(paths, r... | python | edit | 1 | 10 | mit | a2aceffa0133756d833ba0057b3d22e7f4d95406 | vladimirgamalian/pictools | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom calaccess_website import views\n\n\nurlpatterns = [\n # The homepage\n url(\n r'^$',\n views.VersionArchiveIndex.as_view(),\n name=\"version_index\",\n ),\n\n # Version... | python | edit | 1 | 0 | mit | dfa94ee2f7712ed66157ff0024989025831bf6ac | california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website | calaccess_website/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for ifcfg.tools.\"\"\"\n\nimport logging\nimport os\nimport unittest\n\nimport ifcfg\nfrom ifcfg.tools import exec_cmd\nfrom nose.tools import eq_\n\n\nclass IfcfgToolsTestCase(unittest.TestCase):\n\n def test_minimal_logger(... | python | edit | 1 | 1 | bsd-3-clause | da3c17d9142161c9dd9136e604fb9d0f82355044 | ftao/python-ifcfg | tests/tools_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport time\nimport math\nfrom contextlib import contextmanager\n\n@contextmanager\ndef timeit_msg(msg):\n\tprint '{}...'.format(msg),\n\tsys.stdout.flush()\n\n\tstart = time.time()\n\tyield\n\tstop = time.time()\n\n\... | python | edit | 3 | 6 | mit | 4b488c8d0842bb25c719fcd93ee0ae46978b5680 | abulovic/pgnd-meta | meta/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nfrom django.conf import settings\nimport django\n\n\nDEFAULT_SETTINGS = {\n 'INSTALLED_APPS': (\n 'sqjobs',\n 'sqjobs.tests',\n 'sqjobs.contrib.django.djsqjobs'\n ),... | python | edit | 1 | 0 | bsd-3-clause | c80893c5789998b6d6068703bb2434919abc65a3 | gnufede/sqjobs,gnufede/sqjobs | sqjobs/tests/django_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom datetime import datetime\n\nimport attr\nfrom jinja2 import Environment, FileSystemLoader, select_autoescape\n\n\n@attr.s\nclass Message:\n id = attr.ib()\n platform = attr.ib()\n user = attr.ib()\n chat = attr.i... | python | edit | 1 | 2 | mit | 2548a0c5e108fa22867c6a0e4f5b06ceba52dac0 | rougeth/bottery | bottery/message.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ncars = 100\nspace_in_a_car = 4.0\ndrivers = 30\npassengers = 90\ncars_not_driven = cars - drivers\ncars_driven = drivers\ncarpool_capacity = cars_driven * space_in_a_car\naverage_passengers_per_car = passengers / cars_driven\n\n\nprint(\"Th... | python | edit | 1 | 0 | mit | 0d73f5d18a927ffebc3fa32180b608f0c96dcdf1 | Oreder/PythonSelfStudy | Exe_04.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport matplotlib.pyplot as plt\nimport theanets\n\nfrom utils import load_mnist, plot_layers, plot_images\n\n\ntrain, valid, _ = load_mnist()\n\ne = theanets.Experiment(\n theanets.Autoencoder,\n layers=(784,... | python | edit | 1 | 0 | mit | 83cbec4ccf669c997bbe6c7131f63ad08a482c39 | lmjohns3/theanets,chrinide/theanets,devdoer/theanets | examples/mnist-deepautoencoder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ConfigParser\nimport os\nimport sys\n\nUSER_DIR = os.path.join(os.path.expanduser('~'))\nUSER_CONFIG = os.path.join(USER_DIR, '.twphotos')\nd = os.path.dirname(__file__)\nPROJECT_PATH = os.path.abspath(os.path.join(d, os.pardir))\nTE... | python | edit | 1 | 0 | bsd-2-clause | 5c2b5b4ad973717ab35c75ff8d5d63d87c15cf79 | shichao-an/twitter-photos | twphotos/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nimport pytest\n\nfrom owslib.fes import PropertyIsEqualTo\nfrom pydov.search.boring import BoringSearch\nfrom tests.abstract import (\n AbstractTestSearch,\n service_ok,\n)\n\n\nclass TestEncoding(Abstract... | python | edit | 1 | 1 | mit | f10ac5cb7e01feeaaab5b8d308cb0640afaa895c | DOV-Vlaanderen/pydov | tests/test_encoding.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyrox.filtering as filtering\n\n\nclass SimpleFilter(filtering.HttpFilter):\n \"\"\"\n This is an example of a simple filter that simply prints out the\n user-agent value from the header\n \"\"\"\n\n @filtering.handles... | python | edit | 1 | 3 | mit | 09371cf8f27c49dec97b05e26ede4709fb01aa81 | zinic/pyrox,jon-armstrong/pyrox,jon-armstrong/pyrox,akatrevorjay/pyrox,zinic/pyrox,jon-armstrong/pyrox,zinic/pyrox,akatrevorjay/pyrox,akatrevorjay/pyrox | examples/filter/simple_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cartridge.shop.checkout import CheckoutError\nfrom cartridge.shop.models import Cart\n\nfrom commweb.exc import PaymentDeclinedError\nfrom commweb.purchase import Purchase\n\ndef cartridge_payment_handler(request, order_form, order):\n... | python | edit | 4 | 2 | bsd-2-clause | cc51207881be9c76690bcbc1ce14d048ecc71d76 | sjkingo/django-commweb | commweb/cartridge_hook.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import update_wrapper, wraps\nfrom django.contrib.auth import REDIRECT_FIELD_NAME\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom django.utils.decorators import available_attrs\nfrom django.utils.http import... | python | edit | 4 | 2 | mit | f9abd5434dded655591029ae45859e8608b4e5d6 | tino/django-facebook2,srijanmishra/django-facebook,aidanlister/django-facebook,tino/django-facebook2,vstoykov/django4facebook | django_facebook/decorators.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom getpass import getpass\n\nfrom scrapy.commands.crawl import Command as BaseCommand\n\n\ndef sanitize_query(query):\n return query.replace(' ', '+')\n\n\nclass Command(BaseCommand):\n def short_desc(self):\n return \"Scrap ... | python | edit | 1 | 6 | mit | 79fd5586625d2d7873bc71514eda121325a9646a | nihn/linkedin-scraper,nihn/linkedin-scraper | linkedin_scraper/commands/people_search.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nGenerate snippets to copy-paste.\n\"\"\"\nimport sys\n\nfrom jinja2 import Template\n\nfrom fetch import HERE, load_awesome_people\n\nTPL_FILE = HERE / 'snippet.jinja2'\nHTTPIE_TEAM = {\n 'BoboTiG',\n 'claudiatd',\n 'jakubr... | python | edit | 1 | 5 | bsd-3-clause | 5dc4a262771e616458feeaa9bf4ca8568736761a | jakubroztocil/httpie,PKRoma/httpie,jakubroztocil/httpie,jakubroztocil/httpie,PKRoma/httpie | docs/contributors/generate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom us_ignite.snippets.models import Snippet\n\n\nFIXTURES = [\n {\n 'slug': 'home-box',\n 'name': 'UP NEXT: LOREM IPSUM',\n 'body': '',\n 'url_text': 'G... | python | edit | 3 | 3 | bsd-3-clause | 763051db8cb4efe9b3e85fdb3d974674cf435607 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/snippets/management/commands/snippets_load_fixtures.py | rejected_duplicate | Near-duplicate of sample 3066 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 OpenStack Foundation\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Li... | python | edit | 3 | 0 | apache-2.0 | d59635e9542ca54b39eaa10f31b53da46df68e61 | gkotton/vmware-nsx,gkotton/vmware-nsx | neutron/plugins/ml2/drivers/mlnx/config.py | rejected_duplicate | Near-duplicate of sample 14457 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom os import environ, path\n\nfrom ._settings_default import *\nfrom ..exceptions import ImproperlyConfigured\n\nprofile = environ.get(\"GOLD_DIGGER_PROFILE\", \"local\")\n\nif profile == \"master\":\n from .... | python | edit | 4 | 0 | apache-2.0 | f16d93216e1f0890b0551ca3b741130bb12781ef | business-factory/gold-digger | gold_digger/settings/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import call_command\n\nfrom fjord.base.tests import TestCase\n\n\nclass TestGenerateData(TestCase):\n def test_generate_data(self):\n \"\"\"Make sure ./manage.py generatedata runs.\"\"\"\n call_c... | python | edit | 1 | 2 | bsd-3-clause | ef7163a18ee1cf11c1290f2a8832d8cf39fb552c | hoosteeno/fjord,lgp171188/fjord,mozilla/fjord,Ritsyy/fjord,lgp171188/fjord,rlr/fjord,staranjeet/fjord,DESHRAJ/fjord,hoosteeno/fjord,Ritsyy/fjord,rlr/fjord,lgp171188/fjord,DESHRAJ/fjord,mozilla/fjord,hoosteeno/fjord,hoosteeno/fjord,rlr/fjord,Ritsyy/fjord,staranjeet/fjord,lgp171188/fjord,mozilla/fjord,Ritsyy/fjord,DESHRA... | fjord/base/tests/test_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.template.response import TemplateResponse\n\nfrom ..product.utils import products_with_availability, products_with_details\n\n\ndef home(request):\n products = Product.objects.get_available_products()[:6]\n products = prod... | python | edit | 1 | 1 | bsd-3-clause | 49a371728a2e9167494264e0c07c6dd90abec0ff | jreigel/saleor,car3oon/saleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,mociepka/saleor,car3oon/saleor,KenMutemi/saleor,jreigel/saleor,UITools/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,itbabu/saleor,UITools/saleor,KenMutemi/saleor,mociepka/saleor,itbabu/saleor,... | saleor/core/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom collections import Counter\nfrom Bio import SeqIO\nfrom Bio.SeqUtils import GC\nfor seq_record in SeqIO.parse(\"samples/test.fasta\", \"fasta\"):\n cnt = Counter()\n line = str(seq_record.seq)\n i = 0\n for j... | python | edit | 5 | 5 | apache-2.0 | 96dd8312cded04e5f5758495e72238d58905be7b | PDX-Flamingo/codonpdx-python,PDX-Flamingo/codonpdx-python | count.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .metakernel import MetaKernel\nfrom .process_metakernel import ProcessMetaKernel\nfrom .magic import Magic, option\nfrom .parser import Parser\n\n__all__ = ['Magic', 'MetaKernel', 'option']\n\n__version__ = '0.3'\n\ndel magic, metakern... | python | edit | null | null | bsd-3-clause | d6ddc3b41040a374c61d4624e052fa8f1e58ee37 | Calysto/metakernel | metakernel/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function\nfrom odin import exceptions\nfrom odin.fields import ScalarField\nfrom odin.validators import EMPTY_VALUES\nfrom .datatypes import Amount\n\n__all__ = ('Amount... | python | edit | 1 | 4 | bsd-3-clause | 29562b08e436abc8465404e49d9193537721b717 | python-odin/odin | src/odin/contrib/money/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport hc2002.plugin as plugin\nimport hc2002.config as config\n\nplugin.register_for_resource(__name__, 'hc2002.resource.instance')\n\n_prefixes = ('availability-zone:', 'image:', 'kernel:', 'key:',\n 'load-balancers:', 'ramdisk:', ... | python | edit | 3 | 7 | apache-2.0 | 337e7ae58abc7c192633144cc3913078ae3d38bf | biochimia/hc2000 | hc2002/plugin/symbolic_values.py | rejected_duplicate | Near-duplicate of sample 11690 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import url\nfrom django.http import HttpResponse\nfrom django.views import generic\n\nfrom . import views\n\nurlpatterns = (\n url(r'^robots\\.txt$', views.RobotsView.as_view(), nam... | python | edit | 1 | 1 | mit | cb533d74f2e634d9e8c7d0515307fad107da36ef | dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp,dulaccc/cookiecutter-django-herokuapp | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/apps/site/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import (absolute_import, division, print_function)\n\nfrom ..nernst import nernst_potential\n\n\ndef test_nernst_potential():\n # Sodium in cells\n assert abs(1000 * nernst_potential(145, 15, 1... | python | edit | 1 | 1 | bsd-2-clause | 6b93f6a6bedf875d4bad1af2493c91b28a625ea9 | bjodah/aqchem,bjodah/aqchem,bjodah/chempy,bjodah/chempy,bjodah/aqchem | chempy/electrochemistry/tests/test_nernst.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Django admin interface for `~builds.models.Build` and related models.\n\n\"\"\"\n\nfrom django.contrib import admin\nfrom readthedocs.builds.models import Build, VersionAlias, Version, BuildCommandResult\nfrom guardian.admin import Gu... | python | edit | 1 | 0 | mit | f0cf4b51987befb25f605ee421554da7615c9472 | davidfischer/readthedocs.org,safwanrahman/readthedocs.org,espdev/readthedocs.org,safwanrahman/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,davidfischer/readthedocs.org,espdev/readthedocs.org,rtfd/readthedocs.org,pombredanne/readthedocs.org,espdev/readthedocs.org,espdev/readthedocs.org,davidfischer/readthed... | readthedocs/builds/admin.py | rejected_duplicate | Near-duplicate of sample 14418 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url\nfrom django.views.generic import TemplateView\n\nurlpatterns = patterns('django.views.generic.simple',\n url(r'^simple/$', TemplateView.as_view(), name='simple-direct'),\n)\n\n```\n\nA... | python | edit | 1 | 0 | bsd-3-clause | 2735d4a7b1ae0af0d58ea0accb973ab11477783e | jezdez/django-hosts | django_hosts/tests/urls/simple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom cgi import parse_header\nimport json\n\nfrom django.http import HttpResponse, Http404\n\nRPC_MARKER = '_rpc'\n\n\nclass Resource(object):\n\n def __init__(self, request, *args, **kwargs):\n self.request = request\n s... | python | edit | 1 | 4 | mit | 071926edc64241b0359c9a0148fc0825a09cb6ba | funkybob/django-marionette | marionette/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ephem\n\nm = getattr(ephem, (raw_input('Planet: ')))\n\nprint ephem.constellation(m(raw_input('yyyy/mm/dd: ')))\n```\n\nApply this change: Select planet and display alt/az data\n\nCreated a function localized to South Bend, IN, to di... | python | edit | 3 | 1 | mit | 24d3af9288102e5061c3a1f9e6fe2d7d578f6cc5 | bennettscience/PySky | astro.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db.models import F, Q\nfrom django.core.management.base import NoArgsCommand\n\nfrom modeltranslation.settings import DEFAULT_LANGUAGE\nfrom modeltranslation.translator import translator\nfrom modeltrans... | python | edit | 1 | 7 | bsd-3-clause | facfa3bcd7d35163e0504ef4b6f9b3b15e778993 | marctc/django-modeltranslation,akheron/django-modeltranslation,nanuxbe/django-modeltranslation,marctc/django-modeltranslation,nanuxbe/django-modeltranslation,SideStudios/django-modeltranslation,akheron/django-modeltranslation,yoza/django-modeltranslation,extertioner/django-modeltranslation,extertioner/django-modeltrans... | modeltranslation/management/commands/update_translation_fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"ICU (LEGO Island Configuration Utility).\n\nCreated 2015 Triangle717\n<http://le717.github.io/>\n\nLicensed under The MIT License\n<http://opensource.org/licenses/MIT/>\n\n\"\"\"\n\n\nclass ActionsQueue:\n\n ... | python | edit | 1 | 1 | mit | 0ca07405b864f761ae1d7ed659cac67c799bf39a | le717/ICU | src/core/queue.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__title__ = 'cihai'\n__package_name__ = 'cihai'\n__version__ = '0.9.0a3'\n__description__ = 'Library for CJK (chinese, japanese, korean) language data.'\n__author__ = 'Tony Narlock'\n__email__ = '<EMAIL>'\n__github__ = 'https://github.com/c... | python | edit | 1 | 0 | mit | 6f947c99411692f8fe4899203ed9bf202b0412a3 | cihai/cihai,cihai/cihai | cihai/__about__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n# @file Word Pattern\n# @brief Given 2 sets check if it is a bijection\n\n# https://leetcode.com/problems/word-pattern/\n\n'''\nGiven a pattern and a string str, find if str follows the same pattern.\nHere follow means a full match, such... | python | edit | 2 | 2 | mit | 922db591ca726acae07e2628119b95aa705f414c | ngovindaraj/Python | leetcode/ds_string_word_pattern.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pymongo import MongoClient\n\nclass Cards:\n def __init__(self, dbname='cards'):\n \"\"\"Instantiate this class.\n\n Set up a connection to the given Mongo database.\n Get to the collection we'll store car... | python | edit | 1 | 4 | isc | c1f270700d9de209577b64c40b71b5f5b69c5aae | wwu-nosql/cards | cards.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module provides an API and processor for DrugBank content.\nIt builds on the XML-formatted data schema of DrugBank and expects\nthe XML file to be available locally. The full DrugBank download\ncan be obtained at: https://www.dru... | python | edit | 4 | 0 | bsd-2-clause | ec9239fda210f3d71a81045fdba9d72bab04a05b | sorgerlab/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra | indra/sources/drugbank/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport py\nimport pytest\n\nfrom tests.lib.path import Path\n\n\n@pytest.fixture\ndef tmpdir(request):\n \"\"\"\n Return a temporary directory path object which is unique to each test\n function invocation, created as a sub directo... | python | edit | 1 | 1 | mit | f70b2a187c274685cb19def1b48256822b0e3f9f | KarelJakubec/pip,qbdsoft/pip,alquerci/pip,nthall/pip,dstufft/pip,nthall/pip,esc/pip,blarghmatey/pip,chaoallsome/pip,wkeyword/pip,alex/pip,jmagnusson/pip,James-Firth/pip,msabramo/pip,atdaemon/pip,natefoo/pip,rouge8/pip,h4ck3rm1k3/pip,zvezdan/pip,haridsv/pip,rbtcollins/pip,Ivoz/pip,luzfcb/pip,harrisonfeng/pip,willingc/pi... | tests/conftest.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.