messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic.list import ListView\nfrom django.views.generic import DetailView\n\nfrom rest_framework import viewsets\nfrom rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly\n\nfrom wafer.sponsors.models im... | python | edit | 1 | 1 | isc | 9d4b85cdad969dfeb8e9bee1203eb9c916849b1a | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/sponsors/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _\n\nimport django_filters\n\nfrom builds import constants\nfrom builds.models import Build, Version\n\n\nANY_REPO = (\n ('', _('Any')),\n)\n\nBUILD_TYPES = ANY_REPO + constants.BUILD... | python | edit | 1 | 0 | mit | 0e99654d606038098d45fb83cc40405742e43ae8 | agjohnson/readthedocs.org,fujita-shintaro/readthedocs.org,GovReady/readthedocs.org,nyergler/pythonslides,Tazer/readthedocs.org,techtonik/readthedocs.org,takluyver/readthedocs.org,nyergler/pythonslides,GovReady/readthedocs.org,nikolas/readthedocs.org,gjtorikian/readthedocs.org,cgourlay/readthedocs.org,d0ugal/readthedocs... | readthedocs/builds/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='opengithub',\n version='0.1.2',\n author='Kevin Schaul',\n author_email='<EMAIL>',\n url='http://www.kevinschaul.com',\n description='Open your project in GitHub from the comm... | python | edit | 1 | 0 | mit | 8ff387b039a83d21eb4999d1bc1704a827b3c3a2 | kevinschaul/open-in-github | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Employee\nfrom rest_framework import serializers\n\n\nclass EmployeeSerializer(serializers.ModelSerializer):\n class Meta:\n model = Employee\n depth = 1\n fields = ('pk',\n 'user... | python | edit | 1 | 0 | apache-2.0 | 674721b9b094fe7e63d3356cf76e7eec0cb9bb62 | belatrix/BackendAllStars | employees/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.1'\n\nsetup(name='ouimeaux',\n version=version,\n description=\"Python API to Belkin WeMo devices\",\n long_description=\"\"\"\\\n\"\"\",\n clas... | python | edit | 4 | 0 | bsd-3-clause | cf69afe8f9e8151141e6040e9d0212b00edcbef1 | rgardner/ouimeaux,iancmcc/ouimeaux,tomjmul/wemo,sstangle73/ouimeaux,fritz-fritz/ouimeaux,sstangle73/ouimeaux,aktur/ouimeaux,aktur/ouimeaux,drock371/ouimeaux,fritz-fritz/ouimeaux,sstangle73/ouimeaux,m-kiuchi/ouimeaux,iancmcc/ouimeaux,drock371/ouimeaux,fritz-fritz/ouimeaux,bennytheshap/ouimeaux,iancmcc/ouimeaux,aktur/oui... | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Replace import * with explicit names"
},
{
"role": "assistant",
"content": "\nfrom .common import ( # noqa\n A,\n ABBR,\n ACRONYM,\n ADDRESS,\n APPLET,\n AREA,\n ARTICLE,\n ASIDE,\n AUDIO,\n B,\n ... | python | new_file | 1 | 0 | bsd-3-clause | f8bc5893ee875a309361c26b93996917dbef3ba8 | orbnauticus/silk | silk/webdoc/html/__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\nfrom __future__ import absolute_import\n\nimport pytest\n\nfrom caniuse.main import check\n\n\ndef test_package_name_has_been_used():\n assert 'Sorry' in check('requests')\n assert 'So... | python | edit | 3 | 1 | mit | 76c44154ca1bc2eeb4e24cc820338c36960b1b5c | lord63/caniuse | caniuse/test/test_caniuse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.encoding import smart_str, force_unicode\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\ndef saferst(value):\n try:\n ... | python | edit | 4 | 3 | bsd-3-clause | 925aa2ef91f15511ce7a3c97564f106d57d13623 | pitrho/djangopypi2,mattcaldwell/djangopypi,EightMedia/djangopypi,benliles/djangopypi,popen2/djangopypi2,disqus/djangopypi,ask/chishop,pitrho/djangopypi2,hsmade/djangopypi2,popen2/djangopypi2,hsmade/djangopypi2,disqus/djangopypi,EightMedia/djangopypi | djangopypi/templatetags/safemarkup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.16 on 2019-01-28 18:20\n\nimport pickle\nfrom django.db import migrations, models\nimport evennia.utils.picklefield\nfrom evennia.utils.utils import to_bytes\n\ndef migrate_serverconf(apps... | python | edit | 3 | 2 | bsd-3-clause | 88f341c6a9d079c89537feb1fb0aa8908732421a | jamesbeebop/evennia,jamesbeebop/evennia,jamesbeebop/evennia | evennia/server/migrations/0002_auto_20190128_1820.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__authors__ = \"Tim Savage\"\n__author_email__ = \"<EMAIL>\"\n__copyright__ = \"Copyright (C) 2014 Tim Savage\"\n__version__ = \"1.0\"\n\n# Disable logging if an explicit handler is not added\ntry:\n import logging\n logging.getLogger... | python | edit | 1 | 0 | bsd-3-clause | 22b697729d1ee43d322aa1187b3a5f6101f836a5 | python-odin/odin | odin/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport re\n\ndef main(argv):\n # Message to perform sentiment analysis on\n message = argv[0] if len(argv) > 0 else \"\"\n\n if message == \"\":\n print(\"Usage: python analyze.py [message]\")\n sys.exit(1... | python | edit | 1 | 7 | mit | cda81a4585d2b2be868e784566f3c804feb1e9bf | timvandermeij/sentiment-analysis,timvandermeij/sentiment-analysis | analyze.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\n\"\"\"Class to handle Exceptions relating to MoodleFUSE actions\n\"\"\"\n\nfrom functools import wraps\n\nfrom moodlefuse.core import config\n\n\nclass MoodleFuseException(Exception):\n def __i... | python | edit | 4 | 3 | mit | 296f7aa83244af1cc63c4f7cdeae2d2adf6ac51d | BroganD1993/MoodleFUSE,BroganD1993/MoodleFUSE | moodlefuse/exception.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ndescription = \"\"\"\nFull featured redis cache backend for Django.\n\"\"\"\n\nsetup(\n name = \"django-redis\",\n url = \"https://github.com/niwibe/django-redis\",\n author = \"Andrei Antoukh\",\n ... | python | edit | 1 | 0 | bsd-3-clause | 1d9349255fa29b8c29c7d916a5750a8cd0da8f78 | smahs/django-redis,yanheng/django-redis,lucius-feng/django-redis,zl352773277/django-redis,GetAmbassador/django-redis | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nclass Searcher(object):\n \"\"\"Searches files in dirs for specified string.\"\"\"\n def __init__(self, currentdir, string_to_search_for):\n self.currentdir = currentdir\n self.string_to_search_for = string_... | python | edit | 2 | 6 | bsd-2-clause | ca707d8e62a896a4702121faee02ff8d2491a842 | florianbegusch/simple_grep,florianbegusch/simple_grep | grep_redone/grep/grep.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport sys\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n# typing library was introduced as a core module in version 3.5.0\nrequires = [\"dirlistproc\", \"jsonasobj\", \"rdflib\", \"... | python | edit | 1 | 0 | apache-2.0 | ee57052a6749459e2702b36a0341e03d6b5e448a | hsolbrig/SNOMEDToOWL,hsolbrig/SNOMEDToOWL,hsolbrig/SNOMEDToOWL | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\n# Copyright Lajos Katona\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 Licen... | python | edit | 1 | 3 | apache-2.0 | 5d0fa6d6f66cce56b9704601c4399ca0adcc419a | elajkat/hugradexam,elajkat/hugradexam | programmingtheorems/python/theorem_of_selection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__... | python | edit | 1 | 1 | bsd-3-clause | 22e2d980d900f30901cf6f2ef5f167ddec62e9a7 | barbarahui/nuxeo-calisphere,barbarahui/nuxeo-calisphere | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\n\nwith open('README.rst', 'r', 'utf-8') as f:\n readme = f.read()\n\n\nsetup(\n name='blanc-basic-pages',\n version='0.3.7',\n desc... | python | edit | 1 | 0 | bsd-3-clause | be8d6400426fb96964a8447bd941d4ab777a867c | blancltd/blanc-basic-pages | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom vendcrawler.scripts.vendcrawler import VendCrawler\n\nclass TestVendCrawlerMethods(unittest.TestCase):\n\n def test_get_links(self):\n links = VendCrawler().get_links(2)\n self.assertEqual(links, \n ... | python | edit | 1 | 1 | mit | 82b7e46ebdeb154963520fec1d41cc624ceb806d | josetaas/vendcrawler,josetaas/vendcrawler,josetaas/vendcrawler | tests/test_vendcrawler.py | accepted | null | 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 | b200dec97f5aca7653a7ca219159d1f4acee15b1 | 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 setuptools import (\n setup,\n find_packages,\n)\n#from os import path\n\n#here = path.abspath(path.dirname(__file__))\n\n#with open(path.join(here, \"README.md\")) as f:\n# long_description = f.read()\nlong_description = \"st... | python | edit | 1 | 0 | mit | 4f561976b28a81d233fc12903252a56a5de4f84e | zekna/py-types | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\nfrom django.contrib.sites.models import Site\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'picaxe.views.home', name='home'),\n # u... | python | edit | 1 | 0 | mit | 1262a213f5330ab3ac62581cd93a484eb72ebd60 | TuinfeesT/PicAxe | picaxe/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom .base import *\n\nfrom .gradient_based import *\nfrom .misc import *\nfrom .pattern_based import *\nfrom .relevance_based import *\n\n\ndef create_explainer(name,\n output_layer, patterns=None, to_layer=None, **kw... | python | edit | 17 | 1 | mit | 79d8c1e95f3c876e600e1637253c7afcf3f36763 | pikinder/nn-patterns | nn_patterns/explainer/__init__.py | rejected_lint | Too many lint violations: 17 | true |
[
{
"role": "user",
"content": "Write python code for the following: Check that PostgreSQL is 9.4 or higher on initialization"
},
{
"role": "assistant",
"content": "from distutils.version import StrictVersion\n\nfrom django.db import connection\n\n\n# NetBox v2.2 and later requires PostgreSQL 9.4 ... | python | new_file | 1 | 0 | apache-2.0 | f27e1ba885fb8ba5ce33ee84d76dc562bf51db70 | digitalocean/netbox,lampwins/netbox,digitalocean/netbox,lampwins/netbox,digitalocean/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox | netbox/netbox/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = '1.0'\n\nsetup(\n name='tn.bulletino',\n version=version,\n description='',\n classifiers=[\n \"Framework :: Plone\",\n \"Programming Language :: Python\",\n... | python | edit | 1 | 0 | bsd-3-clause | 045417a97251dbb3af2f75e6c0872586acf1f0c4 | tecnologiaenegocios/tn.bulletino | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport socket, struct\nimport scapy.all as scapy\n\ndef get_default_gateway_linux():\n \"\"\"Read the default gateway directly from /proc.\"\"\"\n with open(\"/proc/net/route\") as fh:\n for line in fh:\n fields = li... | python | edit | 6 | 4 | mit | db4b8b2abbb1726a3d2db3496b82e0ad6c0572e9 | nulledbyte/scripts | gateway_mac.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Poet Configurations\n#\n\n# client authentication token\nAUTH = 'b9c39a336bb97a9c9bda2b82bdaacff3'\n\n# directory to save output files to\nARCHIVE_DIR = 'archive'\n\n#\n# The below configs let you bake in the server IP and beacon inter... | python | edit | 1 | 0 | mit | 882175afea0e2c35e2b223e15feb195a005f7d42 | mossberg/poet | common/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .observable import Observable\nfrom .anonymousobservable import AnonymousObservable\nfrom .observer import Observer\nfrom . import checkedobserver\nfrom . import linq\nfrom . import backpressure\n\ntry:\n from asyncio import Future\... | python | edit | 8 | 0 | mit | 7608d0e89781f70fcb49e7dc3ee5cd57a094f18c | ReactiveX/RxPY,ReactiveX/RxPY,dbrattli/RxPY | rx/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os.path as op\n\nfrom setuptools import setup\nfrom distutils.extension import Extension\n\nexts = []\n\nif sys.platform == 'darwin':\n exts.append(Extension(\n '_send2trash_osx',\n [op.join('modules', 's... | python | edit | 1 | 0 | bsd-3-clause | 8b00632dd6659b9b3c3f792564a81c7b47e0da2c | hsoft/send2trash | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import Counter\n\nclass APMTracker(object):\n\n def handleInitGame(self, event, replay):\n for player in replay.players:\n player.apm = Counter()\n player.aps = Counter()\n player.... | python | edit | 2 | 3 | mit | 90c5c9db788c0450483d71c38155fcf0a9d56220 | StoicLoofah/sc2reader,vlaufer/sc2reader,ggtracker/sc2reader,GraylinKim/sc2reader,GraylinKim/sc2reader,vlaufer/sc2reader,ggtracker/sc2reader,StoicLoofah/sc2reader | sc2reader/engine/plugins/apm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import dirname\nfrom restclients.dao_implementation.mock import get_mockdata_url\nfrom restclients.dao_implementation.live import get_con_pool, get_live_url\n\nclass File(object):\n \"\"\"\n This implementation returns mo... | python | edit | 1 | 2 | apache-2.0 | 616bd7c5ff8ba5fe5dd190a459b93980613a3ad4 | uw-it-aca/myuw,uw-it-aca/myuw,fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw,fanglinfang/myuw,uw-it-aca/myuw | myuw_mobile/restclients/dao_implementation/hfs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2014, Michael Boyle\n# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>\n\nfrom auto_version import calculate_version, build_py_copy_version\n\n\ndef configurat... | python | edit | 1 | 2 | mit | 2ef360762cf807806417fbd505319165716e4591 | moble/quaternion,moble/quaternion | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add eul2quat function. Currently only accept scalar. Need to do input checking."
},
{
"role": "assistant",
"content": "import numpy as np\n\ndef eul2quat(rotAngle1,rotAngle2,rotAngle3,\n input_unit='rad',rotation_s... | python | new_file | 1 | 3 | bsd-3-clause | 7bd1a1db924ffbe23e66e178e0044229f3d207cd | hamid-m/NavPy,adhika/NavPy,NavPy/NavPy | navpy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter4, a code checking framework for Sublime Text 3\n#\n# Written by Jack Cherng\n# Copyright (c) 2017-2019 jfcherng\n#\n# License: MIT\n#\n\nfrom SublimeLinter.lint import Linter\nimport sublime\n\n\nc... | python | edit | 1 | 0 | mit | 302c246d1da11282e2f6a687fb504e18f1399a84 | jfcherng/SublimeLinter-contrib-iverilog,jfcherng/SublimeLinter-contrib-iverilog | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nconfig = {}\n\nsystem_mongo_host = os.environ.get('MONGODB_PORT_27017_TCP_ADDR')\nsystem_elastic_host = os.environ.get('ELASTIC_PORT_9300_TCP_ADDR')\n\nconfig['HOST'] = ''\nconfig['PORT'] = 5000\nconfig['MONGODB_HOST'] = system... | python | edit | 1 | 0 | apache-2.0 | 8c90485e5cab6294a38cfc9332eda6fe8ca15483 | AustinStoneProjects/Founderati-Server,AustinStoneProjects/Founderati-Server | project/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom distutils.core import setup\n\nif sys.version_info < (3,):\n print('\\nSorry, but Adventure can only be installed under Python 3.\\n')\n sys.exit(1)\n\nREADME_PATH = os.path.join(os.path.dirname(__file__), ... | python | edit | 1 | 0 | apache-2.0 | 7c2a640d2c3ab9218d8334f4939d7c1af919c318 | devinmcgloin/advent,devinmcgloin/advent | setup.py | rejected_duplicate | Near-duplicate of sample 1295 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\nimport multilingual_survey\n\n# allow setup.py to be run from any path\nos.... | python | edit | 1 | 0 | bsd-3-clause | 32240a553a456e03b18c23fc6c32dd65865aa372 | diadzine/django-simple-multilingual-survey,diadzine/django-simple-multilingual-survey | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport click\nfrom lockfile import LockFile, LockTimeout\n\nlogger = logging.getLogger('spoppy.main')\n\n\ndef get_version():\n return '1.1.0'\n\n\n@click.command()\n@click.argument('username', required=False)\n@click.a... | python | edit | 3 | 9 | mit | 962b1a7e0258db1bd6d8e5b37d32f8012684792a | sindrig/spoppy,sindrig/spoppy | spoppy/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n\n# A regular expression is a string like what you see below between the quote\n# marks, and the ``re`` module interprets it as a pattern. Each regular\n# expression describes a small program that takes another string as input ... | python | edit | 1 | 2 | unlicense | 017d099ee598da94d1ca6118d6c66b006de7b1c1 | wkschwartz/first-last | names.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ethan Zimmerman\n# Copyright (c) 2014 Ethan Zimmerman\n#\n# License: MIT\n#\n\n\"\"\"This module exports the RamlCop plugin class.\"\... | python | edit | 1 | 0 | mit | ffb8f3f0d1fe17e13b349f8f4bae8fd9acbbd146 | thebinarypenguin/SublimeLinter-contrib-raml-cop | linter.py | rejected_duplicate | Near-duplicate of sample 3973 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Exception classes shared by all automata.\"\"\"\n\n\nclass AutomatonException(Exception):\n \"\"\"The base class for all automaton-related errors.\"\"\"\n\n pass\n\n\nclass InvalidStateError(AutomatonExce... | python | edit | 1 | 0 | mit | 950ac9130bafe1fced578bf61d746b047830bfa0 | caleb531/automata | automata/base/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\n\n# Same directory hack\nimport sys\nsys.path.append('.')\nsys.path.append('..')\n\ntry:\n get_input = raw_input\nexcept NameError:\n get_input = input\n\nuser_api_key = ge... | python | edit | 4 | 0 | bsd-3-clause | bbb4496a99a5c65218b12c56de01c12ab83a1056 | Khilo84/Py-StackExchange,lucjon/Py-StackExchange,damanjitsingh/StackExchange-python- | demo/recent_questions.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport types\n\nfrom cyclone import escape\nfrom cyclone import web\n\nclass OONIBHandler(web.RequestHandler):\n def write_error(self, status_code, exception=None, **kw):\n self.set_status(status_code)\n if exception:\n ... | python | edit | 1 | 2 | bsd-2-clause | 168a7c9b9f5c0699009d8ef6eea0078c2a6a19cc | dstufft/ooni-backend,dstufft/ooni-backend | oonib/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\r\n\r\ndef readme():\r\n with open('README.rst') as f:\r\n return f.read()\r\n\r\nsetup(name='savu',\r\n version='0.1',\r\n description='Savu Python Tomography Pipeline',\r\n long_descri... | python | edit | 1 | 1 | apache-2.0 | 11f6fd6e2401af03730afccb14f843928c27c37a | mjn19172/Savu,swtp1v07/Savu,mjn19172/Savu,swtp1v07/Savu,swtp1v07/Savu,swtp1v07/Savu,mjn19172/Savu,mjn19172/Savu,mjn19172/Savu | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nfrom aldryn_faq import __version__\n\nREQUIREMENTS = [\n 'aldryn-apphooks-config',\n 'aldryn-reversion',\n 'aldryn-search',\n 'django-admin-sortable',\n 'd... | python | edit | 1 | 0 | bsd-3-clause | c5a71b5e97657358f41fc7f96b1b674ceb37dfb1 | czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/env python\n# \n# Copyright 2010 bit.ly\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 License at\n#\n# ... | python | edit | 13 | 0 | apache-2.0 | 7955e777d6ba3bbbd104bd3916f131ab7fa8f8b5 | RealGeeks/asyncmongo | asyncmongo/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom urllib.parse import urlsplit, urljoin\nfrom requests import get\n\nl = logging.getLogger(__name__)\n\n#TODO: move this somewhere sensible\n#TODO: useful error handling (CLI...)\nclass HTTPClient:\n def __init__(self,... | python | edit | 4 | 3 | mit | db06039ecb94100bbecb23b5fdee13e306458809 | victorhahncastell/atlassian_permissions,victorhahncastell/atlassian_permissions | atlassian/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Part of the masterfile package: https://github.com/njvack/masterfile\n# Copyright (c) 2018 Board of Regents of the University of Wisconsin System\n# Written by Nate Vack <<EMAIL>> at the Center for Healthy Minds... | python | edit | 1 | 4 | mit | bbe2ef061eb52113d4579eac0415c79275b04721 | njvack/masterfile | src/masterfile/formatters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nZiggy\n~~~~~~~~\n\n:copyright: (c) 2012 by Rhett Garber\n:license: ISC, see LICENSE for more details.\n\n\"\"\"\n\n__title__ = 'ziggy'\n__version__ = '0.0.1'\n__build__ = 0\n__author__ = 'Rhett Garber'\n__... | python | edit | 13 | 4 | isc | 1aef29a64886522d81d2f6a15bd4e48419a66545 | rhettg/Ziggy,rhettg/BlueOx | ziggy/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Create wheel with: python setup.py bdist_wheel\n# Install with: pip install dist/loadconfig-*-none-any.whl\n\nfrom os import environ\nfrom os.path import dirname, abspath\nfrom setuptools import setup\nfrom s... | python | edit | 1 | 0 | mit | 2266ca63ec23fd768c659ee4b3988fce7cd523c6 | mzdaniel/loadconfig,mzdaniel/loadconfig | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\nfrom setuptools import setup, find_packages\n\nVERSION = '1.4.5'\n\n\nsetup(\n namespace_packages = ['tiddlywebplugins'],\n name = 'tiddlywebplugins.atom',\n version = VERSION,\n description = 'A Tid... | python | edit | null | null | bsd-3-clause | ae4ff7cffa1273338fff56eb531f2a6f5989de41 | tiddlyweb/tiddlywebplugins.atom | setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom .base import *\n\nDEBUG = True\nTEMPLATE_DEBUG = True\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.contrib.gis.db.backends.postgis',\n 'NAME': 'devrynda',\n 'USER': 'devrynda',\n '... | python | edit | 4 | 2 | mit | 1e484c288bb95dc10b15c0c73d5c8146f1b92627 | sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/Rynda,sarutobi/Rynda,sarutobi/ritmserdtsa | rynda/Rynda/settings/local.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\nfrom django.test import TestCase\nimport filer\n\n\nclass GeneralTestCase(TestCase):\n def test_version_is_set(self):\n self.assertTrue(len(filer.get_version())>0)\n\n def test_travisci_configuration(sel... | python | edit | 1 | 1 | bsd-3-clause | 404b9208d98753dfccffb6c87594cfc70faed073 | Flight/django-filer,obigroup/django-filer,DylannCordel/django-filer,vstoykov/django-filer,o-zander/django-filer,mitar/django-filer,stefanfoulis/django-filer,skirsdeda/django-filer,thomasbilk/django-filer,kriwil/django-filer,sbussetti/django-filer,jakob-o/django-filer,lory87/django-filer,rollstudio/django-filer,Flight/d... | filer/tests/general.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass OneOf:\n\tdef __init__(self, members):\n\t\tself.members = members\n\n\tdef __call__(self, candidate):\n\t\tif candidate in self.members:\n\t\t\treturn True\n\t\treturn \"%s not in %s\" % (candidate, self.members)\n\n\tdef __repr__(se... | python | edit | 1 | 2 | mit | ba2f2d7e53f0ffc58c882d78f1b8bc9a468eb164 | mrozekma/pytypecheck | predicates.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Route model\n# Start and end locations with additional stop-overs\nclass Route(models.Model):\n origin = models.CharField(max_length=63)\n destination = models.CharField(max_length=63)\n\n\nclass Wa... | python | edit | 1 | 1 | apache-2.0 | 97229a7e51279906254a7befa0456a4c89a9b0ea | jwarren116/RoadTrip,jwarren116/RoadTrip,jwarren116/RoadTrip | planner/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sharepa.search import ShareSearch, basic_search # noqa\nfrom sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa\n\n\ndef source_counts():\n return bucket_to_dataframe(\n 'total_source_counts',\n bas... | python | edit | 1 | 1 | mit | ad2fd7bf2ccfee18856e6f94b996a630ae8362ee | fabianvf/sharepa,CenterForOpenScience/sharepa,erinspace/sharepa,samanehsan/sharepa | sharepa/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\n\"\"\"\nPerforms some core NLP operations as a proof of concept for the library.\n\"\"\"\n\nfrom stanford_corenlp_pywrapper import CoreNLP\n\nclass StanfordCoreNLP:\n\n proc = None\n \n \"\"\"\n ... | python | edit | 1 | 5 | mit | 6bece40a1a0c8977c6211234e5aa4e64ad5b01a2 | Pastafarians/linguine-python,rigatoni/linguine-python | linguine/ops/StanfordCoreNLP.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import settings, utils\nfrom django.conf import settings as django_settings\n\n\nclass Config(object):\n \"\"\"\n The global config wrapper that handles the backend.\n \"\"\"\n def __init__(self):\n super(Config, s... | python | edit | 1 | 2 | bsd-3-clause | 8f59e540cef27ae658f2e01a6a5bf7d765e76ae7 | django-leonardo/django-constance,django-leonardo/django-constance | constance/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport os\n\ndef read(filename):\n with open(filename) as fin:\n return fin.read()\n\nsetup(\n name='dictobj',\n version='0.2.5',\n author='William Grim',\n author_email='<EMAIL>',\n url='https://githu... | python | edit | 1 | 1 | apache-2.0 | 35e2d4791be9470c4a48e5b84e885f7b759ebd3d | grimwm/py-dictobj,grimwm/py-dictobj | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nwith open('README.rst') as rdm:\n README = rdm.read()\n\nsetup(\n name='qjobs',\n use_scm_version=True,\n\n description='Get a clean and flexible output from qstat',\n long_description=README,\... | python | edit | 1 | 0 | mit | 6b9f6ee4d4f00e988fb0419eedb81eaa56e3bbe7 | amorison/qjobs | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\r\nimport directive\r\nimport builder\r\n\r\n\r\n#===========================================================================\r\n# Node visitor functions\r\n\r\ndef visit_passthrough(self, node):\r\n pass\r\n\r\ndef depart_passthrough(s... | python | edit | 1 | 1 | apache-2.0 | 441a1b85f6ab954ab89f32977e4f00293270aac6 | t4ngo/sphinxcontrib-multilatex,t4ngo/sphinxcontrib-multilatex | sphinxcontrib/multilatex/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom setuptools import setup, Extension\n\nwith open(\"README.rst\") as fp:\n long_description = fp.read()\n\nextensions = []\nif os.name == 'nt':\n ext = Extension(\n 'trollius._overlapped', ['overlapped... | python | edit | 1 | 0 | apache-2.0 | 2aeeb23e9771b67234dd6fef338e57000412b784 | haypo/trollius,haypo/trollius,haypo/trollius | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nsetup(\n name = 'django-globals',\n version = '0.2.1-rc1',\n description = 'Very simple application, that allow to define a thread specific global variables.',\n keywords = 'django ap... | python | edit | 1 | 0 | bsd-3-clause | 4f436f14cd1615175051910b38eb83a512fb26ff | CBitLabs/django-globals | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport grpc\n\nimport hello_pb2\nimport hello_pb2_grpc\n\n\ndef run():\n channel = grpc.insecure_channel('localhost:50051')\n stub = hello_pb2_grpc.HelloServiceStub(channel)\n # ideally, you should have try catch block here too\n ... | python | edit | 1 | 3 | mit | d44fee53020470e2d9a8cd2393f5f0125dbd1fab | avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors,avinassh/grpc-errors | python/client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport binascii\nimport os\nimport time\n\nfrom optparse import OptionParser\n\n\ndef gen_random_object_id():\n timestamp = '{0:x}'.format(int(time.time()))\n rest = binascii.b2a_hex(os.urandom(8)).decode('ascii')\n return timestam... | python | edit | 1 | 1 | mit | 7cedab4826d5d184e595864f4cf5ca3966a1921e | mxr/random-object-id | random_object_id/random_object_id.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.5\n#\n# Copyright 2008 the Melange authors.\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 Licen... | python | edit | 1 | 4 | apache-2.0 | 9cc15bc4a7ed8efb82071fa19e9d1ada8771a87d | MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging | app/soc/views/helper/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\nimport os\nfrom functools import wraps\n\ndef restoring_chdir(fn):\n @wraps(fn)\n def decorator(*args, **kw):\n try:\n path = os.getcwd()\n return fn(*args, **kw)\n fina... | python | edit | 2 | 2 | mit | 948c269ba191339a471844eb512448941be4497c | gjtorikian/readthedocs.org,cgourlay/readthedocs.org,tddv/readthedocs.org,wanghaven/readthedocs.org,asampat3090/readthedocs.org,kenwang76/readthedocs.org,KamranMackey/readthedocs.org,clarkperkins/readthedocs.org,VishvajitP/readthedocs.org,emawind84/readthedocs.org,Carreau/readthedocs.org,johncosta/private-readthedocs.or... | readthedocs/doc_builder/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns(\n '',\n url(r'^', include('django.contrib... | python | edit | 1 | 0 | mit | 84c225a9ca7529bca74f853e7b23a1a750647d6f | fladi/django-campus02,fladi/django-campus02 | campus02/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nwith open('README.md') as f:\n long_description = f.read()\n\nsetup(\n name='jiradoc',\n version='0.1',\n description='A JIRAdoc parser',\n long_description=long_description,\n ... | python | edit | 1 | 0 | mit | ea91df1d178031bccc29dbf4a17cdd02fbb05953 | lucianovdveekens/jiradoc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Write the first view - news feed."
},
{
"role": "assistant",
"content": "from django.shortcuts import render\n\nfrom fb.models import UserPost\n\n\ndef index(request):\n if request.method == 'GET':\n posts = UserPost.ob... | python | new_file | 1 | 2 | apache-2.0 | f3f428480a8e61bf22532503680e718fd5f0d286 | pure-python/brainmate | fb/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Family module for Wikivoyage.\"\"\"\n#\n# (C) Pywikibot team, 2012-2016\n#\n# Distributed under the terms of the MIT license.\n#\nfrom __future__ import absolute_import, unicode_literals\n\n__version__ = '$Id$... | python | edit | 1 | 1 | mit | ce95e50b7cb3ef9bbabddb033352aacb96b9237a | Darkdadaah/pywikibot-core,magul/pywikibot-core,jayvdb/pywikibot-core,hasteur/g13bot_tools_new,happy5214/pywikibot-core,magul/pywikibot-core,happy5214/pywikibot-core,Darkdadaah/pywikibot-core,npdoty/pywikibot,wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,hasteur/... | pywikibot/families/wikivoyage_family.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nversion = \"1.0.post1\"\n\nsetup(\n name = \"django-easy-pjax\",\n version = version,\n description = \"Easy PJAX for Django.\",\n license = \"BSD\",\n\n author = \"Fi... | python | edit | 1 | 0 | bsd-3-clause | 3b692018632fef7e632086ed2ef5a980ad6f6c2f | Kondou-ger/django-easy-pjax,nigma/django-easy-pjax,nigma/django-easy-pjax,Kondou-ger/django-easy-pjax,Kondou-ger/django-easy-pjax,nigma/django-easy-pjax | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='akanda-rug',\n version='0.1.5',\n description='Akanda Router Update Generator manages tenant routers',\n author='DreamHost',\n author_email='<EMAIL>',\n url='ht... | python | edit | 1 | 0 | apache-2.0 | 4bb6876b089375e228320162b7955bcdfa824f41 | openstack/akanda-rug,markmcclain/astara,dreamhost/akanda-rug,openstack/akanda-rug,stackforge/akanda-rug,stackforge/akanda-rug | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# The name of the panel to be added to HORIZON_CONFIG. Required.\nPANEL = 'monitoring'\n# The name of the dashboard the PANEL associated with. Required.\nPANEL_DASHBOARD = 'overcloud'\n# The name of the panel group the PANEL is associated w... | python | edit | 1 | 0 | apache-2.0 | 58c97445c8d55d48e03498c758f7b7c6dee245aa | stackforge/monasca-ui,openstack/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,openstack/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui | enabled/_50_admin_add_monitoring_panel.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import path\nfrom setuptools import setup\n\nfrom hip_pocket.constants import VERSION\n\n\ndef load(file_name):\n here = path.dirname(path.abspath(__file__))\n return open(path.join(here, file_name), \"r\").read()\n\nsetup(\n ... | python | edit | 1 | 1 | mit | 08ccc7d676a0cb0c69d1cbd5096ff5c77e19c4ab | svieira/Flask-HipPocket,svieira/Flask-HipPocket | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom data import meta\n\n\nclass Problem(object):\n def __init__(self, name, lines):\n self.name = name\n self.lines = lines\n self._solutions = None\n self._constraints = []\n\n @property\n def kind(self):\n return str(ty... | python | edit | 1 | 5 | mit | 6fd1305f2a4a2e08b51c421b1c2cfdd33b407119 | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | src/puzzle/problems/problem.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom nose.tools import (assert_is_not_none, assert_false, assert_raises, assert_equal)\n\nimport numpy as np\n\n\nfrom sknn.mlp import MultiLayerPerceptronRegressor as MLPR\n\n\nclass TestLearningRules(unittest.TestCase):\n... | python | edit | 5 | 1 | bsd-3-clause | e6400b1cce8f35466818e2424adf11e7b18aba6f | IndraVikas/scikit-neuralnetwork,gticket/scikit-neuralnetwork,agomariz/scikit-neuralnetwork,freakynit/scikit-neuralnetwork,KhanSuleyman/scikit-neuralnetwork,capitancambio/scikit-neuralnetwork,aigamedev/scikit-neuralnetwork | sknn/tests/test_rules.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint, render_template, abort, request, redirect, session, url_for\nfrom flask.ext.login import current_user, login_user\nfrom sqlalchemy import desc\nfrom packages.objects import *\nfrom packages.common import *\nfrom... | python | edit | 19 | 5 | mit | ec4d84e0b67d26dd9888d1b54adda6fbbcdc67da | KnightOS/packages.knightos.org,MaxLeiter/packages.knightos.org,MaxLeiter/packages.knightos.org,KnightOS/packages.knightos.org,KnightOS/packages.knightos.org,MaxLeiter/packages.knightos.org | packages/blueprints/api.py | rejected_lint | Too many lint violations: 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\nimport logging\n\nfrom decouple import config\n\nFOLDER = 'public'\nFOLDER = FOLDER.strip('/')\n\nlog = logging.getLogger('deploy')\n\n\ndef deploy():\n import boto\n from boto.s3.connection import S3Connection\n AWS_A... | python | edit | 1 | 3 | mit | 0876264d9f344dae2006841913f6b2308129f8c1 | vintasoftware/cdrf.co,vintasoftware/cdrf.co,aericson/cdrf.co,aericson/cdrf.co,vintasoftware/cdrf.co,aericson/cdrf.co | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"social_website_django_angular URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.10/topics/http/urls/\nExamples:\nFunction views\n 1. Add an i... | python | edit | 1 | 0 | mit | 062e65a161f9c84e5cd18b85790b195eec947b99 | tomaszzacharczuk/social-website-django-angular,tomaszzacharczuk/social-website-django-angular,tomaszzacharczuk/social-website-django-angular | social_website_django_angular/social_website_django_angular/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import StringField, PasswordField\nfrom wtforms.validators import DataRequired, Email\n\n\nclass Login(Form):\n username = StringField('Username', validators=[DataRequired()])\n password = Pass... | python | edit | 3 | 0 | mit | c154d79ba13d95f3240efd9eb4725cf9fc16060f | openedoo/module_employee,openedoo/module_employee,openedoo/module_employee | forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport doctest\nimport glob\nimport pkg_resources\n\ntry:\n pkg_resources.require('OWSLib')\nexcept (ImportError, pkg_resources.DistributionNotFound):\n pass\n\ntestfiles = glob.glob('*.txt')\n\nfor file in testfiles: \n doctest.te... | python | edit | 2 | 3 | bsd-3-clause | 5c1f9b0a70fe47bbfa7d3813a47e2da81cd81506 | sabman/OWSLib,monoid/owslib,monoid/owslib | tests/runalldoctests.py | rejected_duplicate | Near-duplicate of sample 3119 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom clint.textui import indent, puts, colored\nfrom mamba import spec\n\n\nclass DocumentationFormatter(object):\n\n def __init__(self):\n self.has_failed_tests = False\n self.total_specs = 0\n ... | python | edit | 1 | 3 | mit | 4f2a3f26b8b0ec1f62e036f0bd9d15d71a628e0c | alejandrodob/mamba,eferro/mamba,jaimegildesagredo/mamba,dex4er/mamba,angelsanz/mamba,nestorsalceda/mamba,markng/mamba | mamba/formatters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptescli',\n version='1.1.1',\n url='https://github.com/zooniverse/panoptes-cli',\n author='Adam McMaster',\n author_email='<EMAIL>',\n description=(\n ... | python | edit | 1 | 0 | apache-2.0 | 77c69f592fe35ac4e3087366da084b7a73f21ee6 | zooniverse/panoptes-cli | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFile that initializes a Writer object designed for GitHub style markdown files.\n\"\"\"\n\nfrom anchorhub.writer import Writer\nfrom anchorhub.builtin.github.wstrategies import MarkdownATXWriterStrategy, \\\n MarkdownSetextWriter... | python | edit | 1 | 1 | apache-2.0 | a8818e2058fdfaec7f283a5115619d42d23b7dde | samjabrahams/anchorhub | anchorhub/builtin/github/writer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='redis-dump-load',\n version='0.2.0',\n description='Dump and load redis databases',\n author='Oleg Pudeyev',\n author_email='<EMAIL>',\n url='http://git... | python | edit | 1 | 0 | bsd-2-clause | 73f7502f1fda11bc23469c6f3e8f79b0e375c928 | hyunchel/redis-dump-load,p/redis-dump-load,p/redis-dump-load,hyunchel/redis-dump-load | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom robber import expect\nfrom base import Base\n\nclass Contain(Base):\n \"\"\"\n expect({'key': value}).to.contain('key')\n expect([1, 2, 3]).to.contain(2)\n \"\"\"\n def matches(self):\n return self.expected in sel... | python | edit | 1 | 1 | mit | c2210463fc12121cd4de2a485d7d814d0ebe86b5 | vesln/robber.py,taoenator/robber.py | robber/matchers/contain.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf8\nfrom __future__ import unicode_literals\nfrom ...fr import French\n\ndef test_load_french():\n nlp = French()\n doc = nlp(u'Parlez-vous français?')\n\n```\n\nApply this change: Add test for french tokenizer"
},
{... | python | edit | 1 | 1 | mit | c09a8ce5bb47db4ea4381925ec07199415ae5c39 | raphael0202/spaCy,recognai/spaCy,raphael0202/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,raphael0202/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,banglakit/spaCy,recognai/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,recognai/spaCy,banglakit/sp... | spacy/tests/integration/test_load_languages.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\nsetup(\n name='opps-admin',\n version='0.1',\n description='Opps Admin, drop-in replacement of Django admin comes with lots of goodies, fully extensible with plu... | python | edit | 1 | 0 | bsd-3-clause | c4d1aa9261a37e213676dd1d7943c96b0cb273db | jeanmask/opps-admin | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='twisted-hl7',\n version='0.0.2dev',\n author='John Paulett',\n author_email = '<EMAIL>',\n url = 'http://twisted-hl7.readthedocs.org',\n license = 'BSD',\n platforms = ['PO... | python | edit | 1 | 0 | bsd-3-clause | f0a4e2f302a58f4f16b4d48572e99a124724f267 | johnpaulett/txHL7 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nimport requests as req\nfrom pymongo import MongoClient\n\nfrom pypocketexplore.config import MONGO_URI\nfrom time import sleep\n\ndef extract_topic_items(topic):\n db = MongoClient(MONGO_URI).get_default... | python | edit | 5 | 5 | mit | 5ac310b7c5cee4a8c5f247ae117fda17fc4cb61a | Florents-Tselai/PyPocketExplore | pypocketexplore/jobs.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Scope(object):\n tmp_index = 0\n\n def __init__(self, parent=None):\n self.parent = parent\n self.prefix = []\n self.declarations = {}\n self.globals = set()\n self.inherited = True\n\n def ... | python | edit | 1 | 5 | mit | 0d023a51283d477e4b3d02059361b003a91134e0 | ztane/jaspyx,iksteen/jaspyx | jaspyx/scope.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='xml_models2',\n version='0.7.0',\n description='XML backed models queried from external REST apis',\n author='Geoff Ford and Chris Tarttelin and Cam McHugh'... | python | edit | 1 | 0 | bsd-2-clause | e5a056deffa31ef107a085fdf01ac89de50c1390 | iamwucheng/xml_models2,alephnullplex/xml_models2 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = '0.8.1'\n\nsetup(name='django-cas',\n version=version,\n description=\"Django Cas Client\",\n long_description=open(\"./README.md\", \"r\").read(),\n classifiers=[... | python | edit | 1 | 0 | mit | ecee22357ce26ba6a592855ccd6792ac61278923 | divio/django-cas,byuhbll/django-cas,jrouly/django-cas,kstateome/django-cas | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# setup.py\n# colorific\n#\n\n\"\"\"\nPackage information for colorific.\n\"\"\"\n\nimport os\nfrom setuptools import setup\n\nreadme = os.path.join(os.path.dirname(__file__), 'README.md')\n\nsetup(\n name='... | python | edit | 1 | 0 | isc | 55fced15a69c07dc2b5fea9b25f244a0d1fa88c8 | 99designs/colorific | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2009, 2012 Dietrich Epp <<EMAIL>>\n# See LICENSE.txt for details.\nfrom distutils.core import setup\nsetup(name='IdioTest',\n version='0.1',\n description='Idiotic testing framework',\n auth... | python | edit | 1 | 0 | bsd-2-clause | b1563fb01ece4b4c01641b01ab33fd5993d4f16a | depp/idiotest,depp/idiotest | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import PermissionDenied\nfrom rest_framework import serializers\nfrom wafer.kv.models import KeyValue\n\n\nclass KeyValueSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = KeyValue\n\n ... | python | edit | 1 | 2 | isc | c99e0ac2e463302d41838f11ea28ea8a62990671 | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/kv/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nName: Paul Briant\nDate: 12/11/16\nClass: Introduction to Python\nAssignment: Final Project\n\nDescription:\nCode for Final Project\n\"\"\"\n\nimport pandas\nfrom datetime import datetime\n\n\ndef clean(data):\n \"\"\"\n Take ... | python | edit | 3 | 1 | unlicense | ea3ad65d3d0976ec24c15703fafacb805a6b5351 | UWPCE-PythonCert/IntroPython2016,UWPCE-PythonCert/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,weidnem/IntroPython2016,weidnem/IntroPython2016 | students/psbriant/final_project/clean_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\n\nsetup(\n name=\"myapp\",\n version='0.0.1-dev',\n description='My Awesome Application',\n author='**INSERT_AUTHOR_NAME**',\n author_email='**INSERT_AUTHOR_EMAIL**',... | python | edit | 1 | 0 | bsd-3-clause | c75749922c8be3b70bacd66a6b25b8e50faf7b76 | codehugger/Flask-Starter,codehugger/Flask-Starter | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='DCA',\n version='0.2.3',\n description='Count autoencoder for scRNA-seq denoising',\n author='Gokcen Eraslan',\n author_email=\"<EMAIL>\",\n packages=['dca'],\n install_req... | python | edit | 1 | 0 | apache-2.0 | 55b9a048f5dd3018c336a0e367c97ab1367ed440 | theislab/dca,theislab/dca,theislab/dca | setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.