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 __future__ import absolute_import\n\nimport os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\n# import django\nimport logging\n\nfrom scrapi import events\nfrom scrapi.processing.base import BaseProcessor\n... | python | edit | 1 | 2 | apache-2.0 | b0de066ebaf81745878c1c4d3adf803445a0cfc5 | fabianvf/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,felliott/scrapi,felliott/scrapi,erinspace/scrapi,erinspace/scrapi,mehanig/scrapi | scrapi/processing/postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\n**pronto**: a Python frontend to ontologies\n===========================================\n\n\"\"\"\n\nfrom __future__ import absolute_import\n\n__all__ = [\"Ontology\", \"Term\", \"TermList\", \"Relationship\", \"Pa... | python | edit | 1 | 0 | mit | 39c0dfd7821355c9d2ff2274f4dd6292e959ed87 | althonos/pronto | pronto/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.views.generic import ListView\nfrom longclaw.longclawbasket.models import BasketItem\nfrom longclaw.longclawbasket import utils\n\nclass BasketView(ListView):\n model = BasketItem\n tem... | python | edit | 3 | 2 | mit | 99e9ef79178d6e2dffd8ec7ed12b3edbd8b7d0f1 | JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw | longclaw/longclawbasket/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .. utils import TranspileTestCase, BuiltinFunctionTestCase\n\n\nclass SumTests(TranspileTestCase):\n def test_sum_list(self):\n self.assertCodeExecution(\"\"\"\n print(sum([1, 2, 3, 4, 5, 6, 7]))\n \"\"\")\n... | python | edit | 1 | 1 | bsd-3-clause | cd1eac109ed52f34df35ecea95935b7546147c87 | cflee/voc,freakboy3742/voc,freakboy3742/voc,cflee/voc | tests/builtins/test_sum.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rdflib import Graph, URIRef, Literal, BNode\nfrom rdflib.plugins.sparql import prepareQuery\nfrom rdflib.compare import isomorphic\n\nimport unittest\n\nclass TestConstructInitBindings(unittest.TestCase):\n\n def test_construct_init... | python | edit | 4 | 1 | bsd-3-clause | 1dbe7acc945a545d3b18ec5025c19b26d1ed110f | RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib | test/test_sparql_construct_bindings.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass SponsorManager(models.Manager):\n\n def active(self):\n return self.get_query_set().filter(active=True).order_by(\"level\")\n\n def with_weblogo(self):\n queryset = self.raw(\"\"\"... | python | edit | 1 | 1 | bsd-3-clause | 8683e4317875d99281b79904efc81af8b15614e6 | PyCon/pycon,njl/pycon,njl/pycon,PyCon/pycon,njl/pycon,Diwahars/pycon,Diwahars/pycon,Diwahars/pycon,njl/pycon,PyCon/pycon,Diwahars/pycon,PyCon/pycon | pycon/sponsorship/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\r\n\r\nsetup(\r\n name='birdseed',\r\n\r\n version='0.2.1',\r\n\r\n description='Twitter random number seeder/generator',\r\n\r\n url='https://github.com/ryanmcdermott/birdseed',\r\n\r\n author='R... | python | edit | 1 | 0 | mit | 0ca4b85590bb930ace2d3f06680e3018a4630e91 | ryanmcdermott/birdseed | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import basename\nimport sys\n\nfrom django.core.management.base import BaseCommand\n\nfrom ...utils import to_db, transformer\n\n\n# TODO: Display help if unable to transform a file\n# TODO: Switch to logging rather than direct... | python | edit | 3 | 8 | apache-2.0 | e8d56e5c47b370d1e4fcc3ccf575580d35a22dc8 | texastribune/tx_salaries,texastribune/tx_salaries | tx_salaries/management/commands/import_salary_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport betamax\nimport os\n\nwith betamax.Betamax.configure() as config:\n config.cassette_library_dir = 'tests/cassettes'\n record_mode = 'once'\n if os.environ.get('TRAVIS_GH3'):\n record_mode = 'never'\n config.default... | python | edit | 1 | 0 | bsd-3-clause | cb557823258fe61c2e86db30a7bfe8d0de120f15 | krxsky/github3.py,ueg1990/github3.py,agamdua/github3.py,sigmavirus24/github3.py,wbrefvem/github3.py,h4ck3rm1k3/github3.py,balloob/github3.py,degustaf/github3.py,christophelec/github3.py,jim-minter/github3.py,itsmemattchung/github3.py,icio/github3.py | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport subprocess\nfrom datetime import datetime\n\n\ndef test_last_review_date():\n statement_file_path = \"app/templates/views/accessibility_statement.html\"\n\n # test local changes against master for a full diff of what... | python | edit | 1 | 3 | mit | 73b9246164994049d291d5b482d4dbf2ca41a124 | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | tests/app/test_accessibility_statement.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext import commands\n\n\nclass Owner:\n \"\"\"Admin-only commands that make the bot dynamic.\"\"\"\n\n def __init__(self, bot):\n self.bot = bot\n\n @commands.command()\n @commands.is_owner()\... | python | edit | 1 | 3 | mit | fe7ab3060c43d509f995cc64998139a623b21a4a | ivandardi/RustbotPython,ivandardi/RustbotPython | bot/cogs/owner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom suelta.util import bytes\nfrom suelta.sasl import Mechanism, register_mechanism\n\ntry:\n import urlparse\nexcept ImportError:\n import urllib.parse as urlparse\n\n\n\nclass X_FACEBOOK_PLATFORM(Mechanism):\n\n def __init__(sel... | python | edit | 3 | 4 | mit | 4147e6f560889c75abbfd9c8e85ea38ffe408550 | dwd/Suelta | suelta/mechanisms/facebook_platform.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport bot_chucky\n\nversion = bot_chucky.__version__\n\nsetup_kwargs = {\n 'name': 'bot_chucky',\n 'version': version,\n 'url': 'https://github.com/MichaelYusko/Bot-Chucky',\n 'license': 'MIT',\n ... | python | edit | 1 | 0 | mit | 73949b1fed7cd8826fa6ccaf6fb401c595cdb8cd | MichaelYusko/Bot-Chucky | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom dateutil.relativedelta import relativedelta\n\nfrom legalaid.models import Case\nfrom cla_butler.tasks import DeleteOldData\n\n\nclass FindAndDeleteCasesUsingCreationTime(DeleteOldDa... | python | edit | 1 | 4 | mit | e70780358dd5cf64ee51b590be1b69dc25a214fb | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport hashlib\n\n\nclass BaseX(object):\n @classmethod\n def retrieve_one_by(cls, name, value):\n cls_db_list = cls.query(getattr(cls, name) == value).fetch(1)\n if cls_db_list:\n return cls_db_list[... | python | edit | 1 | 3 | mit | a8e43dcdbdd00de9d4336385b3f3def1ae5c2515 | vanessa-bell/hd-kiosk-v2,carylF/lab5,gmist/fix-5studio,lipis/the-smallest-creature,NeftaliYagua/gae-init,gmist/my-gae-init-auth,jakedotio/gae-init,carylF/lab5,lipis/gae-init,lipis/gae-init,lovesoft/gae-init,gae-init/gae-init-docs,mdxs/gae-init,tonyin/optionstg,gmist/my-gae-init,gae-init/gae-init-babel,terradigital/gae-... | main/modelx.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# flake8: noqa\n\nfrom . import html\nfrom . import snippet\n\ntry:\n from . import external\nexcept ImportError: # pragma: no cover\n pass\ntry:\n from . import image\nexcept ImportError: # pragma: no cover\n pass\ntry:\n ... | python | edit | 1 | 0 | bsd-3-clause | f8b4b1a860b5c0a3ff16dbb8bbf83010bd9a1009 | matthiask/feincms3,matthiask/feincms3,matthiask/feincms3 | feincms3/plugins/__init__.py | accepted | null | 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 | 6 | 1 | mit | 0d6d645f500f78f290d20f54cd94ca8614b1803a | jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle | server/dummy/dummy_server.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\nfrom distutils.core import setup\r\n__version__ = '0.2.6'\r\n\r\nsetup(name='tg2ext.express',\r\n version=__version__,\r\n description='tg2ext.express, a small extension for TurboGears2',\r\n long_d... | python | edit | 1 | 0 | mit | e1e86210fa2d97e2799f037a13576d1ccbe5e4d1 | archsh/tg2ext.express,archsh/tg2ext.express | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render_to_response\nfrom django.contrib.auth.decorators import login_required\nfrom django.template.context import RequestContext\n#from google.appengine.ext import db\nfrom july.people.models import Commit\nfro... | python | edit | 1 | 5 | mit | 5a8199744bf658d491721b16fea7639303e47d3f | ChimeraCoder/GOctober,ChimeraCoder/GOctober,julython/julython.org,ChimeraCoder/GOctober,julython/julython.org,julython/julython.org,julython/julython.org | july/people/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Data transformation utilities test cases.\"\"\"\n\nimport unittest\n\nfrom datagrid_gtk3.utils.transformations import degree_decimal_str_transform\n\n\nclass DegreeDecimalStrTransformTest(unittest.TestCase):\n\n \"\"\"Degree decima... | python | edit | 1 | 1 | mit | c242ad95221c9c5b2f76795abd7dcbad5145cb2a | nowsecure/datagrid-gtk3,jcollado/datagrid-gtk3 | datagrid_gtk3/tests/utils/test_transformations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def run(s... | python | edit | 1 | 1 | bsd-3-clause | e18c55ada2a4241364e6b9538d6d50817b1ca766 | consbio/parserutils | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom flask.ext.restful import reqparse\n\nfrom changes.api.base import APIView\nfrom changes.config import db\nfrom changes.models import SnapshotImage, SnapshotStatus\n\n\nclass SnapshotImageDetail... | python | edit | 1 | 6 | apache-2.0 | dfd3bff4560d1711624b8508795eb3debbaafa40 | dropbox/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes | changes/api/snapshotimage_details.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\"\"\"Program to execute a VBA macro in MS Excel\n\"\"\"\nimport os\nimport shutil\nimport win32com.client\nimport pythoncom\nimport repackage\nrepackage.up()\n\n\ndef execute_macro():\n \"\"\"Execute VBA macro in MS Exc... | python | edit | 3 | 2 | apache-2.0 | b4e3461277669bf42225d278d491b7c714968491 | googleinterns/automated-windows-vms,googleinterns/automated-windows-vms | vm_server/test/execute_macro/code/execute.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ..value import ForeignCloVal\n\n\ndef plus(a: int, b: int) -> int:\n return a + b\n\n\ndef minus(a: int, b: int) -> int:\n return a - b\n\n\ndef times(a: int, b: int) -> int:\n return a * b\n\n\ndef divide(a: int, b: int) -> f... | python | edit | 1 | 1 | apache-2.0 | 99c3eba0d6384cd42c90ef347823e6d66659d6e3 | pdarragh/Viper | viper/interpreter/prelude/operators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='auth_tkt',\n version='0.1.0',\n description='Python implementation of mod_auth_tkt cookies',\n author='Yola',\n license='MIT (Expat)',\n author_email='<EMAIL>',\n url='http... | python | edit | 1 | 0 | mit | 96d01bb9a5f6fae28a25db2ef8c429d69333565b | yola/auth_tkt | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.contenttypes.management import update_contenttypes as django_update_contenttypes\nfrom django.db.models.signals import post_migr... | python | edit | 1 | 4 | bsd-3-clause | b7decb588f5b6e4d15fb04fa59aa571e5570cbfe | grzes/djangae,potatolondon/djangae,grzes/djangae,potatolondon/djangae,grzes/djangae | djangae/contrib/contenttypes/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\nfrom django.db.models import get_app, get_models\nfrom django.conf import settings\nfrom common.utilities.search_utils import index_instance\n\n\nclass Command(BaseCommand):\n def add_argum... | python | edit | 1 | 6 | mit | bcde8104bd77f18d7061f7f4d4831ad49644a913 | urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,urandu/mfl_api | common/management/commands/build_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nexceptions - Core exceptions\n\"\"\"\n\n\nclass InvalidMembership(Exception):\n \"\"\"\n The membership provided is not valid\n \"\"\"\n pass\n\n\nclass SourceNotFound(Exception):\n \"\"\"\n InstanceSource doesn't ... | python | edit | 1 | 1 | apache-2.0 | a378649f85f0bc55060ad0238e426f587bc2ff1a | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | core/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nextra_setup = {}\nif sys.version_info >= (3,):\n extra_setup['use_2to3'] = True\n\nsetup(\n name='blessings',\n version='1.2',\n description='A thin, practical wrapp... | python | edit | 1 | 0 | mit | 93d263666471b220880511a97aa3ee077bfd2910 | erikrose/blessings,tartley/blessings,jquast/blessed | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n\nclass Phage:\n supported_databases = {\n # European Nucleotide Archive phage database\n \"ENA\": r\"^gi\\|[0-9]+\\|ref\\|([^\\|]+)\\|\\ ([^,]+)[^$]*$\",\n\n # National Center for Biotechnology Informat... | python | edit | 3 | 4 | mit | ba983dea1e20409d403a86d62c300ea3d257b58a | mbonsma/phageParser,mbonsma/phageParser,phageParser/phageParser,mbonsma/phageParser,phageParser/phageParser,goyalsid/phageParser,goyalsid/phageParser,phageParser/phageParser,phageParser/phageParser,mbonsma/phageParser,goyalsid/phageParser | parserscripts/phage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom bluebottle.organizations.views import (\n OrganizationList, OrganizationDetail,\n OrganizationContactList, OrganizationContactDetail\n)\n\nurlpatterns = [\n url(r'^$', OrganizationList.as_vi... | python | edit | 1 | 0 | bsd-3-clause | fdfa3aae605eaadf099c6d80c86a9406f34fb71c | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/organizations/urls/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom wtforms.fields import RadioField\n\nclass NullBooleanField(RadioField):\n DEFAULT_CHOICES = ((True, 'Sim'), (False, 'Não'), (None, 'Ignorado'))\n def __init__(self, **kwargs):\n super().__init__(**kwargs)\n self.cho... | python | edit | 1 | 4 | mit | c2a1ce0ad4e2f2e9ff5ec72b89eb98967e445ea5 | gems-uff/labsys,gems-uff/labsys,gems-uff/labsys | labsys/utils/custom_fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys, fileinput, subprocess\n\nerr=0\ncols=78\n\nconfig_proc=subprocess.Popen([ \"git\", \"config\", \"core.autocrlf\" ],\n stdout=subprocess.PIPE)\nresult=config_proc.communicate()[0]\nautocrlf=result.strip() ... | python | edit | 1 | 1 | apache-2.0 | 1d10582d622ce6867a85d9e4e8c279ab7e4ab5ab | ejjeong/rust,omasanori/rust,quornian/rust,mvdnes/rust,barosl/rust,aturon/rust,carols10cents/rust,mdinger/rust,AerialX/rust,krzysz00/rust,krzysz00/rust,sarojaba/rust-doc-korean,SiegeLord/rust,l0kod/rust,philyoon/rust,KokaKiwi/rust,nwin/rust,ktossell/rust,victorvde/rust,dwillmer/rust,0x73/rust,waynenilsen/rand,fabricedes... | src/etc/tidy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | 8e3227416f60fca6b1cbd7d370b6ccfceb721ee4 | Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport sys\nif 'darwin' in sys.platform:\n sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')\nsys.path.append('.')\n\nimport adapter\nadapter.main.run_tcp_server(multi... | python | edit | 1 | 0 | mit | 92c9383f84385a0ceb2029437d0d77fc041d0353 | NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb | tools/debug_adapter.py | rejected_duplicate | Near-duplicate of sample 1465 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom __future__ import print_function\nimport argparse\nimport json\n\nparser = argparse.ArgumentParser(description='Pretty-print LDJSON.')\nparser.add_argument('--indent', metavar='N', type=int, default=2,\n ... | python | edit | 1 | 2 | mit | c6862c5f864db4e77dd835f074efdd284667e6fd | mhyfritz/goontools,mhyfritz/goontools,mhyfritz/goontools | util/ldjpp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2011 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom buildbot.changes import svnpoller\nfrom buildbot.scheduler impor... | python | edit | 1 | 1 | bsd-3-clause | 5aba92fff0303546be0850f786a25659453674a6 | eunchong/build,eunchong/build,eunchong/build,eunchong/build | masters/master.chromium.webkit/master_source_cfg.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\n\nsetup(\n name='top40',\n version='0.1',\n py_modules=['top40'],\n author = 'kevgathuku',\n author_email = '<EMAIL>',\n description = (\"Prin... | python | edit | 1 | 0 | mit | a1d525806e5dcb33e850edb7064e059da984ae28 | kevgathuku/top40,andela-kndungu/top40 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import join, dirname\n\nfrom utlz import flo\n\nfrom ctutlz.sct.verification import verify_signature\n\n\ndef test_verify_signature():\n basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')\n\n signature... | python | edit | 3 | 1 | mit | 959897478bbda18f02aa6e38f2ebdd837581f1f0 | theno/ctutlz,theno/ctutlz | tests/test_sct_verify_signature.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2013, Mark Peek <<EMAIL>>\n# Copyright (c) 2014, Andy Botting <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom troposphere import AWSObject\nfrom troposphere.validators import integer\n... | python | edit | 6 | 0 | bsd-2-clause | 9f2141bad575e1718fe36a597e5af5b5c795da54 | alonsodomin/troposphere,horacio3/troposphere,amosshapira/troposphere,pas256/troposphere,mannytoledo/troposphere,johnctitus/troposphere,Yipit/troposphere,dmm92/troposphere,wangqiang8511/troposphere,jdc0589/troposphere,xxxVxxx/troposphere,ccortezb/troposphere,WeAreCloudar/troposphere,Hons/troposphere,LouTheBrew/troposphe... | troposphere/openstack/heat.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nTwitter API test module.\n\nLocal test to check that Twitter credentials are valid connect to Twitter\nAPI and that the auth functions can be used to do this.\ns\"\"\"\nfrom __future__ import absolute_import... | python | edit | 6 | 1 | mit | c5239c6bbb40ede4279b33b965c5ded26a78b2ae | MichaelCurrin/twitterverse,MichaelCurrin/twitterverse | app/tests/manual/test_twitter_api.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSetup file for clowder\n\"\"\"\nimport sys\nfrom setuptools import setup\n\n# Written according to the docs at\n# https://packaging.python.org/en/latest/distributing.html\n\nif sys.version_info[0] < 3:\n sys.exit('This script req... | python | edit | 1 | 0 | mit | 4dac1f95f79a8627d0f9878621cce32fa3771d71 | JrGoodle/clowder,JrGoodle/clowder,JrGoodle/clowder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.core.urlresolvers import set_script_prefix\nfrom django_medusa.renderers import StaticSiteRenderer\nfrom django_medusa.utils import get_stati... | python | edit | 1 | 5 | mit | e75e35bd7ffb44b8f5c5a5d674a15c6c366f84ac | hyperair/django-medusa | django_medusa/management/commands/staticsitegen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .defaults import * # noqa\n\nlogger = logging.getLogger(__name__)\n\ntry:\n from .local import * # noqa\nexcept ImportError as error:\n logger.warn('No local.py settings file found')\n\n```\n\nApply this change: Add missing imp... | python | edit | 3 | 0 | apache-2.0 | 29d151366d186ed75da947f2861741ed87af902b | samchrisinger/osf.io,himanshuo/osf.io,jinluyuan/osf.io,chrisseto/osf.io,zachjanicki/osf.io,njantrania/osf.io,chrisseto/osf.io,reinaH/osf.io,billyhunt/osf.io,RomanZWang/osf.io,aaxelb/osf.io,arpitar/osf.io,mattclark/osf.io,sbt9uc/osf.io,jolene-esposito/osf.io,rdhyee/osf.io,amyshi188/osf.io,kwierman/osf.io,njantrania/osf.... | website/addons/badges/settings/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom grandchallenge.core.sitemaps import SubdomainSitemap\nfrom grandchallenge.pages.models import Page\n\n\nclass PagesSitemap(SubdomainSitemap):\n priority = 0.8\n\n def items(self):\n return Page.objects.filter(\n ... | python | edit | 1 | 1 | apache-2.0 | 022062c409ee06a719b5687ea1feb989c5cad627 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | app/grandchallenge/pages/sitemaps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools.command.install import install\nimport os\nimport sys\n\nVERSION = '0.1.3'\n\n\nclass VerifyVersionCommand(install):\n \"\"\"Custom command to verify that the git tag matches our version\"\"\... | python | edit | 1 | 2 | mit | 3106babe5d0dd9d994d0bb6357126428f5d05feb | sedders123/phial | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport botocore\nfrom kotocore.session import Session\n\n\nclass KambooConnection(object):\n \"\"\"\n Kamboo connection with botocore session initialized\n \"\"\"\n session = botocore.session.get_session()\n\n def __init__(... | python | edit | 1 | 2 | apache-2.0 | f6be438e01a499dc2bde6abfa5a00fb281db7b83 | henrysher/kamboo,henrysher/kamboo | kamboo/core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask_wtf import Form\nfrom flask_wtf.recaptcha import RecaptchaField, Recaptcha\nfrom wtforms import StringField, validators\n\nfrom .validation import not_blacklisted_nor_spam\n\n\nclass ShortenedURLForm(Form... | python | edit | 1 | 0 | mit | 9be282d3f2f278ca8fe0dd65d78d03005b6e43cd | piotr-rusin/url-shortener,piotr-rusin/url-shortener | url_shortener/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import template\nfrom ..models import Season, Race\nfrom ..common import ordered_position\nregister = template.Library()\n\n@register.filter\ndef champion_filter(season_id):\n if season_id:\n s... | python | edit | 1 | 3 | mit | 6160507169c3cdc837b3472bdeb4c604b5c0d5fd | SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27 | driver27/templatetags/driver27.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.website',\n version='1.0a1.dev0',\n description='tangledframework.org',\n long_description=open('README.rst').read(),\n url='https://tangledframework.org/',\n downlo... | python | edit | 1 | 0 | mit | d10fbd23d67c1b6bde87088d379c75a01299865d | TangledWeb/tangled.website | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n.. automodsumm:: requests_cache.serializers.pipeline\n :classes-only:\n :nosignatures:\n\"\"\"\nfrom typing import Any, List, Union\n\nfrom ..models import CachedResponse\n\n\nclass Stage:\n \"\"\"Generic class to wrap serial... | python | edit | 1 | 3 | bsd-2-clause | 5f128bbfc61169ac6b5f0e9f4dc6bcd05092382c | reclosedev/requests-cache | requests_cache/serializers/pipeline.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tests.base import BaseTest\n\nfrom tenable_io.api.models import ScTestJob\n\n\nclass TestScTestJobsApi(BaseTest):\n\n def test_status(self, client, image):\n jobs = client.sc_test_jobs_api.list()\n assert len(jobs) > 0... | python | edit | 1 | 1 | mit | bb5cbae79ef8efb8d0b7dd3ee95e76955317d3d7 | tenable/Tenable.io-SDK-for-Python | tests/integration/api/test_sc_test_jobs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\r\nfrom setuptools import setup\r\n\r\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\r\n README = readme.read()\r\n\r\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))... | python | edit | 1 | 0 | bsd-3-clause | a1e9a3968a67131dba567950984b7a273e261f86 | FlipperPA/wagtailpress,FlipperPA/wagtailpress | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python -u\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport csv\nfrom gratipay import wireup\nfrom gratipay.models.exchange_route import ExchangeRoute\nfrom gratipay.models.particip... | python | edit | 2 | 0 | mit | 657741f3d4df734afef228e707005dc21d540e34 | gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com | post-refunds-back.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom django.apps import AppConfig\n\n\nclass KolibriTasksConfig(AppConfig):\n name = 'kolibri.tasks'\n label = 'kolibritasks'\n verbose_name = 'Kolibri Tas... | python | edit | 1 | 1 | mit | 9df00bbfa829006396c2a6718e4540410b27c4c6 | MingDai/kolibri,mrpau/kolibri,benjaoming/kolibri,DXCanas/kolibri,lyw07/kolibri,learningequality/kolibri,rtibbles/kolibri,mrpau/kolibri,mrpau/kolibri,rtibbles/kolibri,DXCanas/kolibri,indirectlylit/kolibri,MingDai/kolibri,lyw07/kolibri,mrpau/kolibri,christianmemije/kolibri,DXCanas/kolibri,learningequality/kolibri,jonbois... | kolibri/tasks/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom landlab import NetworkModelGrid, RasterModelGrid\n\n\n@pytest.fixture\ndef four_by_four_raster():\n mg = RasterModelGrid((4, 4))\n return mg\n\n\n@pytest.fixture\ndef simple_network():\n y_of_node = (0, 1, 2, ... | python | edit | 1 | 4 | mit | 20e096ac5261cb7fd4197f6cdeb8b171753c82a7 | landlab/landlab,cmshobe/landlab,landlab/landlab,cmshobe/landlab,amandersillinois/landlab,landlab/landlab,amandersillinois/landlab,cmshobe/landlab | landlab/values/tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, PEP420PackageFinder\n\n\nsetup(\n name='tangled.sqlalchemy',\n version='1.0a6.dev0',\n description='Tangled SQLAlchemy integration',\n long_description=open('README.rst').read(),\n url='https://t... | python | edit | 1 | 0 | mit | e3093bafc14fb3af56d797694d3d4c6186209a06 | TangledWeb/tangled.sqlalchemy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\r\nimport requests\r\nfrom flask import Flask, session, request, current_app\r\n\r\napp = Flask(__name__)\r\n\r\n@app.route(\"/\", methods=[\"POST\"])\r\ndef main():\r\n f = open('bomb_status', 'w')\r\n json_data = json.lo... | python | edit | 2 | 1 | mit | ebcb9a4449bd22aa39a5b05fff91bd46e06086b4 | doobix/csgo-c4-hue | python/csgo-c4-hue-server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport numpy\nfrom ...pipeline import Tagger\nfrom ...vectors import Vectors\nfrom ...vocab import Vocab\nfrom ..util import make_tempdir\n\n\ndef test_issue1727():\n data = numpy.ones((3, 300), d... | python | edit | 1 | 1 | mit | 91e916cb67867db9ce835be28b31904e6efda832 | aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/s... | spacy/tests/regression/test_issue1727.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='exchangerates',\n version='0.3.2',\n description=\"A module to make it easier to handle historical exchange rates\",\n long_description=\"\",\n classifiers=[\n ... | python | edit | 1 | 0 | mit | 9cea258dc69ed56849cf78c8483b4b5497523779 | markbrough/exchangerates | setup.py | rejected_duplicate | Near-duplicate of sample 2928 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\n\nclass MopidyException(Exception):\n\n def __init__(self, message, *args, **kwargs):\n super(MopidyException, self).__init__(message, *args, **kwargs)\n self._mes... | python | edit | 1 | 1 | apache-2.0 | 3aacfd7147836ef95133aa88d558a1d69bbcd0cd | mopidy/mopidy,hkariti/mopidy,tkem/mopidy,bacontext/mopidy,swak/mopidy,mokieyue/mopidy,ZenithDK/mopidy,ali/mopidy,mokieyue/mopidy,bencevans/mopidy,jcass77/mopidy,bencevans/mopidy,bacontext/mopidy,diandiankan/mopidy,hkariti/mopidy,dbrgn/mopidy,ZenithDK/mopidy,bacontext/mopidy,mopidy/mopidy,pacificIT/mopidy,SuperStarPL/mo... | mopidy/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom lexos.processors.prepare.cutter import split_keep_whitespace, \\\n count_words, cut_by_number\n\n\nclass TestCutByNumbers:\n def test_split_keep_whitespace(self):\n assert split_keep_whitespace(\"Test string\") == [\"Test\... | python | edit | 1 | 1 | mit | eb57a07277f86fc90b7845dc48fb5cde1778c8d4 | WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos | test/unit_test/test_cut_number.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='ChannelWorm',\n long_description=open('README.md').read(),\n install_requires=[\n 'cypy',\n 'sciunit',\n 'PyOpenWorm',\n 'PyNeuroML'\n ],\n dependency... | python | edit | 1 | 0 | mit | fda74b21a8b366814b18b7bf3f36b1ce611d006d | gsarma/ChannelWorm,gsarma/ChannelWorm,joebowen/ChannelWormDjango,VahidGh/ChannelWorm,gsarma/ChannelWorm,joebowen/ChannelWormDjango,cheelee/ChannelWorm,joebowen/ChannelWorm,VahidGh/ChannelWorm,gsarma/ChannelWorm,cheelee/ChannelWorm,VahidGh/ChannelWorm,cheelee/ChannelWorm,cheelee/ChannelWorm,openworm/ChannelWorm,openworm... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='mass_api_client',\n version=0.1,\n install_required=['requests==2.13.0', 'marshmallow==2.12.2'])\n\n```\n\nApply this change: Add mass_api_client as Package;... | python | edit | 1 | 0 | mit | ec96c3173a770949c13e560b16272bc265a80da4 | mass-project/mass_api_client,mass-project/mass_api_client | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport time\n\nfrom multiprocessing import Process, Event\n\nimport mfhclient\nimport server\nimport update\n\nfrom arguments import parse\nfrom settings import HONEYPORT, HIVEPORT\n\n\ndef main():\n update_event =... | python | edit | 1 | 7 | mit | 841ca9cfbdb8faac9d8deb47b65717b5fb7c8eb4 | Zloool/manyfaced-honeypot | mfh.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom credentials import label_id\nfrom gmailauth import refresh\n\naccess_token = refresh()\nheaders = {'Authorization': ('Bearer ' + access_token)}\n\n\ndef list_messages(headers):\n params = {'labelIds': label_id, ... | python | edit | 6 | 3 | mit | 7a936665eff8a6a8f6889334ad2238cbfcded18b | deadlyraptor/reels | member.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gym import Env\nfrom gym import spaces\nimport numpy as np\n\ndef categorical_sample(prob_n):\n \"\"\"\n Sample from categorical distribution\n Each row specifies class probabilities\n \"\"\"\n prob_n = np.asarray(prob_n... | python | edit | 1 | 2 | mit | e3548d62aa67472f291f6d3c0c8beca9813d6032 | d1hotpep/openai_gym,Farama-Foundation/Gymnasium,dianchen96/gym,machinaut/gym,dianchen96/gym,d1hotpep/openai_gym,machinaut/gym,Farama-Foundation/Gymnasium | gym/envs/toy_text/discrete.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create internal db initialisation script\n\nPaired by Michael and Richard"
},
{
"role": "assistant",
"content": "\"\"\"\nScript that is run from the command line in order to\n\"\"\"\nimport sys\nimport sqlite3\nfrom display_adapt... | python | new_file | 1 | 1 | mit | 4359a9947c1d86d9e4003c1e8fc358e9a66c6b1d | CO600GOL/Game_of_life,CO600GOL/Game_of_life,CO600GOL/Game_of_life | DisplayAdapter/display_adapter/scripts/init_db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom framework.auth.core import _get_current_user\n\nfrom website.files.models.base import File, Folder, FileNode, FileVersion\n\n\n__all__ = ('DataverseFile', 'DataverseFolder', 'DataverseFileNode')\n\n\nclass DataverseF... | python | edit | 1 | 5 | apache-2.0 | 9f6d4d9e82ef575164535a8fb9ea80417458dd6b | Johnetordoff/osf.io,mluke93/osf.io,SSJohns/osf.io,chrisseto/osf.io,hmoco/osf.io,caseyrygt/osf.io,GageGaskins/osf.io,acshi/osf.io,alexschiller/osf.io,caseyrollins/osf.io,ZobairAlijan/osf.io,wearpants/osf.io,GageGaskins/osf.io,brandonPurvis/osf.io,CenterForOpenScience/osf.io,SSJohns/osf.io,alexschiller/osf.io,adlius/osf.... | website/files/models/dataverse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom werobot.session import SessionStorage\nfrom werobot.utils import json_loads, json_dumps\n\n\nclass MongoDBStorage(SessionStorage):\n \"\"\"\n MongoDBStorage 会把你的 Session 数据储存在一个 MongoDB Collection 中 ::\... | python | edit | 1 | 2 | mit | 06d210cdc811f0051a489f335cc94a604e99a35d | whtsky/WeRoBot,whtsky/WeRoBot,adam139/WeRobot,adam139/WeRobot,whtsky/WeRoBot,weberwang/WeRoBot,weberwang/WeRoBot | werobot/session/mongodbstorage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import formula\n\ndef direction(lat, lng):\n\treturn formula.qibla(lat, lng)\n\ndef direction_dms(lat, lng):\n\treturn _dms(formula.qibla(lat, lng))\n\ndef direction_str(lat, lng, prec=0):\n\td, m, s = direction_dms(lat, lng)\n\t# ne... | python | edit | 1 | 1 | apache-2.0 | 6e2362351d9ccaa46a5a2bc69c4360e4faff166d | fikr4n/iclib-python | iclib/qibla.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom django.db.transaction import commit_on_success\n\nfrom subscribe.models import IdealIssuer\n\nfrom lib import mollie\n\n# command to update bank list (ideal issuers)\n# run as 'pytho... | python | edit | 2 | 2 | mit | 319927dd4548f8d5990bad4be271bfce7f29b10b | jonge-democraten/dyonisos,jonge-democraten/dyonisos,jonge-democraten/dyonisos | subscribe/management/commands/refresh_issuers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright 2017-2021 European Centre for Medium-Range Weather Forecasts (ECMWF).\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 obta... | python | edit | 12 | 0 | apache-2.0 | eb1fdf3419bdfd1d5920d73a877f707162b783b0 | ecmwf/cfgrib | cfgrib/__init__.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.util.irc\n~~~~~~~~~~~~~~~\n\nSend IRC messages to a bot via HTTP.\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom time import sleep\nfrom typing import List\n\nf... | python | edit | 1 | 2 | bsd-3-clause | 11fd3e5c8a2c7f591dff1ba1949508d178d1e5d5 | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | byceps/util/irc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import NoArgsCommand\n\nfrom avatar.conf import settings\nfrom avatar.models import Avatar\n\n\nclass Command(NoArgsCommand):\n help = (\"Regenerates avatar thumbnails for the sizes specified in \"\n ... | python | edit | 1 | 4 | bsd-3-clause | 7f974b87c278ef009535271461b5e49686057a9a | grantmcconnaughey/django-avatar,jezdez/django-avatar,grantmcconnaughey/django-avatar,ad-m/django-avatar,ad-m/django-avatar,jezdez/django-avatar | avatar/management/commands/rebuild_avatars.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom config.settings import *\n\nimport logging\nlog = logging.getLogger('settings')\n\nSETTINGS = 'deployed'\n\nDEBUG = True \nTEMPLATE_DEBUG = DEBUG\n\n# Static media\nSTATIC_ROOT = '/mnt/media'\n\n# Uploads \nMED... | python | edit | 3 | 0 | mit | f1b0aa70569052fae2677989f265e6619df16f17 | ibrahimcesar/panda,pandaproject/panda,newsapps/panda,NUKnightLab/panda,pandaproject/panda,pandaproject/panda,datadesk/panda,pandaproject/panda,newsapps/panda,datadesk/panda,PalmBeachPost/panda,PalmBeachPost/panda,ibrahimcesar/panda,PalmBeachPost/panda,newsapps/panda,datadesk/panda,PalmBeachPost/panda,ibrahimcesar/panda... | config/deployed/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Added column 'weight' to Banner, Logo and Background.\n\nRevision ID: 587c89cfa8ea\nRevises: 2c0bfc379e01\nCreate Date: 2012-05-11 14:36:15.518757\n\n\"\"\"\n\n# downgrade revision identifier, used by Alembic.\nrevision = '587c89cfa8e... | python | edit | 1 | 1 | apache-2.0 | d2a0d0d22a8369c99626ca754a337ea8076f7efa | asidev/aybu-core | aybu/core/models/migrations/versions/587c89cfa8ea_added_column_weight_.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Fill in this file and save as settings_local.py\n\nPROJECT_NAME = 'SuperTuxKart'\nPROJECT_URL = 'http://supertuxkart.net/'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nTEMPLATE_DEBUG = True\n\n# Ad... | python | edit | 1 | 0 | mit | 0ae360b675f2dd0b3607af1bc7b72864e43236b2 | leyyin/stk-stats,supertuxkart/stk-stats,leyyin/stk-stats,supertuxkart/stk-stats | userreport/settings_local.EXAMPLE.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils._os import safe_join\nimport os\nfrom django.conf import settings\nfrom django.contrib.staticfiles.finders import FileSystemFinder\nfrom bluebottle.clients.models import Client\n\n\nclass TenantStaticFilesFinder(FileSystem... | python | edit | 3 | 5 | bsd-3-clause | 30db1d30bc79e121109206ca2bd3b264ca725283 | jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/utils/staticfiles_finders.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ctypes import *\nfrom contextlib import contextmanager\nimport os\nimport stat\n\n\ndef get_file_path(f):\n if f:\n name = getattr(f, 'name')\n if name:\n path = os.path.abspath(name)\n return pat... | python | edit | 8 | 3 | bsd-2-clause | dfc7e8a46558d3cf0e7f63da347e2b34253e302c | shichao-an/soundmeter | soundmeter/utils.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Read resources contained within a package.\"\"\"\n\nimport sys\n\n\n__all__ = [\n 'contents',\n 'is_resource',\n 'open_binary',\n 'open_text',\n 'path',\n 'read_binary',\n 'read_text',\n 'Package',\n 'Resour... | python | edit | 1 | 0 | apache-2.0 | 0727ad29721a3dad4c36113a299f5c67bda70822 | python/importlib_resources | importlib_resources/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom nodeconductor.logging.loggers import EventLogger, event_logger\n\n\nclass InvoiceLogger(EventLogger):\n month = int\n year = int\n customer = 'structure.Customer'\n\n class Meta:\n event_types = ('invoice_created', '... | python | edit | 1 | 0 | mit | 7481c6aad4cd844b0c3fab6f05e4d24aa3c17770 | opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | src/nodeconductor_assembly_waldur/invoices/log.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTransit Status\n\"\"\"\n\nfrom flask import Flask, render_template\nimport json\n\nimport settings\n\napp = Flask(__name__)\napp.debug = settings.DEBUG\n\n@app.route(\"/\")\ndef root():\n wifi = {'WIFI_NAME': settings.WIFI_NAME, ... | python | edit | 1 | 1 | mit | 093e51ea520400faef4f2f64f926135786b652a3 | albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo | src/serve.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n==============\nHinton diagram\n==============\n\nHinton diagrams are useful for visualizing the values of a 2D array. Positive\nand negative values represented by white and black squares, respectively, and\nthe size of each square ... | python | edit | 1 | 0 | bsd-3-clause | e5af653b2133b493c7888bb305488e932acb2274 | tonysyu/mpltools,matteoicardi/mpltools | doc/examples/special/plot_hinton.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom distutils.core import setup\n\nsetup(\n name = 'AudioTranscode',\n version = '1.0',\n packages = ['audioTranscode'],\n scripts = ['transcode'],\n author = 'Jeffrey Aylesworth',\n author_email = ... | python | edit | 1 | 0 | isc | d1d0576b94ce000a77e08bd8353f5c1c10b0839f | jeffayle/Transcode | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 - *-\n\nfrom __future__ import print_function, unicode_literals\n\nfrom cihai.bootstrap import bootstrap_unihan\nfrom cihai.core import Cihai\n\n\ndef variant_list(unihan, field):\n for char in u... | python | edit | 1 | 3 | mit | a473b2cb9af95c1296ecae4d2138142f2be397ee | cihai/cihai,cihai/cihai-python,cihai/cihai | examples/variants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom configparser import Error\nfrom requests.exceptions import HTTPError\nfrom twine.commands.upload import main as twine_upload\nfrom twine.utils import ge... | python | edit | 1 | 6 | apache-2.0 | 154d7c17228cf9196ea4ee6b5e13a5268cc69407 | thaJeztah/compose,thaJeztah/compose,vdemeester/compose,vdemeester/compose | script/release/release/pypi.py | rejected_duplicate | Near-duplicate of sample 3415 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nMisc. general utility functions, not tied to Kubespawner directly\n\"\"\"\nfrom concurrent.futures import ThreadPoolExecutor\n\nfrom jupyterhub.utils import DT_MIN, DT_MAX, DT_SCALE\nfrom tornado import gen, ioloop\nfrom traitlets.c... | python | edit | 1 | 4 | bsd-3-clause | f42e62005ea4cc3e71cf10dda8c0bace029014c5 | yuvipanda/jupyterhub-kubernetes-spawner,jupyterhub/kubespawner | kubespawner/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tastypie.resources import ModelResource, ALL\nfrom .models import Filer, Filing\nfrom .utils.serializer import CIRCustomSerializer\n\n\nclass FilerResource(ModelResource):\n class Meta:\n queryset = Filer.objects.all()\n ... | python | edit | 1 | 0 | mit | 06f78c21e6b7e3327244e89e90365169f4c32ea1 | myersjustinc/django-calaccess-campaign-browser,dwillis/django-calaccess-campaign-browser,myersjustinc/django-calaccess-campaign-browser,california-civic-data-coalition/django-calaccess-campaign-browser,dwillis/django-calaccess-campaign-browser,california-civic-data-coalition/django-calaccess-campaign-browser | calaccess_campaign_browser/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.contrib import admin\nfrom django.db import models\nimport reversion\nfrom stagecraft.apps.datasets.models.backdrop_user import BackdropUser\nfrom stagecraft.apps.datasets.models.data_set... | python | edit | 1 | 1 | mit | 5cd459485fee2611eb96229b0a600b3a21f4fc13 | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | stagecraft/apps/datasets/admin/backdrop_user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:\n\n# python-quilt - A Python implementation of the quilt patch system\n#\n# Copyright (C) 2012 Björn Ricks <<EMAIL>>\n#\n# This library is free software; you can redistribute it and/or\n# modif... | python | edit | 2 | 2 | mit | 7548a1245cc21c92f09302ccaf065bdf6189ef2d | bjoernricks/python-quilt,vadmium/python-quilt | quilt/cli/series.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python3 \n\nimport sys\nfrom PyQt5.QtWidgets import (QWidget, QHBoxLayout, \n QLabel, QApplication, QPushButton)\nfrom PyQt5.QtGui import QPixmap\nfrom PyQt5.QtCore import QObject\n\n\nclass FreakingQtImageViewer(QWidget):\n... | python | edit | null | null | mit | 1f3e56b79f933a1d450074d1c4485e34c97f2806 | philipptrenz/draughtsCV,philipptrenz/Physical-Image-Manipulation-Program,philipptrenz/draughtsCV | pyqt.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef add_country_to_online_events(apps, schema_editor):\n \"\"\"Add an 'Online' country to all events tagged with 'online' t... | python | edit | 3 | 1 | mit | 624ce97b011100cc1aac9446c7f1c8a97eae5f34 | pbanaszkiewicz/amy,vahtras/amy,swcarpentry/amy,swcarpentry/amy,wking/swc-amy,vahtras/amy,wking/swc-amy,wking/swc-amy,vahtras/amy,pbanaszkiewicz/amy,wking/swc-amy,pbanaszkiewicz/amy,swcarpentry/amy | workshops/migrations/0040_add_country_to_online_events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# PMUtil.py\n# Phenotype microarray utility functions\n#\n# Author: Daniel A Cuevas\n# Created on 27 Jan. 2015\n# Updated on 27 Jan. 2015\n\nfrom __future__ import absolute_import, division, print_function\nimport sys\nimport time\nimport d... | python | edit | 1 | 1 | mit | 59b015bb3e45497b7ec86bf1799e8442a30b65da | dacuevas/PMAnalyzer,dacuevas/PMAnalyzer,dacuevas/PMAnalyzer,dacuevas/PMAnalyzer | py/PMUtil.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nThe acl module handles client_acl operations\n\nAdditional information on client_acl can be\nfound by reading the salt documention:\n\n http://docs.saltstack.com/en/latest/ref/clientacl.html\n'''\n\n# Import... | python | edit | 1 | 5 | apache-2.0 | 3a5e2e34374f92f0412d121fb9552278105f230a | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/acl/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n#Go through an OpenXC trace file and plot a time series graph using\n#matplotlib\n\nimport json\nimport sys\nimport argparse\nfrom pylab import *\n\ndef main():\n #Set up the command line argument parser\n par... | python | edit | 9 | 8 | bsd-3-clause | 008f0a2b0a7823e619410c5af70061d093c6f3de | openxc/openxc-data-tools | timeseries.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport setuptools\nfrom distutils.core import setup\n\nexecfile('sodapy/version.py')\n\nwith open('requirements.txt') as requirements:\n required = requirements.read().splitlines()\n\ntry:\n import pypandoc\n ... | python | edit | 5 | 0 | mit | 25597dfd77d80102c23ab2f4f3c9784c98aa943e | xmunoz/sodapy,peggyl/sodapy,peggyl/sodapy | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework.permissions import BasePermission\n\n\nclass ObjectHasTokenUser(BasePermission):\n \"\"\"\n The object's user matches the token's user.\n \"\"\"\n def has_object_permission(self, request, view, obj):\n ... | python | edit | 1 | 4 | mit | 81460f88ee19fb736dfc3453df2905f0ba4b3974 | PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans | common/permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests_unixsocket\nimport urllib\nimport json\nimport re\n\n\ndef dockerapi_dispatcher(app,request):\n method = request.method\n uri = re.match(r\"^.+/dockerapi/(.+)\", request.url).group(1)\n session = requests_unixsocket... | python | edit | 1 | 1 | apache-2.0 | fe4a0e0b86300f7da5f45a5541ee9c42c0a76ab7 | nathanIL/docker-manager,nathanIL/docker-manager,nathanIL/docker-manager | docker_manager/dispatcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass BaseExcelError(Exception):\n\n def __init__(self, message):\n super(BaseExcelError, self).__init__()\n self.message = message\n\n\nclass ValidationError(BaseExcelError):\n pass\n\n\nclass ColumnNotEqualError(BaseEx... | python | edit | 1 | 1 | mit | 7c5747688dffd41737c841ac354c4947939006c3 | NorakGithub/django-excel-tools | django_excel_tools/exceptions.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.