messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kivy.factory import Factory\n\nr = Factory.register\nr('MoaStage', module='moa.stage.base')\nr('StageRender', module='moa.stage.base')\nr('Delay', module='moa.stage.delay')\nr('TreeRender', module='moa.render.treerender')\nr('TreeRende...
python
edit
1
0
mit
23f95f0319c929006c89efdf0d113370a1a003b4
matham/moa
moa/factory_registers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport object_storage_tensorflow as obj_tf\n\n\nclass TestStringMethods(unittest.TestCase):\n\n def test_upper(self):\n self.assertEqual('foo'.upper(), 'FOO')\n\n def test_isupper(self):\n self.assertTru...
python
edit
1
2
apache-2.0
9daac0977933238929eda5e05c635e3a626cbe21
marshallford/ndsu-ibm-capstone,marshallford/ndsu-ibm-capstone
tests/test_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom passwd_change import passwd_change, shadow_change, mails_delete\n\nfrom unittest import TestCase, TestLoader, TextTestRunner\nimport os\nimport subprocess\n\n\nclass PasswdChange_Test(TestCase):\n def setUp...
python
edit
1
6
mit
67f5b1796d2595a5b3fa8449ca7badaf27510ded
maxsocl/oldmailer
test_passwd_change.py
rejected_duplicate
Near-duplicate of sample 3632
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport marshal\n\n\nif sys.hexversion < 0x03030000:\n raise ImportError('python >= 3.3 required')\n\nif sys.implementation.cache_tag is None:\n raise ImportError('python implementation does not use bytecode')\n\...
python
edit
2
0
mit
5978eedb3147bc0f124335d9e408d6c4895de3a7
pyos/dg
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom termcolor import colored\n\nfrom .parser import Addic7edParser\nfrom .file_crawler import FileCrawler\nfrom .logger import init_logger\nfrom .config import Config\n\n\ndef addic7ed():\n try:\n init_logger()\n Config.lo...
python
edit
1
10
mit
b1bf5dfa91f1f7b84512f72d6e5e18c2109f3239
Jesus-21/addic7ed
addic7ed/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\n\nimport os\nimport setuptools\nimport sys\n\n# FIXME explain why this is here\nsys.path.insert(0,\n os.path.join(\n os.path.dirname(__file__),\n \"lib\",\n ))\n\nimport opensub\n\n\nsetuptools.se...
python
edit
1
0
bsd-2-clause
e689a09c7c6d20a7e6bbc5b81b864d1bdd406295
rubasov/opensub-utils,rubasov/opensub-utils
src/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management import call_command\nfrom django.shortcuts import resolve_url\n\nfrom behave_django.testcase import BehaveDjangoTestCase\n\n\ndef before_scenario(context, scenario):\n # This is probably a hacky method of sett...
python
edit
1
2
mit
1a3ffe00bfdf8c61b4ff190beb2ee6a4e9db1412
nikolas/behave-django,nikolas/behave-django,behave/behave-django,bittner/behave-django,bittner/behave-django,behave/behave-django
behave_django/environment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\nAPI-specific fixtures\n\"\"\"\n\nimport pytest\n\nfrom tests.base import create_admin_app\nfrom tests.conftest import CONFIG_PATH_DATA_K...
python
edit
4
1
bsd-3-clause
005c6ceae1b80f5092e78231242b01af2ba64fed
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
tests/integration/api/conftest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThe ``core`` Devito backend is simply a \"shadow\" of the ``base`` backend,\ncommon to all other backends. The ``core`` backend (and therefore the ``base``\nbackend as well) are used to run Devito on standard CPU architectures.\n\"\...
python
edit
1
0
mit
7b14e846f08f69601372266ed82f91ba5bd306f6
opesci/devito,opesci/devito
devito/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib2\n\ntoken = 'test_token'\nchannel = 'test_channel'\ngraphtype = 'test'\n\nurl = 'http://{}/ocpgraph/{}/{}/{}/'.format('localhost:8000', token, channel, graphtype)\ntry:\n req = urllib2.Request(url)\n resposne = urllib2.urlop...
python
edit
3
0
apache-2.0
91f9ea76a1a48cf9e191b4f97818c105428bbbd6
neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,neurodata/ndstore,neurodata/ndstore
util/test_graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\"\"\"Launch the flask-forecaster application.\"\"\"\n\nimport logging\nimport sys\n\n\nlogging.basicConfig(\n datefmt='%Y/%m/%d %H.%M.%S',\n format='%(levelname)s:%(name)s:%(message)s',\n level=logging.INF...
python
edit
1
0
isc
c4818066de3b428678fb03c70dcaa028227e0c00
textbook/flask-forecaster,textbook/flask-forecaster
scripts/launch_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import eq_, ok_\n\nfrom django.test import TestCase\n\nfrom us_ignite.snippets.models import Snippet\n\n\nclass TestSnippetModel(TestCase):\n\n def tearDown(self):\n Snippet.objects.all().delete()\n\n def get_in...
python
edit
1
1
bsd-3-clause
8c4cdc174b502610943507d4e7ffee96ad9d611a
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/snippets/tests/models_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n\nfrom __future__ import print_function, unicode_literals\n\nimport nose.tools as nose\n\nfrom tests.utils import run_filter\n\n\ndef test_ignore_case():\n \"\"\"should ignore case when querying son...
python
edit
1
1
mit
3ae63e055146ecb45b6943e661808b0546b42273
caleb531/play-song,caleb531/play-song
tests/test_playsong/test_query.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport slither, pygame\n\nsnakey = slither.Sprite()\nsnakey.setCostumeByName(\"costume0\")\n\nsnakey.goto(0, 0)\n\nslither.slitherStage.setColor(40, 222, 40)\n\nslither.setup() # Begin slither\n\ndef handlequit():\n print(\"Quitting...\"...
python
edit
1
1
mit
e5b42db249dd94a0d7652881a8bba8ed78772d3e
PySlither/Slither,PySlither/Slither
examples/turnAndMove.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom numpy.distutils.core import setup\nfrom numpy.distutils.misc_util import Configuration\n\ndef configuration(parent_package='',top_path=None):\n config = Configuration('distutils',parent_package,top_path)\...
python
edit
1
1
bsd-3-clause
d0f092afc9534d25b5ebf81ff329ad296e30952e
teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,illume/numpy3k,chadnetzer/numpy-gaurdro,jasonmccampbell/numpy-refactor-sprint,efiring/numpy-work,illume/numpy3k,illume/numpy3k,jasonmccampbell/numpy-refactor-spr...
numpy/distutils/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Bio import SeqIO\nimport logging\nimport unittest\n\nfrom select_taxa import select_genomes_by_ids\nimport translate\n\n\nclass Test(unittest.TestCase):\n\n def setUp(self):\n self.longMessage = True\n logging.root.set...
python
edit
1
2
mit
a2572d38eeaa7c004142a194b18fd6fdfff99f9a
ODoSE/odose.nl
test/test_translate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nimport generic_scaffold\n\nclass Book(models.Model):\n title = models.CharField(max_length=128)\n author = models.C...
python
edit
3
1
mit
52bfbea4e2cb17268349b61c7f00b9253755e74d
spapas/django-generic-scaffold,spapas/django-generic-scaffold
example/books/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n test_configuration\n ~~~~~~~~~~~~~~~~~~\n\n Basic configuration tests\n\"\"\"\n\nimport base64\n\nimport pytest\n\nfrom utils import authenticate, logout\n\n\n@pytest.mark.settings(\n logout_url...
python
edit
1
1
mit
9cadf855a4506e29009a910206c6ce213279aafe
tatataufik/flask-security,quokkaproject/flask-security,wjt/flask-security,mik3cap/private-flask-security,dlakata/flask-security,jonafato/flask-security,nfvs/flask-security,themylogin/flask-security,CodeSolid/flask-security,GregoryVigoTorres/flask-security,inveniosoftware/flask-security-fork,fuhrysteve/flask-security,Sa...
tests/test_configuration.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef reverse_insort(seq, val, lo=0, hi=None):\n if hi is None:\n hi = len(seq)\n while lo < hi:\n mid = (lo + hi) // 2\n if val > seq[mid]:\n hi = mid\n else:\n lo = mid + 1\n seq.in...
python
edit
1
4
mit
50d9c1494c5f14ccc7cb7fa32979e11e19ee1eb8
BeatButton/beattie,BeatButton/beattie-bot
utils/etc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 The Regents of the University of Michigan\n# All rights reserved.\n# This software is licensed under the BSD 3-Clause License.\n\"\"\"Graphical User Interface (GUI) for configuration and database inspection.\n\nThe GUI ...
python
edit
1
1
bsd-3-clause
97811dc9b81d84ae1c074be00ebea1dac8c7f2fc
csadorf/signac,csadorf/signac
signac/gui/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nwith open(os.path.join(os.path.dirname(__file__), \"webclient/VERSION\")) as f:\n __version__ = f.read().strip()\n\n```\n\nApply this change: Add an 'installed_location()' function so syweb can report its own location" }, ...
python
edit
1
1
apache-2.0
e9c83d59fbb5b341e2126039109e306875db0490
williamboman/matrix-angular-sdk,williamboman/matrix-angular-sdk,matrix-org/matrix-angular-sdk,williamboman/matrix-angular-sdk,matrix-org/matrix-angular-sdk,matrix-org/matrix-angular-sdk
syweb/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport numba\nimport numpy\nimport pkg_resources\nimport pytest\n\n\n# The first version of numpy that broke backwards compat and improved printing.\n#\n# We set the printing format to legacy to maintain our doctests' compatibility\n# wit...
python
edit
1
2
mit
258df4932fe937c0baf45d30de88c194f7f7718a
dwillmer/fastats,fastats/fastats
conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nLocal Configurations\n\n- Runs in Debug mode\n- Uses console backend for emails\n- Use Django Debug Toolbar\n'''\nfrom configurations import values\nfrom .common import Common\n\n\nclass Local(Common):\n\n #...
python
edit
1
0
mit
50dea10e4b0dfac459a2e4229cfe2ccbe3500b11
watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,watchdogpolska/poradnia
poradnia/config/local.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test the 20news downloader, if the data is available.\"\"\"\nimport numpy as np\nfrom nose.tools import assert_equal\nfrom nose.tools import assert_true\nfrom nose.plugins.skip import SkipTest\n\nfrom scikits.learn import datasets\n\n...
python
edit
1
2
bsd-3-clause
21ab4cb4bb50acd7598b09ebceec20c7302061da
krez13/scikit-learn,ChanderG/scikit-learn,466152112/scikit-learn,ChanChiChoi/scikit-learn,belltailjp/scikit-learn,tdhopper/scikit-learn,krez13/scikit-learn,yyjiang/scikit-learn,schets/scikit-learn,TomDLT/scikit-learn,xubenben/scikit-learn,MohammedWasim/scikit-learn,0x0all/scikit-learn,mblondel/scikit-learn,aewhatley/sc...
scikits/learn/datasets/tests/test_20news.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sc2\nfrom sc2 import run_game, maps, Race, Difficulty\nfrom sc2.player import Bot, Computer\n\nclass WorkerRushBot(sc2.BotAI):\n async def on_step(self, iteration):\n if iteration == 0:\n for worker in self.worke...
python
edit
1
3
mit
0a779f17e19f18c8f7e734e7e61367712fe9e52a
Dentosal/python-sc2
examples/worker_rush.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__version__ = '1.0.2'\n__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']\n\nfrom .application_master import ApplicationMaster\nfrom .history_server import HistoryServer\nfrom .node_m...
python
edit
1
0
bsd-3-clause
e773239cbf0adee5ca192c10dba14d35275040ff
toidi/hadoop-yarn-api-python-client
yarn_api_client/__init__.py
rejected_duplicate
Near-duplicate of sample 14553
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#/usr/bin/python\n\n\"\"\" Baseline example that needs to be beaten \"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nx, y, yerr = np.loadtxt(\"data/data.txt\", unpack=True)\n\nA = np.vstack((np.ones_like(x), x)).T\nC = np.di...
python
edit
1
0
mit
b57d0b0d3d65995270318d94b551d8bacda73d22
arfon/dottravis,arfon/dottravis
baseline.py
rejected_duplicate
Near-duplicate of sample 1670
true
[ { "role": "user", "content": "Write python code for the following: Add _assert_eq_nan to compare arrays that have NaN\n\nAs comparisons with NaN are false even if both values are NaN, using the\n`assert_eq` does not work correctly in this case. To fix it, we add this\nshim function around `assert_eq`. First...
python
new_file
1
1
bsd-3-clause
0219907b3351fea2467ad961fef750481b62e205
dask-image/dask-ndmeasure
dask_ndmeasure/_test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom storage.models.base import *\n\n\nclass Fighter(Base):\n __tablename__ = 'fighters'\n\n id = Column(Integer, primary_key=True)\n ref = Column(String(STR_SIZE), unique=True, nullable=False)\n name = Column(String(STR_SIZE), ...
python
edit
29
0
apache-2.0
1e90db8de39bd8c4b1a4d58148b991af8b5c32dd
Some1Nebo/ufcpy
storage/models/fighter.py
rejected_lint
Too many lint violations: 29
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lib.softlayer import SoftlayerBaseAction\n\n\nclass SoftlayerDeleteInstance(SoftlayerBaseAction):\n def run(self, name):\n driver = self._get_driver()\n # go from name to Node Object\n node = [n for n in driver....
python
edit
1
4
apache-2.0
1c19d7fb5914554b470a6d067902a9c61882ff4a
tonybaloney/st2contrib,StackStorm/st2contrib,tonybaloney/st2contrib,pearsontechnology/st2contrib,meirwah/st2contrib,psychopenguin/st2contrib,pidah/st2contrib,digideskio/st2contrib,digideskio/st2contrib,psychopenguin/st2contrib,meirwah/st2contrib,lmEshoo/st2contrib,pinterb/st2contrib,tonybaloney/st2contrib,pidah/st2cont...
packs/softlayer/actions/destroy_instance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 The Tulsi 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 the License at\n#...
python
edit
1
4
apache-2.0
750dc7d4eddf691117cebf815e163a4d10af39cb
pinterest/tulsi,bazelbuild/tulsi,bazelbuild/tulsi,bazelbuild/tulsi,bazelbuild/tulsi,pinterest/tulsi,bazelbuild/tulsi,bazelbuild/tulsi,pinterest/tulsi,pinterest/tulsi,pinterest/tulsi,pinterest/tulsi
src/TulsiGenerator/Scripts/bazel_options.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# django-salesforce\n#\n# by Phil Christensen\n# (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org)\n# See LICENSE.md for details\n#\n\n\"\"\"\nA database backend for the Django ORM.\n\nAllows access to all Salesforce objects...
python
edit
3
0
mit
bc2b8d04398f9df9985452b2b8a016208cf216cd
chromakey/django-salesforce,django-salesforce/django-salesforce,chromakey/django-salesforce,django-salesforce/django-salesforce,hynekcer/django-salesforce,chromakey/django-salesforce,hynekcer/django-salesforce,django-salesforce/django-salesforce,hynekcer/django-salesforce
salesforce/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nGeneral purpose formish extensions.\n\"\"\"\n\nfrom formish import validation, widgets, Form\n\n\nclass DateParts(widgets.DateParts):\n\n def __init__(self, **k):\n k['day_first'] = k.pop('l10n').is_day_first()\n su...
python
edit
4
10
bsd-3-clause
c5158020475e62d7e8b86a613a02c0a659038f88
ish/formish,ish/formish,ish/formish
formish/tests/testish/testish/lib/xformish.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom app import create_app, db\n\napp = create_app('development')\n\n\n@app.cli.command()\ndef test():\n \"\"\"Run the unit tests.\"\"\"\n import unittest\n tests = unittest.TestLoader().discover('tests')...
python
edit
3
1
mit
24207f3681b0e546937a1d59ecffa1aa6630b825
rtzll/flask-todolist,rtzll/flask-todolist,0xfoo/flask-todolist,polyfunc/flask-todolist,0xfoo/flask-todolist,polyfunc/flask-todolist,0xfoo/flask-todolist,rtzll/flask-todolist,polyfunc/flask-todolist,rtzll/flask-todolist
todolist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nCLASSIFIERS = \"\"\"\\\nDevelopment Status :: 3 - Alpha\nIntended Audience :: Science/Research\nIntended Audience :: Developers\nLicense :: OSI Approved\nProgramming Language :: Python\nTopic :: Software Development\nTopic :: Scientific/Eng...
python
edit
1
0
bsd-3-clause
cc839453b88b4cd5f2b4f7f4c007405eabb02679
cournape/numscons,cournape/numscons,cournape/numscons
release.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python3\n# Python Challenge - 22\n# http://www.pythonchallenge.com/pc/hex/copper.html\n# http://www.pythonchallenge.com/pc/hex/white.gif\n# Username: butter; Password: fly\n# Keyword:\n\n'''\nUses Anaconda environment with ...
python
edit
3
1
mit
1c494f21cde384b611998d237baa430384dcefbc
HKuz/PythonChallenge
Challenges/chall_22.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom .base import *\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\nif 'SECRET_KEY' not in os.environ:\n logging.warning(\n \"No SECRET_KEY given in environ, please have a check\"\n )\...
python
edit
6
0
bsd-2-clause
26934dae71cb006baf0dcf77ddec4938b8c4fdbd
lapo-luchini/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,lapo-luchini/pinry,pinry/pinry
pinry/settings/docker.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\n\n\n@python_2_unicode_compatible\nclass SchoolYear(models.Mode...
python
edit
1
1
mit
f7a8f66047e2277cd95b553cd7aadfa24fbaad95
texastribune/scuole,texastribune/scuole,texastribune/scuole,texastribune/scuole
scuole/stats/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nclass Prepare(object):\n \"\"\"\n Prepare the champions for the battle!\n\n Usage:\n hero = Prepare(name=\"Aragorn\", base_attack=100, base_hp=100)\n or like this:\n aragorn = {\"name\": \"Aragorn\", \"base_att...
python
edit
2
4
mit
06f045d51b24ee834f7bbb572ccce304431fc602
lerrua/merlin-engine
merlin/engine/battle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Process queues.\"\"\"\nfrom datetime import datetime\n\nfrom server.extensions import db\nfrom server.models import QueueEntry\n\n\ndef finished_entries():\n \"\"\"Process finished entries.\"\"\"\n queue_entries = db.session.que...
python
edit
1
4
mit
c201fc0feef5f7eeede327d6239fc3082ae24180
Nukesor/spacesurvival,Nukesor/spacesurvival,Nukesor/spacesurvival,Nukesor/spacesurvival
server/worker/queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\nfrom app.chess.chess import Chess\nimport unittest\n\n\nclass TestBuildChess(unittest.TestCase):\n \"\"\"\n `TestBuildChess()` class is unit-testing the class\n Chess().\n \"\"\"\n\n # ///////////...
python
edit
1
1
mit
738d080512f36939ce4a23f3d3db0b378550564a
aymguesmi/ChessChallenge
tests/test_build_chess.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nROOT_DIR = os.path.dirname(os.path.realpath(__file__))\n\nclass BaseConfig(object):\n DEBUG = False\n TESTING = False\n FREEZER_REMOVE_EXTRA_FILES = True\n\n FREEZER_DESTINATION = os.path.join(ROOT_DIR, 'html')\n F...
python
edit
1
0
mit
eb169af3b56ef44d50a6f4596debf0c0c9efa532
JamesRiverHomeBrewers/WaterTesting,JamesRiverHomeBrewers/WaterTesting,JamesRiverHomeBrewers/WaterTesting,JamesRiverHomeBrewers/WaterTesting
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Development settings and globals.\"\"\"\n\n\nfrom common import *\nimport dj_database_url\n\n########## DEBUG CONFIGURATION\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n########## END DEBUG CONFIGURATION\n\n# Parse database configuration fr...
python
edit
2
0
mit
0817bdcd26de6627ee36edcee2072727f3174d4c
susanctu/Crazyfish-Public,susanctu/Crazyfish-Public
cfsite/settings/prod.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" A decorator for marking methods/functions as deprecated. \"\"\"\n\n\n# Standard library imports.\nimport logging\n\n# We only warn about each function or method once!\n_cache = {}\n\n\ndef deprecated(message):\n \"\"\" A factory f...
python
edit
1
1
bsd-3-clause
a2f1cdc05e63b7b68c16f3fd1e5203608888b059
burnpanck/traits,burnpanck/traits
traits/util/deprecated.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom flask import Flask, request, json\nfrom flask.ext.cors import CORS\nimport database\nimport rsser\n\n# Update data before application is allowed to start\ndatabase.update_database()\n\...
python
edit
1
2
bsd-3-clause
7a7cd83b5d49961e8d0cdd851caf11b7110c2779
philipbl/talk_feed,philipbl/SpeakerCast
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n# Grabs the folder where the script runs.\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n# Enable debug mode.\nDEBUG = True\n\n# Secret key for session management. You can generate random strings here:\n# http://clsc....
python
edit
1
0
apache-2.0
542bd2696f75ad58cf8b0015024b3011af14851c
AntiPiracy/webapp,AntiPiracy/webapp,tcyrus-hackathon/scurvy-webapp,tcyrus-hackathon/scurvy-webapp,AntiPiracy/webapp,tcyrus-hackathon/scurvy-webapp
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport socket\nimport sys\n\n\nclass SerfConnectionError(Exception):\n pass\n\n\nclass SerfConnection(object):\n \"\"\"\n Manages RPC communication to and from a Serf agent.\n \"\"\"\n\n def __init__(self, host='localhost', p...
python
edit
1
2
mit
d08e8144b90d3fe89fd449d31bdb655d62f3a749
charleswhchan/serfclient-py,KushalP/serfclient-py
serfclient/connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['AddressBook']\n\n\nclass AddressBook(object):\n\n def __init__(self):\n self.persons = []\n\n def add_person(self, person):\n self.persons.append(person)\n\n```\n\nApply this change: Add ability to check is t...
python
edit
1
2
mit
3900c8173bff6c3b1175ff9d6cffec1b98db7c74
dizpers/python-address-book-assignment
address_book/address_book.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for openservices project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\"\"\"\n\nimport os\n\nfrom django.core.wsgi import get_wsgi_application\n\nos.environ.setdefault(\"DJANGO_SETT...
python
edit
1
0
bsd-2-clause
6fbf3edb489059f93cee6684bf5046386f538391
OpenServicesEU/python-attendance
src/attendance/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.serializers import ValidationError\n\nfrom core.models import MaintenanceRecord\n\nfrom api.permissions import CanEditOrReadOnly\nfrom api.v2.serializers.details import MaintenanceRecordSerializer\nfrom api.v2.views.base...
python
edit
7
5
apache-2.0
14c41706d6437247bbe69e0e574c03863fbe5bda
CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend
api/v2/views/maintenance_record.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dask.distributed import dask_client_from_ipclient\n\ndef test_dask_client_from_ipclient():\n from IPython.parallel import Client\n c = Client()\n dc = dask_client_from_ipclient(c)\n assert 2 == dc.get({'a': 1, 'b': (lambda ...
python
edit
1
1
bsd-3-clause
611c34eee4b5aa263669f1b7321b97fab9a98b5e
PhE/dask,clarkfitzg/dask,jayhetee/dask,simudream/dask,mikegraham/dask,vikhyat/dask,PhE/dask,wiso/dask,jcrist/dask,esc/dask,mraspaud/dask,esc/dask,marianotepper/dask,vikhyat/dask,pombredanne/dask,simudream/dask,freeman-lab/dask,cpcloud/dask,blaze/dask,marianotepper/dask,jcrist/dask,hainm/dask,ContinuumIO/dask,blaze/dask...
dask/distributed/tests/test_ipython_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFunctions for displaying images inline in iTerm2.\n\nSee https://iterm2.com/images.html.\n\"\"\"\nfrom __future__ import print_function, division, absolute_import\n\nimport sys\nimport os\nimport base64\n\nIMAGE_CODE = '\\033]1337;F...
python
edit
1
2
mit
baca7b88893f175a222d7130ef1889893ed6b970
asmeurer/iterm2-tools
iterm2_tools/images.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mpi4py import MPI\nimport mpiunittest as unittest\n\nclass GReqCtx(object):\n source = 1\n tag = 7\n completed = False\n free_called = False\n\n def query(self, status):\n status.Set_source(self.source)\n ...
python
edit
1
2
bsd-2-clause
1629d6d369bce079c33986aa62a12a1ad3a8a47d
pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py,pressel/mpi4py
test/test_grequest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport os\nimport requests\n\n\ndef update():\n requests.packages.urllib3.disable_warnings()\n resp = requests.get('http://api.tfl.gov.uk/Line/Mode/tube/Status').json()\n\n return {el['id']: el['lineStatuses'][0]['...
python
edit
4
3
mit
41ad0f842320161c45079f7a75d64df6c8716e5d
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
london_commute_alert.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom app.lookups import base as lookups\nfrom app.drivers.base import BaseDriver\n\n\nclass LookupDriver(BaseDriver):\n def __init__(self, **kwargs):\n super().__init__(**kwargs)\n self.lookupfn = kwargs.get('lookup', None)...
python
edit
1
2
mit
1c22ac91789c2e7230f1c97e9d4def0dfcf13638
glormph/msstitch
app/drivers/mslookup/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport simplejson as json\n\nclass GithubSearch(object):\n def __init__(self):\n self.api_url = \"https://api.github.com/search/code?q=\"\n self.repo = \"OpenTreeOfLife/treenexus\"\n def search(self,t...
python
edit
2
3
bsd-2-clause
a72b20a7c614c86a196585a6703b218613f6d74b
OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api
modules/githubsearch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport testinfra.utils.ansible_runner\n\ntestinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(\n '.molecule/ansible_inventory').get_hosts('all')\n\n\ndef test_hosts_file(File):\n f = File('/etc/hosts')\n\n assert f.exists...
python
edit
1
1
mit
8c2a52ce4eb47e89450677d0beed9c3d45b417e0
idi-ops/ansible-collectd
tests/test_default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport scipy.stats as ss\nimport numpy.random as npr\nfrom functools import partial\n\nfrom . import core\n\n\ndef npr_op(distribution, size, input):\n prng = npr.RandomState(0)\n prng.set_state(input['random_...
python
edit
3
3
mit
7ad9930afd6cfd70e8fdf48dc4b2ecadba6426ea
akangasr/elfi
abcpy/distributions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set the connection to Dropbox API" }, { "role": "assistant", "content": "#!/usr/bin/python\n#lets import the dropbox module\nimport dropbox\n\n#taking the app key and secret \nkey=raw_input('Enter your app key : ')\nsecret=raw_in...
python
new_file
5
0
mit
519cba447e9fed9eb40d5328376442e75936fd4a
Aris-Breezy/encbox
encbox.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Mimic the hggit extension.\ntry:\n from hggit import *\n hggit_reposetup = reposetup\nexcept ImportError:\n # Allow this module to be imported without\n # hg-git installed, eg for setup.py\n pass\n\n\n__version__ = \"0.1....
python
edit
3
7
bsd-2-clause
67d08aff211ae1edbae202819f39be7c34812137
stephenmcd/hg-github
hggithub.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nSECRET_KEY = 'fake_secret'\n\nROOT_URLCONF = 'tests.test_urls'\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'irrelevant.db'\n }\n}\n\nINSTALL...
python
edit
1
0
mit
32c676e727845c62e8958514d3c61ea56569a77b
thomasw/djproxy
tests/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Database Module \"\"\"\n\nfrom flask_sqlalchemy import SQLAlchemy\ndb = SQLAlchemy()\n\n```\n\nApply this change: Attach app to SQLAlchemy properly" }, { "role": "assistant", "content": "\"\"\" Database Module \"\"\"\n\nf...
python
edit
1
0
apache-2.0
557e634a3b68c13b1a19151ec3b96f456e17d347
kevinoconnor7/penelophant,kevinoconnor7/penelophant
penelophant/database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom apps.categories.models import Category\nfrom apps.users.models import UserProfile\nfrom apps.reviews.models import Review\n\n\nclass Book(models.Model):\n title = models.CharField(max_length=255)\n ...
python
edit
1
2
mit
7bbec0e5306766741b22341a100db046d76b82a8
vuonghv/brs,vuonghv/brs,vuonghv/brs,vuonghv/brs
apps/books/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\npytest_plugins = [\n u'ckan.tests.pytest_ckan.ckan_setup',\n u'ckan.tests.pytest_ckan.fixtures',\n]\n\n```\n\nApply this change: Remove pytest plugins from archiver" }, { "role": "assistant", "co...
python
edit
1
0
mit
f76a2070d91d60a261e8f6120a01075491eb785f
ckan/ckanext-archiver,ckan/ckanext-archiver,ckan/ckanext-archiver
conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom kolibri.plugins.base import KolibriFrontEndPluginBase\n\n\nclass ManagementModule(KolibriFrontEndPluginBase):\n \"\"\"\n The Management module.\n \"...
python
edit
1
0
mit
d6b3c47169082eeee6f1f01458b8791de2573849
66eli77/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,jtamiace/kolibri,learningequality/kolibri,aronasorman/kolibri,jamalex/kolibri,christianmemije/kolibri,rtibbles/kolibri,benjaoming/kolibri,jtamiace/kolibri,jayoshih/kolibri,MingDai/kolibri,DXCanas/kolibri,jamalex/kolibri,rtibbles/kolibri,mrpau/...
kolibri/plugins/management/kolibri_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Li...
python
edit
3
1
apache-2.0
12dbfcbdf35f8d846f39eee4898d032aa6729ab9
cblecker/kubernetes,pmorie/kubernetes,mfojtik/kubernetes,feiskyer/kubernetes,frodenas/kubernetes,Lion-Wei/kubernetes,fanzhangio/kubernetes,chestack/kubernetes,rnaveiras/kubernetes,andrewsykim/kubernetes,intelsdi-x/kubernetes,GulajavaMinistudio/kubernetes,micahhausler/kubernetes,humblec/kubernetes,brendandburns/kubernet...
hack/boilerplate/boilerplate_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\n\nimport flask\nimport flask_cors\nfrom sqlalchemy_jsonapi import flaskext as flask_jsonapi\n\nfrom swd6 import config\nfrom swd6.db.models import db\n\nCONF = config.CONF\nDEFAULT_CONF_PATH = '/opt/swd6/api/api.c...
python
edit
1
1
apache-2.0
62586dc0e4e9ca8d0fee6c72e296c74875f3a65c
jimbobhickville/swd6,jimbobhickville/swd6,jimbobhickville/swd6
api/swd6/api/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nhomeassistant.components.device_tracker.mqtt\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nMQTT platform for the device tracker.\n\ndevice_tracker:\n platform: mqtt\n qos: 1\n devices:\n paulus_oneplus: /location/paulus\n ...
python
edit
1
3
mit
5a6ff9a69a2d769f6ac363f20afb89a23dd2290d
emilhetty/home-assistant,mikaelboman/home-assistant,alexmogavero/home-assistant,devdelay/home-assistant,nevercast/home-assistant,shaftoe/home-assistant,srcLurker/home-assistant,tboyce021/home-assistant,instantchow/home-assistant,DavidLP/home-assistant,Julian/home-assistant,jnewland/home-assistant,florianholzapfel/home-...
homeassistant/components/device_tracker/mqtt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sessions.models import Session\n\n\"\"\"\n>>> def clean(count):\n... for idx, s in enumerate(Session.objects.filter(expire_date__lt=...
python
edit
5
3
mit
f9b9023549adf4ee9923ac8ed4b6a0fc0b6a89a5
QLGu/djangopackages,QLGu/djangopackages,pydanny/djangopackages,pydanny/djangopackages,QLGu/djangopackages,pydanny/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages
core/management/commands/delete_old_sessions.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version_info__ = (1, 3, 0, 'dev')\n\n\n# Dot-connect all but the last. Last is dash-connected if not None.\n__version__ = '.'.join([str(i) for i in __version_info__[:-1]])\nif __version_info__[-1] is not None:\n __version__ += ('-%s' %...
python
edit
1
1
apache-2.0
181c80532d54f2cccf092f8785be0604fda3b99d
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
derrida/__init__.py
rejected_duplicate
Near-duplicate of sample 5061
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport youtube_dl, os\nfrom multiprocessing.pool import ThreadPool\nfrom youtube_dl.utils import DownloadError\nfrom datetime import datetime\nfrom uuid import uuid4\n\n\nclass Download:\n link = \"\"\n done = False\n error = False...
python
edit
1
3
mit
6a07b94f9c84741fcc399f9dee3945d0339b19e0
pielambr/PLDownload,pielambr/PLDownload
download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Lint as: python3\n# Copyright 2020 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of th...
python
edit
1
0
apache-2.0
072d5bf150ff3f8d743a84c636929e7a326bf8ea
tensorflow/cloud,tensorflow/cloud
src/python/tensorflow_cloud/tuner/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 The TensorFlow 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 the Licens...
python
edit
1
0
apache-2.0
859cd49b628bb430a721ba89883c3a0efbbbdbbc
renyi533/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,arborh/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tens...
tensorflow/python/autograph/core/config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initialize() method to ShopifyAuth, which sets up the API key and secret of the app." }, { "role": "assistant", "content": "import shopify\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConf...
python
new_file
1
3
mit
a3dc06b0389eccd9a97270399c9878968c2d910c
funkybob/django-shopify-auth,discolabs/django-shopify-auth,funkybob/django-shopify-auth,discolabs/django-shopify-auth,RafaAguilar/django-shopify-auth,RafaAguilar/django-shopify-auth
shopify_auth/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom corehq.apps.locations.models import SQLLocation\nfrom corehq.apps.users.models import CommCareUser\nfrom custom.ewsghana.reminders.second_soh_reminder import SecondSOHReminder\n\n\nclass ThirdSOHReminder(SecondSOHReminder):\n\n def ...
python
edit
1
8
bsd-3-clause
4eeec96f3c79b9584278639293631ab787132f67
qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/ewsghana/reminders/third_soh_reminder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DockerError(Exception):\n\n def __init__(self, status, data, *args):\n super().__init__(*args)\n self.status = status\n self.message = data['message']\n\n def __repr__(self):\n return 'DockerError({se...
python
edit
1
1
mit
172372000f121b31daa0965dca3bf28976b6cba9
barrachri/aiodocker,gaopeiliang/aiodocker,paultag/aiodocker,barrachri/aiodocker,gaopeiliang/aiodocker,barrachri/aiodocker,gaopeiliang/aiodocker
aiodocker/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python3\n\nimport win32gui\nfrom urllib.request import urlopen, urlretrieve\nfrom xml.dom import minidom\nfrom PIL import Image\nimport os\n\n\n#Variables:\nsaveDir = 'C:\\BingWallPaper\\\\'\ni = 0\nwhile i<1:\n try:\n ...
python
edit
1
0
mit
540273ac75880925934e69275c9da1de61fbd699
adamadanandy/PyBingWallpaper
PyBingWallpaper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This is the main function of twitter-news-bot project\n\nIt is intended to be run as a cronjob to periodically scan\nfor news of interest and Tweet about it\n\"\"\"\nimport random\nfrom twitter_bot.service.curator import Curator\nfrom...
python
edit
3
3
mit
3abb2aa6a86603ab8811c47ffd61a851dc314276
econne01/twitter-news-bot
src/run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom copy import deepcopy\nfrom datetime import datetime\n\nfrom isitopenaccess.plugins import string_matcher\n\ndef page_license(record):\n \"\"\"\n To respond to the provider identifier: http://www.biomedcentral.com...
python
edit
5
1
bsd-3-clause
2b1cd9a58aa51ef53996dc1897a7a0e50f29d7ca
CottageLabs/OpenArticleGauge,CottageLabs/OpenArticleGauge,CottageLabs/OpenArticleGauge
isitopenaccess/plugins/bmc.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This code is inspired from this post:\n# http://www.kdnuggets.com/2015/10/neural-network-python-tutorial.html?utm_content=buffer2cfea&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer\n\nimport numpy as np\n\n# Feature matrix a...
python
edit
4
1
mit
f003fd0099b1817e965483e94a51745834a802de
yassineAlouini/ml-experiments,yassineAlouini/ml-experiments
simple_neural_network.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\nimport os\nimport subprocess\n\nfrom celery import Celery\nfrom celery.schedules import crontab\n\nfrom whistleblower.targets.twitter import Post as TwitterPost\nimport whistleblower.queue\n\nHOUR = 3600\nENABLE...
python
edit
6
2
unlicense
241df143d4f75404c6cda3ff0ab3fe2fccba5f79
datasciencebr/whistleblower
whistleblower/tasks.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\nclass Client(object):\n\n LAUNCHPAD_URL = 'https://launchpad.37signals.com'\n BASE_URL = 'https://basecamp.com/%s/api/v1'\n\n def __init__(self, access_token, user_agent, account_id=None):\n \...
python
edit
1
1
mit
0688d285494e9c2ddb5b6ab35f2c0bd1dac02a54
nous-consulting/basecamp-next
basecampx/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\n\nSITE_ID = 1\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql',\n 'NAME': 'coda_local',\n 'USER': os.getenv('DB_MYSQL_USER', default=\"root\"),\n 'PASSWORD': os.geten...
python
edit
5
0
bsd-3-clause
61fa32fc65ea4dbc48f881efd70c82955d8bb15e
unt-libraries/coda,unt-libraries/coda,unt-libraries/coda,unt-libraries/coda
coda/coda_project/settings/test.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCommand that will allow for a user to inject triples into a database.\n\"\"\"\nfrom rhobot.components.commands.base_command import BaseCommand\nfrom rdflib.namespace import FOAF\nfrom rhobot.namespace import RHO\nimport logging\n\nl...
python
edit
1
1
bsd-3-clause
2cc9de18bf20753907c2c0e591b58ccefe1578e0
rerobins/rho_erudite
erudite/components/commands/find_owner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.task.base import Task\nfrom celery.registry import tasks\nfrom inspect import getargspec\n\n\ndef task(**options):\n \"\"\"Make a task out of any callable.\n\n Examples:\n\n >>> @task()\n ... def ...
python
edit
1
1
bsd-3-clause
5950f14ab025999b8161204595a7c35554fe46a0
WoLpH/celery,cbrepo/celery,ask/celery,cbrepo/celery,frac/celery,mitsuhiko/celery,WoLpH/celery,ask/celery,frac/celery,mitsuhiko/celery
celery/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom operator import attrgetter\n\nimport six\nfrom django.core.management.base import BaseCommand\n\nfrom corehq.apps...
python
edit
1
4
bsd-3-clause
144f14bc292e9621508ac755c70d679affddfb90
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/couch_sql_migration/management/commands/show_started_migrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# TODO is it necessary here?\nimport roslib; roslib.load_manifest('practica_turtlebot')\nimport rospy\n\nfrom driver import Driver\nfrom driver import Point\n\nif __name__ == '__main__':\n try:\n # Starts ...
python
edit
1
0
mit
5b7db97d615b9e30a2780a45bd1c38690e6e2e51
Sharekhan/catkin_ws
src/practica/practica_turtlebot_mariano/src/node.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport http.server\nfrom threading import Thread\nimport os.path\n\n\nclass HTTPHandler:\n def __init__(self, config):\n self.config = config\n\n handler = HTTPHandler.make_http_handler('C:/tmp/test/')\n self.httpd =...
python
edit
1
4
mit
813b81293cd2bd69982aef36ad09fc52f7bea1f6
Surye/relaygram
relaygram/http_server.py
rejected_duplicate
Near-duplicate of sample 4668
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport requests\nfrom sys import stderr, exit\nfrom resources import get_resource_root\n\ndef get_key(platform):\n if platform == \"TI73\": return 0x02\n if platform == \"TI83p\" or platform == \"TI83pSE\": return 0x04\n ...
python
edit
7
7
mit
0e8f8d7606380809c206e3e5db329040abe6f267
KnightOS/sdk,KnightOS/sdk,KnightOS/sdk
knightos.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"./manage.py test --settings=workshopvenues.settings_test venues\"\n\nReplace this with more appropriate tests for your application.\n\"\...
python
edit
1
1
bsd-3-clause
103f232f6b4c12e1d1c643c48c5055d66d7a126d
andreagrandi/workshopvenues
workshopvenues/venues/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom serf_master import SerfHandler\nfrom utils import with_payload, truncated_stdout\n\n\nclass BaseHandler(SerfHandler):\n\n @truncated_stdout\n @with_payload\n def where(self, role=None):\n my_role = os.envir...
python
edit
1
2
mit
1cc15cbe37e1118f102f05d9530d6f0a6055d638
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
handler/base_handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=20\nbranch=\"master\"\ntimestamp=1376526219.94\n```\n\nApply this change: Tag commit for v0.0.21-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=21\nbranc...
python
edit
1
0
mit
551d4dc7cb8839fdf8269284c81079b2b29f2ba5
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom settings import * # noqa\nimport os\n\n\nTEST_DISCOVER_ROOT = os.path.abspath(os.path.join(__file__, '../..'))\n\n# Comment this line for turn on debug on tests\nLOGGING = {}\nDEBUG = 0\nTEST_RUNNER = 'django_nose.NoseTestSuiteRunner'...
python
edit
1
0
bsd-3-clause
74a84d76492088f8d9df8d2712041381e57c29bb
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/dbaas/settings_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the Software Freedom Conservancy (SFC) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The SFC licenses this...
python
edit
1
0
apache-2.0
b977de3af3ae93a57f36e1d6eea234f01cbc7a61
bayandin/selenium,carlosroh/selenium,asolntsev/selenium,Herst/selenium,alb-i986/selenium,joshuaduffy/selenium,oddui/selenium,TikhomirovSergey/selenium,sankha93/selenium,mojwang/selenium,lmtierney/selenium,carlosroh/selenium,jsakamoto/selenium,mach6/selenium,Herst/selenium,krmahadevan/selenium,DrMarcII/selenium,tbeadle/...
py/selenium/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport subprocess\n\nTYPE_WARN_MSG = 'WARNING! A string \"%s\" passed to a numeric variable. ' \\\n 'Change the variable type or the passed value.' \\\n\n\n\nclass InvalidTokenError(Exception):\n ...
python
edit
1
1
mit
fc6aae454464aa31f1be401148645310ea9ee2b9
cloud4rpi/cloud4rpi
cloud4rpi/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\ndef mean_energy(x_blocks):\n return np.sqrt(np.mean(x_blocks**2, axis=1))\n\nif __name__ == '__main__':\n\n import matplotlib.pyplot as plt\n from files import load_wav\n from analysis import split_to_block...
python
edit
3
1
mit
e0b2ce4b0287e8321cddde6c658a833dcf147974
bzamecnik/tfr,bzamecnik/tfr
features.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport svgwrite\n\ndef main():\n print 'test'\n\nif __name__ == '__main__':\n main()\n\n```\n\nApply this change: Include the first bullet svg" }, { "role": "assistant", "content": "#!/usr/bin/env pyth...
python
edit
1
1
apache-2.0
abff14b5804bf43bc2bffeac6418259580bdbae5
nanaze/xmascard
makecard.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport RPi.GPIO as GPIO\n\n\nclass relay():\n def __init__(self, gpio_num, NC=False):\n self.gpio_num = gpio_num\n GPIO.setmode(GPIO.BCM)\n try:\n GPIO.input(self.gpio_num)\n raise LookupError(\...
python
edit
1
4
mit
c17fed815cd062b37ebe5e6118da43afcf89db1f
pahumadad/raspi-relay-api
relay_api/core/relay.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Generate fixtures.\"\"\"\n\nimport os\nimport json\nimport numpy as np\nfrom scipy import special\n\n\n# Get the file path:\nFILE = os.path.realpath(__file__)\n\n# Extract the directory in which this file reside...
python
edit
1
1
apache-2.0
d2699a9848652a17967ee5243055e811a7d0909b
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/logit/test/fixtures/python/runner.py
rejected_duplicate
Near-duplicate of sample 18226
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This preprocessor replaces Python code in markdowncell with the result\nstored in cell metadata\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2014, Juergen Hasch\n#\n# Distr...
python
edit
3
4
bsd-3-clause
b29e607d56ab07d07f4e33e2229a728cf0be1585
jbn/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,andyneff/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,andyneff/IPython-notebook-extensions,ipython-contrib/IPython-note...
usability/python-markdown/pymdpreprocessor.py
accepted
null
true