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\n\"\"\"dependenpy plugins module.\"\"\"\n\ntry:\n from archan import Provider, Argument, DSM as ArchanDSM\n from .dsm import DSM as DependenpyDSM\n from .helpers import guess_depth\n\n class InternalDep... | python | edit | 1 | 2 | isc | 9249dc161e9fdd64e15a42f644232c43cb6875b2 | Pawamoy/dependenpy,Pawamoy/dependenpy | src/dependenpy/plugins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import standard_library\nfrom builtins import * # NOQA\nstandard_library.i... | python | edit | 1 | 1 | mit | 9495a43e0797d1a089df644663900957cadc3ac0 | toslunar/chainerrl,toslunar/chainerrl | tests/agents_tests/test_iqn.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on Jul 16, 2014\n\n@author: thomas\n'''\nimport unittest\n\nclass TestTimeseries (unittest.TestCase):\n\n\n def setUp(self):\n pass\n\n\n def tearDown(self):\n pass\n\n\n def test_strToXTArray (self):\n ... | python | edit | 1 | 2 | mit | 2739999c6fa0628e7cfe7a918e3cde3b7d791d66 | brianthomas/astroplpython,brianthomas/astroplpython | tests/astroplpython/data/test_Timeseries.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sqlalchemy import *\nfrom migrate import *\n\nmetadata = MetaData()\n \ntable = Table('crud_versions', metadata,\n Column('id', Integer, primary_key=True),\n Column('object_type', Text, nullable=False),\n Column('object_id'... | python | edit | 19 | 1 | bsd-3-clause | 8ae27080b8ff9fe124733005a8006261a3d22266 | mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen | migrate/crud/versions/001_create_initial_tables.py | rejected_lint | Too many lint violations: 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport stat\nfrom os.path import join, abspath\nfrom subprocess import call\n\ndef prepare(globs, locs):\n # RTD defaults the current working directory to where conf.py resides.\n # In our case, t... | python | edit | 2 | 2 | bsd-3-clause | 2f10aa07422c8132218d8af336406629b336550c | fpoirotte/XRL | docs/src/conf.py | rejected_duplicate | Near-duplicate of sample 604 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nimport time\nfrom PIL import Image # Depends on the Pillow lib\n\nfrom opensimplex import OpenSimplexNoise\n\nWIDTH = 512\nHEIGHT = 512\nFEATURE_SIZE = 24\n\ndef main():\n random.seed(time.time())\n seed = random.randin... | python | edit | 1 | 3 | mit | 93512f1837a4e72752d4ffa07ac49e1f2cd5a7f6 | lmas/opensimplex,antiface/opensimplex | opensimplex_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom immobilus import immobilus\nfrom immobilus.logic import _datetime_to_utc_timestamp\n\nfrom datetime import datetime\nfrom time import time\n\n\ndef test_time_function():\n\n dt = datetime(1970, 1, 1)\n assert _datetime_to_utc_tim... | python | edit | 1 | 1 | apache-2.0 | d8d77d4dd98d9287be8a98f0024e5f458bef2b66 | pokidovea/immobilus | tests/test_time.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\nimport sys\nimport urllib\n\nlogger = logging.getLogger('mopidy.utils.path')\n\ndef get_or_create_folder(folder):\n folder = os.path.expanduser(folder)\n if not os.path.isdir(folder):\n logger.info(u'... | python | edit | 2 | 3 | apache-2.0 | b455b545779836e6fb2ff69717e6b0a26e23e2cc | priestd09/mopidy,pacificIT/mopidy,kingosticks/mopidy,rawdlite/mopidy,woutervanwijk/mopidy,jcass77/mopidy,dbrgn/mopidy,diandiankan/mopidy,abarisain/mopidy,mopidy/mopidy,adamcik/mopidy,pacificIT/mopidy,hkariti/mopidy,swak/mopidy,mokieyue/mopidy,dbrgn/mopidy,jmarsik/mopidy,bencevans/mopidy,jcass77/mopidy,dbrgn/mopidy,jmar... | mopidy/utils/path.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# Flask application default config:\n# http://flask.pocoo.org/docs/config/#configuring-from-files\n# https://github.com/mbr/flask-appconfig\n\n\nproject_name = u'Ninhursag'\n\n\nclass Defau... | python | edit | 1 | 0 | mit | d13db6f3466629df7d3aa8d2dc7eb31a9ec1f8b4 | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag | app/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2018 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test bitcoind shutdow... | python | edit | 1 | 1 | mit | 4412a59bfe8228698e5b5bbe8bb21c8e8a70d357 | fujicoin/fujicoin,myriadteam/myriadcoin,apoelstra/bitcoin,prusnak/bitcoin,namecoin/namecore,midnightmagic/bitcoin,jamesob/bitcoin,fujicoin/fujicoin,pataquets/namecoin-core,r8921039/bitcoin,lateminer/bitcoin,DigitalPandacoin/pandacoin,Sjors/bitcoin,sipsorcery/bitcoin,bitcoin/bitcoin,AkioNak/bitcoin,bespike/litecoin,part... | test/functional/feature_shutdown.py | rejected_duplicate | Near-duplicate of sample 2049 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom evesp.event import Event\n\nclass TestEvent(unittest.TestCase):\n def setUp(self):\n self.evt = Event(foo='bar')\n\n def test_event_creation(self):\n self.assertEqual(self.evt.foo, 'bar')\n ... | python | edit | 1 | 1 | apache-2.0 | 77ee44b0af8a80babf0a88ddd4f53f2f4ad10d2d | BlackLight/evesp | tests/test_event.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass SendwithusError(Exception):\n \"\"\"Base class for Sendwithus API errors\"\"\"\n\n\nclass AuthenticationError(SendwithusError):\n \"\"\"API Authentication Failed\"\"\"\n\n\nclass APIError(SendwithusError):\n \"\"\"4xx - Inval... | python | edit | 1 | 1 | apache-2.0 | 3af22fd5583ee110f731b9e1ebecba67ebee2bd4 | sendwithus/sendwithus_python | sendwithus/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\n\nfrom os import getenv\n\n\napp = Flask(__name__)\napp.config['SQLALCHEMY_DATABASE_URI'] = getenv('DATABASE_URL',\n default='po... | python | edit | 3 | 0 | mit | 891a85fc427b16295c6f792d7311eca1e497332e | Demotivated/loadstone | api/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport setuptools\n\nsetuptools.setup(\n name='gymnasium',\n version='0.0.2',\n packages=setuptools.find_packages(),\n author='Leif Johnson',\n author_email='<EMAIL>',\n description='yet another OpenGL-with-phys... | python | edit | 1 | 0 | mit | ea991176d3f0562b5000dbd03320a9145129e586 | EmbodiedCognition/pagoda,EmbodiedCognition/pagoda | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pygraphc.misc.LKE import *\nfrom pygraphc.evaluation.ExternalEvaluation import *\n\n# set input and output path\nip_address = '161.166.232.17'\nstandard_path = '/home/hudan/Git/labeled-authlog/dataset/Hofstede2014/dataset1/' + ip_addre... | python | edit | 2 | 0 | mit | 602184794c3f38bf6307cf68f4d61294b523c009 | studiawan/pygraphc | examples/LKE_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for suorganizer project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/\n\"\"\"\n... | python | edit | 1 | 0 | bsd-2-clause | f100faade749d86597e1c8c52b88d55261e7a4dc | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | suorganizer/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom patient.models import Patient\nfrom django.utils.encoding import smart_unicode\n\n\nclass MotivationText(models.Model):\n patient = models.ForeignKey(Patient, null=False)\n text = models.TextField(de... | python | edit | 1 | 2 | mit | 13da95de0f2fb17ec6cbf005be33db3b3d348831 | sigurdsa/angelika-api | motivation_text/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='mdf_forge',\n version='0.5.0',\n packages=['mdf_forge'],\n description='Materials Data Facility python package',\n long_description=\"Forge is the Materials Data Facility Python ... | python | edit | 1 | 0 | apache-2.0 | dfd9d6c010083893814cfbc9cc4953ac8f785ecf | materials-data-facility/forge | forge/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nImplementation of Stack data structure\n\n'''\n\n\nclass Stack:\n\n def __init__(self):\n\t'''\n\tInitialize stack\n\n\t'''\n\tself.items = []\n\n\n def is_empty(self):\n\t'''\n\tReturn True if stack if empty else False\n\t\n\t''... | python | edit | 14 | 1 | mit | eb4d480d8bf7807f7a0d38f445a5779331f8d3f3 | ueg1990/aids | aids/stack/stack.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom . import get_user_model\n\n\nclass UserSuForm(forms.Form):\n\n user = forms.ModelChoic... | python | edit | 1 | 4 | mit | 9c037ed3ebe7353b419562311bbc1f07875ab358 | adamcharnock/django-su,PetrDlouhy/django-su,adamcharnock/django-su,PetrDlouhy/django-su | django_su/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nfrom .tokenizer_exceptions import TOKENIZER_EXCEPTIONS\nfrom .tag_map import TAG_MAP\nfrom .stop_words import STOP_WORDS\nfrom .lemmatizer import LOOKUP\n\nfrom ..tokenizer_exceptio... | python | edit | 1 | 1 | mit | 8815507f8e334238d269468e08c22f4415e58528 | recognai/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spa... | spacy/lang/es/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom uuid import uuid4\n\n\nclass MessageBus:\n \"\"\"A class that is used behind the scenes to coordinate events and timings of\n animations.\n \"\"\"\n\n def __init__(self):\n self.subs = {}\n\n def new_id(self):\n ... | python | edit | 1 | 5 | mit | b812a8da81ec9943d11b8cb9f709e234c90a2282 | alcarney/stylo,alcarney/stylo | stylo/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\nclass ResultPlugin(object):\n \"\"\"\n Captures the TestResult object for later inspection.\n\n nose doesn't return the full test result object from any of its runner\n methods. Pass an instance of this plugin to the TestPr... | python | edit | 1 | 1 | bsd-3-clause | 8a6bc4a46141b42d4457fdc4d63df234f788253d | aristiden7o/django-nose,harukaeru/django-nose,disqus/django-nose,dgladkov/django-nose,mzdaniel/django-nose,sociateru/django-nose,krinart/django-nose,alexhayes/django-nose,daineX/django-nose,harukaeru/django-nose,mzdaniel/django-nose,Deepomatic/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,alexhaye... | django_nose/plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gdata.youtube.service import YouTubeService, YouTubeVideoQuery\n\nclass YoutubeMusic:\n def __init__(self):\n self.service = YouTubeService()\n\n def search(self, artist):\n query = YouTubeVideoQuery()\n quer... | python | edit | 1 | 6 | mit | 90ab0bfbac851a52f0e48f5186a727692e699a6f | 6/GeoDJ,6/GeoDJ | geodj/youtube.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Test for parsing arff headers only.\"\"\"\nimport os\n\nfrom scipy.testing import *\n\nfrom scipy.io.arff.arffread import read_header, MetaData\n\ndata_path = os.path.join(os.path.dirname(__file__), 'data')\n\nt... | python | edit | 7 | 2 | bsd-3-clause | 026f4e4bcd23e716db508d370e7c84fbf60f4bd0 | lesserwhirls/scipy-cwt,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt | scipy/io/arff/tests/test_header.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pkg_resources\nimport skyfield\nfrom skyfield.api import load\nfrom skyfield.functions import load_bundled_npy\n\ndef main():\n print('Skyfield version: {0}'.format(skyfield.__version__))\n print('jpl... | python | edit | 1 | 2 | mit | 28803e4669f4c7b2b84e53e39e3a0a99ff57572d | skyfielders/python-skyfield,skyfielders/python-skyfield | skyfield/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .baselauncher import BaseLauncher\n\nclass BaseTestCases(BaseLauncher):\n def handle_problem_set(self, name, problems):\n for i, prob in enumerate(problems):\n answer_got = self.get_answer(prob, name, i, len(proble... | python | edit | 1 | 5 | mit | d7ea1e9c7728b5e98e6c798ab3d5ef5b9066463c | vnetserg/barrage | barrage/basetestcases.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom rest_framework.serializers import HyperlinkedModelSerializer\n\nfrom trex.models.project import Projec... | python | edit | 1 | 0 | mit | 5aef0b64477248f6cdadfd864a6d05cbc6939f09 | bjoernricks/trex,bjoernricks/trex | trex/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.http import HttpResponseRedirect\nfrom django.urls import reverse\nfrom django.views.generic.base import TemplateView\nfrom django.views.generic... | python | edit | 1 | 3 | bsd-2-clause | a2c13df57f2db1721c656200c1c37cf0e52b22c9 | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | dashboard/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\nimport logging\nfrom django.core.management.base import BaseCommand\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass Command(BaseCommand):\n help = \"This runs the MCCB1sSLA report\"\n\n def handle(self, *args, **o... | python | edit | 1 | 1 | mit | 70d435e1176a1132db6a04c34c04567df354d1d9 | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/reports/management/commands/mi_cb1_report.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\ncomo.settings - some global variables\n\"\"\"\n\nimport os\n\nfrom paxo.util import DEBUG_MODE\n\nLOCATION_CODES = [\n '1C', '2Z', '4H', '5K', '8H', '5D', '7J', 'CK', 'E', 'EE',\n 'F', 'FC', 'G8', 'GQ'... | python | edit | 1 | 0 | bsd-3-clause | f03a8fa100aeb5944402ae3b2761c0373fb6a29d | cwoebker/como | como/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom allauth.socialaccount.providers.base import ProviderAccount\nfrom allauth.socialaccount.providers.oauth.provider import OAuthProvider\n\n\nclass TrelloAccount(ProviderAccount):\n def get_profile_url(self):\n return None\n\n ... | python | edit | 1 | 1 | mit | c69b9519c2984154dd15d31395d9590e00d689b5 | lukeburden/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,bittner/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,bittner/django-allauth,bittner/django-allauth,pennersr/django-allauth,lukeburden/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth | allauth/socialaccount/providers/trello/provider.py | rejected_duplicate | Near-duplicate of sample 1477 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\nimport pytest\nimport tempfile\nimport numpy as np\nimport bands_inspect as bi\nfrom click.testing import CliRunner\n\nimport tbmodels\nfrom tbmodels._cli import cli\n\n\ndef te... | python | edit | 4 | 1 | apache-2.0 | 918db0dddae47e660aecabba73b460dc13ca0bc4 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | tests/test_cli_eigenvals.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport aioes\n\nfrom .utils import wait_for_all_services\nfrom .settings import ELASTICSEARCH_ENDPOINTS\n\n\nasync def connect_to_elasticsearch():\n print(\"Connecting to Elasticsearch...\")\n\n await wait_for_all_services(ELASTICSEAR... | python | edit | 1 | 1 | mit | b448d52e5a30346633dd20e52431af39eb6859ec | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | importer/importer/connections.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import models\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import ValidationError\nfrom cryptography.hazmat.primitives.serialization import load_ssh_public_key\nf... | python | edit | 3 | 5 | isc | dee7b02d0cdd6969b4228086ab9af77ad1da60ef | crgwbr/asymmetric_jwt_auth,crgwbr/asymmetric_jwt_auth | asymmetric_jwt_auth/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\n\nsetup(name='django-backupdb',\n version='1.0',\n description='Management comm... | python | edit | 1 | 1 | bsd-2-clause | c1a152126aa92e7b0a1139eb9c172f2aedc4e744 | fusionbox/django-backupdb | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom freeposte import manager, db\nfrom freeposte.admin import models\nfrom passlib import hash\n\n\n@manager.command\ndef flushdb():\n \"\"\" Flush the database\n \"\"\"\n db.drop_all()\n\n\n@manager.command\ndef initdb():\n \"... | python | edit | 1 | 2 | mit | 3976a5b38e1b5356b83d22d9113aa83c9f09fdec | kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io | admin/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom datetime import datetime, timedelta\n\nfrom changes.config import queue\nfrom changes.constants import Status\nfrom changes.experimental.stats import RCount\nfrom changes.models import Task\nfr... | python | edit | 1 | 3 | apache-2.0 | 802d030087d7f15add5ccfa5d305555632575642 | bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes | changes/jobs/cleanup_tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hoomd.python_action import _PythonAction, _InternalPythonAction\nfrom hoomd.custom_action import _CustomAction, _InternalCustomAction\n\n\nclass CustomAnalyzer(_CustomAction):\n def analyze(self, timestep):\n return self.act(... | python | edit | 1 | 2 | bsd-3-clause | 27deb367c8fb080ad3a05c684920d2a90fb207f5 | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/analyze/python_analyzer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef lta_to_uvfits():\n\tlta_files = glob.glob('*.lta*')\n\t#flag_files = glob.glob('*.FLAGS*')\n\tfor i in range(len(lta_files)):\n\t\tlta_file_name = lta_files[i]\n\t\tuvfits_file_name = lta_file_name +'.UVFITS'\n\t\tspam.convert_lta_to_uv... | python | edit | 2 | 2 | mit | 21d9b2f89a7eb9a6801a48c2586cc360e6be47c3 | NCRA-TIFR/gadpu,NCRA-TIFR/gadpu | LTA_to_UVFITS.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n },\n}\n\n\n```\n\nApply this change: Fix Travis co... | python | edit | 2 | 0 | bsd-3-clause | 97ffd9f5271ffb93b04da06866591f6e6650d76b | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | bluebottle/settings/travis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nargh\n\"\"\"\nimport os\nimport json\nfrom roamer.entry import Entry\n\nentries_path = os.path.expanduser('~/.roamer-data/entries.json')\n\nclass Record(object):\n def __init__(self):\n self.entries = {}\n # TODO: L... | python | edit | 1 | 3 | mit | 53b17a3b576a90e5d5bb773ca868a3dd160b3273 | abaldwin88/roamer | roamer/record.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport types\nfrom os.path import abspath, dirname, join\nfrom epubcheck import utils, samples\n\n\nTEST_DIR = abspath(dirname(samples.__file__))\n\n\ndef test_utils_java_ver... | python | edit | 1 | 1 | bsd-2-clause | 9f5f59783fa29cf376f975864af1b3a9325cadd0 | titusz/epubcheck | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/env python3\n# Prosite regular expressions matcher\n# Copyright (c) 2014 Tomasz Truszkowski\n# All rights reserved.\n\nimport prosite_matcher\n\nif __name__ == '__main__':\n\n\tprint(\"\\n Hi, this is Prosite Matcher! \\n\")\n\n\tseq... | python | edit | 1 | 0 | mit | e44dc4d68845845f601803f31e10833a24cdb27c | stack-overflow/py_finite_state | prosite_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .conditions import *\nfrom .exceptions import *\nfrom .fields import *\nfrom .lists import *\nfrom .types import *\n\n```\n\nApply this change: PEP8: Replace star imports with explicit imports"
},
{
"role": "assistant",
"co... | python | edit | 1 | 0 | isc | 8657f7aef8944eae718cabaaa7dfd25d2ec95960 | RevolutionTech/django-conditions,RevolutionTech/django-conditions,RevolutionTech/django-conditions | conditions/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# \n# This script completely migrates a <= 0.8.x Trac environment to use the new\n# default ticket model introduced in Trac 0.9.\n# \n# In particular, this means that the severity field is removed (or rather\n# disabl... | python | edit | 2 | 4 | bsd-3-clause | 5b9e2849c6ee49d68968fdc2588fefd5a25e7bac | rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac | contrib/migrateticketmodel.py | rejected_duplicate | Near-duplicate of sample 1139 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom importlib import import_module\nfrom django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY\n\n\ndef force_login(user, driver, base_url):\n from django.conf import settings\n SessionStore = import_module(se... | python | edit | 1 | 1 | mit | 0deac2fe49d1240a1d5fee1b9c47313bde84d609 | feffe/django-selenium-login,feffe/django-selenium-login | seleniumlogin/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom airflow.hooks import MySqlHook\nfrom airflow.models import BaseOperator\nfrom airflow.utils import apply_defaults\n\n\nclass MySqlOperator(BaseOperator):\n \"\"\"\n Executes sql code in a specific MySQL database... | python | edit | 1 | 1 | apache-2.0 | a5441719e8f12cc16189b2ca110c878decfed120 | jlowin/airflow,lxneng/incubator-airflow,cjqian/incubator-airflow,dhuang/incubator-airflow,gritlogic/incubator-airflow,forevernull/incubator-airflow,modsy/incubator-airflow,jesusfcr/airflow,ronfung/incubator-airflow,nathanielvarona/airflow,holygits/incubator-airflow,akosel/incubator-airflow,wxiang7/airflow,fenglu-g/incu... | airflow/operators/mysql_operator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.sites.models import Site\nfrom django.core.mail import mail_managers\nfrom django.core.management.base import NoArgsCommand\nfrom django.core.urlresolvers import reverse\n\nimport requests\n\nfrom deflect.models import S... | python | edit | 1 | 3 | bsd-3-clause | 5f430b076ad70c23c430017a6aa7a7893530e995 | jbittel/django-deflect | deflect/management/commands/checkurls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport sys\nimport os\n\nsys.path.append('../nsmaps')\n\nimport nsmaps\nfrom nsmaps.station import StationType\n\nDATA_DIR = './website/nsmaps-data'\n\nMAX_STATIONS = 60\n\n\ndef main():\n stations = nsmaps.stat... | python | edit | 3 | 5 | mit | 618bcd64fa23e1bd8868c06ce38e30b7ef47b7e1 | bartromgens/nsmaps,bartromgens/nsmaps,bartromgens/nsmaps | bin/create_traveltime_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A module containing tests for the library implementation of accessing utilities.\"\"\"\nfrom lxml import etree\nimport iati.core.resources\nimport iati.core.utilities\n\n\nclass TestUtilities(object):\n \"\"\"A container for tests ... | python | edit | 1 | 2 | mit | af31c71e49b7d63c24ab7d7c04a5e908451263e2 | IATI/iati.core,IATI/iati.core | iati/core/tests/test_utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom artgraph.node import NodeTypes\nfrom artgraph.plugins import Plugin\n\nclass InfoboxPlugin(Plugin):\n def __init__(self, node):\n self._node = node\n \n @staticmethod\n def get_target_node_type():\n return Nod... | python | edit | 1 | 7 | mit | 1a830d0581f2baed76cb48eeee5f32d465737657 | dMaggot/ArtistGraph | src/artgraph/plugins/infobox.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2011-2016 Josh Kearney\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#\n# ht... | python | edit | 1 | 2 | apache-2.0 | 6fe391b2e2f9b88a6835a6636a5d58810852ab5e | jk0/pyhole,jk0/pyhole,jk0/pyhole | pyhole/tests/test_log.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.management import call_command\nfrom south.signals import post_migrate\n\n__author__ = 'xaralis'\n\n\nAPPS_TO_WAIT_FOR = ['clients', 'services']\n\n\ndef load_static_data(app, **kwargs):\n ... | python | edit | 2 | 2 | mit | b14ca021e93c40b02c5fef4972795796bddeb5ba | fragaria/BorIS,fragaria/BorIS,fragaria/BorIS | boris/utils/management/load_static_fixtures.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .. project import project\n\n\"\"\"Common command line arguments for run and demo.\"\"\"\n\n\ndef add_to_parser(parser):\n parser.add_argument(\n '-d', '--driver', default='simpixel',\n help='Default driver type if no ... | python | edit | 1 | 4 | mit | 00aad9bc179aa4a090f703db9669e8ba49ff8f3c | ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel | bibliopixel/main/arguments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright 2016 EMBL-European Bioinformatics Institute\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\... | python | edit | 3 | 2 | apache-2.0 | ebd9949177db3e2db51b47b74254908e300edc13 | Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq | process_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nprint(sys.version_info)\nimport random\nimport time\n\nimport networkzero as nw0\n\nquotes = [\n \"Humpty Dumpty sat on a wall\",\n \"Hickory Dickory Dock\",\n \"Baa Baa Black Sheep\",\n \"Old King Cole was a merry o... | python | edit | 1 | 6 | mit | f34330817414f72494aec359c169e5d6d9d1568f | tjguk/networkzero,tjguk/networkzero,tjguk/networkzero | examples/quotes/quotes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport logging\nfrom paste.deploy import loadapp\nfrom paste.script.util.logging_config import fileConfig\n\nlog = logging.getLogger(__name__)\n\n\ndef get_pylons_app(global_conf):\n pyramid_config = os.path.realpath(global_co... | python | edit | 1 | 2 | apache-2.0 | 1e5f8299dfa0e724933bb565359650a5dc579bb6 | asidev/aybu-core | aybu/core/dispatch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'tsune.views... | python | edit | 1 | 0 | mit | 32a61c6df871ad148a8c51b7b4cab3f392a2c61a | DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune | tsune/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_restful import Resource, Api, abort\nfrom .models import Comment, Lecture\n\napi = Api()\n\n\nclass CommentListResource(Resource):\n def get(self, lecture_id):\n db_lectures = Lecture.query.filter(Lecture.id == lecture_... | python | edit | 1 | 3 | mit | 8edd3879c87727b7d6b0808227d32d9bd3072c90 | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS | server/resources.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.core.checks import Warning, register\n\n\ndef warn_1_3_changes(app_configs, **kwargs):\n return [\n Warning(\n 'cmsplugin-contact-plus >= 1.3 has renamed the \"input\" field. Do not ... | python | edit | 1 | 2 | bsd-3-clause | d68935dfb34f7c5fc463f94e49f0c060717b17b8 | arteria/cmsplugin-contact-plus,arteria/cmsplugin-contact-plus,worthwhile/cmsplugin-remote-form,worthwhile/cmsplugin-remote-form | cmsplugin_contact_plus/checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom test_support import TESTFN\n\nimport os\nimport random\n\nsource = TESTFN + \".py\"\npyc = TESTFN + \".pyc\"\npyo = TESTFN + \".pyo\"\n\nf = open(source, \"w\")\nprint >> f, \"# This will test Python's ability to import a .py file\"\na... | python | edit | 8 | 0 | mit | b9fcd270f520f49fcbe85bcbc53940326f556fdf | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_import.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version_info__ = (0, 6, 0, None)\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 | 7a453a7c289bf72a84e69d5f69389afa2f492588 | Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django | winthrop/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom support import lib,ffi\nfrom qcgc_test import QCGCTest\n\nclass FitAllocatorTest(QCGCTest):\n def test_macro_consistency(self):\n self.assertEqual(2**lib.QCGC_LARGE_FREE_LIST_FIRST_EXP, lib.qcgc_small_free_lists + 1)\n ... | python | edit | 3 | 3 | mit | c080865fdb36da2718774ddff436325d947be323 | ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc | test/test_fit_allocator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport data\n\n\ns = data.Session()\nfor video in s.query(data.Video):\n print u'+++ Downloading {} +++'.format(video.title)\n video.download()\ndel s\n\n```\n\nApply this change: Print video title in quotes"
... | python | edit | 2 | 0 | mit | e999e9b9480d31c45bf13882081e36bd7e2c4c63 | drkitty/metatube,drkitty/metatube | download.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n# -*- coding: utf8 -*-\n\nfrom taemin import plugin\n\nclass TaeminCafe(plugin.TaeminPlugin):\n helper = {\"all\": \"Envoie un message à tout le monde\",\n \"cafe\": \"Appelle tout le monde pour prend... | python | edit | 1 | 4 | mit | db1aaa7f7e28c901b2b427236f9942aa78d5ae34 | ningirsu/taemin,ningirsu/taemin | taemin/plugins/cafe/plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging, urllib2\nfrom lighter.util import merge, build_request\n\nclass HipChat(object):\n def __init__(self, url, token):\n self._url = url or 'https://api.hipchat.com'\n self._token = token\n self_rooms = [... | python | edit | 7 | 4 | mit | 2cf6318c18620064898cdf5e940a3fc732d976f8 | meltwater/lighter,meltwater/lighter | src/lighter/hipchat.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nimport shutil\nimport composer\nimport configuration\nimport downloader\n\n\ndef run():\n project_dir = os.getcwd()+'/'\n execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/'\n\n ... | python | edit | 4 | 3 | mit | 1c2e17e31c00a52661706a3c90efbb3c93d6fbef | mi-schi/php-code-checker | app/initialization.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom djrichtextfield.views import InitView\n\nurlpatterns = [\n url('^init.js$', InitView.as_view(), name='djrichtextfield_init')\n]\n\n```\n\nApply this change: Use path instead of soon to be deprecat... | python | edit | 1 | 0 | mit | f2a88e4849876970c29b568b897dff88ffe09306 | jaap3/django-richtextfield,jaap3/django-richtextfield | djrichtextfield/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom commands import *\nfrom wrappers import *\n\n__version__ = '0.9.1'\n\n```\n\nApply this change: Check whether Montage commands are available"
},
{
"role": "assistant",
"content": "from commands import *\nfrom wrappers impor... | python | edit | 5 | 0 | bsd-3-clause | 65f0ef0ae523059db6ecf3856c9e2695cad81d38 | astrofrog/montage-wrapper,astrofrog/python-montage,astrofrog/montage-wrapper,jat255/montage-wrapper,vterron/montage-wrapper,astropy/montage-wrapper | montage/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Setup specs for packaging, distributing, and installing MR lib.\"\"\"\n\nimport distribute_setup\n# User may not have setuptools installed on their machines.\n# This script will automatically install the right v... | python | edit | 1 | 0 | apache-2.0 | 80025b77f42813a840533050331972d66febeb04 | bmenasha/appengine-mapreduce,talele08/appengine-mapreduce,soundofjw/appengine-mapreduce,aozarov/appengine-mapreduce,ankit318/appengine-mapreduce,talele08/appengine-mapreduce,Candreas/mapreduce,aozarov/appengine-mapreduce,soundofjw/appengine-mapreduce,westerhofffl/appengine-mapreduce,soundofjw/appengine-mapreduce,vendas... | python/src/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom uni_form.helper import FormHelper\nfrom uni_form.layout import Submit, Layout, Fieldset, ButtonHolder\nfrom Instanssi.ext_blog.models import BlogEntry\n\nclass BlogEntryForm(forms.Mo... | python | edit | 1 | 1 | mit | ba0a4aff1ea21670712b35061570805e62bb4159 | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | Instanssi/admin_blog/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\ndef read_sides(line):\n return map(int, line.split())\n\n\ndef valid_triangle((a, b, c)):\n return a + b > c and b + c > a and a + c > b\n\n\nif __name__ == '__main__':\n print len(filter(valid_triangle, map(read_si... | python | edit | 7 | 3 | mit | dff5a8650c5d7ed5b5bab12b36ac5d61541dbb4e | jonathanj/advent2016 | python/day3.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport concurrent.futures\n\nfrom db.common import session_scope\nfrom db.player import Player\nfrom utils.player_data_retriever import PlayerDataRetriever\n\n\ndef create_player_seasons(sim... | python | edit | 3 | 4 | mit | bd4e1c3f511ac1163e39d99fdc8e70f261023c44 | leaffan/pynhldb | setup/create_player_seasons.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2013, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\ndef boolean(x):\n if x in [True, 1, '1', 'true', 'True']:\n return \"true\"\n if x in [False, 0, '0', 'false',... | python | edit | 2 | 4 | bsd-2-clause | 9c877984d1f9175660911d9cac457d6ff87b2754 | jantman/troposphere,amosshapira/troposphere,ikben/troposphere,samcrang/troposphere,pas256/troposphere,ptoraskar/troposphere,cryptickp/troposphere,xxxVxxx/troposphere,horacio3/troposphere,alonsodomin/troposphere,alonsodomin/troposphere,pas256/troposphere,DualSpark/troposphere,7digital/troposphere,jdc0589/troposphere,ibl... | troposphere/validators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import *\nimport os\nimport re\n\n__all__ = []\n\n@task\ndef test(plugin_path):\n \"\"\"\n Symbolically link a host file that contains a redcap plugin into the ./redcap/plugins folder\n\n :param plugin_path: path to... | python | edit | 11 | 2 | bsd-3-clause | 95fa71c4439343764cac95a1667e08dc21cb6ebe | ctsit/redcap_deployment,ctsit/redcap_deployment,ctsit/redcap_deployment,ctsit/redcap_deployment | plugins.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport BaseHTTPServer\n\nServerClass = BaseHTTPServer.HTTPServer\nRequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler\n\nSERVER_NAME = ''\nSERVER_PORT = 9000\n\nclass JsonPostResponder(RequestHandlerClass):\... | python | edit | 1 | 1 | mit | fb4aa211f64ed6fdc0443d03dd02dc52fc882978 | jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle | server/dummy/dummy_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Award a badge to a user.\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nimport click\n\nfrom byceps.services.user_badge import service as badge_servi... | python | edit | 1 | 2 | bsd-3-clause | fcd98cc714b5a790eaf2e946c492ab4e14700568 | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps | scripts/award_badge_to_user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/env python3\n\nfrom sys import argv\n\ndef main():\n parseArgs()\n print(\"Nope.\")\n print(argv)\n\ndef parseArgs():\n if len(argv) > 1:\n time = argv[1].split('h')\n print(time)\n if 'm' not in time... | python | edit | null | null | mit | 159e1e210480c0037b3a550e70b77dbfce34bbca | jabocg/ptyme | ptyme/ptyme.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Various display related classes.\n\nAuthors : MinRK, dannystaple\n\"\"\"\nimport urllib\n\nclass YouTubeVideo(object):\n \"\"\"Class for embedding a YouTube Video in an IPython session, based on its video id.\n\n e.g. to embed t... | python | edit | 1 | 2 | bsd-3-clause | 2efeba04a04d8d9591c02e8176f1ed251dd95338 | ipython/ipython,ipython/ipython | IPython/lib/display.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom gym_app.models import Task, Athlete, PersonalTrainer, BodyScreening, WorkoutPlan, Tracker, MailBox, Message\nfrom django.contrib.auth.models import Permission\n\n# Register your models here.\nadmin.sit... | python | edit | 1 | 0 | mit | 61909686132143db127deb31d582e44f5b198729 | brunoliveira8/managyment,brunoliveira8/managyment,brunoliveira8/managyment | project/gym_app/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django import forms\nfrom django.core.validators import MinLengthValidator\nfrom .models import PoolingUser\nfrom users.forms import UserCreationForm\n\n\nclass LoginForm(Authen... | python | edit | 1 | 2 | mit | 8332dc01c3c743543f4c3faff44da84436ae5da2 | livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride | planner/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url\nfrom go.contacts import views\n\nurlpatterns = patterns('',\n url(r'^$', views.index, name='index'),\n url(r'^groups/$', views.groups, name='groups'),\n url(r'^groups/(?P<type>[\... | python | edit | 1 | 0 | bsd-3-clause | 84f7fe2d17a82d095ff6cf4f2bbd13a2a8426c2d | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/contacts/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport datetime\n\nfrom django.core.management import CommandError\nfrom django.core.management.color import no_style\nfrom django.core.management.sql import sql_delete, sql_all\nfrom django.db import connections, transacti... | python | edit | 1 | 3 | bsd-3-clause | 6fb30db07457fb231827cfa4c8215f8ff107cb74 | feincms/feincms-elephantblog,sbaechler/feincms-elephantblog,michaelkuty/feincms-elephantblog,joshuajonah/feincms-elephantblog,sbaechler/feincms-elephantblog,joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,michaelkuty/feincms-elephantblog,sbaechler/feincms-elephantblog,joshuajonah/feincms-elephantblog,mi... | tests/testapp/tests/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# thumbor imaging service\n# https://github.com/globocom/thumbor/wiki\n\n# Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license\n# Copyright (c) 2011 globo.com <EMAI... | python | edit | 1 | 2 | mit | 47cedcd514f7c569c1637acc331890bb49aedd90 | fanhero/thumbor,fanhero/thumbor,fanhero/thumbor,fanhero/thumbor | thumbor/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# and add mpv.json to ~/.mozilla/native-messaging-hosts\nimport sys\nimport json\nimport struct\nimport subprocess\n\n\n# Read a message from stdin and decode it.\ndef getMessage():\n rawLength = sys.stdin.read(4... | python | edit | 1 | 2 | mit | 65336509829a42b91b000d2e423ed4581ac61c98 | vayan/external-video,vayan/external-video,vayan/external-video,vayan/external-video | app/mpv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cProfile\nfrom demodulate.cfg import *\nfrom demodulate.detect_tone import *\nfrom demodulate.element_resolve import *\nfrom gen_test import *\n\n\n\nif __name__ == \"__main__\":\n\t#gen_test_data()\n\tdata = gen_test_data()\n\t#prin... | python | edit | 10 | 0 | mit | 124489e979ed9d913b97ff688ce65d678579e638 | nickodell/morse-code | morse_modem.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ninfo = {\n 'id': 'webcam',\n 'name': 'Webcam',\n 'description': 'Generic webcam driver',\n 'module name': 'Webcam',\n 'class name': 'Webcam',\n 'author': 'Philip Chimento',\n 'copyright year': '2011',\n}\n\n```\n\nApply... | python | edit | 1 | 0 | mit | e4079d7cdeb59a3cac129813b7bb14a6639ea9db | ptomato/Beams | plugins/Webcam_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport lib.collect.config as config\n\nif config.BACKEND == 'dynamodb':\n import lib.collect.backends.dymamodb as api\nelse:\n import lib.collect.backends.localfs as api\n\n```\n\nApply this change: Fix bug in module selection."
},
... | python | edit | 3 | 0 | mit | f39f7d64ba8ca8051b24407811239f960cc6f561 | ic/mark0 | lib/collect/backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef get_related_model(rel):\n # In Django 1.7 and under, the related model is accessed by doing: rel.model\n # This was renamed in Django 1.8 to rel.related_model. rel.model now returns\n # the base model.\n return getattr(rel, ... | python | edit | 1 | 2 | bsd-3-clause | 1ba88cf7d087c2783306854ea3fbc16c5fe17df4 | mayapurmedia/wagtail,chrxr/wagtail,darith27/wagtail,mjec/wagtail,rv816/wagtail,rsalmaso/wagtail,stevenewey/wagtail,KimGlazebrook/wagtail-experiment,kurtw/wagtail,serzans/wagtail,m-sanders/wagtail,KimGlazebrook/wagtail-experiment,JoshBarr/wagtail,JoshBarr/wagtail,inonit/wagtail,kaedroho/wagtail,zerolab/wagtail,FlipperPA... | wagtail/utils/compat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\nfrom .highlevel import Kernel\n\n# Legacy support (DEPRECATED)\nfrom .legacy_support import *\nfrom ..bodies import get\n\n\ndef load(path='.', recursive=True, followlinks=False):\n return ... | python | edit | 1 | 1 | mit | ac25dd0b2bf3188e1f4325ccdab78e79e7f0a937 | DaRasch/spiceminer,DaRasch/spiceminer | spiceminer/kernel/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\nfrom ggrc.converters import errors\nfrom integration.ggrc import TestCase\n\n\nclass TestBasicCsvImport(TestCase):\n\n def ... | python | edit | 1 | 1 | apache-2.0 | 6b14c9e5683d41ca9d8b9138c25af7526c83d1e4 | selahssea/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core | test/integration/ggrc/converters/test_import_delete.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nname = \"package-name\" # See https://www.python.org/dev/peps/pep-0008/\npath = name.lower().replace(\"-\", \"_\").replace(\" \", \"_\")\nversion = \"0.1.dev0\" # https://python.org/dev/peps/pep-0440 https://semver.org\nauthor = \"Author ... | python | edit | 1 | 0 | mit | 24d7f9f05e4d597358b62a50d2d0f5fad6a61c63 | scottclowe/python-continuous-integration,scottclowe/python-ci,scottclowe/python-ci,scottclowe/python-continuous-integration | package_name/__meta__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom flask import Flask\n\nimport plenario.tasks as tasks\n\n\ndef create_worker():\n\n app = Flask(__name__)\n app.config.from_object('plenario.settings')\n app.url_map.strict_slashes = False\n\n ... | python | edit | 1 | 2 | mit | 44223235e5b8b0c49df564ae190927905de1f9a4 | UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario | plenario/worker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\nALLOWED_HOSTS = ['YOUR_DOMAIN(S)_GO_HERE']\n\nCORS_ORIGIN_WHITELIST = ('ALLOWED_DOMAINS')\n\nSTATIC_ROOT = o... | python | edit | 4 | 0 | mit | 193781255bca1a8748945a467e6d7736f4d460cb | erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online | jp2_online/settings/production.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom optparse import make_option\nimport os\nfrom csv import reader\nfrom codecs import BOM_UTF8\n\nimport pickle\n\nfrom django.utils.six import string_types, PY3\nfrom django.core.management.base i... | python | edit | 7 | 5 | apache-2.0 | 261cb5aecc52d07b10d826e8b22d17817d1c3529 | tOverney/ADA-Project,tOverney/ADA-Project,tOverney/ADA-Project | web/backend/backend_django/apps/capacity/management/commands/importpath.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nHacker News Top:\n -Get top stories from Hacker News' official API\n -Record all users who comment on those stories\n\nAuthor: Rylan Santinon\n\"\"\"\n\nfrom api_connector import *\nfrom csv_io import *\n\ndef main():\n conn = Ap... | python | edit | 16 | 8 | apache-2.0 | 84b907ad78f03d614e8af14578c21e1228ab723d | rylans/hackernews-top,davande/hackernews-top | top.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\nimport os.path\nimport sys\n\n\ndef main():\n setup_py = os.path.join(os.path.dirname(os.path.dirname(__file__)),\n 'setup.py')\n\n with open(setup_py, 'r') as f:\n for lin... | python | edit | 1 | 3 | apache-2.0 | 6bdb91aefc6acb9b0065c7edae19887778dedb22 | 1st1/uvloop,MagicStack/uvloop,MagicStack/uvloop | .ci/package-version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n__version__ = \"0.3.0\"\n__author__ = 'Michael Davis'\n__license__ = 'MIT'\n__copyright__ = 'Copyright 2015 Michael Davis'\n\n\nfrom .exceptions import JOSEError\nfrom .exceptions import JWSError\nfrom .exceptions import ExpiredSignatureE... | python | edit | 6 | 0 | mit | b3e0d640ff4b7dbc5c30dc9ebb69578acfe02f07 | mpdavis/python-jose | jose/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCreated on 18 May 2017\n\n@author: Bruno Beloff (<EMAIL>)\n\"\"\"\n\nimport sys\n\nfrom scs_dfe.particulate.opc_n2 import OPCN2\n\nfrom scs_host.bus.i2c import I2C\nfrom scs_host.sys.host import Host\n\nfrom scs_mfr.test.test import... | python | edit | 1 | 6 | mit | 7d03a6bfa32d2bf20a95769b2937e098972285af | south-coast-science/scs_mfr,south-coast-science/scs_mfr | src/scs_mfr/test/opc_test.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.