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# enable: W9401,W9402\n\n#A comment does not begin with a whitespace.\n\na = 1 + 2 # A comment begins with two whitespace.\n\n# a comment begins with a lowercase letter.\n\n# Good comment examples.\n\n# A sentence that spans multiple line...
python
edit
1
0
mit
743064dbe22e40928c50817417077b8d52de641c
twisted/twistedchecker
twistedchecker/functionaltests/comments.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom google.appengine.api import users\nfrom google.appengine.ext import db\n\nfrom model import User\n\n@db.transactional\ndef create_user(google_user):\n user = User(\n google_user=google_user\n )\n user.put()\n return ...
python
edit
1
3
mit
a3c68f6f70a2d4d1ecdcdb982eda9ec15fa4c127
youtify/newscontrol,studyindenmark/newscontrol,studyindenmark/newscontrol,youtify/newscontrol
utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport itertools\nimport re\nfrom md5 import md5\n\npuzzle_input = 'abc' # 'yjdafjpo'\n\ndef key(n):\n return md5(puzzle_input + str(n)).hexdigest()\n\ndef otp_keys(horizon):\n lookahead = {k: -1 for k in '0123456789abcdef'}\n...
python
edit
2
6
mit
9f8b555698471987a5a635f69fa0ad68a4b28134
amalloy/advent-of-code-2016
14/src.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\n\n\nclass Discussion(models.Model):\n user = models.ForeignKey(User)\n name = models.CharField(max_length=255)\n slug = models.SlugField()\n\n def __unic...
python
edit
1
1
bsd-2-clause
12aaf389356966e7f82c4a588e0ae888073da8dd
incuna/django-discussion,incuna/django-discussion,lehins/lehins-discussion,lehins/lehins-discussion,lehins/lehins-discussion
discussion/models.py
rejected_duplicate
Near-duplicate of sample 7912
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015-present Scikit Flow Authors. 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 t...
python
edit
5
1
apache-2.0
aabf28c02a4dff593e5e4b156052adb9b81a70c7
handroissuazo/tensorflow,elingg/tensorflow,awni/tensorflow,aselle/tensorflow,theflofly/tensorflow,ishay2b/tensorflow,XueqingLin/tensorflow,DavidNorman/tensorflow,odejesush/tensorflow,taknevski/tensorflow-xsmm,AndreasMadsen/tensorflow,Kongsea/tensorflow,hfp/tensorflow-xsmm,jhaux/tensorflow,JingJunYin/tensorflow,tensorfl...
skflow/ops/tests/test_dropout_ops.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom os.path import dirname, join\n\nfrom setuptools import find_packages, setup\n\nfrom channels_redis import __version__\n\n# We use the README as the long_description\nreadme = open(join(dirname(__file__), \"README.rst\")).read()\n\ncryp...
python
edit
1
0
bsd-3-clause
0e83eff1b63eeb5203b4abc55e6278fc411567ae
django/asgi_redis
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\nimport os\nfrom distutils.core import setup\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))\n\nsetup(\n name='d...
python
edit
1
0
isc
29600a6a8e8fa17e1c5b9f53dde57167450cbf4d
Pawamoy/django-zxcvbn-password,Pawamoy/django-zxcvbn-password,Pawamoy/django-zxcvbn-password
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\nfrom setuptools import setup, find_packages\nfrom tornado_redis_sentinel import __version__\n\ntests_require = [\n 'mock',\n 'nose',\n 'coverage',\n 'yanc',\n 'preggy',\n '...
python
edit
1
0
mit
da765334ffbc87c5cc20c8b3cdf7e31768c97bf7
ms7s/tornado-redis-sentinel
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# This file is part of gruvi. Gruvi is free software available under the terms\n# of the MIT license. See the file \"LICENSE\" that was provided together with\n# this source file for the licensing terms.\n#\n# Copyright (c) 2012 the gruv...
python
edit
1
0
mit
565c66982965c5abbc88083fa505efb4ce8a92c0
swegener/gruvi,geertj/gruvi,geertj/gruvi,swegener/gruvi
setup.py
rejected_duplicate
Near-duplicate of sample 485
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nwith open('README.rst') as file:\n long_description = file.read()\n\nsetup(name='parmap',\n version='1.5.1.9000',\n description=('map and starmap implementations passing ...
python
edit
1
0
apache-2.0
d4feda3b91585576708f56ebc8f2c8592f877e2c
zeehio/parmap
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(name = 'OWSLib',\n version = '0.1.0',\n description = 'OGC Web Service utility library',\n license = 'GPL',\n keywords = 'gis ogc ows wfs wms capabiliti...
python
edit
1
0
bsd-3-clause
af406d09ded10dbdfcc1d752f1cfe1d4bfe8f7d5
daf/OWSLib,datagovuk/OWSLib,kalxas/OWSLib,bird-house/OWSLib,kwilcox/OWSLib,datagovuk/OWSLib,KeyproOy/OWSLib,Jenselme/OWSLib,b-cube/OWSLib,QuLogic/OWSLib,robmcmullen/OWSLib,geopython/OWSLib,daf/OWSLib,jaygoldfinch/OWSLib,mbertrand/OWSLib,ocefpaf/OWSLib,tomkralidis/OWSLib,dblodgett-usgs/OWSLib,JuergenWeichand/OWSLib,daf/...
setup.py
rejected_duplicate
Near-duplicate of sample 11757
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport imp\nfrom setuptools import find_packages\n\ntry:\n from restricted_pkg import setup\nexcept:\n # allow falling back to setuptools only if\n # we are not trying to upload\n if 'upload' in sys.argv:\...
python
edit
1
0
mit
9260852d12ca686843ba30f3786b542e6418e4ff
gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nSetup file for toolaudit.\n\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(filename):\n \"\"\"\n Read the contents ...
python
edit
1
1
mit
7db466f94fbca57482947fa982f56ae77b11f9fa
jstutters/toolaudit
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Package Keysmith.\"\"\"\n\n\nimport codecs\nimport os.path\n\nimport setuptools # type: ignore\n\nimport keysmith # This project only depends on the standard library.\n\n\ndef read(*parts):\n \"\"\"Read a file in this repository....
python
edit
1
1
bsd-3-clause
5b2691dcc89fb9d9b7b1db77e9512976950adf45
dmtucker/keysmith
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport populous\n\nrequirements = [\n \"click\",\n]\n\nsetup(\n name=\"populous\",\n version=populous.__version__,\n url=populous.__url__,\n description=populous.__doc__,\n au...
python
edit
1
0
mit
05ed915cab57ec8014a4d4636687132694171218
novafloss/populous
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 = 'thespian',\n version = '2.1.4',\n description = 'Python Actor concurrency library',\n author = 'Kevin Quick',\n author_email = '<EMAIL>',\n url = 'http://thes...
python
edit
1
0
mit
0ba4eb026c34b85e0413bc83015398eeb33e6547
kquick/Thespian,godaddy/Thespian,kquick/Thespian,godaddy/Thespian
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport io\n\n# Take from Jeff Knupp's excellent article:\n# http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/\n\ndef read(*filenames, **kwargs):\n encoding = kwargs.get('...
python
edit
1
2
mit
6edb67deeb3f19b3b5d24e262afc266ce2cb7600
durden/dayonetools
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\nfrom setuptools import setup\n\n\n# Get long description (used on PyPI project page)\ndef get_long_description():\n try:\n # Use pandoc to create reStructuredText README if possible\n ...
python
edit
1
2
mit
edd54a7e34fdce5268ef1d15bd04b09e724a8508
caleb531/alfred-workflow-packager
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport sys\n\n\nwith open('README.md') as f:\n readme = f.read()\n\ninstall_requires = [\n 'seria',\n 'python-gnupg'\n]\n\nsetup(\n name='figgypy',\n versi...
python
edit
3
0
mit
be8ea4018641cf79a347f2da04b078e725b0801e
theherk/figgypy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\n\n# Install setuptools if not installed.\ntry:\n import setuptools\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n\nfrom setuptools import setup, find_packages\n\n\n# read README as t...
python
edit
2
0
bsd-3-clause
bc687afb9421d61afe95f1c3a444e6c91971a113
UDST/spandex,SANDAG/spandex
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 = 'django-news-sitemaps',\n version = '0.1.7',\n description = 'Generates sitemaps compatible with the Google News schema',\n author = 'TWT Web Devs',\n author_emai...
python
edit
1
0
apache-2.0
e91d22d34027429f7d0db86d2800ba9ed73056be
theatlantic/django-news-sitemaps
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n__version__ = '0.1'\n\nHERE = os.path.dirname(__file__)\n\ntry:\n long_description = open(os.path.join(HERE, 'README.rst')).read()\nexcept:\n long_description = None\n\nsetup(\...
python
edit
1
1
mit
5c0c0a86827ec6d2b8ece7cffddec3afbfcf72b6
laterpay/rubberjack-cli
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\nVERSION = '0.0.1'\n\n\ntest_requirements = [\n 'nose>=1.3.7',\n 'responses>=0.5.1'\n]\n\ninstall_requires = test_requirements + [\n 'requests>=2.4.3',\n]\n\nsetup(\n name=\"...
python
edit
1
0
mit
d8de5888e4519ba32d63d5f31aa4806d81c37399
gabalese/mondo-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nbase_dir = os.path.dirname(__file__)\nsetup(\n name='elastalert',\n version='0.0.99',\n description='Runs custom filters ...
python
edit
1
0
apache-2.0
42043217547f05eb1652d481840d15b581b80434
Yelp/elastalert,jetyang2005/elastalert,jetyang2005/elastalert,jetyang2005/elastalert,dvopsway/elastalert,rprabhat/elastalert
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom distutils import sysconfig\nimport re\n#from setuptools.dist import Distribution\n\nsite_packages_path = sysconfig.get_python_lib()\nsprem = re.match(\n r'.*(lib[\\\\/](python\\d\\.\\d[\\\\/])?site-pack...
python
edit
2
0
bsd-2-clause
96499391091a81302ac3947536b573c21f571677
dougn/coverage_pth
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nwith open('README.md') as readme:\n with open('HISTORY.md') as history:\n long_description = readme.read() + '\\n\\n' + history.read()\n\nVERSION = '1.0'\n\nsetup(\n name='argparse-autogen',\...
python
edit
1
0
mit
a1a651acf48604ab135961b324d3b9e271a2128b
sashgorokhov/argparse-autogen
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup\nfrom ipyrmd import __version__\n\nsetup(name=\"ipyrmd\",\n version=__version__,\n description=\"Convert between IPython/Jupyter notebooks and RMarkdown\",\n author=\"Gor...
python
edit
1
0
mit
61f9f96645daaa42369b86f2af9404f3d228b22e
chronitis/ipyrmd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name = 'skeleton',\n version = '0.0',\n description = 'A python skeleton project',\n long_description = '''\nThis project represents a basic python skeleton p...
python
edit
1
0
bsd-2-clause
e5e6d4ac9e86aa7e44694cf4746c4c9ec91df107
arlaneenalra/python-skeleton
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nversion = __import__('eemeter').get_version()\n\n\nsetup(\n name='eemeter',\n version=version,\n description='Open Energy Efficiency Meter',\n long_description=(\n \"Standard...
python
edit
1
0
apache-2.0
bdee28d919458449d882df352ed6e2d675b87901
openeemeter/eemeter,openeemeter/eemeter
setup.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.2',\n 'botocore>=1.4.8,<2.0.0',\n 'virtualenv>=1...
python
edit
1
0
apache-2.0
4a7a7a0b558358840440f937a03dcc88e469ca01
freaker2k7/chalice,awslabs/chalice
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright (c) 2011 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"A tool to package a checkout's source and up...
python
edit
1
5
bsd-3-clause
0ef968528f31da5dd09f016134b4a1ffa6377f84
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/slave/chromium/package_source.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Take the output of the BitFunnel correlate command and generate histograms.\n\nfrom collections import defaultdict\nimport csv\n\nterm_term_correlation = defaultdict(int)\nterm_all_correlation = defaultdict(int)\n\n# TODO: don't hardcode ...
python
edit
1
5
mit
6c8dd596a0f5f84acee54938d2f948f25445327d
danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel
src/Scripts/correlation-histogram.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqjobs.utils import get_jobs_from_module\n\nimport logging\nlogger = logging.getLogger('sqjobs.contrib.django.utils')\n\n\ndef get_apps_names():\n \"\"\"\n copied from django-extensions compatibility sheam\n \"\"\"\n try:\n...
python
edit
1
4
bsd-3-clause
55dc12dcac51109b4974c58252929066ca985569
gnufede/sqjobs,gnufede/sqjobs
sqjobs/contrib/django/djsqjobs/finders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cv2\nimport itertools\nimport numpy as np\n\ndef partition(pred, iterable):\n \"\"\"\n Partition the iterable into two disjoint entries based\n on the predicate.\n\n @return: Tuple (iterable1, iterable2)\n \"\"\"\n iter1, iter2...
python
edit
1
1
mit
962fc49f734b04e717bf936745013ab0c19c4ee1
viswanathgs/dist-dqn,viswanathgs/dist-dqn
utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.http import FileResponse, HttpRequest, HttpResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.functional import cached_property\nfrom django.views.generic import TemplateView\n\nfrom pretix....
python
edit
1
4
apache-2.0
1016664a5d0285a51455f90d47940b39f77562e4
Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix
src/pretix/base/views/cachedfiles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding=utf8\nfrom lxml import html\n\n\ndef _recursive_convert(element):\n # All strings outside tags should be ignored\n if not isinstance(element, html.HtmlElement):\n return\n\n fragment_root_element = {\n '_':...
python
edit
1
6
mit
24f69b587ce38c581f9ee68e22978963b266f010
mercuree/html-telegraph-poster
html_to_telegraph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\nimport sys\nfrom pip._internal.req import parse_requirements\nfrom pip._internal.download import PipSession\nfrom pip._vendor import pkg_resources\nfrom pip._vendor.six import print_\n\nrequirements = [...
python
edit
1
0
mit
917ba14418f01fa2fc866fc1c18989cc500c2cfd
pivotal/LicenseFinder,pivotal/LicenseFinder,pivotal/LicenseFinder,pivotal/LicenseFinder,pivotal/LicenseFinder,pivotal/LicenseFinder,pivotal/LicenseFinder
bin/license_finder_pip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_, raises\nfrom mock import MagicMock, patch\n\nfrom buffer.models.link import Link\n\ndef test_links_shares():\n '''\n Test link's shares retrieving from constructor\n '''\n\n mocked_api = MagicMock()\n mock...
python
edit
4
1
mit
973c6a541deadb5a4b7c23dae191acf9d4c1be27
bufferapp/buffer-python,vtemian/buffpy
buffer/tests/test_link.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 rospy\nimport socket\nfrom statistics.msg import StatsD\n\nclass StatsHandler():\n def __init__(self, statsd_host, statsd_port):\n self.statsd_target = (statsd_host, statsd_port)\n self.sock = socket.s...
python
edit
2
1
apache-2.0
2d6babf3bf6107b8a5c42fe76a4d17d7fa0b51f6
EndPointCorp/appctl,EndPointCorp/appctl
catkin/src/statistics/scripts/listener.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nAutocompletion example that shows meta-information alongside the completions.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom prompt_toolkit.contrib.completers import WordCompleter\nfrom prompt_toolki...
python
edit
1
1
bsd-3-clause
9d5300f6688038ca59b07ed4033c8768658377c6
jonathanslenders/python-prompt-toolkit
examples/prompts/multi-column-autocompletion-with-meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" OpenstackDriver for Network\n based on NetworkDriver\n\"\"\"\n\nfrom neutronclient.v2_0 import client\nfrom network_driver import NetworkDriver\n\n\nclass OpenstackNetWorkDriver(NetworkDriver):\n \"\"\"docstring for OpenstackNe...
python
edit
1
1
apache-2.0
fbf42c288a6faa13ac918047eac09985cbd6f6e0
cloudcomputinghust/CAL
cal/v1/network/drivers/openstack_network.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setupbase import create_cmdclass, install_npm\n\ncmdclass = create_cmdclass(['js'])\ncmdclass['js'] = install_npm()\n\nsetup_args = dict(\n name = '{{cookiecutter.extension_name}}',\n ...
python
edit
1
0
cc0-1.0
3ba549b00e4ee8491e9adab7baa36e27edd45fa9
jupyterlab/mimerender-cookiecutter,gnestor/mimerender-cookiecutter,jupyterlab/mimerender-cookiecutter,gnestor/mimerender-cookiecutter
{{cookiecutter.extension_name}}/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nNOSQL = any([name in (os.getenv(\"DB\") or \"\")\n for name in (\"datastore\", \"mongodb\", \"imap\")])\n\nif NOSQL:\n from test_dal_nosql import *\nelse:\n from sql import *\n\n```\n\nApply this change: Fix wr...
python
edit
3
0
bsd-3-clause
9a061d7b13482046509c6c231b0018a600cb9155
niphlod/pydal,willimoa/pydal,kmcheung12/pydal,manuelep/pydal,stephenrauch/pydal,michele-comitini/pydal,web2py/pydal
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom gensim import matutils\nfrom gensim.corpora import Dictionary\n\n\nclass BaseVectorizer:\n \"\"\"Base class for vectorization objects. \"\"\"\n name = NotImplemented\n\n def transform(self, corpus, copy=Tru...
python
edit
3
3
bsd-2-clause
10ae884bd68feca56b3893b84221b867f3b0aec3
cheral/orange3-text,cheral/orange3-text,cheral/orange3-text
orangecontrib/text/vectorization/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for temperature conversions in lesson 4." }, { "role": "assistant", "content": "import unittest\n\nfrom lessons.lesson_4_temperature import temperature\n\n\nclass CtoFTestCase(unittest.TestCase):\n def test_handles_f...
python
new_file
1
1
mit
f182bb2dd76483891148476b14ccad08a596b080
thejessleigh/test_driven_python,thejessleigh/test_driven_python,thejessleigh/test_driven_python
tests/test_lesson_4_temperature.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add periodicity of script\n\nRevision ID: 147d1de2e5e4\nRevises: \nCreate Date: 2019-04-19 18:48:33.526449\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\n# revision identifiers, used by Alembic.\nrevision = '147d1de2e...
python
edit
1
1
mit
5ebe17f5dc88fef7718d2c3665b905cc8d7fab7c
e-henry/scripto,e-henry/scripto,e-henry/scripto,e-henry/scripto
alembic/versions/147d1de2e5e4_add_periodicity_of_script.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
python
edit
1
1
apache-2.0
72c00dca2c8310744c424296d8f712909bc95b95
samueldmq/infosystem
infosystem/subsystem/capability/entity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'oshi_rest_server.views.home', name='home'),\n # url(r'^blog/'...
python
edit
1
0
isc
b07037277b28f80aaa6d6f74d6f79d4146b5ee23
ferrarimarco/OSHI-REST-server,ferrarimarco/OSHI-REST-server
oshi_rest_server/oshi_rest_server/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module contains the methods for the ``openxc-dump`` command line program.\n\n`main` is executed when ``openxc-dump`` is run, and all other callables in this\nmodule are internal only.\n\"\"\"\nfrom __future__ import absolute_im...
python
edit
1
2
bsd-3-clause
ca6a758f525c741f277e7e7be115b5b9d20fa5c1
openxc/openxc-python,openxc/openxc-python,openxc/openxc-python
openxc/tools/dump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture(autouse=True)\ndef platform(request):\n marker = request.node.get_marker('platform')\n if marker:\n expected = marker.args[0]\n minion = request.getfuncargvalue('minion')\n platf...
python
edit
1
6
mit
83c64e096ff8b79e2ae22edbcabb483dcf27302f
dincamihai/salt-toaster,dincamihai/salt-toaster
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport subprocess\n\n\nclass DefaultRepositoryHandler():\n def __init__(self, cwd):\n self.cwd = cwd\n\n def repository_exists(self, path):\n return os.path.exists(path + os.path.sep + '.git')\n\n def ...
python
edit
3
2
bsd-3-clause
b910900f72d6b25cb05c56563968aad102429c25
solarnz/polygamy,solarnz/polygamy
gmrh/RepositoryHandler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015-2016 Masayuki Yamamoto\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
3
apache-2.0
ef41e90cf49856a6d0ca1b363440edb542dd2e0d
ma8ma/yanico
tests/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef missing_openmm(*args, **kwargs):\n raise RuntimeError(\"Install OpenMM to use this feature\")\n\ntry:\n import simtk.openmm\n import simtk.openmm.app\nexcept ImportError:\n HAS_OPENMM = False\n Engine = missing_openmm\n ...
python
edit
16
1
mit
72e509be8415e628613b2341c136018ff5bb0f44
openpathsampling/openpathsampling,dwhswenson/openpathsampling,openpathsampling/openpathsampling,choderalab/openpathsampling,openpathsampling/openpathsampling,choderalab/openpathsampling,dwhswenson/openpathsampling,dwhswenson/openpathsampling,choderalab/openpathsampling,openpathsampling/openpathsampling,dwhswenson/openp...
openpathsampling/engines/openmm/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest that lldb command \"command source\" works correctly.\n\nSee also http://llvm.org/viewvc/llvm-project?view=rev&revision=109673.\n\"\"\"\n\nimport os, time\nimport unittest2\nimport lldb\nfrom lldbtest import *\n\nclass CommandS...
python
edit
6
1
apache-2.0
3f5e90a19881884408003ed01b04b4a29b3bd2fd
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
test/command_source/TestCommandSource.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Time: O(n)\n# Space: O(1)\n\n# Given an array of integers, 1 <= a[i] <= n (n = size of array),\n# some elements appear twice and others appear once.\n# Find all the elements that appear twice in this array.\n# Could you do it without ext...
python
edit
2
5
mit
5a1c48403a912eedc4f5d87215fafdb05eb49ed5
kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015
Python/find-all-duplicates-in-an-array.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass State(object):\n def __init__(self, ix):\n self.index = ix\n self.link = None # placeholder, not None if Snake or Ladder\n\n def process(self):\n \"\"\"Action when landed upon\"\"\"\n if self.link:\n...
python
edit
2
3
cc0-1.0
73243dc74b416fc42ccb8b684924f0b2a09919a3
robclewley/DataScotties
SnakesLadders/SnakesLadders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# stdlib\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom typing import Any\nfrom typing import Optional\nfrom typing import Union\n\n# third party\nfrom jose import jwt\nfrom passlib.context import CryptContext\n\n# gri...
python
edit
1
2
apache-2.0
f3be5184dfccdcbbf5b95c7fcd75fbbda8d2ce1c
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/grid/backend/grid/core/security.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first tests. disk and ring masks for simple cases." }, { "role": "assistant", "content": "\"\"\"Check ringtophat results against scipy.ndimage.convolve\"\"\"\nimport unittest\nfrom numpy.testing import assert_equal, assert_al...
python
new_file
3
1
bsd-3-clause
5d6b384a2f1b8caa9421b428e5d81aaa1d9a82e1
gammapy/ringtophat,gammapy/ringtophat
tests/correct.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python3\n\nimport sys\nimport os\nimport math\nfrom astropy.io import fits\n\ninputFolder = sys.argv[1]\noutputFolder = sys.argv[2]\neLo = int(sys.argv[3])\neHi = int(sys.argv[4])\nbinSize = int(sys.argv[5])\n\n\nfnames = os.lis...
python
edit
1
0
mit
2974972ce36f1cd2dec99a18edc49ac374cdf458
fauzanzaid/IUCAA-GRB-detection-Feature-extraction
tools/fitsevt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Package for regression testing of the blender nif scripts.\"\"\"\n\nimport bpy\n\ndef setup(self):\n \"\"\"Enables the nif scripts addon, so all tests can use it.\"\"\"\n bpy.ops.wm.addon_enable(module=\"io_scene_nif\")\n\ndef t...
python
edit
1
2
bsd-3-clause
145a72dc8439d4479b64a79e7c94cbc12f4afdd7
amorilia/blender_nif_plugin,nightstrike/blender_nif_plugin,amorilia/blender_nif_plugin,nightstrike/blender_nif_plugin
test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\n\nfrom flexget import plugin\n\n\nclass TestInterfaces(object):\n \"\"\"Test that any pl...
python
edit
1
2
mit
a4e959c1aeb705128898f07bdf9c9fb315ba593c
malkavi/Flexget,tobinjt/Flexget,jacobmetrick/Flexget,jawilson/Flexget,tobinjt/Flexget,LynxyssCZ/Flexget,malkavi/Flexget,qk4l/Flexget,OmgOhnoes/Flexget,JorisDeRieck/Flexget,gazpachoking/Flexget,crawln45/Flexget,jacobmetrick/Flexget,jawilson/Flexget,jacobmetrick/Flexget,tobinjt/Flexget,poulpito/Flexget,JorisDeRieck/Flexg...
flexget/tests/test_plugin_interfaces.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"filter_fasta_on_length.py \n\nFilter a fasta file so that the resulting sequences are all longer \nor equal to the length threshold parameter. Only accepts stdin.\"\"\"\n\nimport argparse\nimport sys\nfrom Bio i...
python
edit
1
7
mit
c3ca44b17b9e14e8570083ab49be4da8e64757bc
EnvGen/toolbox,EnvGen/toolbox
scripts/filter_fasta_on_length.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.admin import ModelAdmin, register\nfrom django.contrib.gis.admin import GeoModelAdmin\nfrom weather.models import WeatherStation, Location\n\n\n@register(Location)\nclass LocationAdmin(GeoModelAdmin):\n openlayers_url...
python
edit
1
0
bsd-3-clause
1975d5391f058f85272def4435b243440b72bff6
parksandwildlife/resource_tracking,parksandwildlife/resource_tracking,parksandwildlife/resource_tracking,ropable/resource_tracking,ropable/resource_tracking,ropable/resource_tracking
weather/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ckan.plugins import toolkit as tk\n\n\ndef qa_openness_stars_resource_html(resource):\n qa = resource.get('qa')\n if not qa:\n return '<!-- No qa info for this resource -->'\n extra_vars = qa\n return tk.literal(\n ...
python
edit
1
2
mit
91c502beb68acff1ad5194a572d5b75f607b7d00
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
ckanext/qa/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unicodedata\nimport urllib\n\n\ndef normalize(name):\n if not isinstance(name, unicode):\n name = name.decode('utf-8')\n\n return unicodedata.normalize('NFKC', name.replace(\"'\", '')).encode('utf-8')\n\n\ndef quote(name...
python
edit
3
3
mit
b2d654cf2af71b608d81c6501b214a9b330e1ffe
PuckCh/battlenet,vishnevskiy/battlenet
battlenet/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nZorp\n\"\"\"\n\nfrom zorp.client import Client\nfrom zorp.decorator import remote_method\nfrom zorp.server import Server\n\n```\n\nApply this change: Add TriesExceededException to the base package" }, { "role": "assistant", ...
python
edit
6
0
mit
99b1edfcc317dbb71b8dad9ad501aaa21f8044f9
proxama/zorp
zorp/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.trial import unittest\n\nimport ooni.errors\n\nclass TestErrors(unittest.TestCase):\n\n def test_catch_child_failures_before_parent_failures(self):\n \"\"\"\n Verify that more specific Failures are caught first...
python
edit
1
3
bsd-2-clause
e57d8f885c2be591bcfa7b5f337495cdb2e6ce64
0xPoly/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe
ooni/tests/test_errors.py
rejected_duplicate
Near-duplicate of sample 7365
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom risk_engine import RiskEngine\nimport unittest\n\nclass RiskEngineTestCase(unittest.TestCase):\n\n def setUp(self):\n self.engine = RiskEngine()\n\n def test_roll_is_near_even(self):\n n = 1000000 \n payout_count = 0\n fo...
python
edit
1
4
mit
3c8f7752a6b47a8ce5395b9038a9280fe0369aae
joelklabo/risk
risk_engine_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom app import serve\n\n\nclass PageCase(unittest.TestCase):\n def setUp(self):\n serve.app.config['TESTING'] = True\n self.app = serve.app.test_client()\n\n def test_index_load(self):\n self.p...
python
edit
1
1
mit
3d97a2ca6c4c285d59e3c823fbee94a494e85ba0
albertyw/base-flask,albertyw/base-flask,albertyw/base-flask,albertyw/base-flask
app/tests/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport ctypes\nimport doctest\n\nfrom numba import *\nimport numba\n\ntry:\n import cffi\n ffi = cffi.FFI()\nexcept ImportError:\n ffi = None\n\n# ______________________________________________________________________\n\...
python
edit
8
2
bsd-2-clause
cec7922ad7636f62be864d115f8e341ac511bbc9
stefanseefeld/numba,jriehl/numba,IntelLabs/numba,stonebig/numba,gmarkall/numba,numba/numba,GaZ3ll3/numba,stefanseefeld/numba,numba/numba,IntelLabs/numba,cpcloud/numba,sklam/numba,cpcloud/numba,IntelLabs/numba,shiquanwang/numba,stuartarchibald/numba,sklam/numba,pitrou/numba,gdementen/numba,gmarkall/numba,seibert/numba,s...
numba/tests/foreign_call/test_cffi_call.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom urlparse import urljoin\nimport requests\n\n# project\nfrom checks import AgentCheck\n\nclass Veneur(AgentCheck):\n\n VERSION_METRIC_NAME = 'veneur.deployed_version'\n BUILDAGE_METRIC_NAME = 'veneur.build_age'\n ...
python
edit
1
3
mit
6e2dae94239252f6b0338e609a838fa31e417842
stripe/stripe-datadog-checks,stripe/datadog-checks
checks.d/veneur.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\...
python
edit
2
9
bsd-3-clause
84b27afce57232bc0c8170eaad1beb26fd96eef0
dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dar...
tools/gyp/find_mac_gcc_version.py
rejected_duplicate
Near-duplicate of sample 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2018-11-12 17:18\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, connection\n\n\ndef reverse_func(state, schema):\n with connection.cursor() as curso...
python
edit
1
0
apache-2.0
1a089ec6f34ebf81b4437b6f541ee2b9f4b85966
cslzchen/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,felliott/osf.io,baylee-d/osf.io,mattclark/osf.io,mfraezz/osf.io,aaxelb/osf.io,felliott/osf.io,mfraezz/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,mattclark/osf.io,adlius/osf.io,saradbowman/osf.io,adlius/osf.i...
osf/migrations/0145_pagecounter_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport sys\nimport os\nimport glob\n\nsys.path.append(os.path.join(sys.path[0], '../../'))\nfrom instabot import Bot\n\nposted_pic_list = []\ntry:\n with open('pics.txt', 'r') as f:\n posted_pic_list = f.read().splitl...
python
edit
1
0
apache-2.0
e83019f67a3c93efac27566666bcff5eb0d2a0da
instagrambot/instabot,ohld/instabot,instagrambot/instabot
examples/autopost/auto_post.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .converter_base import DatatypeConverterBase\nimport dateutil\n\ndef _str_to_datetime(java_obj, idx):\n return dateutil.parser.parse(java_obj.getString(idx))\n\n\n_typename_to_converter_fxn = {'timestamp': _str_to_datetime}\n\n\ncla...
python
edit
1
3
apache-2.0
cc00cc1c2539eb7dbeed2656e1929c8c53c4dd98
mozafari/verdict,mozafari/verdict,mozafari/verdict,mozafari/verdict,mozafari/verdict
pyverdict/pyverdict/datatype_converters/impala_converter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n nbttreewidget\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport logging\n\nfrom PySide import QtGui\nfrom PySide.QtCore import Qt\n\nfrom mcedit2.widgets.nbttree.nbttreemodel imp...
python
edit
1
1
bsd-3-clause
17c9256000f78fd8fc52f86729dcbb39cb80b3a3
Rubisk/mcedit2,Rubisk/mcedit2,vorburger/mcedit2,vorburger/mcedit2
src/mcedit2/widgets/nbttree/nbttreeview.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nspdypy.connection\n~~~~~~~~~~~~~~~~~\n\nContains the code necessary for working with SPDY connections.\n\"\"\"\n# Define some states for SPDYConnections.\nNEW = 'NEW'\n\nclass SPDYConnection(object):\n \"...
python
edit
1
1
mit
050394cc0c228edf8ac9c3ea6f2001d36d874841
Lukasa/spdypy
spdypy/connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n'''This adds a \"slugify\" command to be invoked by Sublime Text. It is made\navailable as \"Slugify\" in the command palette by Default.sublime-commands.\nParts of these commands are borrowed from the sublime-slug pack...
python
edit
3
4
mit
fdfb2b1da5e7cea83bd4189bb9d998273c03a7cd
alimony/sublime-slugify
SlugifyCommand.py
rejected_duplicate
Near-duplicate of sample 3180
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pyinfra\n# File: pyinfra/pseudo_modules.py\n# Desc: essentially a hack that provides dynamic imports for the current deploy (CLI only)\n\nimport sys\nimport pyinfra\n\n\nclass PseudoModule(object):\n _module = None\n\n def __getattr...
python
edit
1
2
mit
e3a298bcbe0eac1d2a0ade13244b0f3650bd6c49
Fizzadar/pyinfra,Fizzadar/pyinfra
pyinfra/pseudo_modules.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#coding=utf8\n\nfrom whacked4 import config\nfrom whacked4.ui import windows\n\n\nclass StartDialog(windows.StartDialogBase):\n \"\"\"\n This dialog is meant to be displayed on startup of the application. It all...
python
edit
1
2
bsd-2-clause
f5f4397d026678570ad271e84099d2bcec541c72
GitExl/WhackEd4,GitExl/WhackEd4
whacked4/whacked4/ui/dialogs/startdialog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport six\n\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\n\n@six.python_2_unicode_compatible\nclass ImagerProfile(models.Model):\n user = models.OneToOneField(User)\n fav_camera = models.CharField(max_...
python
edit
1
1
mit
16742262b6a37f34bf83b3b6d6bcfd72e69276b2
jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager
imagersite/imager_profile/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom jinja2.utils import Markup\nfrom pprint import pformat\nimport sys\nimport types\n\n\ndef global_node(node_value):\n \"\"\"\n Used for the inclusion of a node in a template.\n It just marks the node ...
python
edit
1
1
bsd-3-clause
079e347bf7f05e01824a6c05495b42015e672423
cr0cK/keepsimple.cms,cr0cK/keepsimple.cms,cr0cK/keepsimple.cms
keepsimplecms/jinja/globals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.template import RequestContext\nfrom django.template.loader import render_to_string\n\n\nclass BaseItem(object):\n template = 'wagtailadmin/edit_bird/base_item.html'\n\n @prope...
python
edit
3
7
bsd-3-clause
91faf4fd5fa3d5878e2792bcd87f81c261ec5033
takeflight/wagtail,FlipperPA/wagtail,stevenewey/wagtail,jorge-marques/wagtail,kurtw/wagtail,Pennebaker/wagtail,janusnic/wagtail,gogobook/wagtail,hamsterbacke23/wagtail,m-sanders/wagtail,mayapurmedia/wagtail,zerolab/wagtail,bjesus/wagtail,Tivix/wagtail,JoshBarr/wagtail,takeshineshiro/wagtail,chimeno/wagtail,benemery/wag...
wagtail/wagtailadmin/edit_bird.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.db import models\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom imagekit.models import ImageSpec\nfrom imagekit.processors import resize\n\nclass CalendarEvent(mod...
python
edit
1
0
mit
1d486d8035e918a83dce5a70c83149a06d982a9f
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/admin_calendar/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.mail import EmailMessage\n\nfrom notification.backends.base import NotificationBackend\n\n\nclass EmailBackend(NotificationBackend):\n slug = u'email'\n display_name = u'E-mail'\n ...
python
edit
1
3
mit
7fb284ad29098a4397c7ac953e2d9acb89cf089e
theatlantic/django-notification,theatlantic/django-notification
notification/backends/email.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Image Processing SciKit (Toolbox for SciPy)\"\"\"\n\n\nimport os.path as _osp\n\ndata_dir = _osp.join(_osp.dirname(__file__), 'data')\n\nfrom version import version as __version__\n\ndef _setup_test():\n import functools\n\n bas...
python
edit
2
2
bsd-3-clause
bd79e3741e03a25b17670f6529e4d98bb97fa3ae
dpshelio/scikit-image,emon10005/scikit-image,chriscrosscutler/scikit-image,jwiggins/scikit-image,almarklein/scikit-image,oew1v07/scikit-image,warmspringwinds/scikit-image,Britefury/scikit-image,ofgulban/scikit-image,vighneshbirodkar/scikit-image,ClinicalGraphics/scikit-image,paalge/scikit-image,blink1073/scikit-image,e...
scikits/image/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom socketio_client.manager import Manager\n\nimport gevent\nfrom gevent import monkey\nmonkey.patch_socket()\n\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n\nio = Manager('localhost', 8000, auto_connect=False)\nchat = io.soc...
python
edit
2
1
mit
005ff4e6584727ba6ca61b49a57621dd7f17cd6a
veo-labs/python-socketio-client
examples/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport rospy\nfrom std_srvs.srv import Empty\n\ndef service_client():\n rospy.loginfo('waiting service')\n rospy.wait_for_service('call_me')\n try:\n service = rospy.ServiceProxy('call_me', Empty)\n ...
python
edit
3
2
bsd-2-clause
5d65b35623d2dbdb518a6e4a7f95ec224bf879a1
OTL/ros_book_programs,OTL/ros_book_programs
ros_start/scritps/service_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport os\nfrom subprocess import check_output\nfrom sys import argv, stdout\n\nRSGRP = \"travistestresourcegroup\"\nSTACC = \"travistestresourcegr3014\"\n\ndef run(command):...
python
edit
5
2
mit
b28ceb8631446b57abb48be6c76db843ec747221
QingChenmsft/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,BurtBiel/azure-cli,BurtBiel/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,QingChenmsft/azure...
demo/set-sas-token.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_restful import Resource\n\nfrom pajbot.managers.redis import RedisManager\nfrom pajbot.managers.user import UserManager\nfrom pajbot.streamhelper import StreamHelper\n\n\nclass APIUser(Resource):\n @staticmethod\n def get(u...
python
edit
4
2
mit
3f7a9d900a1f2cd2f5522735815c999040a920e0
pajlada/tyggbot,pajlada/tyggbot,pajlada/pajbot,pajlada/pajbot,pajlada/pajbot,pajlada/tyggbot,pajlada/pajbot,pajlada/tyggbot
pajbot/web/routes/api/users.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add ckan boolean to mod table\n\nRevision ID: 35597d56e8d\nRevises: 18af22fa9e4\nCreate Date: 2014-12-12 20:11:22.250080\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '35597d56e8d'\ndown_revision = '18af22fa9e4'\n\...
python
edit
1
1
mit
ddfdddad65a96198d6949c138ad9980188250b92
Kerbas-ad-astra/KerbalStuff,Kerbas-ad-astra/KerbalStuff,toadicus/KerbalStuff,KerbalStuff/KerbalStuff,EIREXE/SpaceDock,ModulousSmash/Modulous,KerbalStuff/KerbalStuff,ModulousSmash/Modulous,ModulousSmash/Modulous,toadicus/KerbalStuff,ModulousSmash/Modulous,EIREXE/SpaceDock,EIREXE/SpaceDock,toadicus/KerbalStuff,Kerbas-ad-...
alembic/versions/35597d56e8d_add_ckan_boolean_to_mod_table.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport gevent.monkey\ngevent.monkey.patch_all()\n\nimport logging\n\nimport boto.gs.connection\nimport boto.gs.key\n\nimport cache\n\nfrom boto_base import BotoStorage\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass GSStorage(BotoSto...
python
edit
1
2
apache-2.0
89112aa8e5ffda6763db2f49a2d32cff5f6b15fd
depay/docker-registry,alephcloud/docker-registry,HubSpot/docker-registry,dhiltgen/docker-registry,catalyst-zero/docker-registry,ewindisch/docker-registry,hex108/docker-registry,scrapinghub/docker-registry,ewindisch/docker-registry,shipyard/docker-registry,mdshuai/docker-registry,OnePaaS/docker-registry,nunogt/docker-re...
lib/storage/gcs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom django.db.backends.postgresql_psycopg2.creation import DatabaseCreation as OriginalDatabaseCreation\n\n\nclass DatabaseCreation(OriginalDatabaseCreation):\n def _destroy_test_db(self, test_database_name, verbosity)...
python
edit
1
1
apache-2.0
293b1d492cfd3c5542c78acffbbdebf4933b6d85
jneight/django-db-geventpool,PreppyLLC-opensource/django-db-geventpool
django_db_geventpool/backends/postgresql_psycopg2/creation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom io import BytesIO\nfrom django.core.management import call_command\nfrom django.test import TestCase\nfrom mock import patch\n\nfrom contentstore.models import Schedule\nfrom seed_stage_based_messaging import test_utils as utils\n\n\nc...
python
edit
1
1
bsd-3-clause
e9a11dac0d125d90d5e0b1783b215b9007334d02
praekelt/seed-stage-based-messaging,praekelt/seed-stage-based-messaging,praekelt/seed-staged-based-messaging
contentstore/management/commands/tests/test_sync_schedules.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Helpers.string import *\n\ndef binop_aexp(commands, env, op, left, right):\n left.compile_vm(commands, env)\n right.compile_vm(commands, env)\n if op == '+':\n value = assemble(Add)\n elif op == '-':\n value =...
python
edit
19
6
mit
0aff137a210debd9ea18793a98c043a5151d9524
PetukhovVictor/compiler,PetukhovVictor/compiler
src/Compiler/VM/arithmetic_exprs.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Base class for Namespace proxies in class creation.\"\"\"\n\nimport weakref\n\nfrom . import ops\nfrom .proxy import _Proxy\n\n_PROXY_INFOS = weakref.WeakKeyDictionary()\n\n\nclass _ScopeProxy(_Proxy):\n\n \"\"\"Proxy object for ma...
python
edit
1
3
mit
c3bac71b19842d9010390996c094119ed25566ab
mwchase/class-namespaces,mwchase/class-namespaces
class_namespaces/scope_proxy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nPy27 Support\n~~~~~~~~~~~~\n\nLike odin this library will support Python 2.7 through to version 2.0.\n\nFrom this point onwards Python 3.5+ will be required.\n\n\"\"\"\nfrom __future__ import unicode_literal...
python
edit
5
1
bsd-3-clause
2e95901ee37100f855a5f30e6143920ef2b56904
python-odin/odinweb,python-odin/odinweb
odinweb/_compat.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncore\nimport logging\nimport os\nimport sys\n\nsys.path.insert(0,\n os.path.abspath(os.path.join(os.path.dirname(__file__), '../')))\n\nfrom mopidy import get_class, settings, SettingsError\nfrom mopidy.mpd.server import MpdSe...
python
edit
4
3
apache-2.0
be9614da32a3c626d2a8e434a43d411d30451f7f
quartz55/mopidy,mopidy/mopidy,jmarsik/mopidy,tkem/mopidy,quartz55/mopidy,rawdlite/mopidy,mopidy/mopidy,ali/mopidy,woutervanwijk/mopidy,diandiankan/mopidy,dbrgn/mopidy,glogiotatidis/mopidy,pacificIT/mopidy,quartz55/mopidy,vrs01/mopidy,dbrgn/mopidy,mokieyue/mopidy,kingosticks/mopidy,tkem/mopidy,abarisain/mopidy,quartz55/...
mopidy/__main__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom nala.bootstrapping import generate_documents\n\n\nclass TestBootstrapping(unittest.TestCase):\n def test_generate_documents_number(self):\n # commenting out for now since it takes about 6 mins on Travis CI\n ...
python
edit
3
1
apache-2.0
1396a0f39ef46500ce1db499e905c1fca8fa5a5f
Rostlab/nalaf
tests/bootstrapping/test_bootstrapping.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\ndef test_mongo_server(mongo_server):\n assert mongo_server.check_server_up()\n assert mongo_server.delete\n mongo_server.api.db.test.insert_one({'a': 'b', 'c': 'd'})\n assert mongo_server.api.db.test.find_one(...
python
edit
1
1
mit
da59d4334eb1a6f77bd0a9599614a6289ef843e4
manahl/pytest-plugins,manahl/pytest-plugins
pytest-server-fixtures/tests/integration/test_mongo_server.py
accepted
null
true