messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nFlask-Login example\r\n===================\r\nThis is a small application that provides a trivial demonstration of\r\nFlask-Login, including remember me functionality.\r\n\r\n:copyright: (C) 2011 by Matt... | python | edit | 1 | 2 | mit | b7ada8c3a4cacc5b6b91aa5cb91cd57a6ee5566d | corydolphin/flask-olinauth | example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom database import QuizDB\n\ndb = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT)\n\nclass Quiz(Base):\n def __init__(self, id):\n self.id = id\n\n QUESTION_HASH = \"{0}:question\".format(self.id)\n ANSWER_HASH = \"... | python | edit | 15 | 2 | bsd-2-clause | e16911bb965a86fc841b17d4748fdc75d8ed5cf2 | estreeper/quizalicious,estreeper/quizalicious,estreeper/quizalicious | quizzes.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport numpy as np\nimport copy as cp\nimport rust_sorting as rs\n\nN = 5\nmax_val = 10.0\n\ndtypes = [np.int8, np.int16, np.int32, np.int64,\n np.uint8, np.uint16, np.uint32, np.uint64,\n np.f... | python | edit | 1 | 0 | bsd-3-clause | f00eeefd5c7b13c8fdff2ff213a50f2c13423073 | nbigaouette/rust-sorting,nbigaouette/rust-sorting,nbigaouette/rust-sorting | example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport imp\n\nfrom mamba import formatters\nfrom mamba.runner import Runner\n\n\ndef main():\n formatter = formatters.DocumentationFormatter()\n runner = Runner(formatter)\n\n for file_ in sys... | python | edit | 1 | 5 | mit | 75add42972c059a00b01fe2b4eeb716d905a3bd6 | angelsanz/mamba,eferro/mamba,alejandrodob/mamba,dex4er/mamba,nestorsalceda/mamba,markng/mamba,jaimegildesagredo/mamba | mamba/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under MIT license - see LICENSE.rst\n\n\"\"\"\nThis is an Astropy affiliated package.\n\"\"\"\n\n# Affiliated packages may add whatever they like to this file, but\n# should keep this content at the top.\n# ----------------------... | python | edit | 6 | 0 | mit | a769c30a874913cbf053c6973b137520dfc58e93 | evandromr/stingray,abigailStev/stingray,dhuppenkothen/stingray,pabell/stingray,StingraySoftware/stingray | stingray/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom commands.apply_config import ApplyConfigCommand\nfrom commands.compile import CompileCommand\nfrom commands.init import InitCommand\nfrom commands.setup import SetupCommand\nfrom commands.update_deps import Updat... | python | edit | 4 | 2 | mit | 3d1c4c3bd3dd6ae48e75772a2f2706d6104d189c | googkit/googkit,googkit/googkit,googkit/googkit | googkit.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nfrom django.conf import settings\n\nfrom haystack import indexes\nfrom celery_haystack.indexes import CelerySearchIndex\n\nfrom .models import PublicBody\n\nPUBLIC_BODY_BOOSTS = settings.FROIDE_CONFI... | python | edit | 1 | 2 | mit | 9b820aff6fc64ffa750dbf92a51d754f9c55ab79 | okfse/froide,ryankanno/froide,fin/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,okfse/froide,catcosmo/froide,okfse/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,stefanw/froide,stefanw/froide,okfse/froide,okfse/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,fin/froide,LilithWittmann... | froide/publicbody/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyinfra import inventory, state\n\nfrom pyinfra_docker import deploy_docker\nfrom pyinfra_etcd import deploy_etcd\nfrom pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node\n\nSUDO = True\nFAIL_PERCENT = 0\n\n\nde... | python | edit | 1 | 2 | mit | f565b24c7766df2681669abd6a3c2145a4a62853 | EDITD/pyinfra-kubernetes,EDITD/pyinfra-kubernetes | example/deploy.py | rejected_duplicate | Near-duplicate of sample 2686 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport socket\nimport time\nimport math\nimport random\n\nHOST, PORT = 'localhost', 7777\n\nLIMIT = 0.5\n\nposx, posy, posz = 0.0, 0.0, 0.0\n\ndef change_pos(*values):\n range_delta = 0.1\n\n output = []\n f... | python | edit | 3 | 4 | mit | f1a5c564d56996d023cc891f56c28000ba24df7f | saleone/bachelor-thesis | src/client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom fabric.api import (\n lcd,\n local,\n task)\n\n\n@task\ndef clean():\n local('rm -rf wheelhouse')\n local('rm -rf dist')\n local('rm -rf build')\n\n with lcd('doc'):\n local('make ... | python | edit | 1 | 1 | mit | 78b82b0c5e074c279288b9d53fe9cb5cfe1381ae | smarter-travel-media/stac | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move package metadatas at the code level"
},
{
"role": "assistant",
"content": "\"\"\"Spam checker backends for Zinnia based on Akismet\"\"\"\n__version__ = '1.0.dev'\n__license__ = 'BSD License'\n\n__author__ = 'Fantomas42'\n__e... | python | new_file | 1 | 0 | bsd-3-clause | 8cf555f2c8424cc8460228bac07940a19cf1a6a5 | django-blog-zinnia/zinnia-spam-checker-akismet | zinnia_akismet/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.db.models.signals import pre_save, post_save\nfrom django.dispatch import receiver\nfrom django.conf import settings\n\nfrom competition.models import Team\n\nimport json\n\n\nclass TeamStats(models... | python | edit | 6 | 1 | bsd-3-clause | b1890ccd9946054cde25bbd511e317ec0b844b9a | siggame/webserver,siggame/webserver,siggame/webserver | webserver/hermes/models.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom numpy import all, array, dstack\n\nfrom .. import image\n\n\ndef test_get_channels():\n x = array([[1, 2, 3], [2, 3, 4], [3, 4, 5]])\n y = dstack((x, x, x))\n for z in image.get_channels(y):\n a... | python | edit | 1 | 2 | isc | 43b00bdb18131c49a6e52d752aeb0549298d8cda | eliteraspberries/avena | avena/tests/test-image.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy\nimport Adafruit_BBIO.GPIO as GPIO\nfrom vortex_msgs.msg import CameraFeedSelection\n\nGPIO_PIN_MAP = rospy.get_param('/camera/pin_map')\n\nclass CameraSelection(object):\n def __init__(self):\n ... | python | edit | null | null | mit | 80e67ffa99cc911219b316b172d7c74e1ede5c50 | vortexntnu/rov-control,vortexntnu/rov-control,vortexntnu/rov-control | camera_selection/scripts/camera_selection.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import environ as env\n\nfrom django.conf import settings\nimport requests\nfrom datetime import datetime\nfrom django.utils import timezone\nfrom celery.utils.log import get_task_logger\n\nlogger = get_task_logger(__name__)\n\nauth... | python | edit | 3 | 6 | mit | de06a96af887b2bbfa6589b2881606c29000398e | arachnys/cabot,cmclaughlin/cabot,cmclaughlin/cabot,arachnys/cabot,maks-us/cabot,cmclaughlin/cabot,bonniejools/cabot,arachnys/cabot,bonniejools/cabot,bonniejools/cabot,bonniejools/cabot,maks-us/cabot,arachnys/cabot,maks-us/cabot,maks-us/cabot,cmclaughlin/cabot | cabot/cabotapp/jenkins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404\n\nfrom .models import Post\n\n\nclass PostGetMixin:\n\n errors = {\n 'url_kwargs':\n \"Generic view {} must be called with \"\n \"year, month, and slug.\",\n ... | python | edit | 1 | 4 | bsd-2-clause | 29564aca770969c0ff75413f059e5db7d33a69a7 | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | blog/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\n# import mailboxresource\nfrom mailboxresource import MailboxClient\nimport argparse\n\n\ndef main():\n argparser = argparse.ArgumentParser(description=\"Dump a IMAP folder into .eml files\... | python | edit | 1 | 9 | mit | 601b3d7db3bedd090291f1a52f22f6daee9987fd | polo2ro/imapbox | imapbox.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n######\n# Create a file (html or markdown) with the output of\n# - JVMHeap\n# - LogFiles\n# - Ports\n# - Variables\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting... | python | edit | 5 | 0 | apache-2.0 | 30674fb6e244373bb8b1ed74b7a38e5cc2ed19a7 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/Documentation.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\n\n\nfrom aeromancer.db.models import Project\n\n\nclass ProjectFilter(object):\n \"\"\"Manage the arguments for filtering queries by project.\n \"\"\"\n\n @staticmethod\n def add_arguments(parser):\n \"\"... | python | edit | 3 | 5 | apache-2.0 | 80d5fc4ec2711dde9bd7cf775e9376190c46f9f7 | openstack/aeromancer,stackforge/aeromancer,dhellmann/aeromancer | aeromancer/project_filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\n\nimport argparse\n\nfrom util.assemble import assemble\nfrom util.hexdump import hexdump\n\n\ndef get_args():\n parser = argparse.ArgumentParser(description='Spym MIPS Assembler. Generates \"spym\" format binar... | python | edit | 1 | 1 | mit | 9236ac7c0893cc1c4cf19755683d4ab38590de7d | mossberg/spym,mossberg/spym | spym-as.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.gis.db import models as geomodels\nfrom django.contrib.gis.geos.point import Point\n\nfrom geopy import geocoders\n\nclass GeoLocatedModel(geomodels.Model):\n geom = geomodels.PointField(null=True, blank=True)\n \n... | python | edit | 1 | 2 | bsd-2-clause | b856207fe42d480975618f5749ef9febc84f0363 | atiberghien/django-geolocation-helper,atiberghien/django-geolocation-helper | geolocation_helper/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests functions in smoothing.py\nRun with:\n nosetests test_smoothing.py\n\"\"\"\t\n\n# Test method .smooth()\nsmooth1, smooth2 = subtest_runtest1.smooth(0), subtest_runtest1.smooth(1, 5)\nsmooth3 = subtest_runtest1.smooth(2, 0.2... | python | edit | 6 | 0 | bsd-3-clause | ed05dbf4dc231ea659b19310e6065d4781bd18bc | berkeley-stat159/project-delta | code/tests/test_smoothing.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# (c) 2014 Brainly.com, Pawel Rozlach <<EMAIL>>\n\n# This script is intended to only find \"where it is\" and invoke the inventory\n# tool with correct inventory path basing on it's name.\n\nimport os.path as op\ni... | python | edit | 1 | 0 | apache-2.0 | f4f529aca5a37a19c3445ec7fc572ece08ba4293 | brainly/inventory_tool,vespian/inventory_tool | examples/hosts-production.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom types import TracebackType\nfrom typing import NoReturn, Optional, Type, Union\n\n\ndef to_bytes(\n x: Union[str, bytes], encoding: Optional[str] = None, errors: Optional[str] = None\n) -> bytes:\n if isinstance(x, bytes):\n ... | python | edit | 1 | 7 | mit | e9171e8d77b457e2c96fca37c89d68c518bec5f7 | sigmavirus24/urllib3,sigmavirus24/urllib3,urllib3/urllib3,urllib3/urllib3 | src/urllib3/util/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.conf.urls.static import static\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\n\nfrom... | python | edit | 1 | 0 | bsd-3-clause | 262bfb89311b51ce2de74271c4717282d53cedc6 | django-oscar/django-oscar-stores,django-oscar/django-oscar-stores,django-oscar/django-oscar-stores | sandbox/sandbox/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport django\ndjango.setup()\n\nimport sys,os\nfrom django.contrib.auth.models import User\nfrom django.core.management import call_command\n\nadmin_username = os.getenv('WEBLATE_ADMIN_NAME', 'admin')\n\ntry:\n us... | python | edit | 4 | 0 | mit | 7bace98978e0058489b4872d7af300d91fe7f55d | beevelop/docker-weblate,beevelop/docker-weblate | createAdminOnce.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom django.core import mail\n\nfrom .tasks import task_email_user\n\nlogger = logging.getLogger(__name__)\n\n\ndef email_user(user, template, context, attachments=None, delete_attachments_after_send=False, send_to=None,\n... | python | edit | 1 | 3 | mit | f9572834538d40f5ae58e2f611fed7bf22af6311 | tuomasjaanu/django-templatemailer | templatemailer/mailer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.admin import SimpleListFilter\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom shop_catalog.models import Product\n\n\nclass ProductPare... | python | edit | 1 | 3 | bsd-3-clause | eef628750711b8bb4b08eb5f913b731d76541ab1 | dinoperovic/django-shop-catalog,dinoperovic/django-shop-catalog | shop_catalog/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom spotify.manager import SpotifyContainerManager as \\\n PyspotifyContainerManager\n\nlogger = logging.getLogger('mopidy.backends.spotify.container_manager')\n\nclass SpotifyContainerManager(PyspotifyContainerManager... | python | edit | 1 | 1 | apache-2.0 | 371fb9b90d452f8893446e4968659d2e1ff58676 | swak/mopidy,dbrgn/mopidy,rawdlite/mopidy,jmarsik/mopidy,ZenithDK/mopidy,SuperStarPL/mopidy,quartz55/mopidy,bacontext/mopidy,dbrgn/mopidy,pacificIT/mopidy,diandiankan/mopidy,mokieyue/mopidy,swak/mopidy,jodal/mopidy,mokieyue/mopidy,tkem/mopidy,SuperStarPL/mopidy,kingosticks/mopidy,SuperStarPL/mopidy,ali/mopidy,mokieyue/m... | mopidy/backends/spotify/container_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Activity(models.Model):\n group = models.CharField(max_length=4)\n grouptype = models.TextField()\n groupdetail = models.TextField()\n details = models.TextField()\n disabled = models.Boo... | python | edit | 1 | 1 | bsd-3-clause | 4b34053ce422e9be15e0ac386a591f8052a778b1 | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker | vcs/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom decimal import Decimal\n\n\nclass FixedWidthWriter():\n\n def __init__(self, fd, fields, line_ending='linux'):\n self.fd = fd\n self.fields = fields\n if line_ending == 'linux':\n sel... | python | edit | 2 | 4 | mit | 758f59f9167bb49102679ad95d074bf22b4a62f4 | HardDiskD/py-fixedwidthwriter,ArthurPBressan/py-fixedwidthwriter | fixedwidthwriter/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDefinition of urls for tob_api.\n\"\"\"\n\nfrom django.conf.urls import include, url\nfrom django.views.generic import RedirectView\nfrom . import views\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib i... | python | edit | 1 | 0 | apache-2.0 | 7a8112249de859a5ef73fe07eb6029aeb1266f35 | swcurran/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,swcurran/TheOrgBook | tob-api/tob_api/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport epubcheck\nfrom epubcheck import samples\nfrom epubcheck.cli import main\n\n\ndef test_valid():\n assert epubcheck.validate(samples.EPUB3_VALID)\n\n\ndef test_inval... | python | edit | 4 | 2 | bsd-2-clause | 4d95f634dd7f856fa4fbaf4a20bda58c01fa58b4 | titusz/epubcheck | tests/test_epubcheck.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\n\nfrom awscli.customizations.commands import BasicCommand\n\nimport os\n\ndef awscli_initialize(event_hooks):\n event_hooks.register('building-command-table.main', inject_commands)\n\ndef inject_commands(command_table, s... | python | edit | 1 | 2 | mit | e16a292d027f07c1f425229bdb8b74e0d2c66e1f | hashbrowncipher/aws-roleshell | aws_roleshell.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add email and API template"
},
{
"role": "assistant",
"content": "# Enter the password of the email address you intend to send emails from\nemail_address = \"\"\nemail_password = \"\"\n# Enter the login information for the EPNM A... | python | new_file | 1 | 0 | apache-2.0 | cb7b51414a034d50e44fb30c6528b878aa9c64ee | cisco-gve/epnm_alarm_report,cisco-gve/epnm_alarm_report,cisco-gve/epnm_alarm_report,cisco-gve/epnm_alarm_report | web_ui/opensesame.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Alex Rogozhnikov'\n__version__ = '0.4.1'\n\n\nclass EinopsError(RuntimeError):\n \"\"\" Runtime error thrown by einops \"\"\"\n pass\n\n\n__all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError... | python | edit | 1 | 0 | mit | 05fa3c4c6ab1d7619281399bb5f1db89e55c6fa8 | arogozhnikov/einops | einops/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport unittest\nimport knot\n\n\nclass TestContainer(unittest.TestCase):\n def test_wrapper_looks_like_service(self):\n c = knot.Container()\n\n @c.service('service')\n ... | python | edit | 1 | 1 | mit | ce8dc3daa6a4af3c5ed743fb2b5c4470bff7647b | jaapverloop/knot | test_knot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Python implementation of the Readability Shortener API\"\"\"\n\nimport requests\ntry:\n import simplejson as json\nexcept ImportError:\n import json\n\n\nclass Readability(object):\n\n def __init__(... | python | edit | 1 | 5 | mit | 8b80b8b82400bd78d72158471b5030309075310c | mlafeldt/rdd.py,mlafeldt/rdd.py,mlafeldt/rdd.py | rdd/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make jokes and functions available globally in the module"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\nfrom .pyjokes import get_local_joke\nfrom .chuck import get_chuck_nerd_joke\nfrom .jokes imp... | python | new_file | 5 | 0 | bsd-3-clause | 5f9dcf6e277f3a2136840c56fbf3c117319cc41b | birdsarah/pyjokes,gmarkall/pyjokes,trojjer/pyjokes,pyjokes/pyjokes,borjaayerdi/pyjokes,Wren6991/pyjokes,martinohanlon/pyjokes,ElectronicsGeek/pyjokes,bennuttall/pyjokes | pyjokes/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n dsmtpd\n ~~~~~~\n\n :copyright: (c) 2013 by Stephane Wirtel <<EMAIL>>\n :license: BSD, see LICENSE for more details\n\"\"\"\n__name__ = \"dsmtpd\"\n__version__ = \"0.3git\"\n__author__ = (\"Step... | python | edit | 1 | 0 | bsd-2-clause | 3a7612925905f129c247f4c139aa0b896499346d | matrixise/dsmtpd | dsmtpd/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Setup specs for packaging, distributing, and installing Pipeline lib.\"\"\"\n\nimport setuptools\n\n# To debug, set DISTUTILS_DEBUG env var to anything.\nsetuptools.setup(\n name=\"GoogleAppEnginePipeline\",\... | python | edit | 1 | 0 | apache-2.0 | b18ab0218fe221dc71047b68a4016b9c107e3664 | VirusTotal/appengine-pipelines,aozarov/appengine-pipelines,vendasta/appengine-pipelines,vendasta/appengine-pipelines,Loudr/appengine-pipelines,vendasta/appengine-pipelines,googlecloudplatform/appengine-pipelines,Loudr/appengine-pipelines,googlecloudplatform/appengine-pipelines,VirusTotal/appengine-pipelines,GoogleCloud... | python/src/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nInterface for web scraping\n\"\"\"\nimport os\nimport sys\n\nfrom selenium import webdriver\n\ndef scrape():\n browser = webdriver.Chrome('/home/lowercase/Desktop/scheduler/chromedriver')\n\nif __name__ == \"__main__\":\n scra... | python | edit | 4 | 1 | mit | 948dc7e7e6d54e4f4e41288ab014cc2e0aa53e98 | undercase/scheduler | scraper.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"distutils\n\nThe main package for the Python Module Distribution Utilities. Normally\nused from a setup script as\n\n from distutils.core import setup\n\n setup (...)\n\"\"\"\n\n# This module should be kept compatible with Python... | python | edit | 1 | 0 | mit | 4c9e5df1bd52b0bad6fcfb2ac599999a00c8f413 | pypa/setuptools,pypa/setuptools,pypa/setuptools | __init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib\n\nfrom playa import app\n\n@app.template_filter('duration')\ndef duration(seconds):\n return '%s:%s' % (int(seconds / 60), ('0' + str(int(seconds % 60)))[-2:])\n\n@app.template_filter('song_title')\ndef song_title(metadata... | python | edit | 1 | 2 | apache-2.0 | ca584c5ddf942d867585de00ee786101d8ab7438 | disqus/playa,disqus/playa | playa/web/templatetags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport rospy\nfrom threading import Lock\n\n\nclass Listener:\n def __init__(self, topic_name, topic_type, lock=None):\n \"\"\"\n Listener is a wrapper around a subscriber where the callback simply... | python | edit | 1 | 1 | bsd-2-clause | fc87264fec2b13afb04fb89bfc7b2d4bbe2debdf | WPI-ARC/arc_utilities,UM-ARM-Lab/arc_utilities,UM-ARM-Lab/arc_utilities,WPI-ARC/arc_utilities,UM-ARM-Lab/arc_utilities,WPI-ARC/arc_utilities | src/arc_utilities/ros_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, sys, json, pylast, calendar\nfrom datetime import datetime\n\nresultJson = json.loads(sys.stdin.read())\n# exit immediately if recognition failed\nif resultJson[\"status\"][\"msg\"] != \"Success\":\n\tprint \"Recognition failed.\... | python | edit | 6 | 0 | mit | cc3f363c1fefb758302b82e7d0ddff69d55a8261 | jeffstephens/pi-resto,jeffstephens/pi-resto | recognition/scrobbleTrack.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, request\nfrom modals.modals import User\nfrom api import create_app, db\nfrom validate_email import validate_email\n\napp = create_app('DevelopmentEnv')\n\n\n@app.route('/')\ndef index():\n response = js... | python | edit | 1 | 2 | mit | 9569a37369e37dbb2a567423fa20a76948439e21 | patlub/BucketListAPI,patlub/BucketListAPI | api/BucketListAPI.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# models definitions for request_profiler\nfrom django.conf import settings\n\n# cache key used to store enabled rulesets.\nRULESET_CACHE_KEY = getattr(settings, 'REQUEST_PROFILER_RULESET_CACHE_KEY', \"request_profi... | python | edit | 1 | 0 | mit | e6210531dac1d7efd5fd4d343dcac74a0b74515e | yunojuno/django-request-profiler,yunojuno/django-request-profiler,sigshen/django-request-profiler,sigshen/django-request-profiler | request_profiler/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport guv\n\nguv.monkey_patch()\nimport json\n\nimport bottle\n\nimport guv.wsgi\nimport logger\n\nlogger.configure()\n\napp = bottle.Bottle()\n\n\n@app.route('/')\ndef index():\n data = json.dumps({'status': True})\n return data\n\n... | python | edit | 1 | 1 | mit | 45cfd59f5bc8e91a88e54fda83f868f7bb3c4884 | veegee/guv,veegee/guv | examples/wsgi_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport completor\nimport itertools\nimport re\n\nfrom completor.compat import text_type\n\nfrom .filename import Filename # noqa\nfrom .buffer import Buffer # noqa\nfrom .omni import Omni # noqa\n\ntry:\n fr... | python | edit | 1 | 5 | mit | 8e202175767660bd90c4a894953d2553eec1a1d3 | maralla/completor.vim,maralla/completor.vim | pythonx/completers/common/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils import encoding\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.views import exception_handler as drf_exc... | python | edit | 1 | 7 | bsd-2-clause | 536bed6c3ff0a819075a04e14296518f1368cc74 | leo-naeka/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,grapo/django-rest-framework-json-api,hnakamur/django-rest-framework-json-api,leo-naeka/rest_framework_ember,django-json-api/django-rest-framework-json-api,abdulhaq-e/django-rest-framework-json-ap... | rest_framework_json_api/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pkg_resources\n\nENTRY_POINT = 'fanstatic.libraries'\n\nclass LibraryRegistry(dict):\n \"\"\"A dictionary-like registry of libraries.\n\n This is a dictionary that mains libraries. A value is\n a :py:class:`Library` instance... | python | edit | 1 | 2 | bsd-3-clause | ff4204659b158827070fbb4bdf9bfc1f263e8b33 | fanstatic/fanstatic,fanstatic/fanstatic | fanstatic/registry.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nprint 2**3\nprint pow(2,3)\nprint abs(-10)\nprint round(1.536,2)\nprint 1/2\nprint 1.0//2.0\nprint 0xAF\nprint 010\n\n```\n\nApply this change: Test math and cmath module."
},
{
"role": "assistant",
"content": "print 2**3\nprint... | python | edit | 12 | 0 | apache-2.0 | fe397dccf389e31e6b39d5eaa77aedd266cef72d | Vayne-Lover/Python | Practice.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. 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 | 1 | 0 | apache-2.0 | f93f11f0369a5c263be5b8f078e188e7af630fba | DataBiosphere/dsub,DataBiosphere/dsub | dsub/_dsub_version.py | rejected_duplicate | Near-duplicate of sample 2591 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom willie import web\nfrom willie import module\nimport time\nimport json\n\nimport urllib\n\n@module.rule('.*(play.spotify.com\\/track\\/)([\\w-]+).*')\ndef spotify(bot, trigger, found_match=None):\n match = found_match or trigger\n\n... | python | edit | 2 | 3 | mit | 3ad37c4acfb1d34978941cea2663cb31f1460503 | Metastruct/hal1320 | spotify.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nsys.path.insert(0, \"/usr/local/opencv-2.4.11/lib/python2.7/site-packages/\")\n\nimport argparse\nimport commands\nimport cv2\nimport fnmatch\nimport os.path\n\nsys.path.append('../lib')\nimport ProjectMgr\n... | python | edit | 6 | 0 | mit | 0bcbd9656723726f1098899d61140a3f1a11c7ea | UASLab/ImageAnalysis | scripts/1d-load-images.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2009 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Breakpad for Python.\n\nSends a notification when a process sto... | python | edit | 3 | 4 | bsd-3-clause | e4964832cf330f57c4ef6dc7be942d2533c840a7 | svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools | breakpad.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Creates the station class\"\"\"\n\n\nclass Station:\n \"\"\"\n Each train station is an instance of the Station class.\n Methods:\n __init__: creates a new stations\n total_station_pop: calculates total station populati... | python | edit | 1 | 1 | mit | 2048045b9b77d8cab88c0cab8e90cf72cb88b2a4 | ForestPride/rail-problem | station.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\n\n_findBackslash = re.compile(\"/\") \n\n# http://rosettacode.org/wiki/Find_common_directory_path#Python\ndef __commonprefix(*args, sep='/'):\n return os.path.commonprefix(*args).rpartition(sep)[0]\n\ndef __getProjec... | python | edit | 1 | 6 | mit | ad97fa93ad50bfb73c29798f9f1f24465c6a3683 | coronalabs/CoronaSDK-SublimeText,coronalabs/CoronaSDK-SublimeText | _lua_paths.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Various tests of type safety.\"\"\"\nimport unittest\n\nfrom raco.fakedb import FakeDatabase\nfrom raco.scheme import Scheme\nfrom raco.myrial.myrial_test import MyrialTestCase\nfrom collections import Counter\n\n\nclass TypeTests(Myr... | python | edit | 4 | 1 | bsd-3-clause | 3f747610f080879774720aa1efe38f40364ea151 | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco | raco/myrial/type_tests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.core.urlresolvers import reverse_lazy\n\nfrom MyInfo import views as my_info_views\nfrom django_cas import views as cas_views\nfrom oam_base import views as base_views\n\n# Un... | python | edit | 1 | 0 | mit | d18919060fde86baaa1bd6fed561872dfe4cc37f | hhauer/myinfo,hhauer/myinfo,hhauer/myinfo,hhauer/myinfo | oam_base/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\ndef find_min_max_naive(a_ls):\n \"\"\"Find mix & max in a list by naive method.\"\"\"\n _min = a_ls[0]\n _max = a_ls[... | python | edit | 1 | 4 | bsd-2-clause | a0151bb7934beac7f5db3c79c60d7335a594d29a | bowen0701/algorithms_data_structures | alg_minmax.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# usage: python one_time_eval.py as8sqdtc\n# usage: python one_time_eval.py as8sqdtc 2skskd\n\nfrom convenience import find_pcts, pr, str2cards\nimport sys\n\n## argv to strings\nhole_cards_str = sys.argv[1]\nboard_str = ''\nif len(sys.argv... | python | edit | 6 | 0 | mit | 85bba7e080100ed7154330c8b0d1476bc3718e28 | zimolzak/poker-experiments,zimolzak/poker-experiments,zimolzak/poker-experiments | one_time_eval.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom runcommands.commands import show_config # noqa: F401\n\nfrom arctasks.base import lint # noqa: F401\nfrom arctasks.python import show_upgraded_packages # noqa: F401\nfrom arctasks.release import * # noqa: F401,F403\n\n```\n\nApply ... | python | edit | 1 | 0 | mit | a46d2de6bb0a9605944b44971cc29126023e0623 | wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils | commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import *\nfrom fabric.contrib.files import sed\nimport random\nimport string\nimport time\n# Custom Code Enigma modules\nimport Drupal\nimport common.MySQL\n\n\n# Small function to revert db\n@task\n@roles('app_primary')\nde... | python | edit | 5 | 2 | mit | c5e319363727f332b04ac863e494cb04c52c91b5 | codeenigma/deployments,codeenigma/deployments,codeenigma/deployments,codeenigma/deployments | drupal/Revert.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis test is only for Microsoft Edge (Chromium)!\n\"\"\"\nfrom seleniumbase import BaseCase\n\n\nclass EdgeTests(BaseCase):\n\n def test_edge(self):\n if self.browser != \"edge\":\n print(\"\\n This test is onl... | python | edit | 1 | 2 | mit | d600fc56127f234a7a14b4a89be14b5c31b072e7 | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase | examples/edge_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport re\nimport datetime\nfrom collections import namedtuple\n\nSUBTITLE_REGEX = re.compile(r'''\\\n(\\d+)\n(\\d+:\\d+:\\d+,\\d+) --> (\\d+:\\d+:\\d+,\\d+)\n(.+)\n''')\n\nSubtitle = namedtuple('Subtitle', ['index'... | python | edit | 1 | 2 | mit | f48344f8b961971eb0946bcb4066df021f3eef8a | cdown/srt | tinysrt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 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\nimport logging\nimport unittest\n\nfrom telemetry import decorators\nfrom... | python | edit | 1 | 2 | bsd-3-clause | 19a96cb5b687e580bd3bda348a47255394da7826 | dushu1203/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,dednal/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,jaruba/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,... | tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_cookiecutter_invocation\n----------------------------\n\nTests to make sure that cookiecutter can be called from the cli without\nusing the entry point set up for the package.\n\"\"\"\n\nimport os\nim... | python | edit | 1 | 2 | bsd-3-clause | 166fd73f5ac4501b9357d0263e6b68888836588a | audreyr/cookiecutter,hackebrot/cookiecutter,pjbull/cookiecutter,michaeljoseph/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,hackebrot/cookiecutter,audreyr/cookiecutter,pjbull/cookiecutter,luzfcb/cookiecutter | tests/test_cookiecutter_invocation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport datetime\nfrom subprocess import call\n\nfrom ca import app, db, mail\nfrom ca.models import Request\n\nfrom flask import Flask, render_template\nfrom flask_mail import Message\n\n\nd... | python | edit | 3 | 1 | mit | 5eef9eaf6fabe00281c480fd5886917596066a50 | freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net | buildcert.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import forms\nfrom django.core.exceptions import NON_FIELD_ERRORS\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom core import models\n\nDUPLICATE_PLAYER_ERROR = \\\n _('There is alrea... | python | edit | 1 | 2 | mit | cc09da295d61965af1552b35b7ece0caf4e5a399 | XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant | accountant/interface/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nconfig = {\n \"CREATE_RETRIES\": 5,\n \"CHUNK_LOCK_TIMEOUT_SECONDS\": 30\n}\n\n```\n\nApply this change: Reduce chunk lock timeout for testing"
},
{
"role": "assistant",
"content": "config = {\n \"CREATE_RETRIES\": 5,\n... | python | edit | 1 | 0 | mit | 22988dad36645bb5b1f6023579757d5a0fca3a9e | numberoverzero/dvox | dvox/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass ElasticsearchInterface(object):\n def __init__(self, es):\n self.es = es\n\n def update_index_settings(self, index, settings_dict):\n return self.es.indices.put_settings(settings_dict, index=index)\n\n```\n\nApply ... | python | edit | 1 | 3 | bsd-3-clause | c9ca9ae51ebc976bc60b982b9e98f68325301aea | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/util/es/interface.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom addons.base.serializer import CitationsAddonSerializer\n\nclass ZoteroSerializer(CitationsAddonSerializer):\n addon_short_name = 'zotero'\n\n @property\n def serialized_node_settings(self):\n result = super(ZoteroSerial... | python | edit | 1 | 1 | apache-2.0 | 764a6387ddd117c5dc55b5345fcf7ebab5a01190 | brianjgeiger/osf.io,Johnetordoff/osf.io,pattisdr/osf.io,mfraezz/osf.io,chennan47/osf.io,cslzchen/osf.io,adlius/osf.io,aaxelb/osf.io,caseyrollins/osf.io,erinspace/osf.io,aaxelb/osf.io,mattclark/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,HalcyonChimera/osf.io,saradbowman/osf.io,binoculars/osf.io,chennan47/osf.io,mfraezz/... | addons/zotero/serializer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint, request, url_for, render_template\nfrom flask.ext.security import current_user\n\nplay = Blueprint('play', __name__, template_folder='templates')\n\n\n@play.route('/')\ndef index():\n api_token = current_user... | python | edit | 5 | 2 | mit | a97f3948c0f9c2b7e446c70a2f158b38a6c9365b | KanColleTool/kcsrv,KanColleTool/kcsrv,KanColleTool/kcsrv | modules/play/play.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport configparser\nimport time\nimport RPi.GPIO as GPIO\n\nfrom client import MumbleClient\n\nclass InterCom:\n\n def __init__(self):\n config = configparser.ConfigParser()\n config.read('intercom.ini')\n self.mumb... | python | edit | 3 | 3 | mit | 07ae4af01043887d584e3024d7d7e0aa093c85f4 | pkronstrom/intercom | intercom.py | rejected_duplicate | Near-duplicate of sample 4041 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom click.exceptions import BadParameter\nimport pytest\n\nfrom djclick import params\n\n\n@pytest.mark.django_db\ndef test_modelinstance_init():\n from testapp.models import DummyModel\n from django.db.models.query import QuerySet\n... | python | edit | 1 | 1 | mit | da619869c8d321863a1cc081189ebda79e1b5dbc | GaretJax/django-click | djclick/test/test_params.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nproject = 'django-bcrypt'\nversion = ''\nrelease = ''\ncopyright = '2010, 2011 UUMC Ltd.'\n\nhtml_logo = 'playfire.png'\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']\nhtml_title = \"%s documentation\" % project\nmaster_doc ... | python | edit | 1 | 0 | bsd-3-clause | 3380091215ef3918449f1a49210cb23de39603ea | playfire/django-bcrypt | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\n\nfrom notification.views import notices, mark_all_seen, feed_for_user, single, notice_settings\n\n\nurlpatterns = patterns(\"\",\n url(r\"^$\", notices, name=\"notification_notices\"),\n url(r... | python | edit | 9 | 0 | mit | 6c870e242914d40601bf7ad24e48af2b0d28559e | daniell/django-notification,daniell/django-notification | notification/urls.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ninf = infinity = float('inf')\n\nclass Timer:\n\n def __init__(self, duration, *callbacks):\n self.duration = duration\n self.callbacks = list(callbacks)\n\n self.elapsed = 0\n self.paused = False\n\n def r... | python | edit | 1 | 5 | mit | abe30517c0a16cb54977979ab4a90c3fd841f801 | kxgames/kxg | modules/tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport os\n\nif __name__ == '__main__':\n\tjs_file = open('cropList.js', 'w')\n\tjs_file.write('imageNames = [\\n')\n\tjs_file.write(',\\n'.join(['\\t\"%s\"' % name for name in os.listdir('originals')\n\t\tif name[-4:] in... | python | edit | 1 | 0 | mit | 382d304a3f8a4a1d2a396074836ed6e951245800 | nightjuggler/pig,nightjuggler/pig,nightjuggler/pig | cropList.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of the GBI project.\n# Copyright (C) 2013 Omniscale GmbH & Co. KG <http://omniscale.com>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ... | python | edit | 1 | 3 | apache-2.0 | 8db1207cc8564fff8fb739b627932ea3ce4785fc | omniscale/gbi-server,omniscale/gbi-server,omniscale/gbi-server | app/gbi_server/forms/wfs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom django.contrib.auth.models import User\nfrom login.models import UserProfile\n\nclass UserSerializer(serializers.ModelSerializer):\n class Meta:\n model = User\n fields = ('id', ... | python | edit | 1 | 1 | bsd-3-clause | 094380f4e30608713de549389adc1657f55b97b6 | BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP | UCP/login/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Authors: James Bergstra\n# License: MIT\nimport theano\nimport theano.tensor as TT\n\n\ndef pairwise_theano_tensor_prepare(dtype):\n X = TT.matrix(dtype=str(dtype))\n dists = TT.sqrt(\n TT.sum(\n TT.sqr(X[:, None, ... | python | edit | 1 | 1 | mit | e5b879a9b56f6a03a9ccec8eb5a2496de3ffe4ac | numfocus/python-benchmarks,numfocus/python-benchmarks | pairwise/pairwise_theano.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_create_template\n--------------------\n\"\"\"\n\n\nimport os\nimport pip\nimport pytest\nimport shutil\nimport subprocess\n\nTEMPLATE = os.path.realpath('.')\n\n\n@pytest.fixture(autouse=True)\ndef cl... | python | edit | 1 | 3 | mit | c9d8833d59ae4858cfba69e44c1e8aaa5dd07df9 | luzfcb/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin | tests/test_create_template.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport numpy as np\n\n\nclass Candidate(object):\n \"\"\"\n Class for candidate bubble portions from 2D planes.\n \"\"\"\n def __init__(self, mask, img_coords):\n super(Candidate, self).__init__()\n self.mask = m... | python | edit | 1 | 1 | mit | 3d1774aeb21b38e7cbb677228aed25e36374d560 | e-koch/BaSiCs | basics/candidate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import connection\nfrom django.db.models.fields import *\nfrom south.db import generic\n\nclass DatabaseOperations(generic.DatabaseOperations):\n \"\"\"\n django-pyodbc (sql_server.pyodbc) implementation of database ope... | python | edit | 5 | 5 | apache-2.0 | e0ce0095fd488852a7d565ecaf49eba0b8dbd7d5 | theatlantic/django-south,theatlantic/django-south | db/sql_server/pyodbc.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrighted by participating institutions in DataONE. For\n# more information on DataONE, see our web site at http://dataone.org.\n... | python | edit | 1 | 3 | apache-2.0 | 661299275942813a0c45aa90db64c9603d287839 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | lib_common/src/d1_common/iter/string.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nr\"\"\"``sphobjinv`` *package definition module*.\n\n``sphobjinv`` is a toolkit for manipulation and inspection of\nSphinx |objects.inv| files.\n\n**Author**\n Brian Skinn (<EMAIL>)\n\n**File Created**\n 17 May 2016\n\n**Copyright**\n... | python | edit | 24 | 0 | mit | 0213bbb8f8075b2dc36a33380a66932c9d541f63 | bskinn/sphobjinv | src/sphobjinv/__init__.py | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nfrom . import etl\n\n\n@click.command()\n@click.option('--test', default=False)\ndef run(test):\n if not test:\n etl.run_excel_etl()\n else:\n click.echo('Capmetrics test.')\n\n# Call run function when modu... | python | edit | 1 | 2 | mit | 0b6b90a91390551fffebacea55e9cccb4fa3d277 | jga/capmetrics-etl,jga/capmetrics-etl | capmetrics_etl/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db.models import get_model\nfrom django.db.models.signals import post_save\nfrom django.contrib.auth.models import User\n\n\ndef send_product_alerts(sender, instance, created, **kwargs):\n fr... | python | edit | 1 | 3 | bsd-3-clause | a3e5f553fdf8dffa894d7ba3b89fefd0019653fe | rocopartners/django-oscar,marcoantoniooliveira/labweb,Idematica/django-oscar,rocopartners/django-oscar,adamend/django-oscar,makielab/django-oscar,michaelkuty/django-oscar,django-oscar/django-oscar,amirrpp/django-oscar,adamend/django-oscar,jinnykoo/wuyisj.com,jinnykoo/christmas,binarydud/django-oscar,jinnykoo/wuyisj.com... | oscar/apps/customer/alerts/receivers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nProvides commands to the xkcd system\n'''\nfrom stickord.helpers.xkcd_api import get_random, get_by_id, print_comic, get_recent\nfrom stickord.registry import Command\n\n@Command('xkcd', category='xkcd')\nasync def get_comic(cont, _mes... | python | edit | 1 | 3 | mit | 1f75d6b1d13814207c5585da166e59f3d67af4c1 | RobinSikkens/Sticky-discord | stickord/commands/xkcd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nimport station\n\n@pytest.fixture(scope='module', params=['local', 'spark'])\ndef eng(request):\n if request.param == 'local':\n return None\n if request.param == 'spark':\n station.setup(spark=True)\n ... | python | edit | 1 | 3 | apache-2.0 | 4d915a5a9056c17fe66f41a839a4ad8e3c0bffaa | j-friedrich/thunder,j-friedrich/thunder,thunder-project/thunder,jwittenbach/thunder | test/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Wrapper to run make and preprocess any paths in the output from MSYS Unix-style paths\n# to Windows paths, for Eclipse\nfrom __future__ import division, print_function\n\nimport os.path\nimport re\nimport subproc... | python | edit | 1 | 4 | apache-2.0 | 63b3184aeae800795775928a67bf7567b487cba3 | espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf | tools/windows/eclipse_make.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom runcommands import command\nfrom runcommands.commands import local as _local\n\n\n@command\ndef format_code(check=False):\n _local(f\"black . {'--check' if check else ''}\")\n\n\n@command\ndef lint():\n _local(\"flake8 .\")\n\n\n... | python | edit | 1 | 3 | mit | 936a8b77625f881f39f2433fad126f1b5d73fa3f | wylee/django-local-settings | commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\nfrom rest_framework import serializers\n\nfrom . import models\n\n\nclass ContentTypeField(serializers.Field):\n def to_representation(self, obj):\n ct = ContentType.obje... | python | edit | 1 | 2 | mit | a565235303e1f2572ed34490e25c7e0f31aba74c | jbradberry/django-turn-generation,jbradberry/django-turn-generation | turngeneration/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom python_cowbull_game.GameController import GameController\nfrom python_cowbull_game.GameMode import GameMode\n\n\nclass ExtGameController(GameController):\n additional_modes = [\n GameMode(mode=\"SuperTough\", priority=6, digi... | python | edit | 1 | 2 | apache-2.0 | a91ae078952471377505ffc09b58e8391d3b7713 | dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server | extensions/ExtGameController.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2015, The MITRE Corporation. All rights reserved.\n# See LICENSE.txt for complete terms.\nfrom mixbox import fields\n\nimport stix\nfrom stix.common import DateTimeWithPrecision\nimport stix.bindings.indicator as indicator_b... | python | edit | 3 | 1 | bsd-3-clause | f919aa183d1a82ba745df6a5640e8a7a83f8e87e | STIXProject/python-stix | stix/indicator/valid_time.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom providers.popularity.provider import PopularityProvider\nfrom utils.torrent_util import torrent_to_movie, remove_bad_torrent_matches\n\nIDENTIFIER = \"kickasstorrents\"\n\nclass Provider(PopularityProvider):\n PAGES_TO_FETCH = 1\n\n... | python | edit | 1 | 4 | mit | d1be59a87fce8e20d698c4d1f6a272c21834a1c3 | EmilStenstrom/nephele | providers/popularity/kickasstorrents.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Asynchronous task queue module.\"\"\"\n\nfrom celery import Celery\nfrom celery.utils.log import get_task_logger\nfrom kombu import Exchange, Queue\n\nfrom raven import Client\nfrom raven.contrib.celery import... | python | edit | 3 | 1 | apache-2.0 | aff229797b3914b6708920fd247861d7777ccc22 | jmcarp/osf.io,MerlinZhang/osf.io,Nesiehr/osf.io,leb2dg/osf.io,emetsger/osf.io,GageGaskins/osf.io,ticklemepierce/osf.io,jinluyuan/osf.io,zamattiac/osf.io,CenterForOpenScience/osf.io,caseyrygt/osf.io,kch8qx/osf.io,KAsante95/osf.io,crcresearch/osf.io,aaxelb/osf.io,zamattiac/osf.io,zamattiac/osf.io,cwisecarver/osf.io,fabia... | framework/tasks/__init__.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.