messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Visual profiler for Python.\"\"\"\nimport argparse\nimport functools\nimport json\nimport profile\nimport stats_server\nimport subprocess\nimport sys\n\n_MODULE_DESC = 'Python visual profiler.'\n_HOST = 'localhost'\n_PORT = 8000\n\n\n... | python | edit | 4 | 4 | bsd-2-clause | 19bae697bc6e017a97eef77d1425d1ccfbe27ff6 | nvdv/vprof,nvdv/vprof,nvdv/vprof | vprof/__main__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import OrderedDict, Mapping\nimport json\n\nclass AST(Mapping):\n def __init__(self, **kwargs):\n self._elements = OrderedDict(**kwargs)\n\n def add(self, key, value):\n previous = self._elements.get(key... | python | edit | 1 | 4 | bsd-2-clause | ee61dab40c4c3eaa1553397091a17a3292dcf9d6 | frnknglrt/grako,vmuriart/grako | grako/ast.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# Copyright (c) 2018 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\"\"\"Test bitcoind shutdow... | python | edit | 1 | 1 | mit | 4412a59bfe8228698e5b5bbe8bb21c8e8a70d357 | fujicoin/fujicoin,myriadteam/myriadcoin,apoelstra/bitcoin,prusnak/bitcoin,namecoin/namecore,midnightmagic/bitcoin,jamesob/bitcoin,fujicoin/fujicoin,pataquets/namecoin-core,r8921039/bitcoin,lateminer/bitcoin,DigitalPandacoin/pandacoin,Sjors/bitcoin,sipsorcery/bitcoin,bitcoin/bitcoin,AkioNak/bitcoin,bespike/litecoin,part... | test/functional/feature_shutdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport reg\n\n\n@reg.generic\ndef consumer(obj):\n \"\"\"A consumer consumes steps in a stack to find an object.\n \"\"\"\n\n\n@reg.generic\ndef app(obj):\n \"\"\"Get the application that this object is associated with.\n \"\"\"... | python | edit | 1 | 1 | bsd-3-clause | 9656b9fb1590513398bfca20f53483c6397b8095 | morepath/morepath,faassen/morepath,taschini/morepath | morepath/generic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom src.Move import Move\nfrom src.NaiveCube import NaiveCube\nfrom src.Cubie import Cube\nfrom src.Solver import Kociemba\nimport timeout_decorator\nimport unittest\n\n\nclass TestKociembaSolver(unittest.TestCase):\n @timeout_decorator... | python | edit | 1 | 6 | mit | 5edeb2e484eae8ac81898f92369f06dfed78908c | Wiston999/python-rubik | tests/test_KociembaSolver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom onirim.card._base import ColorCard\n\nclass _Door(ColorCard):\n\n def drawn(self, agent, content):\n do_open = agent.ask(\"if open\") if content.can_open(self) else False\n if do_open:\n content.discard(self... | python | edit | 1 | 3 | mit | 4f0dbf920a6867d8f3e16eb420391c8bcca43c44 | cwahbong/onirim-py | onirim/card/_door.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.conf import settings\nfrom django.contrib import admin\n\nfrom wagtail.wagtailadmin import urls as wagtailadmin_urls\nfrom wagtail.wagtaildocs import urls as wagtaildocs_urls\nfrom wagt... | python | edit | 3 | 0 | mit | 79a33e6e0de55dcfd602a58ef5adfabe7895915e | yostan/mysite,yostan/mysite | mysite/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom hamcrest.core import *\nfrom hamcrest.library import *\n\n__version__ = \"2.0.0a1\"\n__author__ = \"Chris Rose\"\n__copyright__ = \"Copyright 2014 hamcrest.org\"\n__license__ = \"BSD, see License... | python | edit | 3 | 0 | bsd-3-clause | c86efe7d1598cc9f7afc82c3118ec4cc20483312 | nitishr/PyHamcrest,msabramo/PyHamcrest,msabramo/PyHamcrest,nitishr/PyHamcrest | src/hamcrest/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom staticgen.staticgen_pool import staticgen_pool\nfrom staticgen.staticgen_views import StaticgenView\n\nfrom .models import Post\n\n\nclass BlogPostListView(Staticgen... | python | edit | 3 | 5 | bsd-3-clause | 6fe2e1dfbce465fee8a12475b3bfcda3ea10594e | mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo | staticgen_demo/blog/staticgen_views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 OpenStack Foundation\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Li... | python | edit | 1 | 0 | apache-2.0 | 24f0402e27ce7e51f370e82aa74c783438875d02 | openstack/oslo.db,openstack/oslo.db | oslo_db/tests/sqlalchemy/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Sponsor(models.Model):\n name = models.CharField(max_length=255)\n website = models.URLField(max_length=500)\n image = models.ImageField(upload_to=\"sponsor\")\n order = models.IntegerFiel... | python | edit | 1 | 1 | bsd-3-clause | 630ba21f3b08dcd2685297b057cbee4b6abee6f7 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/sections/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\n# This will make sure the app is always imported when\n# Django starts so that shared_task will use this app.\nfrom .celery import app as celery_app # noqa\n\n\n__version__ = \"1.0.0\"\n\n```\n\nAp... | python | edit | 1 | 2 | bsd-3-clause | a92118d7ee6acde57ab9853186c43a5c6748e8a6 | rapidpro/tracpro,xkmato/tracpro,xkmato/tracpro,xkmato/tracpro,xkmato/tracpro,rapidpro/tracpro,rapidpro/tracpro | tracpro/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport queue\nimport threading\n\n\nclass Producer(object):\n\n def __init__(self, period_in_seconds, queue, function):\n self._period_in_seconds = period_in_seconds\n self._queue = queue\n self._function = function\... | python | edit | 3 | 3 | mit | ef50e82c3c1f49d63d013ac538d932d40c430a46 | crashmaster/pyradiator | pyradiator/endpoint.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\n\nfrom corehq.apps.domain.forms import DimagiOnlyEnterpriseForm\nfrom corehq.apps.domain.models import Domain\nfrom corehq.util.decorators import require_debug_true\n\n\nclass Command(BaseComm... | python | edit | 1 | 1 | bsd-3-clause | eeb85c110bc9a723eeac4deb10d36e5b912035af | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/accounting/management/commands/make_domain_enterprise_level.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncio\n\nimport aiohttp\n\n\n@asyncio.coroutine\ndef aiohttp_request(loop, method, url, output='text', **kwargs):\n session = aiohttp.ClientSession(loop=loop)\n response_ctx = session.request(method, url, **kwargs) # NOQA: E... | python | edit | 1 | 4 | mit | 709017ea46cd3784983ef0ee64cfe608aa44cf0c | graingert/vcrpy,graingert/vcrpy,kevin1024/vcrpy,kevin1024/vcrpy | tests/integration/aiohttp_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom mrbelvedereci.api.serializers.cumulusci import OrgSerializer\nfrom mrbelvedereci.api.serializers.cumulusci import ScratchOrgInstanceSerializer\nfrom mrbelvedereci.api.serializers.cumulusci import Se... | python | edit | 3 | 0 | bsd-3-clause | ef96000b01c50a77b3500fc4071f83f96d7b2458 | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | mrbelvedereci/api/views/cumulusci.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass TestUser0(models.Model):\n username = models.CharField()\n test_field = models.CharField('My title')\n\n class Meta:\n app_label = 'controlcenter'\n\n def foo(self):\n return... | python | edit | 1 | 1 | bsd-3-clause | d328129a2f2909c1b8769f1edb94746c4a88dd28 | byashimov/django-controlcenter,byashimov/django-controlcenter,byashimov/django-controlcenter | test_project/test_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\r\n# strip-po-charset.py\r\n#\r\n\r\nimport sys, string\r\n\r\ndef strip_po_charset(inp, out):\r\n\r\n out.write(string.replace(inp.read(),\r\n \"\\\"Content-Type: text/plain; charset=UTF-8\\\\n\\\"\\n\",\"\... | python | edit | 3 | 2 | apache-2.0 | 36e6e2bedcc37a48097ccf0abd544ca095748412 | wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion | build/strip-po-charset.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (1, 0, 0)\n__version__ = '.'.join(map(str, VERSION))\n\n\nimport logging\nlogger = logging.getLogger('plata')\n\n\nclass LazySettings(object):\n def _load_settings(self):\n from plata import default_settings\n fro... | python | edit | 1 | 3 | bsd-3-clause | 99386fdd222988ca41d3781905cc1b185ca009f1 | armicron/plata,armicron/plata,armicron/plata,stefanklug/plata,allink/plata | plata/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Social auth models\"\"\"\nfrom django.db import models \nfrom django.contrib.auth.models import User\n\n\nclass UserSocialAuth(models.Model):\n \"\"\"Social Auth association model\"\"\"\n user = models.ForeignKey(User, related_n... | python | edit | 1 | 0 | bsd-3-clause | 9aace6d89642e5025692b25e2c6253544ed580a6 | michael-borisov/django-social-auth,krvss/django-social-auth,thesealion/django-social-auth,lovehhf/django-social-auth,sk7/django-social-auth,dongguangming/django-social-auth,czpython/django-social-auth,beswarm/django-social-auth,adw0rd/django-social-auth,MjAbuz/django-social-auth,VishvajitP/django-social-auth,MjAbuz/dja... | social_auth/models.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\nsetup(\n name = 'invokust',\n version = '0.7',\n author = 'Max Williams',\n author_email = '<EMAIL>',\n description =... | python | edit | 1 | 0 | mit | 4580bf5e1c4ada62f09bc4a33fae2b971c6fb3c1 | FutureSharks/invokust,FutureSharks/invokust | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom test_create_resource import *\nfrom test_resource_file import *\nfrom test_resource_list import *\nfrom test_resource_meta import *\nfrom test_resource_types import *\nfrom test_set_access_rules import *\nfrom test_user_info import *\n... | python | edit | 1 | 0 | bsd-3-clause | 24d2b9620af40395c66bd8d93c443fddfe74b5cf | ResearchSoftwareInstitute/MyHPOM,hydroshare/hydroshare,ResearchSoftwareInstitute/MyHPOM,hydroshare/hydroshare,FescueFungiShare/hydroshare,ResearchSoftwareInstitute/MyHPOM,RENCI/xDCIShare,ResearchSoftwareInstitute/MyHPOM,hydroshare/hydroshare,FescueFungiShare/hydroshare,ResearchSoftwareInstitute/MyHPOM,RENCI/xDCIShare,h... | hs_core/tests/api/rest/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__title__ = 'libvcs'\n__package_name__ = 'libvcs'\n__description__ = 'vcs abstraction layer'\n__version__ = '0.3.0'\n__author__ = 'Tony Narlock'\n__github__ = 'https://github.com/vcs-python/libvcs'\n__pypi__ = 'https://pypi.org/project/libv... | python | edit | 1 | 0 | mit | 59e47de06a175084538140481c7a702ff020e919 | tony/libvcs | libvcs/__about__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Metadata(object):\n def __init__(self, name, value):\n self.name = name\n self.value = value\n\n def __repr__(self):\n return \"Metadata({}, {})\".format(repr(self.name), repr(self.value))\n\n def __eq__(... | python | edit | 1 | 3 | mit | c8cc1f8e0e9b6d7dfb29ff9aef04bf2b5867cceb | biosustain/genomediff-python | genomediff/records.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2014 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\... | python | edit | 1 | 1 | apache-2.0 | 57e4d45d24b39287de12407350ce6c359332ac34 | williamboman/matrix-angular-sdk,williamboman/matrix-angular-sdk,matrix-org/matrix-angular-sdk,matrix-org/matrix-angular-sdk,matrix-org/matrix-angular-sdk,williamboman/matrix-angular-sdk | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom responses import RequestsMock\n\nfrom netvisor import Netvisor\n\n\n@pytest.fixture\ndef netvisor():\n kwargs = dict(\n sender='Test client',\n partner_id='xxx_yyy',\n partner_key='E2CEBB1966C7016... | python | edit | 1 | 1 | mit | 52fc9bc79343632a034d2dc51645306f4b58210c | fastmonkeys/netvisor.py | tests/services/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sympy.matrices.expressions import MatrixSymbol, HadamardProduct\nfrom sympy.matrices import ShapeError\nfrom sympy import symbols\nfrom sympy.utilities.pytest import raises\n\n\ndef test_HadamardProduct():\n n, m, k = symbols('n,m,k... | python | edit | 1 | 1 | bsd-3-clause | 06d271da251d3c85266629197d6b31b2ff617623 | kaichogami/sympy,Sumith1896/sympy,sahmed95/sympy,MridulS/sympy,Gadal/sympy,yashsharan/sympy,Shaswat27/sympy,chaffra/sympy,beni55/sympy,drufat/sympy,MechCoder/sympy,souravsingh/sympy,kaushik94/sympy,abhiii5459/sympy,liangjiaxing/sympy,iamutkarshtiwari/sympy,Gadal/sympy,grevutiu-gabriel/sympy,vipulroxx/sympy,moble/sympy,... | sympy/matrices/expressions/tests/test_hadamard.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Add taintlib to PATH so it can be imported during runtime without any hassle\nimport sys; import os; sys.path.append(os.path.dirname(os.path.dirname((__file__))))\nfrom taintlib import *\n\n# This has no runtime impact, but allows autocom... | python | edit | 9 | 2 | mit | d3163d8a7695da9687f82d9d40c6767322998fc2 | 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/dataflow/tainttracking/defaultAdditionalTaintStep-py3/test_collections.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='django-simpleimages',\n version='1.0.0',\n author='Saul Shanabrook',\n author_email='<EMAIL>',\n packages=['simpleimages', ],\n url='https://www.github.com/saulshanabrook/dj... | python | edit | 1 | 0 | mit | 3db4d85164a2a2c41503b568505077cf2af86e90 | saulshanabrook/django-simpleimages | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2020 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | python | edit | 7 | 0 | apache-2.0 | b2f6a318434f33f39c9d3bc6e738b6b0eba508c9 | tensorflow/cloud,tensorflow/cloud | tensorflow_cloud/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This is the top-level amaranth module init file.\n\nThe only current use of this class is to define common constants.\n\"\"\"\n\nLOW_CALORIE_THRESHOLD = 100\nHIGH_CALORIE_THRESHOLD = 500\n\n```\n\nApply this change: Change high calori... | python | edit | 1 | 0 | apache-2.0 | 766a2fa8a1256946af9bc3b20b98a9a6ac7e1080 | googleinterns/amaranth,googleinterns/amaranth | amaranth/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nfrom r2.lib.errors import errors\nfrom r2.lib.validator import (\n VMultiByPath,\n Validator,\n)\nfrom r2.models import (\n NotFound,\n Subreddit,\n)\n\nis_multi_rx = re.compile(r\"\\A/?(user|r)/[^\\/]+/m/(?P<name>.... | python | edit | 1 | 6 | bsd-3-clause | 96856fc267ec99de6e83a997346c853dbdb1cfd5 | madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk | reddit_adzerk/lib/validator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n\nfrom . import RepoChecker\n\n\nclass CheckSemverTags(RepoChecker):\n\n def check(self):\n if not self.semver_tags:\n msg = \"No semantic version tags found. See http://semver.org.\"\n for tag i... | python | edit | 1 | 4 | mit | e0063c0d5604372c1a07a179f5206a0a27570817 | packagecontrol/st_package_reviewer,packagecontrol/package_reviewer | package_reviewer/check/repo/check_semver_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tests.models import EventWithNulls, EventWithNoNulls\nimport pytest\n\n\n@pytest.mark.django_db\ndef test_recurs_can_be_explicitly_none_if_none_is_allowed():\n # Check we can save None correctly\n event = EventWithNulls.objects.c... | python | edit | 1 | 1 | bsd-3-clause | 3a5fb18a385ffd0533da94632d917e3c0bcfb051 | linux2400/django-recurrence,linux2400/django-recurrence,django-recurrence/django-recurrence,Nikola-K/django-recurrence,FrankSalad/django-recurrence,Nikola-K/django-recurrence,FrankSalad/django-recurrence,django-recurrence/django-recurrence | tests/test_nulls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom memoized import memoized\nfrom custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter\nfrom custom.intrahealth.sqldata... | python | edit | 1 | 3 | bsd-3-clause | 73cb3c6883940e96e656b9b7dd6033ed2e41cb33 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | custom/intrahealth/reports/recap_passage_report_v2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport textract\nimport sys\nimport os\nimport re\nimport random\n\n###################################\n# Extracts text from a pdf file and\n# selects one sentence, which it\n# then prints.\n#\n# Created by Fredrik Omstedt.\n##############... | python | edit | 1 | 4 | mit | c43820a2e26dd4f87c36b986a9a0af80b409f659 | Xaril/sentence-extractor,Xaril/sentence-extractor | sentence_extractor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom utils import TextLoader\nimport numpy as np\n\nclass TestUtilsMethods(unittest.TestCase):\n def setUp(self):\n self.data_loader = TextLoader(\"tests/test_data\", batch_size=2, seq_length=5)\n\n def test_in... | python | edit | 1 | 1 | mit | 2575946f1b05ac1601a00f8936ab3a701b05bc7e | hunkim/word-rnn-tensorflow,bahmanh/word-rnn-tensorflow | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Forms for user application.\"\"\"\n\nfrom django.forms import ModelForm\nfrom django.contrib.auth import get_user_model, forms\n\nUser = get_user_model()\n\n\nclass SignupForm(ModelForm):\n \"\"\"Sign up for user registration.\"\"\... | python | edit | 1 | 1 | mit | 30e567adb809810930616493fd92ef1c40c9207b | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/users/forms.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.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('sponsors', '0004_auto_20160813_1328'),\n ]\n\n ... | python | edit | 1 | 0 | isc | 7c894c716cb712bbcb137df3a5df5548bdca9d93 | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/sponsors/migrations/0005_sponsorshippackage_symbol.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 app import app, webhooks\n\n@webhooks.hook(\n app.config.get('GITLAB_HOOK','/hooks/gitlab'),\n handler='gitlab')\nclass Gitlab:\n def issue(sel... | python | edit | 1 | 1 | apache-2.0 | 014c8ca68b196c78b9044b194b762cdb3dfe6c78 | pipex/gitbot,pipex/gitbot,pipex/gitbot | app/hooks/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom framework.mongo import database as proxy_database\nfrom website import settings as osfsettings\n\nlogger = logging.getLogger(__name__)\n\n\ndef begin(database=None):\n database = database or ... | python | edit | 1 | 3 | apache-2.0 | f712a03fea451b846e6f8b3e33a685dc5794f923 | baylee-d/osf.io,baylee-d/osf.io,mluo613/osf.io,hmoco/osf.io,caneruguz/osf.io,Nesiehr/osf.io,hmoco/osf.io,alexschiller/osf.io,chrisseto/osf.io,leb2dg/osf.io,saradbowman/osf.io,mattclark/osf.io,cslzchen/osf.io,HalcyonChimera/osf.io,felliott/osf.io,aaxelb/osf.io,pattisdr/osf.io,TomBaxter/osf.io,alexschiller/osf.io,Halcyon... | framework/transactions/commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nREADME = 'README.md'\n\n\ndef long_desc():\n try:\n import pypandoc\n except ImportError:\n with open(README) as f:\n return f.read()\n ... | python | edit | 1 | 2 | mit | 9d58310b2106e3ed5fc140a8479e003a4a647e82 | mayfield/ecmcli | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass Key(models.Model):\n user = models.ForeignKey(User)\n key = models.CharField(max_length=40)\n created = models.Date... | python | edit | 1 | 5 | bsd-3-clause | d63d391d5b9ee221c0cd67e030895f4598430f08 | uploadcare/django-loginurl,vanschelven/cmsplugin-journal,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,fajran/django-loginurl,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-web... | onetime/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\n\nclass DatasetSpider(CrawlSpider):\n\n name = 'dataset'\n allowed_domains =... | python | edit | 3 | 0 | mit | fb8c2fb065449a436dd8ffa11b469bb2f22a9ad1 | MaxLikelihood/CODE | spider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2010 rPath, Inc.\n\nimport testsuite\ntestsuite.setup()\n\nfrom testrunner import testcase\n\nfrom rpath_repeater import models\n\nclass TestBase(testcase.TestCaseWithWorkDir):\n pass\n\nclass ModelsTest(TestBase):\n d... | python | edit | 1 | 1 | apache-2.0 | f0e8999ad139a8da8d3762ee1d318f23928edd9c | sassoftware/rpath-repeater | tests/modelstest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport time\nimport contextlib\nimport os\nfrom unittest import mock\n\nfrom tempora import timing\n\n\ndef test_IntervalGovernor():\n \"\"\"\n IntervalGovernor should prevent a function from being called more than\n ... | python | edit | 1 | 2 | mit | 3aa13efa28b4ededa465541a7db8df5fc5878ce3 | jaraco/tempora | tempora/tests/test_timing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom decimal import Decimal\n\n# FIXME: The amount should be dynamically calculated by payment's currency.\n# For example, amount will wrong for JPY since JPY does not support cents\n\n\ndef get_amount_for_stripe(amount, currency):\n \"\... | python | edit | 1 | 1 | bsd-3-clause | dbcc7604b7ab554b7bb6000029071bfa8d2a5971 | UITools/saleor,mociepka/saleor,maferelo/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,UITools/saleor,mociepka/saleor | saleor/payment/gateways/stripe/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nINSTALLED_APPS = ['post_office']\n\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n },\n}\n\n\nCACHES = {\n 'default': {\n 'BACKEND'... | python | edit | 1 | 0 | mit | b555137fa7c7e84353daa1d12e29ba636bb9fd77 | JostCrow/django-post_office,ekohl/django-post_office,CasherWest/django-post_office,ui/django-post_office,carrerasrodrigo/django-post_office,CasherWest/django-post_office,fapelhanz/django-post_office,jrief/django-post_office,RafRaf/django-post_office,LeGast00n/django-post_office,yprez/django-post_office,ui/django-post_o... | post_office/test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom ykman.util import TRANSPORT\nfrom .util import (DestructiveYubikeyTestCase, missing_mode, ykman_cli)\n\n\n@unittest.skipIf(*missing_mode(TRANSPORT.CCID))\nclass TestOpenPGP(DestructiveYubikeyTestCase):\n\n def test_... | python | edit | 1 | 1 | bsd-2-clause | 745ec6f3dd227cc00c3db0d100b005fb6fd4d903 | Yubico/yubikey-manager,Yubico/yubikey-manager | test/on_yubikey/test_cli_openpgp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport importlib\nimport os\nimport sys\nimport unittest\nimport code\nimport struct\n\ncode_path = os.path.dirname(__file__)\ncode_path = os.path.join(code_path, os.pardir)\nsys.path.append(code_path)\n\nimport MOS6502\n\nclass TestCartHea... | python | edit | 5 | 1 | bsd-2-clause | 43905a102092bdd50de1f8997cd19cb617b348b3 | pusscat/refNes | tests/cart_tests.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport threading\nimport subprocess\n\nimport sublime\n\n\nclass ExecFlowCommand(threading.Thread):\n \"\"\"Threaded class used for running flow commands in a different thread.\n\n The subprocess must be thread... | python | edit | 1 | 5 | mit | fc472d043e81c2b5687a0f83dbbdd0dd02b73e35 | Pegase745/sublime-flowtype | flowtype/commands/exec_flow.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(name='l1',\n version='0.1',\n description='L1',\n author='Bugra Akyildiz',\n author_email='<EMAIL>',\n url='bugra.github.io',\n packages=['l1'],\n ... | python | edit | 1 | 0 | apache-2.0 | 90ba2679c712e87ac750affdc389bed1de0a422a | bugra/l1 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# flake8: noqa\n\n__version__ = '0.28.5k'\n\nfrom .explainers.kernel import KernelExplainer, kmeans\nfrom .explainers.sampling import SamplingExplainer\nfrom .explainers.tree import TreeExplainer, Tree\nfrom .explainers.deep import DeepExpl... | python | edit | 1 | 0 | mit | 286422d95355fc55c1745731732d763ca1bdb7e5 | slundberg/shap,slundberg/shap,slundberg/shap,slundberg/shap | shap/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 0xc0170\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/... | python | edit | 3 | 2 | apache-2.0 | 4e1b76db16658a01d3f8cf99f8b5d58e63b5e343 | project-generator/project_generator,sarahmarshy/project_generator,0xc0170/project_generator,hwfwgrp/project_generator,ohagendorf/project_generator,sg-/project_generator,sg-/project_generator,molejar/project_generator | project_generator/builders/builder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flaskext.redis import Redis\n\ndef create_app():\n from codesharer.apps.classifier.views import frontend\n\n app = Flask(__name__)\n app.config.from_object('codesharer.conf.Config')\n\n app.register... | python | edit | 1 | 1 | apache-2.0 | e9b422c74382d88787114796e7e4b6dfd2b25225 | disqus/codebox,disqus/codebox | codesharer/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup,find_packages\n\nMETADATA = dict(\n name='django-socialregistration',\n version='0.4.3',\n author='Alen Mujezinovic',\n author_email='<EMAIL>',\n description='Django applica... | python | edit | 1 | 0 | mit | 42d765c8dbcc099f7bd2ac77485a0b5351a1b0a7 | aditweb/django-socialregistration,bopo/django-socialregistration,lgapontes/django-socialregistration,0101/django-socialregistration,mark-adams/django-socialregistration,brodie/django-socialregistration,mark-adams/django-socialregistration,minlex/django-socialregistration,flashingpumpkin/django-socialregistration,kapt/d... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport threading\nimport Queue\n\nfrom datetime import datetime,date,timedelta\nimport time\n\nfrom tornado import gen\nfrom tornado.ioloop import IOLoop\n\n@gen.coroutine\ndef async_sleep(seconds):\n yield gen.Task(IOLoop.i... | python | edit | 30 | 6 | apache-2.0 | d8b3e511b00c9b5a8c7951e16d06173fe93d6501 | METASPACE2020/sm-engine,SpatialMetabolomics/SM_distributed,METASPACE2020/sm-engine,SpatialMetabolomics/SM_distributed,SpatialMetabolomics/SM_distributed,SpatialMetabolomics/SM_distributed | engine/util.py | rejected_lint | Too many lint violations: 30 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Solution to Project Euler Problem 7\nhttps://projecteuler.net/problem=7\n\"\"\"\n\nINDEX = 10001\n\n\ndef compute(index=INDEX):\n \"\"\"Find the `index`th prime number.\"\"\"\n\n primes = list()\n test_number = 2\n\n while... | python | edit | 1 | 4 | mit | 1702fbc607816544c28a8f2895a82d234226e48b | 2Cubed/ProjectEuler | euler/p007.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom st2actions.runners.pythonrunner import Action\n\nAPI_URL = 'https://api.travis-ci.org'\nHEADERS_ACCEPT = 'application/vnd.travis-ci.2+json'\nCONTENT_TYPE = 'application/json'\n\n\nclass TravisCI(Action):\n def _ge... | python | edit | 1 | 6 | apache-2.0 | c7512104dce2e9ca83e8400b399b4f77113f9368 | pidah/st2contrib,lmEshoo/st2contrib,psychopenguin/st2contrib,psychopenguin/st2contrib,armab/st2contrib,StackStorm/st2contrib,tonybaloney/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,armab/st2contrib,armab/st2contrib,S... | packs/travisci/actions/lib/action.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport commandline_args\nfrom .mutant_epitope_predictor import MutantEpitopePredictor\nfrom .epitope_helpers import (\n epitopes_to_dataframe,\n epitopes_to_csv\n)\nfrom .predict_epitopes import predict_epitopes, predict_epitopes_from... | python | edit | null | null | apache-2.0 | 370676a21ff43ae25b75b890870613ebd6dbcf03 | hammerlab/topiary,hammerlab/topiary | topiary/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\r\n# define overloading of ids for each social site\r\n# to be customized for your accounts\r\n#\r\n\r\n#\r\n# flickr\r\n#\r\ndef flickr_api_secret():\r\n return \"\"\r\n\r\ndef flickr_api_key():\r\n return \"\"\r\n\r\ndef flickr_us... | python | edit | 1 | 1 | mit | 38d16da934503a964ae5e16aafd65c0642970472 | JulienLeonard/socialstats | pysocialids.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for vumi.persist.redis_base.\"\"\"\n\nfrom twisted.trial.unittest import TestCase\n\nfrom vumi.persist.redis_base import Manager\n\n\nclass ManagerTestCase(TestCase):\n def mk_manager(self, client, key_prefix='test'):\n ... | python | edit | 1 | 2 | bsd-3-clause | c9e4a05ed2677fd569642e0ef77dd9f63bf3e15f | TouK/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi | vumi/persist/tests/test_redis_base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name=\"feedinlib\",\n version=\"0.1.0rc2\",\n description=\"Creating time series fr... | python | edit | 1 | 1 | mit | d8a39009565ca8aff4b6fbddae5d2ef7aada7213 | oemof/feedinlib | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass PackageData(object):\n def __init__(self, local_file, name, version):\n self.local_file = local_file\n self.name = name\n self.version = version\n\n def __getattr__(self, name):\n if name in self.__di... | python | edit | 1 | 2 | mit | 8a583c522dff8fc2671d7b51042a8c9ff07e86dc | MichaelMraka/pyp2rpm,mcyprian/pyp2rpm,fedora-python/pyp2rpm,joequant/pyp2rpm,henrysher/spec4pypi,pombredanne/pyp2rpm,yuokada/pyp2rpm | pyp2rpmlib/package_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.decorators import permission_required\nfrom django.shortcuts import get_object_or_404, render_to_response\nfrom django.template import RequestContext\n\nfrom feincms.module.page.models import Page\n\n\ndef build_pag... | python | edit | 1 | 2 | bsd-3-clause | 305e88780fc2d3638fb3a9f33bfec8d6c295535e | matthiask/feincms2-content,joshuajonah/feincms,nickburlett/feincms,nickburlett/feincms,hgrimelid/feincms,feincms/feincms,mjl/feincms,mjl/feincms,joshuajonah/feincms,pjdelport/feincms,matthiask/django-content-editor,feincms/feincms,matthiask/feincms2-content,matthiask/django-content-editor,hgrimelid/feincms,pjdelport/fe... | feincms/views/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\n\nfrom . import views\n\n\nurlpatterns = [\n url(r'^events/import/?$',\n views.ConferenceImport.as_view(),\n name='event_import'),\n url(r'^persons/import/?$',\n views.Pe... | python | edit | 1 | 0 | mit | e2479e3f8748fbfa34c89ecda7d2f3e72e94fa57 | swcarpentry/amy,vahtras/amy,pbanaszkiewicz/amy,pbanaszkiewicz/amy,swcarpentry/amy,vahtras/amy,swcarpentry/amy,vahtras/amy,pbanaszkiewicz/amy | pydata/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import path\nfrom setuptools import setup\n\n\n# Utility function to read the README file.\n# Used for the long_description. It's nice, because now 1) we have a top level\n# README file and 2) it's easier to type in the README file... | python | edit | 1 | 1 | mit | b57a0a89cd2596174300319ee0a83490ad987177 | andrasmaroy/pconf | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\n\nfrom ..hmap import HashMap\n\n@pytest.fixture(params=[0,1,5,9])\ndef n(request):\n \"\"\"Number of items\"\"\"\n return request.param\n\n@pytest.fixture\ndef items(n):\n \"\"\"A list of str... | python | edit | 3 | 2 | bsd-3-clause | a79a3f7c42c858ae42c618479654cd7589de05b9 | alexrudy/Zeeko,alexrudy/Zeeko | zeeko/utils/tests/test_hmap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\n\n\ndef each(function, iterable):\n for item in iterable:\n function(item)\n\n\ndef each_unpack(function, iterable):\n for item in iterable:\n function(*item)\n\n\ndef minmax(*args):\n min = None\n max = None\n... | python | edit | 1 | 4 | mit | a3c582df681aae77034e2db08999c89866cd6470 | davidfoerster/schema-matching | utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.conf import settings\n\nclass Playbook(models.Model):\n name = models.CharField(max_length=200)\n inventory = models.CharField(max_length=200, default=\"hosts\")\n user = models.CharField(m... | python | edit | 1 | 1 | bsd-3-clause | 39b57462b69d78825fd217822d9be2f1eea5a06d | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | src/ansible/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# With mod_python we'll have to delay importing trac.web.api until\n# modpython_frontend.handler() has been called since the\n# PYTHON_EGG_CACHE variable is set from there\n#\n# TODO: Remove this once the Genshi zip_safe issue has been reso... | python | edit | 5 | 0 | bsd-3-clause | c205742520f4d2882d666e13a06c487d886ec7bc | rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac | trac/web/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models import ForeignKey\nfrom django.contrib.auth.models import User\n\nimport threadlocals\n\n\nclass UserField(ForeignKey):\n \"\"\" UserField\n\n By defaults, foreign key to User; null=True, blank=True\n \"\"\"\n... | python | edit | 1 | 2 | bsd-3-clause | c7660db45e0275a685a6cc450fd4341a69c52b92 | diver-in-sky/django-threaded-multihost | threaded_multihost/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPackage configuration\n\"\"\"\n# pylint:disable=no-name-in-module, import-error\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nsetup(\n name='IXWSAuth',\n version='0.1.1',\n author='Infoxchanhe A... | python | edit | 1 | 0 | mit | 45ec0f85bf4b244738220b920dc2046183ba707e | infoxchange/ixwsauth | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import base\n\n\nclass RoutesCachePreprocessor(base.BasePreprocessor):\n KIND = '_routes_cache'\n\n def __init__(self, pod):\n self.pod = pod\n\n def run(self, build=True):\n self.pod.routes.reset_cache(rebuild... | python | edit | 1 | 3 | mit | eff7f0bf52507013859788eec29eea819af6ce63 | denmojo/pygrow,grow/pygrow,grow/grow,denmojo/pygrow,denmojo/pygrow,grow/pygrow,grow/grow,grow/grow,grow/grow,grow/pygrow,denmojo/pygrow | grow/preprocessors/routes_cache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport os\n\nsys.path.append(os.path.join(os.path.dirname('__file__'), '..', 'src'))\n\nfrom random import randint\nfrom datetime import datetime, timedelta\n\nfrom logsandra.model.client import CassandraC... | python | edit | 2 | 0 | mit | 54f53815653f807c17c33e9d3262d9d3a31abfcf | thobbs/logsandra | scripts/fill_events.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport platform\nimport subprocess\n\nIS_MACOS = platform.system() == 'Darwin'\nIS_WINDOWS = platform.system() == 'Windows'\n\ndef node_bridge(data, bin, args=[]):\n\tenv = None\n\tstartupinfo = None\n\tif IS_MACOS:\n\t\t# GUI ap... | python | edit | 1 | 5 | mit | 47f1b47f37da4f9a3444a2ac6cc7b7a0affafbf3 | sindresorhus/sublime-autoprefixer,sindresorhus/sublime-autoprefixer,sindresorhus/sublime-autoprefixer | node_bridge.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport tornado.httpserver\nimport tornado.ioloop\nimport tornado.options\nimport tornado.web\n\ntornado.options.define(\"port\", default=8888, type=int)\n\nif __name__ == \"__main__\":\n tornado.options.parse_command_line()\n a... | python | edit | 2 | 0 | bsd-3-clause | 4bf129f49eb608e34e46f60edb1d23303dd2ed27 | qqqlllyyyy/d3,xc145214/d3,wangjun/d3,imshibaji/d3,alexgarciac/d3,markengelstad/d3,KevinMarkVI/d3,amorwilliams/d3,clayzermk1/d3,codingang/d3-1,overmind1980/d3,peterwu8/d3,baegjins/d3,christianevans214/d3,ilovezy/d3,ilo10/d3,UpstatePedro/d3,nbende/d3,trankmichael/d3,oanaradulescu/d3,MartinDavila/d3,Sachin-Ganesh/d3,nhein... | examples/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom .base import *\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n ('Sym Roe', '<EMAIL>'),\n)\n\nMANAGERS = ADMINS\n\nALLOWED_HOSTS = ['.herokuapp.com']\nINTERNAL_IPS = ()\n\n# Redirect any non-HTTP request to HTTP... | python | edit | 4 | 0 | bsd-3-clause | f9365594e415e9485dc6a4435cb14b3eaf8b9c58 | lm-tools/sectors,lm-tools/sectors,lm-tools/sectors,lm-tools/sectors | situational/settings/heroku.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\r\nimport stat\r\nimport time\r\n\r\n\r\ndef updateModificationTime(path):\r\n accessTime = os.stat(path)[stat.ST_ATIME]\r\n modificationTime = time.time()\r\n os.utime(path, (accessTime, modificationTime))\r\n\n```\n\nAp... | python | edit | 1 | 6 | isc | c9f5bee80dfb0523050afc6cb72eea096a2e3b95 | luoliyan/incremental-reading-for-anki,luoliyan/incremental-reading-for-anki | ir/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom rest_framework.authtoken.views import obtain_auth_token\nfrom . import views\n\nrouter = routers.DefaultRouter()\nrouter.register(r'users', views.UserViewSet)\n\nurlpatterns = [\n url(r'^ge... | python | edit | 1 | 0 | mit | 8b7529551d11c67aad4729e53a2b25473599b1f7 | ioO/billjobs | billjobs/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nif sys.version_info <= (2, 4):\n error = 'Requires Python Version 2.5 or above... exiting.'\n print >> sys.stderr, error\n ... | python | edit | 2 | 0 | apache-2.0 | 3de90ff1f33d05d30e295279e7ad4cdd0e6bbc9b | garydonovan/google-maps-services-python,edwardsamuel/google-maps-services-python,cmontezano/google-maps-services-python,ambrozic/google-maps-services-python,quevedin/google-maps-services-python,codeAshu/google-maps-services-python,Scronker/google-maps-services-python,googlemaps/google-maps-services-python,Prindle19/goo... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .hough_transform import *\nfrom .radon_transform import *\nfrom .finite_radon_transform import *\nfrom .integral import *\nfrom ._geometric import (warp, warp_coords, estimate_transform,\n SimilarityTransform, A... | python | edit | 18 | 0 | bsd-3-clause | 87a3025196b0b3429cab1f439cd10728e99d982f | emon10005/scikit-image,bsipocz/scikit-image,blink1073/scikit-image,youprofit/scikit-image,rjeli/scikit-image,SamHames/scikit-image,almarklein/scikit-image,rjeli/scikit-image,emon10005/scikit-image,almarklein/scikit-image,youprofit/scikit-image,chintak/scikit-image,almarklein/scikit-image,paalge/scikit-image,vighneshbir... | skimage/transform/__init__.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nfrom flask import Flask, url_for, render_template\napp = Flask(__name__)\n\n@app.route('/')\ndef index():\n\treturn render_template('index.html')\n\n@app.route('/recipe/search/<term>')\ndef recipe(term=None):\n in... | python | edit | 3 | 1 | bsd-2-clause | 19f4b7d46d3aa57bb81dc34e2639a4c192b58cb1 | kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes | meanrecipes/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom flask import json\nfrom api import db\nfrom api.BucketListAPI import app\nfrom instance.config import application_config\n\n\nclass AuthenticationTestCase(unittest.TestCase):\n def setUp(self):\n app.config.f... | python | edit | 1 | 1 | mit | c04b9813b5d6d3f8bc8eaa7be2d49d32f150aaf2 | patlub/BucketListAPI,patlub/BucketListAPI | tests/test_authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itertools import permutations\n\n\ndef solve() -> int:\n pandigital = []\n\n for permutation in permutations(range(1, 10)):\n result = int(''.join(str(digit) for digit in permutation[:4]))\n\n for i in range(1, 4):\... | python | edit | 1 | 4 | mit | 9011b359bdf164994734f8d6890a2d5acb5fa865 | cryvate/project-euler,cryvate/project-euler | project_euler/solutions/problem_32.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file... | python | edit | 1 | 1 | apache-2.0 | 90963666f22bea81d433724d232deaa0f3e2fec1 | jtopjian/st2,StackStorm/st2,StackStorm/st2,emedvedev/st2,dennybaa/st2,StackStorm/st2,alfasin/st2,pixelrebel/st2,nzlosh/st2,Itxaka/st2,StackStorm/st2,dennybaa/st2,punalpatel/st2,Plexxi/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,grengojbo/st2,Itxaka/st2,jtopjian/st2,alfasin/st2,punalpatel/st2,peak6/st2,tonybaloney/st2,pin... | st2common/st2common/exceptions/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport board\nimport digitalio\nimport gamepad\nimport time\n\npad = gamepad.GamePad(\n digitalio.DigitalInOut(board.PA11),\n digitalio.DigitalInOut(board.PA12),\n digitalio.DigitalInOut(board.PA24),\n digitalio.DigitalInOut(boa... | python | edit | 1 | 0 | mit | 25e71a56d48e5bdc4d73522333196d69d735707a | adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython | ports/nrf/boards/pca10056/examples/buttons.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n salt.utils.parser\n ~~~~~~~~~~~~~~~~~\n\n :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio (<EMAIL>)`\n :license: Apache 2.0, see LICENSE for more details.\n\"\"\"\n\nimport sys\nimport op... | python | edit | 2 | 2 | apache-2.0 | 26e90f715f5fbd5adeae1703a48ebef2352c93a2 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/utils/parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pupa.scrape import Jurisdiction\n\nfrom .people import PersonScraper\n\n\nclass Example(Jurisdiction):\n jurisdiction_id = 'ocd-jurisdiction/country:us/state:ex/place:example'\n name = 'Example Legislature'\n url = 'http://exa... | python | edit | 1 | 2 | bsd-3-clause | 3d435421fd3680d4b5e84a4ca69e4d294c3e01e0 | datamade/pupa,rshorey/pupa,influence-usa/pupa,mileswwatkins/pupa,influence-usa/pupa,opencivicdata/pupa,rshorey/pupa,opencivicdata/pupa,mileswwatkins/pupa,datamade/pupa | example/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models.signals import (\n post_save,\n)\n\nfrom django.dispatch import receiver\n\nfrom rest_framework.authtoken.models import Token\n\nfrom django.conf import settings\n\nfrom .models import (\n Contest,\n)\n\n\n@recei... | python | edit | 1 | 3 | bsd-2-clause | 0f35ed05d335e7c126675bc913b72aac3ac916df | barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api | project/apps/api/signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nfrom data import warehouse\n\n_WORD_REGEX = re.compile(r'^\\w+$', re.IGNORECASE)\n\n\ndef score_word(word):\n if not _valid(word):\n return False\n if word in warehouse.get('/words/unigram/trie'):\n return 1\n return .... | python | edit | 1 | 5 | mit | 7ea8a4110ec2b696ff8124e0881d8cf769d8c365 | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | src/puzzle/heuristics/analyze_word.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom api.caching.tasks import ban_url\nfrom framework.tasks.handlers import enqueue_task\nfrom modularodm import signals\n\n@signals.save.connect\ndef log_object_saved(sender, instance, fields_changed, cached_data):\n abs_url = None\n ... | python | edit | 1 | 3 | apache-2.0 | 32a831d575b5354468a8f9c2a815f9f1aa03f2fb | kwierman/osf.io,amyshi188/osf.io,baylee-d/osf.io,felliott/osf.io,chrisseto/osf.io,amyshi188/osf.io,felliott/osf.io,samchrisinger/osf.io,cslzchen/osf.io,icereval/osf.io,cwisecarver/osf.io,sloria/osf.io,kwierman/osf.io,kch8qx/osf.io,asanfilippo7/osf.io,TomHeatwole/osf.io,DanielSBrown/osf.io,cslzchen/osf.io,CenterForOpenS... | api/caching/listeners.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntitle=\"Notes on dynamic programming - part 1\"\ndescription=\"\"\" \nPart 1 of extensive notes discussing the fundamentals of dynamic programming.\nExamples in these notes include the Fibonacci sequence and Warshall's\nalgorithm. Pseudocod... | python | edit | 1 | 0 | mit | 5ca96beb26dd2ab5285a57f5cade6f01160df368 | joequery/joequery.me,joequery/joequery.me,joequery/joequery.me,joequery/joequery.me | joequery/blog/posts/code/notes-on-dynamic-programming-part-1/meta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport pandas as pd\nimport pymongo\n\nimport emission.core.get_database as edb\nimport emission.storage.timeseries.builtin_timeseries as bits\n\nclass AggregateTimeSeries(bits.BuiltinTimeSeries):\n def __init__(self):\n ... | python | edit | 6 | 1 | bsd-3-clause | 453b6a8697b066174802257156ac364aed2c650a | shankari/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,sunil07t/e-mission-server,yw374cornell/e-mission-... | emission/storage/timeseries/aggregate_timeseries.py | rejected_lint | Too many lint violations: 6 | 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, unicode_literals\n\nimport re\n\nfrom ._base import VarNameSanitizer\n\n\nclass ElasticsearchIndexNameSanitizer(VarN... | python | edit | 1 | 1 | mit | 1f8895c4e2f9189032383771d322afdbfdac5e37 | thombashi/pathvalidate | pathvalidate/variable/_elasticsearch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom setuptools import setup, find_packages\n\nextra_setup = {}\nif sys.version_info >= (3,):\n extra_setup['use_2to3'] = True\n\nsetup(\n name='noseprogressive',\n version='0.1',\n description='Nose plugin to show... | python | edit | 1 | 0 | mit | ff77e5e6323b05260c89ee735bfd6dc083211def | veo-labs/nose-progressive,olivierverdier/nose-progressive,erikrose/nose-progressive,pmclanahan/pytest-progressive | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Driver script for testing sockets\n Unix only\n\"\"\"\nimport os, sys, time\n\n# Fork, run server in child, client in parent\npid = os.fork()\nif pid == 0:\n # exec the parent\n os.execv(sys.argv[1], ('-D', sys.argv[3]))\nel... | python | edit | 1 | 0 | bsd-3-clause | 615e57fefa2b3b52ce351ef1d8039216927dc891 | SimVascular/VTK,johnkit/vtk-dev,gram526/VTK,daviddoria/PointGraphsPhase1,sankhesh/VTK,hendradarwin/VTK,jeffbaumes/jeffbaumes-vtk,ashray/VTK-EVM,msmolens/VTK,SimVascular/VTK,arnaudgelas/VTK,gram526/VTK,berendkleinhaneveld/VTK,johnkit/vtk-dev,Wuteyan/VTK,aashish24/VTK-old,mspark93/VTK,hendradarwin/VTK,collects/VTK,collec... | Parallel/Testing/Cxx/TestSockets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.forms import UserCreationForm, UserChangeForm\n\nfrom .models import UniqueEmailUser\n\n\nclass UniqueEmailUserCreationForm(UserCreationForm):\n \"\"\"\n A form that creates a UniqueEmailUser.\n \"\"\"\n\n ... | python | edit | 1 | 0 | mit | 4fe19797ba2fb12239ae73da60bb3e726b23ffe9 | uppercounty/uppercounty,uppercounty/uppercounty,uppercounty/uppercounty | web/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# LIBTBX_SET_DISPATCHER_NAME dev.dials.rebin_images\n\nfrom __future__ import division\n\ndef rebin_images(in_template, out_template, start, end):\n from dials.util.rebin_images import main\n in_images = [in_template % j for j in range(st... | python | edit | 2 | 3 | bsd-3-clause | 98e574061dc430b1cad6c9bbef5b55aa92803206 | dials/dials,dials/dials,dials/dials,dials/dials,dials/dials | command_line/rebin_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom invoke.tasks import task\nfrom invoke.runner import run\n\n\ndocs_dir = 'docs'\nbuild = os.path.join(docs_dir, '_build')\n\n\n@task\ndef clean_docs():\n run(\"rm -rf %s\" % build)\n\n\n@task\ndef browse_docs():\n run... | python | edit | 1 | 6 | bsd-2-clause | fc75f5843af70c09e0d63284277bf88689cbb06d | mrjmad/invocations,pyinvoke/invocations,alex/invocations,singingwolfboy/invocations | invocations/docs.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.