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#!/usr/bin/env python\n\n# Print information columns of number values.\n\nimport sys\nimport numpy as np\n\nfrom dwi import asciifile\n\nfor filename in sys.argv[1:]:\n af = asciifile.AsciiFile(filename)\n print filename\n print af... | python | edit | 4 | 0 | mit | b7d928b473ec6b1eb60707783842d78b9a9ecdec | jupito/dwilib,jupito/dwilib | info.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom stable_baselines.a2c import A2C\nfrom stable_baselines.acer import ACER\nfrom stable_baselines.acktr import ACKTR\n# from stable_baselines.ddpg import DDPG\nfrom stable_baselines.deepq import DeepQ\nfrom stable_baselines.gail import GA... | python | edit | 11 | 0 | mit | 02e7875bb8792741cfcf1b94561c5c5a418fcfbc | hill-a/stable-baselines,hill-a/stable-baselines | stable_baselines/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function\n\nimport tensorflow as tf\n\nfrom niftynet.utilities.util_common import look_up_operations\nfrom niftynet.layer.base_layer import Layer\n\nSUPPORTED_OPS = {\"S... | python | edit | 1 | 4 | apache-2.0 | c1fbc761e10e06effa49ede1f8dbc04189999bd5 | NifTK/NiftyNet,NifTK/NiftyNet,NifTK/NiftyNet,NifTK/NiftyNet | niftynet/layer/post_processing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"`sktracker.io` module is designed to easly and quickly open Tiff files and\nto be able to parse and import any kind of metadata.\n\nFinally, an OME module is provided to read and write OME xml metadata. See\nhttps://www.openmicroscopy... | python | edit | 1 | 0 | bsd-3-clause | 07bc7efb756e2bc99f59c59476379bc186f36143 | bnoi/scikit-tracker,bnoi/scikit-tracker,bnoi/scikit-tracker | sktracker/io/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import absolute_import\n\n\"\"\"RiveScript's __main__.py\n\nThis script is executed when you run `python rivescript` directly.\nIt does nothing more than load the interactive mode of RiveScript.\"\"\... | python | edit | 3 | 0 | mit | 6ab4fc7af637976a92846005c4d1d35693e893a0 | Dinh-Hung-Tu/rivescript-python,FujiMakoto/makoto-rivescript,aichaos/rivescript-python,FujiMakoto/makoto-rivescript,plasmashadow/rivescript-python,aichaos/rivescript-python,FujiMakoto/makoto-rivescript,plasmashadow/rivescript-python,aichaos/rivescript-python,plasmashadow/rivescript-python,Dinh-Hung-Tu/rivescript-python,... | rivescript/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef insertion_sort(seq):\n for i in range(1, len(l)):\n for j in range(i, 0, -1):\n if l[j - 1] < l[j]:\n break\n l[j - 1], l[j] = l[j], l[j - 1]\n\n return l\n```\n\nApply this change: Reve... | python | edit | 1 | 4 | mit | b86a0aa55bb6f30be07cff5e3e6cdb27d84b0024 | wizh/algorithms | Insertion_sort/insertion_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils import timezone\nfrom datetime import datetime\n\n\ndef key_state(key):\n results = settings.GPG_OBJ.import_keys(key).results\n keys = settings.GPG_OBJ.list_keys()\n if not result... | python | edit | 1 | 9 | mit | 79087444a858c33362c5a31200f158c6edda95df | whitesmith/hawkpost,whitesmith/hawkpost,whitesmith/hawkpost | humans/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom peewee import SqliteDatabase, OperationalError\n\n\n__all__ = [\n 'BaseDatabase',\n ]\n\n\nclass BaseDatabase:\n \"\"\"The base database class to be used with Peewee.\n \"\"\"\n def __init__(self, url=None):\n sel... | python | edit | 1 | 2 | apache-2.0 | 399e8ae093034ca69030f15dff8e9b570baf0cf5 | maxking/paper-to-git,maxking/paper-to-git | paper_to_git/database.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport warnings\nimport functools\n\n\n__all__ = ['deprecated']\n\n\nclass deprecated(object):\n \"\"\"Decorator to mark deprecated functions with warning.\n\n Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.\n\n ... | python | edit | 1 | 3 | bsd-3-clause | 332c21f97936baab6901fccb3b6d28eaee83729c | chintak/scikit-image,warmspringwinds/scikit-image,SamHames/scikit-image,almarklein/scikit-image,chriscrosscutler/scikit-image,chriscrosscutler/scikit-image,SamHames/scikit-image,michaelpacer/scikit-image,almarklein/scikit-image,bennlich/scikit-image,bsipocz/scikit-image,ClinicalGraphics/scikit-image,dpshelio/scikit-ima... | skimage/_shared/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib import admin\n# admin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^', include('test_app.urls')),\n... | python | edit | 1 | 1 | mit | 6ebb2b021594633a66f2ff90121d4a39eec96cc8 | liberation/django-elasticsearch,leotsem/django-elasticsearch,sadnoodles/django-elasticsearch,alsur/django-elasticsearch | test_project/test_project/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url, include\nfrom conferences import views\n\nurlpatterns = [\n url(r'^$', views.ConferenceList.as_view(), name='list'),\n url(r'^(?P<pk>[0-9]+)/$', views.ConferenceDetail.as_view(), name='detail'),\n ... | python | edit | 1 | 0 | apache-2.0 | 579fa16e21b580f2469e3c098a26ec480ea0dba5 | leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings | meetings/conferences/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '0.4-alpha'\n__author__ = 'Dan Persons <<EMAIL>>'\n__license__ = 'MIT License'\n__github__ = 'https://github.com/dogoncouch/siemstress'\n__all__ = ['parsecore', 'querycore', 'query', 'triggercore', 'trigger']\n\nimport siemstr... | python | edit | 9 | 0 | mit | 9ec465771ed3b6b1b0be85468f73086fcfdbb76d | dogoncouch/siemstress | siemstress/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport setuptools\n\nNAME = 'takeyourmeds'\n\nDATA = (\n 'static',\n 'templates',\n)\n\ndef find_data(dirs):\n result = []\n for x in dirs:\n for y, _, _ in os.walk(x):\n res... | python | edit | 1 | 3 | mit | ab49b07f89dcc000201742275c7109597a032d9b | takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nsetup.py\n\n\"\"\"\n__author__ = 'Gavin M. Roy'\n__email__ = '<EMAIL>'\n__since__ = '2011-09-13'\n\nfrom hockeyapp import __version__\nfrom setuptools import setup\n\nlong_description = \"\"\"Python client for the HockeyApp.net API\... | python | edit | 1 | 0 | bsd-3-clause | 5fc27215618ac6e160b193e82dea4f222bfeaaf2 | gmr/hockeyapp,vkotovv/hockeyapp | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\n# Parse the version from the mapbox module.\nwith open('mapboxcli/__init__.py') as f:\n for line in f:\n if line.find(\"__version__\") >= 0:\n version = line.split(\"=\")... | python | edit | 1 | 0 | mit | 8472078e29ca70843e19e24b6c3290dab20e80de | mapbox/mapbox-cli-py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\n(c) 2014 Farsight Security Inc.\n(c) 2010 Victor Ng\n\nReleased under the MIT license. See license.txt.\n'''\n\nfrom setuptools import setup\nfrom setuptools.extension import Extension\nfrom Cython.Distutils import build_ext\nfrom os.... | python | edit | 4 | 0 | mit | 977ffecdef01bd5041c3f206dbf311211f03a054 | farsightsec/mmaparray,farsightsec/mmaparray | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"ftfy\",\n version='3.3.0',\n maintainer='Luminoso Technologies, Inc.',\n maintainer_email='<EMAIL>',\n license=\"MIT\",\n url='http://github.com/LuminosoInsight/python-ftfy',... | python | edit | 1 | 0 | mit | 09f784d459f22eec41cb720f5e1945f8fca48e6e | rspeer/python-ftfy | setup.py | rejected_duplicate | Near-duplicate of sample 18406 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n \nVersion = \"0.01\"\n\nsetup(name = \"coverage-reporter\",\n version = Version,\n description = \"Coverage reporting tool\",... | python | edit | 1 | 0 | mit | dd11bcd4011ba911642b2e13d0db2440f749afa1 | dugan/coverage-reporter | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nversion = \"0.3.1\"\n\nsetup(\n name=\"arxiv\",\n version=version,\n packages=[\"arxiv\"],\n\n # dependencies\n install_requires=[\n 'feedparser',\n 'requests',\n 'pytest-r... | python | edit | 1 | 0 | mit | a7e6df9654bb526ed3d88d44fef44bf2a9ae493d | lukasschwab/arxiv.py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nClass Mixins.\n\"\"\"\n\nclass MultipleIDMixin(object):\n \"\"\"\n Override get_queryset for multiple id support\n \"\"\"\n def get_queryset(self):\n \"\"\"\n Override :meth:``get_queryset``\n \"\"\"... | python | edit | 1 | 3 | bsd-2-clause | 450e9415f90c92d64f814c363248db8250c5a8f2 | grapo/django-rest-framework-json-api,aquavitae/django-rest-framework-json-api,scottfisk/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,lukaslundgren/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,leo-naeka/django-rest-framework-json-api,django-json-api/django-rest... | rest_framework_json_api/mixins.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(name='dshelpers',\n version='1.1.0',\n description=\"Provides some helpers functions used by the ScraperWiki Data Services team.\",\n long_description=\"Provides some helpers functions ... | python | edit | 1 | 0 | bsd-2-clause | 9fcd338b568ec46ac16661a9aa497e619c092eeb | scraperwiki/data-services-helpers | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport simple_virtuoso_migrate\n\n\nsetup(\n name = \"simple-virtuoso-migrate\",\n version = simple_virtuoso_migrate.SIMPLE_VIRTUOSO_MIGRATE_VERSION,\n packages = find_packages(),\n a... | python | edit | 1 | 0 | apache-2.0 | 576aaf93c8d8ed5c81bef85d0561609252de7169 | globocom/simple-virtuoso-migrate,globocom/simple-virtuoso-migrate | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# License: MIT\n# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:\n\n\"\"\"\ndjango twitter bootstrap form setup script\n\"\"\"\n\n__author__ = \"Guillaume Luchet <<EMAIL>>\"\n__ve... | python | edit | 3 | 0 | mit | 53a597539c5f6ddbec04e51bfafb0402c4e31fdc | geelweb/django-twitter-bootstrap-form,geelweb/django-twitter-bootstrap-form | 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 codecs import open\nfrom os import path\nimport pubcode\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, 'README.rst'), encoding='utf-8') ... | python | edit | 1 | 0 | mit | f6d6cae28b5fdc49a5f56fe1713bd0fbb02c1dff | Venti-/pubcode | 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 = 'slf-project-one',\n version = '0.1dev',\n packages = find_packages(),\n license = 'BSD',\n long_description = open('README.rst').read(),\n)\n\n```\n\nApply this ... | python | edit | 1 | 0 | bsd-3-clause | d1951085f60f2d91d5ab0b42d83fbd5733bfa706 | dokterbob/slf-project-one | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\nos.chdir(os.path.dirname(sys.argv[0]) or \".\")\n\nimport libsongtext\nversion = '%s.%s.%s' % libsongtext.__version__\n\ntry:\n long_description = open('README.rst',... | python | edit | 1 | 0 | bsd-2-clause | 296223d370baea719c56726d71118ec0d4a8a665 | ysim/songtext,ysim/songtext | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nProxy Server \"Phone Book\".\n\nSimplify running browser tests through a proxy server\nby adding your frequently-used proxies here.\n\nNow you can do something like this on the command line:\n\"pytest SOME_TEST.py --proxy=proxy1\"\n... | python | edit | 1 | 0 | mit | f562e0d2f258df59b9bfb74a5d18424a42bea65d | seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase | seleniumbase/config/proxy_list.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\n\nwith open('README.rst') as readme_file:\n README = readme_file.read()\n\n\ninstall_requires = [\n 'click==6.6',\n 'botocore>=1.5.40,<2.0.0',\n 'typing==3.5.... | python | edit | 1 | 0 | apache-2.0 | 6775a5c58bd85dce644330dfd509d8f23135c5fe | awslabs/chalice | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"The setup script.\"\"\"\n\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as histor... | python | edit | 1 | 0 | mit | 94318fdc01afe6c21626ff074bafe46a6efafeb0 | NorakGithub/django-excel-tools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom pecan import conf\n\nimport os\n\nclass DiskStorageDriver(object):\n \"\"\"A driver for storing blocks onto local disk\n\n IMPORTANT: This driver should not be considered\n secure and therefore should not be ran in\n any ... | python | edit | 3 | 2 | apache-2.0 | 61eaf65a721ffe5820522a1d4afac5cdafe2a0a3 | rackerlabs/deuce | deuce/drivers/storage/blocks/disk/DiskStorageDriver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\n\ndef get_version():\n \"\"\"\n Get the version from version module without importing more than\n necessary.\n \"\"\"\n version_module_path = os.path.join(os.path.dirname(__file__)... | python | edit | 1 | 1 | apache-2.0 | c45b89a6be7df2131dc5ed2e29b1cc2fe6ea061f | ScatterHQ/eliot,ScatterHQ/eliot,ScatterHQ/eliot,ClusterHQ/eliot,iffy/eliot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\nfrom osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license\nimport pypandoc\n\n\ndef read(fname):\n return open(os.path.join(os.path.... | python | edit | 3 | 1 | mit | 8e56648242669697612b4e290e1d5d8e1f06dba9 | khazhyk/osuapi | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\n# Make sure we are running python3.5+\nif 10 * sys.version_info[0] + sys.version_info[1] < 35:\n sys.exit(\"Sorry, only Python 3.5+ is supported.\")\n\nfrom setuptools import setup\n\ndef readme():\n with open('README.r... | python | edit | 1 | 1 | mit | 4da7debc49cc87a243f8fc93a2fccbd4e276da26 | FNNDSC/med2image,FNNDSC/med2image | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom local_settings import *\nfrom utils import SensorConsumerBase\nimport redis\nimport datetime\nimport sys\n\nclass Bathroom(SensorConsumerBase):\n def __init__(self):\n SensorConsumerBase.__init__(self, \"bat... | python | edit | 5 | 2 | bsd-3-clause | 1a13e9da4e3955aaa7c52792d91638966d29de9c | ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display | sensor_consumers/bathroom_door.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nwith open(os.path.join(here, 'README.rst')) as f:\n README = f.read()\n \nrequires = [\n 'pyodbc',\n 'peewee'\n]\n\nversion = '0.1... | python | edit | 1 | 0 | mit | edcdf92d1c9aca515ac05a165e6bfc2392be6d46 | brake/peewee_mssql | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='tchannel',\n version='0.10.1.dev0',\n author='Abhinav Gupta, Aiden Scandella, Bryce Lampe, Grayson Koonce, Junchao Wu',\n author_email='<EMAIL>',\n description='... | python | edit | 1 | 0 | mit | 29da663d6b27e760087fed62ee5717b47f26531a | Willyham/tchannel-python,uber/tchannel-python,uber/tchannel-python,Willyham/tchannel-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\n\nsetup(\n name='django-emailuser',\n version='1.0',\n description='simple User model identified by email address',\n packages=['emailuser'],\n\n author='Mark Paschal',\n author_email='<... | python | edit | 1 | 0 | mit | e5ac63b4615b4166d7e7866c9f169e4c9f86f46c | markpasc/django-emailuser,duncaningram/django-emailuser | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom keras.applications.resnet50 import ResNet50\nfrom keras.applications.vgg16 import VGG16\nfrom keras.applications.vgg19 import VGG19\nfrom keras.applications.inception_v3 import InceptionV3\n\nresnet = ResNet50(weights='imagenet')\nvgg1... | python | edit | 1 | 0 | apache-2.0 | 8b4fc00e7a5ac1d416d54952cbb6d09ef328a9c3 | Kaggle/docker-python,Kaggle/docker-python | cache_keras_weights.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nsetup(\n name='wagtailcodeblock',\n version=\"0.4.0\",\n description='Wagtail Code Block provides PrismJS syntax highlighting in Wagtail.',\n long_description='A Wagtail Streamfield b... | python | edit | 1 | 0 | bsd-3-clause | d629cc508cb2d3eab83e259d9aefc9885076a407 | FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock | 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='autobuilder',\n version='1.0.3',\n packages=find_packages(),\n license='MIT',\n author='Matt Madison',\n author_email='<EMAIL>',\n entry_points={\n 'c... | python | edit | 1 | 0 | mit | b64c713555bfbfa4eb8d483a6da17853ceaa6078 | madisongh/autobuilder | setup.py | rejected_duplicate | Near-duplicate of sample 1079 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom __future__ import division, print_function\nfrom time import time\n\n\nclass Timer(object):\n\n \"\"\" Simple timing object.\n\n Usage:\n with Timer('Function took'):\n ... | python | edit | 1 | 1 | unlicense | 13c26818cbb217ac4e27b94f188f239152fa85b8 | dseuss/pythonlibs | timer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom go_store_service.api_handler import (\n ApiApplication, create_urlspec_regex, CollectionHandler,\n ElementHandler)\n\n\nclass TestCreateUrlspecRegex(TestCase):\n def test_no_variables(self):\n ... | python | edit | 1 | 1 | bsd-3-clause | af59d91afdddf9a5f3f673dd7bba98ad4538ec55 | praekelt/go-store-service | go_store_service/tests/test_api_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAuthor(s): Matthew Loper\n\nSee LICENCE.txt for licensing and contact information.\n\"\"\"\n__all__ = ['mstack', 'wget']\n\ndef mstack(vs, fs):\n import chumpy as ch\n import numpy as np\n lengths = [v.shape[0] for v in vs]... | python | edit | 1 | 4 | mit | 539fae27f9911b9ad13edc5244ffbd12b1509006 | mattloper/opendr,mattloper/opendr | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport flask\n\nfrom handlers import app\nimport db.query as q\n\n@app.route('/')\ndef index():\n return app.send_static_file('index.html')\n\n@app.route('/api/perspective/random')\ndef random_perspective():\n return flask.jsonify(\n q... | python | edit | 1 | 1 | apache-2.0 | 69d1f91c48ab022a56232debdec14f5a5a449cbc | pascalc/narrative-roulette,pascalc/narrative-roulette | src/handlers/custom.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on 02/02/2014\n\n@author: Miguel Otero\n'''\n\nclass MeasurementUnit(object):\n '''\n classdocs\n '''\n\n RANK = \"rank\"\n INDEX = \"index\"\n UNITS = \"units\"\n SQ_KM = \"sq. km\"\n PERCENTAGE = \"%\"... | python | edit | 1 | 2 | mit | cbe39a8f63ca792715370bac7d28b39bae8b0c86 | weso/landportal-importers,landportal/landbook-importers,landportal/landbook-importers | LandPortalEntities/lpentities/measurement_unit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom mezzanine.core.models import Displayable, RichText\n\nclass Event(Displayable, RichText):\n \"\"\"\n Main object for each event.\n\n ... | python | edit | 3 | 0 | mit | daeb8e38ec5b15650b9c5933789b6eab14b4a0a8 | jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website | website/jdevents/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 Huawei Technologies Co.,LTD.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ht... | python | edit | 1 | 2 | apache-2.0 | cf20a04b0fb50993e746945f586160b96a0f16b1 | Alzon/SUR,eshijia/SUR,jay-lau/magnum,dimtruck/magnum,ArchiFleKs/magnum,Tennyson53/magnum,Alzon/SUR,eshijia/magnum,Tennyson53/magnum,ddepaoli3/magnum,annegentle/magnum,ramielrowe/magnum,eshijia/magnum,ArchiFleKs/magnum,openstack/magnum,ramielrowe/magnum,mjbrewer/testindex,mjbrewer/testindex,Tennyson53/SUR,ffantast/magnu... | magnum/api/validation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopied over from django.contrib.auth.management\n\"\"\"\nfrom django.dispatch import dispatcher\nfrom django.db.models import get_models, signals\n\ndef _get_permission_codename(action, opts):\n return u'%s_%s' % (action, opts.ob... | python | edit | 2 | 6 | bsd-3-clause | 6ff8ffe74c5d107133258f051430d17cf421d105 | ella/ella,WhiskeyMedia/ella,petrlosa/ella,whalerock/ella,WhiskeyMedia/ella,MichalMaM/ella,whalerock/ella,petrlosa/ella,MichalMaM/ella,whalerock/ella | ella/ellaadmin/management/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = (1, 5, 0, 'final', 2)\n\ndef get_version(*args, **kwargs):\n # Don't litter django/__init__.py with all the get_version stuff.\n # Only import if it's actually called.\n from django.utils.version import get_version\n r... | python | edit | 1 | 1 | bsd-3-clause | b170c077ccd86280715dbc57cf2cac9a2327ff4b | ccn-2m/django,bliti/django-nonrel-1.5,ccn-2m/django,hasadna/django,alx-eu/django,ccn-2m/django,alx-eu/django,hasadna/django,alx-eu/django,imtapps/django-imt-fork,ccn-2m/django,bliti/django-nonrel-1.5,bliti/django-nonrel-1.5,alx-eu/django,imtapps/django-imt-fork,imtapps/django-imt-fork,hasadna/django | django/__init__.py | rejected_duplicate | Near-duplicate of sample 2298 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .base_match import BaseMatchAdapter\nfrom fuzzywuzzy import fuzz\n\n\nclass ClosestMatchAdapter(BaseMatchAdapter):\n \"\"\"\n The ClosestMatchAdapter creates a response by\n using fuzzywuzzy's process ... | python | edit | 1 | 5 | bsd-3-clause | 2b07fdcefdc915e69580016d9c0a08ab8e478ce7 | Reinaesaya/OUIRL-ChatBot,maclogan/VirtualPenPal,Gustavo6046/ChatterBot,vkosuri/ChatterBot,gunthercox/ChatterBot,Reinaesaya/OUIRL-ChatBot,davizucon/ChatterBot | chatterbot/adapters/logic/closest_match.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='dex',\n version='0.0.1',\n description='A research language for typed, functional array processing',\n license='BSD',\n author='Adam Paszke',\n author_email='<EMAIL>',\n p... | python | edit | 1 | 0 | bsd-3-clause | ff39617b554d0feefc8d5518d33894e4c2e88941 | google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang,google-research/dex-lang | python/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests for the mock of the query endpoint.\n\nhttps://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query.\n\"\"\"\n\nimport pytest\nimport requests\n\nfrom tests.mock_vws.utils import Endpoint, assert_que... | python | edit | 1 | 1 | mit | a6441de03522f9352742cba5a8a656785de05455 | adamtheturtle/vws-python,adamtheturtle/vws-python | tests/mock_vws/test_query.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nTesting the wordpress import.\n\nIt will do create a new site with the import_wordpress command\nand use that newly created site to make a build.\n\"\"\"\n\nimport os\nimport os.path\n\nimport pytest\n\nfrom... | python | edit | 1 | 1 | mit | 4e2237d53d3f78e1cc11aeba1a1599c296e0c280 | getnikola/nikola,getnikola/nikola,getnikola/nikola,okin/nikola,okin/nikola,okin/nikola,okin/nikola,getnikola/nikola | tests/integration/test_wordpress_import.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport os\n\nINSTALLED_APPS += [\n 'data_aggregator.apps.DataAggregatorConfig',\n 'webpack_loader',\n]\n\nif os.getenv('ENV') == 'localdev':\n DEBUG = True\n DATA_AGGREGATOR_ACCESS_GROUP = 'u_test_g... | python | edit | 4 | 0 | apache-2.0 | 2295ccdca2ae208bcfb44c09b2a07cf525baebfc | uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics,uw-it-aca/canvas-analytics | docker/settings.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Any, NamedTuple, Optional\n\nimport numpy as np\n\nfrom data.image import image\nfrom puzzle.steps import step\n\n\nclass ImageChangeEvent(NamedTuple):\n pass\n\n\nclass BaseImageStep(step.Step):\n _source: image.Image\... | python | edit | 1 | 3 | mit | 7798de3a4ce6428e15394c5e3d00f5db5745f7af | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | src/puzzle/steps/image/_base_image_step.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nabelfunctions is a Python library for computing with Abelian functions,\nalgebraic curves, and solving integrable Partial Differential Equations.\n\nThe code is available as a git repository at\n\n https://github.com/cswiercz/abe... | python | edit | 4 | 0 | mit | d3ebf779f3da800145e84913cb202a1e508c9d30 | abelfunctions/abelfunctions,cswiercz/abelfunctions,cswiercz/abelfunctions,abelfunctions/abelfunctions,cswiercz/abelfunctions,abelfunctions/abelfunctions | abelfunctions/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 Intel Corp\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License... | python | edit | 1 | 0 | apache-2.0 | db1af67bab58b831dcf63f63bfefc0e28e4ced55 | ramineni/my_congress,ramineni/my_congress,ramineni/my_congress,ramineni/my_congress,openstack/congress,openstack/congress | congress_tempest_tests/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# EForge project management system, Copyright © 2010, Element43\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the abov... | python | edit | 1 | 1 | isc | 609864faf36b9a82db9fd63d28b5a0da7a22c4f5 | oshepherd/eforge,oshepherd/eforge,oshepherd/eforge | eforge/__init__.py | rejected_duplicate | Near-duplicate of sample 21373 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport nengo\n\nfrom . import fixpoint as fp\n\n\ndef totuple(a):\n \"\"\"Convert any object (e.g., numpy array) to a Tuple.\n\n http://stackoverflow.com/questions/10016352/convert-numpy-array-to-tuple\n \"\"\"\n try:\n r... | python | edit | 3 | 4 | mit | 2f5e8d51db04520600738064a0a97742a5f59dbb | ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014 | nengo_spinnaker/utils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nimport yaml\nimport jinja2\nimport glob\nfrom conda_build.config import config\nfrom conda_build.metadata import MetaData\nfrom distutils.version import LooseVersion\n\nrecipe_metadata = MetaData(os.path.join(sys.argv... | python | edit | 4 | 0 | bsd-3-clause | b6645c81c4e45a03297ebb5e4fb65fcef952a1f9 | amacd31/hydromath,amacd31/hydromath | ci/get_latest_conda_build_path.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\nPASSWORD_PLACEHOLDER = '*' * 16\n\n# If any remote service does not respond within 10 minutes, time out\nREQUEST_TIMEOUT = 600\n\nALGO_AES = 'aes'\n\nDATA_TYPE_UNKNOWN = None\n\nCOMMCARE_DATA_TYPE_TEXT = 'cc_text'\nCOMMCARE_DATA_TYPE_IN... | python | edit | 1 | 0 | bsd-3-clause | 894fea9aecf62cb5a04d1fd02b48d3a263e16a81 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/motech/const.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright [2009-2014] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License ... | python | edit | 3 | 0 | apache-2.0 | f4550e5a341baab9b1193766595a86d57e253806 | RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode | rnacentral/apiv1/urls.py | rejected_duplicate | Near-duplicate of sample 16566 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport os\nimport pdb\n\nfrom sqlalchemy import create_engine, MetaData\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker, scoped_session\n\nclass Mode... | python | edit | 4 | 2 | mit | 7e2b60a7f7b32c235f931f9e7263ccefc84c79e2 | studio666/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,MikeFair/www.gittip.com,MikeFair/www.gittip.com,studio666/gratipay.com,mccolgst/www.gittip.com,bountysource/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,bountysource/www.gittip.com,MikeFair/www.git... | gittip/orm/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom demands import HTTPServiceClient\n\nfrom yolapy.resources import campaign, partner, site, subscription, user\n\n\nclass Yola(\n HTTPServiceClient, campaign.CampaignResourceMixin,\n partner.PartnerResourceMixin, site.SiteR... | python | edit | 1 | 1 | mit | 099b8d9b6d546d035e63b6db8714c44364537efd | yola/yolapy | yolapy/services.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n pyfire.tests\n ~~~~~~~~~~~~\n\n All unittests live here\n\n :copyright: (c) 2011 by the pyfire Team, see AUTHORS for more details.\n :license: BSD, see LICENSE for more details.\n\"\"\"\n```\... | python | edit | 1 | 0 | bsd-3-clause | 48d02d2c9cea083946c68e494309d7597ec2d878 | IgnitedAndExploded/pyfire,IgnitedAndExploded/pyfire | pyfire/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom django import template\n\nregister = template.Library()\n\n\ndef to_link(m):\n text = m.group('text')\n dweet_id = m.group('dweet_id')\n username = m.group('username')\n\n if username is None:\n path = '/d... | python | edit | 1 | 2 | apache-2.0 | eacc79f1e1a7a0748d9202eb2c9a90291abe3fd7 | lionleaf/dwitter,lionleaf/dwitter,lionleaf/dwitter | dwitter/templatetags/insert_magic_links.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nsentry.quotas.base\n~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom django.conf ... | python | edit | 1 | 3 | bsd-3-clause | d7a8162ab33224742258838b90e11f8845198a95 | mvaled/sentry,mvaled/sentry,ifduyue/sentry,zenefits/sentry,kevinlondon/sentry,1tush/sentry,Natim/sentry,argonemyth/sentry,BayanGroup/sentry,jean/sentry,fuziontech/sentry,BayanGroup/sentry,drcapulet/sentry,felixbuenemann/sentry,ifduyue/sentry,kevinastone/sentry,llonchj/sentry,mitsuhiko/sentry,looker/sentry,Kryz/sentry,f... | src/sentry/quotas/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\ndef isValid( s):\n if not s:\n return False\n stack = []\n map = {'(':')', '[':']', '{':'}'}\n for c in s:\n if c in map.keys():\n stack.append(c)\n else:\n if len(stack) > 0:\n ... | python | edit | 6 | 7 | mit | 1ff766471df0c0171722c97f21ea1033f21e44f3 | chancyWu/leetcode | src/valid_parentheses.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport plotly.offline as py_offline\n\n### Offline Mode\t\n\ndef go_offline(connected=False):\n\ttry:\n\t\tpy_offline.init_notebook_mode(connected)\n\texcept TypeError:\n\t\t#For older versions of plotly\n\t\tpy_offline.init_notebook_mode()... | python | edit | 1 | 3 | mit | 6c8122be60b25bbe9ba4ff8a714370e801e6ae70 | santosjorge/cufflinks | cufflinks/offline.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport subprocess\nimport sys\n\nfrom lib.util import *\n\n\nSOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))\n\n\ndef main():\n input_file = sys.argv[1]\n output_dir = os.path.dirname(sys.argv[... | python | edit | 2 | 2 | mit | 979ec05ed34cec2af0d45dc76b84921af85f84e9 | mjaniszew/electron,meowlab/electron,rreimann/electron,eriser/electron,tonyganch/electron,nicholasess/electron,wolfflow/electron,thingsinjars/electron,dongjoon-hyun/electron,rhencke/electron,Evercoder/electron,yan-foto/electron,mattdesl/electron,pirafrank/electron,nagyistoce/electron-atom-shell,bitemyapp/electron,Andrey... | script/compile-coffee.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport datetime\nimport json\nimport sys\n\nsys.path.append('..')\nimport sabre_dev_studio\nimport sabre_dev_studio.sabre_exceptions as sabre_exceptions\n\n'''\nrequires config.json in the same directory for api authenticat... | python | edit | 4 | 1 | mit | 785fcdca3c9bfb908444d3b9339457c616761f2c | Jamil/sabre_dev_studio | tests/flights_to_test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\nif len(sys.argv) < 2:\n sys.exit('Usage: %s file.in' % sys.argv[0])\n \nfile = open(sys.argv[1], 'r')\nT = int(file.readline())\nfor i in xrange(1, T+1):\n N = int(file.readline())\n L = map(int, f... | python | edit | 2 | 0 | mit | 0d38b9592fbb63e25b080d2f17b690c478042455 | robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles | google-code-jam-2012/perfect-game/perfect-game.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport json\nimport os\nimport time\n\nimport requests\nfrom tardis import __githash__ as tardis_githash\n\n\nparser = argparse.ArgumentParser(description=\"Run slow integration tests\")\nparser.add_argument(\"--yaml\", des... | python | edit | 2 | 0 | bsd-3-clause | 65f5695b90054f73d7119f0c50be51f61de777fa | kaushik94/tardis,orbitfold/tardis,kaushik94/tardis,orbitfold/tardis,orbitfold/tardis,kaushik94/tardis,orbitfold/tardis,kaushik94/tardis | tardis/tests/tests_slow/runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n__all__ = [\"recursively_remove_ltac\"]\n\nLTAC_REG = re.compile(r'^\\s*(?:Local\\s+|Global\\s+)?Ltac\\s+([^\\s]+)', re.MULTILINE)\n\ndef recursively_remove_ltac(statements, exclude_n=3):\n \"\"\"Removes any Ltac statement w... | python | edit | 1 | 5 | mit | d623ae9eed5fd8e558461de8bc52a83ff0a168af | JasonGross/coq-tools,JasonGross/coq-tools | recursive_remove_ltac.py | rejected_duplicate | Near-duplicate of sample 7422 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom topics.models import Topic\n\n\nclass Command(BaseCommand):\n help = u'Bootstrap the topic lists in the database.'\n\n def handle(self, *args, **kwargs):\n self.load_t... | python | edit | 1 | 2 | mit | 4d247da1ecd39bcd699a55b5387412a1ac9e1582 | texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84 | txlege84/topics/management/commands/bootstraptopics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL\nfrom django.contrib.admin.options import StackedInline, TabularInline\nfrom django.contrib.admin.sites import AdminSite, site\n\n\ndef autodiscover():\n \"\"\"\n ... | python | edit | 9 | 4 | bsd-3-clause | 93f2ff45ff3d61487ed061ae3d1a65051c3d1799 | svn2github/django,svn2github/django,svn2github/django | django/contrib/admin/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\ndef add_all(nums):\n\treturn sum(nums)\n\ndef multiply_all(nums):\n\treturn reduce(lambda a, b: a * b, nums)\n\nif __name__== '__main__':\n\tcommand = sys.argv[1]\n\tnums = map(float, sys.argv[2:])\n\tif command == 'add':\n\t\... | python | edit | 2 | 1 | bsd-3-clause | fd8caec8567178abe09abc810f1e96bfc4bb531b | tanecious/calc | calc.py | rejected_duplicate | Near-duplicate of sample 20803 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Tuple\n\nfrom opwen_email_server import azure_constants as constants\nfrom opwen_email_server import config\nfrom opwen_email_server.services.queue import AzureQueue\nfrom opwen_email_server.services.sendgrid import Sendg... | python | edit | 1 | 2 | apache-2.0 | 0d7add686605d9d86e688f9f65f617555282ab60 | ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver | opwen_email_server/backend/email_sender.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n#\n# By Henrik Lilleengen (<EMAIL>)\n#\n# Released under the MIT License: https://opensource.org/licenses/MIT\n\nimport soco, sys\n\nspeakers = list(soco.discover())\n\n\nstate = speakers[0].get_current_transport_inf... | python | edit | 1 | 0 | mit | cc6c80ad64fe7f4d4cb2b4e367c595f1b08f9d3b | Lilleengen/i3blocks-sonos | i3blocks-sonos.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._base import *\n\n# DJANGO ######################################################################\n\nDATABASE_NAME = 'test_%s' % DATABASES['default']['NAME']\n\nDATABASES = {\n 'default': {\n 'NAME': DATABASE_NAME,\n ... | python | edit | 10 | 0 | mit | f0e29748ff899d7e65d1f4169e890d3e3c4bda0e | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | icekit/project/settings/_test.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport MySQLdb\nfrom datetime import datetime, timedelta\n\ndb = MySQLdb.connect(host=\"10.0.196.2\",\n user=\"ciuser\",\n passwd=\"secret\",\n db=\"ciresources\")\n\ncur = db.curs... | python | edit | 1 | 0 | apache-2.0 | 5c5de666e86d6f2627df79762b0e3b0f188861d4 | CiscoSystems/project-config-third-party,CiscoSystems/project-config-third-party | scripts/claim_vlan.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\r\nfrom dateutil.parser import parse\r\nfrom ..common import run, chdir\r\n\r\n\r\ndef check_dates(spec_id, username, spec, basedir):\r\n \"\"\" Port of the CheckDates program from C++\r\n Finds the first submission date... | python | edit | 1 | 5 | mit | 374981fd60c0116e861d598eec763cc2b8165189 | StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit | cs251tk/common/check_submit_date.py | rejected_duplicate | Near-duplicate of sample 4028 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# PyArt by MohamadKh75\n# 2017-10-05\n# ********************\n\nfrom pathlib import Path\n\n\n# Set the Alphabet folder path\nfolder_path = Path(\"Alphabet\").resolve()\n\n\n# Read all Capital Letters - AA is Capital A\ndef letter_reader(le... | python | edit | 1 | 3 | mit | 014925aa73e85fe3cb0d939a3d5d9c30424e32b4 | MohamadKh75/Arthon | func.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import chdir, getcwd\nfrom os.path import dirname, basename\nfrom unittest import TestCase\n\nfrom nose.tools import eq_\n\nfrom noseprogressive.utils import human_path, frame_of_test\n\n\nclass UtilsTests(TestCase):\n \"\"\"Test... | python | edit | 1 | 2 | mit | 923d49c753acf7d8945d6b79efbdb08363e130a2 | pmclanahan/pytest-progressive,erikrose/nose-progressive,veo-labs/nose-progressive,olivierverdier/nose-progressive | noseprogressive/tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPiston handlers for notable resources.\n\"\"\"\n\n\nfrom piston.handler import BaseHandler\nfrom portal import models\n\n\nclass RepositoryHandler(BaseHandler):\n model = models.Repository\n\n\nclass CollectionHandler(BaseHandler... | python | edit | 1 | 0 | mit | 60156236836944205f3993badcf179aaa6e7ae54 | mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections | ehriportal/portal/api/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n#import hashlib\nimport os\n\ndef main():\n for root, dirs, files in os.walk(\"/mcfs/data/materialscommons\"):\n for f in files:\n print f\n\nif __name__ == \"__main__\":\n main()\n\n```\n\nA... | python | edit | 2 | 3 | mit | 51f4d40cf6750d35f10f37d939a2c30c5f26d300 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/scripts/updatedf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a default null logger per python recommendations."
},
{
"role": "assistant",
"content": "__author__ = 'katharine'\n\nimport logging\n\nfrom .exceptions import *\n\nlogging.getLogger('libpebble2').addHandler(logging.NullHandle... | python | new_file | 2 | 0 | mit | 70d009834123cb5a10788763fed3193017cc8162 | pebble/libpebble2 | libpebble2/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport types\n\n\nclass ShimModule(types.ModuleType):\n\n def __getattribute__(self, key):\n exec 'from IPython import %s' % key\n return eval(key)\n\nsys.modules['IPython.frontend'] = ShimModule('frontend')\n\n... | python | edit | null | null | bsd-3-clause | bf28376f252fd474d594e5039d0b2f2bb1afc26a | ipython/ipython,ipython/ipython | IPython/frontend.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404, render\nfrom django.http import HttpResponseRedirect, HttpResponse, Http404\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.auth.decorators import login_required\n\nfrom dwi... | python | edit | 7 | 1 | apache-2.0 | e6af9d901f26fdf779a6a13319face483fe48a3b | lionleaf/dwitter,lionleaf/dwitter,lionleaf/dwitter | dwitter/dweet/views.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\n\nfrom django.conf import settings\n\nJOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'\nDEFAULT_PORT = 2222\nENV_VAR_TEMPLATE = '{name: \"... | python | edit | 1 | 1 | apache-2.0 | e637e5f53990709ed654b661465685ad9d05a182 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | api/spawner/templates/constants.py | rejected_duplicate | Near-duplicate of sample 11201 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom . import views\n\nurlpatterns = [\n url(r'^personal_fast$', views.get_personal_timetable_fast),\n url(r'^personal$', views.get_personal_timetable),\n url(r'^bymodule$', views.get_modules_tim... | python | edit | 1 | 0 | mit | d16373609b2f30c6ffa576c1269c529f12c9622c | uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi | backend/uclapi/timetable/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on May 10, 2012\n\n@author: sean\n'''\nfrom .bytecode_consumer import ByteCodeConsumer\nfrom argparse import ArgumentParser\n\nclass ByteCodePrinter(ByteCodeConsumer):\n \n def generic_consume(self, instr):\n print... | python | edit | 1 | 1 | bsd-3-clause | d7e03596f8bf1e886e984c0ea98334af878a15e2 | enthought/Meta,gutomaia/Meta | meta/bytecodetools/print_code.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nSQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']\n\nACCESS_TOKEN = os.environ['ACCESS_TOKEN']\nPAGE_ID = os.environ['PAGE_ID']\nAPP_ID = os.environ['APP_ID']\nVERIFY_TOKEN = os.environ['VERIFY_TOKEN']\n\n```\n\nApply this c... | python | edit | 1 | 0 | mit | 0812ec319291b709613152e9e1d781671047a428 | Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom chainer.functions.loss import crf1d\nfrom chainer import link\nfrom chainer import variable\n\n\nclass CRF1d(link.Link):\n\n \"\"\"Linear-chain conditional random field loss layer.\n\n This link wraps the :func:`~chainer.function... | python | edit | 1 | 1 | mit | 32e83559e00b7d5a363585d599cd087af854c445 | keisuke-umezawa/chainer,hvy/chainer,okuta/chainer,niboshi/chainer,niboshi/chainer,okuta/chainer,chainer/chainer,chainer/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,okuta/chainer,pfnet/chainer,tkerola/chainer,wkentaro/chainer,chainer/chainer,okuta/chainer,hvy/chainer,niboshi/chainer,hvy/chainer,chainer/chain... | chainer/links/loss/crf1d.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom .models import Experiment\nfrom UserManager.models import WorkbenchUser\nfrom django.contrib.auth.models import User\nfrom django.test import Client\n\n\nclass ExperimentTestCase(TestCase):\n def se... | python | edit | 1 | 1 | mit | 21149eb8d128c405d0b69991d1855e99ced951c7 | MOOCworkbench/MOOCworkbench,MOOCworkbench/MOOCworkbench,MOOCworkbench/MOOCworkbench | ExperimentsManager/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom itertools import chain\nfrom itertools import imap\n\nimport karld\n\nfrom karld.path import i_walk_csv_paths\n\n\ndef main():\n \"\"\"\n Consume many csv files as if one.\n \"\"\"\n i... | python | edit | 1 | 2 | apache-2.0 | a23a1050501563889c2806a514fe2994a2ebe3a8 | johnwlockwood/stream_tap,johnwlockwood/karl_data,johnwlockwood/stream_tap,johnwlockwood/iter_karld_tools | example/consume_many_csv_files.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport logging\nimport argparse\n\nimport emission.net.ext_service.push.notify_usage as pnu\n\nif __name__ == '__main__':\n logging.basicConfig(level=logging.DEBUG)\n parser = argparse.ArgumentParser(prog=\"silent_ios_pus... | python | edit | 3 | 0 | bsd-3-clause | ca5c3648ad5f28090c09ecbbc0e008c51a4ce708 | sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server | bin/push/silent_ios_push.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n pyexcel.internal\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Pyexcel internals that subjected to change\n\n :copyright: (c) 2015-2017 by Onni Software Ltd.\n :license: New BSD License\n\"\"\"\nfrom lml.loader imp... | python | edit | 4 | 0 | bsd-3-clause | 8214d516b3feba92ab3ad3b1f2fa1cf253e83012 | chfw/pyexcel,chfw/pyexcel | pyexcel/internal/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numpy import where\n\n\n__all__ = ('sign2bin', 'bin2sign', 'hopfield_energy')\n\n\ndef sign2bin(matrix):\n return where(matrix == 1, 1, 0)\n\n\ndef bin2sign(matrix):\n return where(matrix == 0, -1, 1)\n\n\ndef hopfield_energy(wei... | python | edit | 3 | 1 | mit | 29384b927b620b7e943343409f62511451bb3059 | stczhc/neupy,stczhc/neupy,itdxer/neupy,itdxer/neupy,stczhc/neupy,stczhc/neupy,itdxer/neupy,itdxer/neupy | neupy/algorithms/memory/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCPWeb - A collection of commonly used routines to produce CoolProp's online documentation\n=====\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport codecs\nimport csv\nimport cStringIO\n\n\ndef get... | python | edit | 1 | 1 | mit | f4bbb244716f9471b520f53ebffaf34a31503cd1 | CoolProp/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,henningjp/CoolProp,henningjp/CoolProp,henningjp/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,CoolProp/CoolProp | Web/scripts/CPWeb/__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.