messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='amii-tf-nn',\n version='0.0.1',\n license='MIT',\n packages=find_packages(),\n install_requires=[\n 'future == 0.15.2',\n 'setuptools >= 20.2.2',\n... | python | edit | 1 | 0 | mit | 655ac367fde72d892eccfeece3ebf6719612d35b | AmiiThinks/amii-tf-nn | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom client import client\nimport pytest\n\n\ndef test_string_input():\n assert client(\"String\") == \"You sent: String\"\n\n\ndef test_int_input():\n assert client(42) == \"You sent: 42\"\n\n\ndef test_empty_input():\n with pytes... | python | edit | 3 | 1 | mit | 80c4b0fe0a654ef4ec56faac73af993408b846f1 | nbeck90/network_tools | test_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Activity(models.Model):\n group = models.CharField(max_length=4)\n grouptype = models.TextField()\n groupdetail = models.TextField()\n details = models.TextField()\n disabled = models.Boo... | python | edit | 1 | 1 | bsd-3-clause | 4aa1623e08519127a06f49060d546c5ef18e906c | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker | vcs/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nfrom pypvwatts.__version__ import VERSION\n\nsetup(\n name='pypvwatts',\n version=VERSION,\n author='Miguel Paolino',... | python | edit | 3 | 0 | mit | 00b822d2523708f333e214fc7f507ef3bf1ca865 | mpaolino/pypvwatts | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.apps import AppConfig\n\nclass RavenConfig(AppConfig):\n name = 'raven.contrib.django'\n label = 'raven.contrib.django'\n verbose_name = 'Raven'\n\n```\n\nApply this change: Add missing __future... | python | edit | 1 | 0 | bsd-3-clause | 94790371e7ec8dc189409e39e193680b9c6b1a08 | getsentry/raven-python,lepture/raven-python,smarkets/raven-python,Photonomie/raven-python,akalipetis/raven-python,danriti/raven-python,jbarbuto/raven-python,akheron/raven-python,ronaldevers/raven-python,johansteffner/raven-python,smarkets/raven-python,jmagnusson/raven-python,akheron/raven-python,jbarbuto/raven-python,P... | raven/contrib/django/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nconfig = {\n 'name': 'timew-report',\n 'version': '1.0.0',\n 'description': 'An interface for TimeWarrior report data',\n ... | python | edit | 1 | 0 | mit | c972357a44640c7a5f803d79fc77ca597e1b22f0 | lauft/timew-report | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bukkit import Collection\n\n\ndef test_creation():\n buckets = Collection(rate=5, limit=23, timeout=31, clock=lambda: 0)\n assert buckets.rate == 5\n assert buckets.limit == 23\n assert buckets.timeout == 31\n assert buc... | python | edit | 4 | 2 | mit | 9ee1db76af2a1afdf59bf9099008715d9bca2f4d | kgaughan/bukkit | tests/test_collection.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import join, dirname, abspath\ndefault_base_dir = join(dirname(abspath(__file__)), 'completion')\n\nimport run\n\n\ndef pytest_addoption(parser):\n parser.addoption(\n \"--base-dir\", default=default_base_dir,\n ... | python | edit | 1 | 2 | mit | 59030daa60a4d2006cae6192219071e2a8017364 | tjwei/jedi,jonashaag/jedi,mfussenegger/jedi,jonashaag/jedi,dwillmer/jedi,WoLpH/jedi,tjwei/jedi,mfussenegger/jedi,dwillmer/jedi,flurischt/jedi,WoLpH/jedi,flurischt/jedi | test/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.contrib.auth.decorators import login_required\nfrom profiles.views import (ProfilesList,\n ProfileEdit,\n)\n\nurlpatterns = patterns(\"\",\n url(r'^list/$', ... | python | edit | 5 | 0 | mit | f2d34fa3153448ab6a893fba45ae48b52d7759db | agfor/chipy.org,brianray/chipy.org,chicagopython/chipy.org,bharathelangovan/chipy.org,bharathelangovan/chipy.org,chicagopython/chipy.org,bharathelangovan/chipy.org,chicagopython/chipy.org,tanyaschlusser/chipy.org,agfor/chipy.org,tanyaschlusser/chipy.org,tanyaschlusser/chipy.org,brianray/chipy.org,chicagopython/chipy.or... | chipy_org/apps/profiles/urls.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nversion_path = os.path.join(os.path.dirname(__file__), 'VERSION')\nwith open(version_path) as fh:\n version = fh.read().strip()\n\nsetup(name='vector-d... | python | edit | 1 | 0 | mit | d89f7d742813b70d7bccdf90e9722d727599f977 | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom pillow_retry.models import PillowError\n\n\n@admin.register(PillowError)\nclass PillowErrorAdmin(admin.ModelAdmin):\n\n model = PillowError\n list_display = [\n 'pillow',\n 'doc_i... | python | edit | 1 | 1 | bsd-3-clause | 130d73d64e6f4abe4946240a8e876891cb02182c | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/ex-submodules/pillow_retry/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nfrom flask import g, render_template, redirect, request, url_for\nfrom flask.ext.login import current_user, login_required, logout_user\n\nfrom social.apps.flask_app.template_filters impor... | python | edit | 3 | 2 | apache-2.0 | 4378aef47a7e2b80a4a22af2bbe69ce4b780ab6d | teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr | pokr/views/login.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='sandbox',\n version=open('VERSION').read().strip(),\n long_description=(open('README.rst').read() + '\\n' +\n open('CHANGELOG.rst').read()),\n py_modules=[\n ... | python | edit | 1 | 0 | bsd-2-clause | 7bd045ce1157343b17318ce446185138400a5f75 | plone/plone.server,plone/plone.server | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\nimport yalix.utils as utils\n\nclass UtilsTest(unittest.TestCase):\n\n def test_log_progress_reports_FAILED(self):\n with utils.capture() as out:\n with... | python | edit | 1 | 1 | mit | 3a321a93f9779f9e27da8e85e3ffc7460bbbef12 | rm-hull/yalix | src/python/yalix/test/utils_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport django\n\nfrom django.db.backends.postgresql_psycopg2.creation import DatabaseCreation as OriginalDatabaseCreation\n\n\nclass DatabaseCreationMixin16(object):\n def _create_test_db(self, verbosity, autoclobber):\n... | python | edit | 1 | 1 | apache-2.0 | f935eb48517627df679605aaee834165380d74db | jneight/django-db-geventpool,PreppyLLC-opensource/django-db-geventpool | django_db_geventpool/backends/postgresql_psycopg2/creation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pathlib\n\n\ndef test_should_write_json(cli_runner, tmp_rc, tmp_templates_file):\n result = cli_runner([\n '-c', tmp_rc, 'update'\n ])\n\n assert result.exit_code == 0\n\n templates = pat... | python | edit | 1 | 2 | bsd-3-clause | 6709944d7e856fbce0434da0dc731fc83b55feb1 | hackebrot/cibopath | tests/test_cli_update.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef process( node_name, handle ):\n\n handle.editorTemplate( beginScrollLayout=True )\n\n handle.editorTemplate( beginLayout=\"Float Attributes\" )\n handle.editorTemplate( \"floatAttr\", addControl=True )\n handle.editorTempl... | python | edit | 2 | 1 | bsd-3-clause | 42221c7b858951376ba59385fa42cac11d542fdd | michaeljones/sphinx-maya-node | plugin/script/sphinxexampleae.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom CommandTemplate import CommandTemplate\nfrom IrcMessage import IrcMessage\n\n\nclass Command(CommandTemplate):\n\ttriggers = ['join']\n\thelptext = \"Makes me join another channel, if I'm allowed to at least\"\n\t\n\tdef execute(self, ... | python | edit | 3 | 5 | mit | d6b1f7c03ec2b32823fe2c4214e6521e8074cd9f | Didero/DideRobot | commands/join.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nfrom setuptools import find_packages\n\nVERSION = '0.1.4'\n\nsetup(\n name='spockbot',\n description='High level Python framework for building Minecraft '\n 'clients and bots',\n l... | python | edit | 1 | 0 | mit | b9dbf4861f1c8b8ae70a130617d1913ef4efb539 | Gjum/SpockBot,SpockBotMC/SpockBot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='Simon',\n version='0.7.0',\n description='Simple MongoDB Models',\n long_description=open('README.rst').read(),\n author='Andy Dirnberger',\n author_e... | python | edit | 1 | 0 | bsd-3-clause | 597854eeaacaae71832833d41eea260ad5ef7279 | dirn/Simon,dirn/Simon | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom robotsim import *\nimport atexit\natexit.register(destroy)\n\n__all__ = ['WorldModel','RobotModel','RobotModelLink','RigidObjectModel','TerrainModel','Mass','ContactParameters',\n 'SimRobotController','SimRobotSensor','SimBod... | python | edit | 31 | 0 | bsd-3-clause | 90dfa38014ba91de2e8c0c75d63788aab3c95f38 | krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt,krishauser/Klampt | Python/python2_version/klampt/__init__.py | rejected_lint | Too many lint violations: 31 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Typer, build great CLIs. Easy to code. Based on Python type hints.\"\"\"\n\n__version__ = \"0.0.4\"\n\nfrom click.exceptions import ( # noqa\n Abort,\n BadArgumentUsage,\n BadOptionUsage,\n BadParameter,\n ClickExcepti... | python | edit | 1 | 0 | mit | 72466cb328fb56bfe28f5c3a1f8fca082db24319 | tiangolo/typer,tiangolo/typer | typer/__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 | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n'fbcode_builder steps to build & test Bistro'\n\nimport specs.fb... | python | edit | 1 | 1 | mit | 59e15749671009047ec62cae315a07719d583ac7 | facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro | build/fbcode_builder_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nversion = '1.6.5'\nrevision = ' release'\nmilestone = 'Yoitsu'\nrelease_number = '86'\nprojectURL = 'https://syncplay.pl/'\n\n```\n\nApply this change: Move to 1.6.6 dev for further development"
},
{
"role": "assistant",
"conten... | python | edit | 1 | 0 | apache-2.0 | 115a71995f2ceae667c05114da8e8ba21c25c402 | alby128/syncplay,alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay | syncplay/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(\n name=\"public-drive-urls\",\n version='0.4.0',\n author=\"Brian Peterson\",\n author_email=\"<EMAIL>\",\n description=\"Find Google Drive download URLs from a file's sharing URL\",\n... | python | edit | 1 | 0 | mit | de548682a8cae05fac4b303d08ec321fb683cc63 | bepetersn/public-drive-urls | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nsetup(\n name='robber',\n version='1.1.1',\n description='BDD / TDD assertion library for Python',\n author='Tao Liang',\n author_email='<EMAIL>'... | python | edit | 1 | 0 | mit | 35dc73f0149d83f2f7f0cae9e602b1aaa399f2c5 | vesln/robber.py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom person import Person\n\n__all__ = ['AddressBook']\n\n\nclass AddressBook(object):\n\n def __init__(self):\n self.persons = []\n\n def add_person(self, person):\n self.persons.append(person)\n\n def __contains__(s... | python | edit | 1 | 2 | mit | 03e0e11491c64ae546134eb6c963a31958fe6d6d | dizpers/python-address-book-assignment | address_book/address_book.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom django.core.management import BaseCommand, CommandError\nfrom gcutils.bigquery import Client\n\n\nclass Command(BaseCommand):\n help = 'Removes any datasets whose tables have all expired'\n\n def handle(self, *args, **... | python | edit | 1 | 4 | mit | 0782ab8774f840c7ab2e66ddd168ac3ccfa3fc4f | ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc | openprescribing/pipeline/management/commands/clean_up_bq_test_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, sys, subprocess, shutil\n\ndef check_for_module_builder():\n if os.path.exists(\"voxel_native/scripts/\"):\n return\n\n print(\"Downloading P3DModuleBuilder...\")\n\n cmd = [sys.executable, \"-B\", \"voxel_native/... | python | edit | 4 | 5 | mit | 0ba9fa847a8b605363b298ecad40cb2fc5870cbb | treamology/panda3d-voxels,treamology/panda3d-voxels,treamology/panda3d-voxels | build_modules.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass CashewException(Exception):\n pass\n\nclass InternalCashewException(CashewException):\n pass\n\nclass UserFeedback(CashewException):\n pass\n\nclass InactivePlugin(UserFeedback):\n def __init__(self, plugin_instance_or_ali... | python | edit | 2 | 2 | mit | 0997055c591d7bd4ad4334874292f8977ba778bf | dexy/cashew | cashew/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nose.tools import eq_\nimport mock\n\nfrom lcp import api\n\n\n@mock.patch('lcp.api.requests.request')\ndef _assert_calls_requests_with_url(original_url, expected_url, request_mock):\n api.Client('BASE_URL').request('METHOD', origin... | python | edit | 1 | 2 | bsd-3-clause | ecc56eec0ebee4a93d5052280ae5d8c649e1e6da | bradsokol/PyLCP,Points/PyLCP,bradsokol/PyLCP,Points/PyLCP | tests/test_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom distutils.core import setup\n\nsetup(\n name='tq',\n version='0.2.0',\n description='comand line css selector',\n author='Pedro',\n author_email='<EMAIL>',\n url='https://github.com/plainas/tq',\... | python | edit | 1 | 0 | mit | adfc532450699ac929dd08199abc2c0f751d982f | plainas/tq,plainas/tq,plainas/tq | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nfrom setuptools import setup, find_packages\nfrom os.path import dirname, join\n\n\ndef main():\n base_dir = dirname(__file__)\n setup(\n name='genty',\n versio... | python | edit | 1 | 1 | apache-2.0 | a28923d292abcb4b509b4a7eb95bdf2982c90bab | box/genty,box/genty | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom abc import ABCMeta\nfrom abc import abstractmethod\nfrom django import forms\n\n\nclass _BaseEnumField(forms.TypedChoiceField):\n __metaclass__ = ABCMeta\n\n def __init__(self, enum, *args, **kwargs):\n self.enum = enum\n ... | python | edit | 1 | 3 | mit | 428fda845c79f70c6e3d64302bbc716da5130625 | hearsaycorp/django-richenum,adepue/django-richenum,dhui/django-richenum,asherf/django-richenum,hearsaycorp/django-richenum | src/django_richenum/forms/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nimport unittest\n\nfrom django.conf import settings\n\n#\n# Must configure settings before importing base.\n#\n\ndb = 'testdjangodb1'\nschema = 'django1'\nuser = 'django1'\npasswd = 'django1'\n\nsettings.confi... | python | edit | 4 | 4 | isc | eb40e27b0699a717708dd9367ac91ac0326456fe | rutube/djonet,gijzelaerr/djonet | regress/tests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nMassOpenCloud / Hardware Isolation Layer (HIL)\n\nSlurm / HIL Control Settings\n\nMay 2017, Tim Donahue\t<EMAIL>\n\"\"\"\n\nDEBUG = True\n\nSLURM_INSTALL_DIR = '/usr/local/bin/'\n\nHIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/moc_hil_ul... | python | edit | 1 | 0 | mit | 48fab607b1152b8b93cdb0cc0dc5c300dafecf4c | mghpcc-projects/user_level_slurm_reservations,mghpcc-projects/user_level_slurm_reservations | common/hil_slurm_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport yaml\nfrom yaml import SafeLoader\n\nyaml.load(payload) # $decodeInput=payload decodeOutput=Attribute() decodeFormat=YAML decodeMayExecuteInput\nyaml.load(payload, SafeLoader) # $ decodeInput=payload decodeOutput=Attribute() decode... | python | edit | 13 | 0 | mit | 14e9bda5de10ef5a1c6dd96692d083f4e0f16025 | github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql | python/ql/test/experimental/library-tests/frameworks/yaml/Decoding.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ndef main():\n setup(name='bioagents',\n version='0.0.1',\n description='Biological Reasoning Agents',\n long_description='Biological Reasoning Agents',\n ... | python | edit | 1 | 1 | bsd-2-clause | 9192fbad43b7df9153b63f04c444b3654626a9ec | bgyori/bioagents,sorgerlab/bioagents | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Generated by Django 3.0.5 on 2020-04-15 09:43\n\nfrom django.db import migrations\n\n\ndef change_extension_permission_to_plugin_permission(apps, schema_editor):\n permission = apps.get_model(\"auth\", \"Permission\")\n users = apps... | python | edit | 1 | 6 | bsd-3-clause | e2f1787601e7c05c9c5ab2efe26b6d1cb90b2ccb | mociepka/saleor,mociepka/saleor,mociepka/saleor | saleor/account/migrations/0040_auto_20200415_0443.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom setuptools import setup\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the relevant file\nwith open(path.join(... | python | edit | 1 | 1 | bsd-2-clause | 27851b9f2371853f1386d0033d0b9b2d0ef74b75 | fusionbox/django-verified-email-change,fusionbox/django-verified-email-change | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\n\nfrom norc.settings import (NORC_LOG_DIR, BACKUP_SYSTEM,\n AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME)\n\nif BACKUP_SYSTEM == 'AmazonS3':\n from norc.norc_utils.aws import set_s3_key\n\n\ndef s3_backup(fp,... | python | edit | 5 | 4 | bsd-3-clause | 04cca2c87cc8e56ecd84e1b3125a7a7b8c67b026 | darrellsilver/norc,darrellsilver/norc | norc_utils/backup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport urllib2\n\nimport sublime\nimport sublime_plugin\n\nGIST_URL = u'https://raw.githubusercontent.com/RomuloOliveira/dot-files/master/sublime/User/Preferences.sublime-settings' # noqa\n\n\nclass UpdateUserSettingsCommand(s... | python | edit | 1 | 2 | apache-2.0 | 62a76827ecf7c148101b62925dea04f63709012a | RomuloOliveira/dot-files,RomuloOliveira/unix-files,RomuloOliveira/dot-files | sublime/User/update_user_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, Extension\r\nimport numpy\r\n\r\next_modules=[\r\n Extension(\r\n \"heat_diffusion_experiment.cython_versions\",\r\n [\"heat_diffusion_experiment/cython_versions.pyx\"], \r\n language='c... | python | edit | null | null | mit | 4359912ce0898c6c4a8d54c7328fb11a7eb486c9 | dplucenio/heat_diffusion_experiment | setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nStart the reactor!\n'''\n# Import salt libs\nimport salt.utils.reactor\n# Import ioflo libs\nimport ioflo.base.deeding\n\n\n@ioflo.base.deeding.deedify(\n 'SaltRaetReactorFork',\n ioinit={\n ... | python | edit | 1 | 1 | apache-2.0 | a40c617ea605bd667a9906f6c9400fc9562d7c0a | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/daemons/flo/reactor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# mention.py\n#\n# statbot - Store Discord records for later analysis\n# Copyright (c) 2017 Ammon Smith\n#\n# statbot is available free of charge under the terms of the MIT\n# License. You are free to redistribute and/or modify it under ... | python | edit | 1 | 0 | mit | 0fe990cf476dcd0cdea56c39de1dad6003d81851 | strinking/statbot,strinking/statbot | statbot/mention.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\ndef package_data(package):\n package_data = []\n for dirpath, dirnames, filenames in os.walk(\n... | python | edit | 1 | 1 | bsd-3-clause | 68ca61ec2206b83cca34a319a472961793771407 | Ixxy-Open-Source/django-linkcheck-old,claudep/django-linkcheck,Ixxy-Open-Source/django-linkcheck-old,claudep/django-linkcheck,AASHE/django-linkcheck,yvess/django-linkcheck,DjangoAdminHackers/django-linkcheck,DjangoAdminHackers/django-linkcheck | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\"\"\"\nUtil classes\n------------\nClasses which represent data types useful for the package pySpatialTools.\n\n\"\"\"\n\nfrom spdesc_mapper import Sp_DescriptorMapper\nfrom spatialelements import SpatialElementsCollection, Locations\nfr... | python | edit | 8 | 0 | mit | 7f1542bc52438e6c9796e776603553d7f5a9df7f | tgquintela/pySpatialTools,tgquintela/pySpatialTools | pySpatialTools/utils/util_classes/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport jsonschema\n\n\nCORE_SCHEMA = {\n 'type': 'object',\n 'properties': {\n 'paradigm': {\n 'type': 'string',\n },\n 'method': {\n 'type': 'string',\n },\n },\n 'additionalPro... | python | edit | 1 | 1 | mit | b27a51f19ea3f9d13672a0db51f7d2b05f9539f0 | thiderman/network-kitten | kitten/validation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom nanagogo.api import NanagogoRequest, NanagogoError\n\n\ndef get(path, params={}):\n r = NanagogoRequest(path,\n method=\"GET\",\n params=params)\n return r.w... | python | edit | 4 | 4 | mit | ce052f8e19d46f6db202e7eee054d5b88af01d9b | kastden/nanagogo | nanagogo/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nfrom yelp_kafka_tool import __version__\n\n\nsetup(\n name=\"yelp-kafka-tool\",\n version=__version__,\n author=\"Distributed systems team\",\n author_email=\... | python | edit | 1 | 0 | apache-2.0 | bc4e66a5229ea6863b39ce62a35e19c7cca217aa | 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 sublime, sublime_plugin, webbrowser\n\n\nQD_URL = \"http://localhost:5000/\"\n\nclass GoToQuantifiedDevDashboardCommand(sublime_plugin.TextCommand):\n def run(self,edit):\n SETTINGS = {}\n SETTINGS_FILE = \"Quantified... | python | edit | 1 | 1 | apache-2.0 | 0a5f09c90ace9c09379b8f2faa98ba7040298af9 | 1self/sublime-text-plugin,1self/sublime-text-plugin,1self/sublime-text-plugin | QuantifiedDevOpenDashboardCommand.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\ndef as_int(value):\n try:\n return int(value)\n except ValueError:\n return None\n\n```\n\nApply this change: Add url join which serves our needs\n\nExisting functions in common libraries add extra slashes."
},
{... | python | edit | 1 | 3 | apache-2.0 | f2cd1d531a1cefdc5da4b418c866be0d76aa349b | eve-basil/common | basil_common/str_support.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom calexicon.internal.julian import distant_julian_to_gregorian\n\n\nclass TestJulian(unittest.TestCase):\n def test_distant_julian_to_gregorian(self):\n self.assertEqual(distant_julian_to_gregorian(9999, 12, ... | python | edit | 1 | 1 | apache-2.0 | 0788aaf316a2b200c5283fe9f5f902a8da701403 | jwg4/qual,jwg4/calexicon | calexicon/internal/tests/test_julian.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 rack-ddnsm\n ~~~~~\n\n Dynamic DNS metadata for Rackspace Cloud DNS, \n manages TXT records containing metadata in the format of title,desc,data.\n\n :copyright: (c) 20... | python | edit | 1 | 0 | mit | 8a630fc6e33a76def9d8288a3d04fcacbc3e1d03 | sunshinekitty/rack-ddnsm | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# test_xcrun.py - Unit tests for swift_build_support.xcrun -*- python -*-\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors\n# Licensed under Apache ... | python | edit | 1 | 2 | apache-2.0 | 2e6e7d8ec05f2a760f12f2547730c4707a07ebfa | nathawes/swift,xedin/swift,apple/swift,aschwaighofer/swift,practicalswift/swift,glessard/swift,uasys/swift,rudkx/swift,huonw/swift,roambotics/swift,Jnosh/swift,bitjammer/swift,shahmishal/swift,lorentey/swift,modocache/swift,manavgabhawala/swift,KrishMunot/swift,devincoughlin/swift,nathawes/swift,atrick/swift,zisko/swif... | utils/swift_build_support/tests/test_xcrun.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scapy.all import *\nimport unirest\nimport json\n\ndef callbackFunction(response):\n\tpass\n\t# \"http://54.68.246.202:3000/rssi\"\n\ndef main():\n print \"Reading pcap file %s\"%sys.argv[1]\n myreader = PcapReader(sys.argv[1])\n... | python | edit | 25 | 7 | mit | d68910e98eea4836a372e6230cc11044f2e59214 | cheung31/bigbrother,cheung31/bigbrother,cheung31/bigbrother,cheung31/bigbrother | packet_sniffer/pcapreader.py | rejected_lint | Too many lint violations: 25 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom subprocess import check_call, CalledProcessError\n\nfrom setuptools import setup\n\n\ndef convert_readme():\n try:\n check_call([\"pandoc\", \"-f\", \"markdown_github\", \"-t\",\n \... | python | edit | 1 | 2 | bsd-3-clause | 4523e55f7a7c5333b1087a037c6a96b6af30e111 | thomwiggers/django-mongodbforms | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.signing import TimestampSigner\n\n\nclass TokenSigner:\n signer = TimestampSigner()\n\n def unsign(self, value):\n return self.signer.unsign(value=value, max_age=60 * 60 * 24)\n\n def sign(self, value):\n ... | python | edit | 1 | 1 | mit | e9188fdce548106cd8729c2b62a58ba387255f82 | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | feder/virus_scan/signer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom django.test import TestCase\n\nfrom search.parse_json import process_file\n\nbase_dir = os.path.dirname(os.path.dirname(__file__))\n\nclass TestHacks(TestCase):\n\n def test_h2_parsing(self):\n data = process_fil... | python | edit | 1 | 2 | mit | ddd4a0d1ba607f49f75f9516c378159f1204d9fb | wanghaven/readthedocs.org,wijerasa/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,d0ugal/readthedocs.org,takluyver/readthedocs.org,wanghaven/readthedocs.org,emawind84/readthedocs.org,KamranMackey/readthedocs.org,attakei/readthedocs-oauth,agjohnson/readthedocs.org,michaelmcandrew/readthedocs.org,asampat3090/r... | readthedocs/rtd_tests/tests/test_search_json_parsing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nimport requests\n\n\nclass RPCClient(object):\n def __init__(self, hostname, port):\n\n self.url = 'http://' + str(hostname) + ':' + str(port) + '/mopidy/rpc'\n self.id = 0\n\n def _do_rpc(self, method, pa... | python | edit | 1 | 2 | apache-2.0 | a41a76b7e4cdf4a8cbc533550963921839dcd998 | rectalogic/mopidy-pandora,jcass77/mopidy-pandora | mopidy_pandora/rpc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding:utf8 -*-\n\nimport os\nfrom model.oandapy import oandapy\n\n\nclass OrderBook(object):\n\n def get_latest_orderbook(self, instrument, period, history):\n oanda_token = os.environ.get('OANDA_TOKEN')\n oanda = ... | python | edit | 1 | 2 | mit | 48e405f0f2027c82403c96b58023f1308c3f7c14 | supistar/OandaOrderbook,supistar/OandaOrderbook,supistar/OandaOrderbook | model/orderbook.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport codecs\nfrom setuptools import setup, find_packages\n\nsetup(\n name='Venom',\n version='1.0.0a1',\n packages=find_packages(exclude=['*tests*']),\n url='ht... | python | edit | 1 | 0 | mit | 64e2e80570268c2be47198495334ccffcd387b35 | biosustain/venom | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport os\n\n\n# Get version without importing, which avoids dependency issues\ndef get_version():\n import re\n with open('imbox/version.py') as version_file:\n return re.search(r\"\"\"__version__... | python | edit | 1 | 1 | mit | a0325e9b29e41badf576c699163aef081df2ab32 | martinrusev/imbox | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport ctypes\nimport errno\nimport os\nimport select\nimport traceback\n\nimport cepoll\nimport ctimerfd\n\ndef on_timer ():\n pass\n\ndef main ():\n spec = ctimerfd.itimerspec ()\n spec.it_interva... | python | edit | 5 | 4 | mit | 170bfa1aea96c0d1cbe13557ce158effff91466c | yrro/pilight | pilight.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom .models import Animal\n\nclass AnimalSerializer(serializers.ModelSerializer):\n class Meta:\n model = Animal\n fields = ('id', 'name', 'dob', 'gender', 'active', 'own', 'father',... | python | edit | 1 | 7 | apache-2.0 | 6d32f609379febe2fdad690adc75a90e26b8d416 | mmlado/animal_pairing,mmlado/animal_pairing | backend/backend/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os, sys\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib'))\n\nimport glob, json\nimport numpy as np\n\nimport task_usage\n\ndef main(data_path, index_path, report_each=10000):\n print(... | python | edit | 3 | 5 | mit | 082f366402ca2084542a6306624f1f467297ebae | learning-on-chip/google-cluster-prediction | bin/task_usage_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom txircd.utils import ircLower\nfrom zope.interface import implements\n\nclass Accounts(ModuleData):\n\timplements(IPlugin, IModuleData)\n\t... | python | edit | 1 | 3 | bsd-3-clause | 904db705daf24d68fcc9ac6010b55b93c7dc4544 | Heufneutje/txircd,ElementalAlchemist/txircd | txircd/modules/core/accounts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pylint: disable=missing-docstring\nimport os\nimport shutil\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\n\nfrom resolwe.flow.engine import manager\nfrom resolwe.flo... | python | edit | 1 | 2 | apache-2.0 | f869cf9a94749ea210d38178317d196fbdd15fac | jberci/resolwe,jberci/resolwe,genialis/resolwe,genialis/resolwe | resolwe/flow/tests/test_backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import jsonify\n\nfrom soundem import app\n\n\ndef json_error_handler(e):\n return jsonify({\n 'status_code': e.code,\n 'error': 'Bad Request',\n 'detail': e.description\n }), e.code\n\n\n@app.errorhand... | python | edit | 1 | 1 | mit | dd50858ee22c27076919614d1994e3ce9c8e2399 | building4theweb/soundem-api | soundem/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nimport sockjsroom\n\n# Setup library\nsetup(\n # Pypi name\n name = \"sockjsroom\",\n # Release version\n version = sockjsroom._... | python | edit | 1 | 0 | mit | fe5ddba257885aa166bd71696a6eeefad153e66a | Deisss/python-sockjsroom,Deisss/python-sockjsroom,Deisss/python-sockjsroom | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport sys\nimport argparse\nimport numpy as np\nimport yaml\n\n\nDESC = \"Prints version and model type from model.npz file.\"\nS2S_SPECIAL_NODE = \"special:model.yml\"\n\n\ndef main():\n args = parse_args()\n\... | python | edit | 3 | 8 | mit | ba0ea7491fab383992013a8379592657eedfe1ce | emjotde/amunmt,emjotde/amunmt,marian-nmt/marian-train,emjotde/amunmt,amunmt/marian,emjotde/amunn,amunmt/marian,emjotde/amunn,emjotde/amunmt,marian-nmt/marian-train,emjotde/amunn,marian-nmt/marian-train,emjotde/amunn,marian-nmt/marian-train,emjotde/Marian,marian-nmt/marian-train,emjotde/Marian,amunmt/marian | scripts/contrib/model_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom newswall.models import Source, Story\n\n\nadmin.site.register(Source,\n list_display=('name', 'is_active', 'ordering'),\n list_filter=('is_active',),\n prepopulated_fields={'slug': ('name',)... | python | edit | 1 | 0 | bsd-3-clause | a2920b9bf5386b3f92a8e2cd5f7c4251439b2c42 | matthiask/django-newswall,registerguard/django-newswall,michaelkuty/django-newswall,HerraLampila/django-newswall,matthiask/django-newswall,HerraLampila/django-newswall,registerguard/django-newswall,michaelkuty/django-newswall | newswall/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# -*- coding: utf-8 -*-\nimport os\nimport urllib.parse\n\nimport yaml\n\nimport numpy as np\n\n\ndef run_schema_example_test(organization, standard, name, version, check_func... | python | edit | 6 | 9 | bsd-3-clause | 111d0bd356c18d0c028c73cd8c84c9d3e3ae591c | pllim/astropy,astropy/astropy,lpsinger/astropy,larrybradley/astropy,StuartLittlefair/astropy,mhvk/astropy,pllim/astropy,MSeifert04/astropy,saimn/astropy,dhomeier/astropy,lpsinger/astropy,pllim/astropy,stargaser/astropy,larrybradley/astropy,larrybradley/astropy,bsipocz/astropy,StuartLittlefair/astropy,astropy/astropy,dh... | astropy/io/misc/asdf/tags/tests/helpers.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport json\n\n\nclass StripeResponse:\n\n def __init__(self, body, code, headers):\n self.body = body\n self.code = code\n self.headers = headers\n... | python | edit | 1 | 2 | mit | e299906aae483f1cb6deaff83a68519a042b92e6 | stripe/stripe-python | stripe/stripe_response.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n``onecodex``\n------------\n\n``onecodex`` provides a command line client for interaction with the\nOne Codex API.\n\n\n\nLinks\n`````\n* `One Codex: <https://www.onecodex.com/>`\n* `API Docs: <http://docs.onecodex.com/>`\n\n\"\"\"\... | python | edit | 1 | 0 | mit | c1d111ab00cdc916412cc2985ef4bbc184166f20 | onecodex/onecodex,refgenomics/onecodex,refgenomics/onecodex,onecodex/onecodex | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom discord.ext.commands.errors import CommandError\n\nclass NotServerOwner(CommandError):\n\t'''Not Server Owner'''\n\tpass\n\nclass VoiceNotConnected(CommandError):\n\t'''Voice Not Connected'''\n\tpass\n\nclass PermittedVoiceNotConnect... | python | edit | 1 | 1 | mit | 5cd674ec764be72bb3e94c0b56fdf733a4a1c885 | Harmon758/Harmonbot,Harmon758/Harmonbot | Discord/utilities/errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport operator\n\nclass Plugin:\n def __call__(self, bot):\n bot.on_hear(r\"(lol|:D|:P)\", self.on_hear)\n bot.on_respond(r\"stats\", self.on_respond)\n bot.on_help(\"stats\", self.on_help)\n\n def on_hear(self, ... | python | edit | 3 | 2 | mit | ee3941e2c3a0355314b270c04de6a623f5a0730c | thomasleese/smartbot-old,Cyanogenoid/smartbot,tomleese/smartbot,Muzer/smartbot | plugins/stats.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ntry:\n from pypandoc import convert\n read_md = lambda f: convert(f, 'rst')\nexcept ImportError:\n print(\"warning: pypandoc module not found, could not convert Markdown to RST\")\n read_md = lamb... | python | edit | 1 | 1 | mit | 6e71b0de777bf516d376397961ec232ec39ea195 | fitodic/centerline,fitodic/polygon-centerline,fitodic/centerline | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ntry:\n from auth0.v2.exceptions import Auth0Error\nexcept ImportError: # pragma: no cover\n class Auth0Error(Exception):\n def __init__(self, status_code, error_code, message):\n self.status_code = status_code\n ... | python | edit | 1 | 1 | isc | 42a54411634ef395ca3c2dfbfeefd7cea2d55101 | bretth/auth0plus | auth0plus/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport handlers.events as events\n\nAPPLICATION_ID = \"amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0\"\n\n\ndef lambda_handler(event, context):\n if event['session']['new']:\n events.on_session_started({'requestId': event['... | python | edit | 1 | 6 | mit | 53ad3866b8dfbd012748e4ad7d7ed7025d491bd0 | mauriceyap/ccm-assistant | src/alexa-main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tcxparser\nfrom configparser import ConfigParser\nfrom datetime import datetime\nimport urllib.request\nimport dateutil.parser\n\nt = '1984-06-02T19:05:00.000Z'\n# Darksky weather API\n# Create config file manually\nparser = ConfigPa... | python | edit | 3 | 1 | mit | 12f4b26d98c3ba765a11efeca3b646b5e9d0a0fb | briansuhr/slowburn | running.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nimport asyncio\n\nclient = discord.Client()\n\n@client.event\nasync def on_ready():\n print('Logged in as')\n print(client.user.name)\n print(client.user.id)\n print('------')\n\n@client.event\nasync def on_messa... | python | edit | 4 | 1 | mit | b881247b182a45774ed494146904dcf2b1826d5e | EsqWiggles/SLA-bot,EsqWiggles/SLA-bot | sla_bot.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\ndef get_project_path():\n root_dir = os.path.abspath(os.path.dirname(__file__))\n return root_dir\n```\n\nApply this change: Add new changes to th branch"
},
{
"role": "assistant",
"content": "import os\ndef get... | python | edit | 1 | 1 | mit | e9fbd541b3fcb84c6d2de9ba1de53886730a67fa | nvthanh1/Skypybot | common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom openerp import models, fields, api\n\n'''\nThis module create model of Course\n'''\n\n\nclass Course(models.Model):\n '''\n This class create model of Course\n '''\n _name = 'openacademy.course' # Model odoo name\n\n na... | python | edit | 3 | 3 | apache-2.0 | e7f1c49216a7b609dbe8ea283cdf689cfa575f85 | maitaoriana/openacademy-project | openacademy/model/openacademy_course.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nGrains for Cisco NX OS Switches Proxy minions\n\n.. versionadded: Carbon\n\nFor documentation on setting up the nxos proxy minion look in the documentation\nfor :doc:`salt.proxy.nxos</ref/proxy/all/salt.proxy.n... | python | edit | 2 | 4 | apache-2.0 | b26200860337d4dba13aeafe7cfb9dff8bf181d0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/grains/nxos.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tenyksservice import TenyksService, run_service\n\n\nclass AFK(TenyksService):\n direct_only = False\n irc_message_filters = {\n 'depart': [r'^(?i)(xopa|away|afk|brb)'],\n 'return': [r'^(?i)(xoka|back)']\n }\n\n ... | python | edit | 1 | 3 | mit | 3e30ccba76655ecc23002c328885d55780ee55b4 | cblgh/tenyks-contrib,colby/tenyks-contrib,kyleterry/tenyks-contrib | src/tenyksafk/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\ntry:\n with open(os.path.join(here, 'README.rst')) as f:\n README = f.read()\n with open(os... | python | edit | 1 | 0 | bsd-3-clause | 4531017c7c9e96a7a1108f39a906ddcac25ebd59 | faassen/importscan | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom factory import Faker, fuzzy\n\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\nfrom django.urls import reverse\n\n\nclass UserRegistrationTestCase(TestCase):\n def test_registration_view(self):\n ... | python | edit | 1 | 1 | mit | 5914b9a4d1d086f1a92309c0895aa7dd11761776 | pydata/conf_site,pydata/conf_site,pydata/conf_site | conf_site/accounts/tests/test_registration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.version import get_version\nfrom subprocess import check_output, CalledProcessError\n\nVERSION = (0, 0, 3, 'beta', 1)\n\n__version__ = get_version(VERSION)\n\ntry:\n __git_hash__ = check_output(['git', 'rev-parse', '--s... | python | edit | 1 | 0 | mit | 89a8d6021d8ca8a714af018f3168298109013c6f | ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player | radio/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport logbook\nimport pytablewriter\nimport simplesqlite\n\n\nlogger = l... | python | edit | 1 | 3 | mit | 696a79069ad1db1caee4d6da0c3c48dbd79f9157 | thombashi/sqliteschema | sqliteschema/_logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib import admin\nfrom . import models\n\n\n@admin.register(models.Notification)\nclass NotificationAdmin(admin.ModelAdmin):\n list_display = ('launch', ... | python | edit | 1 | 0 | apache-2.0 | aa8234d1e6b4916e6945468a2bc5772df2d53e28 | ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server | bot/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom pathlib import Path\n\nimport saw_client as saw\n\nfrom saw_client.jvm import Contract, java_int, cryptol\n\nclass Add(Contract):\n def __init__(self) -> None:\n super().__init__()\n\n def specification(se... | python | edit | 3 | 2 | bsd-3-clause | 6c98f48acd3cc91faeee2d6e24784275eedbd1ea | GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script | saw-remote-api/python/tests/saw/test_basic_java.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom followthemoney import model\n\nfrom ingestors.ingestor import Ingestor\nfrom ingestors.support.temp import TempFileSupport\nfrom ingestors.support.shell import ShellSupport\nfrom ingestors.support.ole import OLESupport\... | python | edit | 1 | 2 | mit | 36e034749e8f99e457f5f272d886577e41bb0fb2 | pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph | services/ingest-file/ingestors/email/outlookpst.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nimport asyncio\nimport random\nimport configparser\nimport json\n\ndef RunBot(config_file):\n config = configparser.ConfigParser()\n config.read(config_file)\n\n client = discord.Client()\n\n @client.event\n a... | python | edit | 3 | 3 | mit | 2198ae847cb257d210c043bb08d52206df749a24 | havokoc/MyManJeeves | Jeeves/jeeves.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n\tname = 'django-test-addons',\n\tpackages = ['test_addons'],\n\tversion = '0.3.5',\n\tdescription = 'Library to provide support for testing multiple database system like Mongo, Redis, Neo4j along... | python | edit | 1 | 0 | mit | 0f97e1427cf86cab4d53f613eb440c1cf4426e6d | hspandher/django-test-addons | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys\nimport versioneer\n\nproject_name = 'menpo3d'\n\n# Versioneer allows us to automatically generate versioning from\n# our git tagging system which makes releases simpler.\nversioneer.V... | python | edit | 1 | 0 | bsd-3-clause | 95ba22a3f8e4a8084fd19071a713be550158a569 | grigorisg9gr/menpo3d,nontas/menpo3d,nontas/menpo3d,grigorisg9gr/menpo3d | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#returns the distance between two data points\ndef distance(X, Y):\n d = 0\n for row in range(len(X)):\n for col in range(len(X[row]):\n if X[row][col] != Y[row][col]:\n d += 1\n return d\n\n#partitions the data into the s... | python | edit | 4 | 7 | mit | a1b4afc062b246dc347526202ef00a43992afa28 | mkaplan218/clusterverify | code/kmeans.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom django.http import Http404\nfrom django.template import loader\nfrom django.shortcuts import render\nfrom django.db.models import Count, Sum\nfrom django.views.decorators.csrf... | python | edit | 8 | 1 | mit | 9c2d9eeedc6e3a3a78b4ca7173aad948cb6309ea | dreardon/megamillions-group,dreardon/megamillions-group,dreardon/megamillions-group | results/views.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flask import Flask\n\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n return \"Hello World!\"\n\n\napp.run(debug=True)\n\n```\n\nApply this change: Add the basic validation routes"
},
{
... | python | edit | 1 | 1 | apache-2.0 | deb91e9f1e3c7332c005ca498f1c6bc79cf59b34 | coolsvap/clapper,coolsvap/clapper,rthallisey/clapper,coolsvap/clapper,rthallisey/clapper | ansible-tests/validations-api.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.