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#######################\n# PRODUCTION SETTINGS #\n#######################\n\nfrom os import environ\n\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom .base import *\n\nDEBUG = False\n\n\ndef get_env_setting(setting):\n \...
python
edit
2
2
mit
786f40b8bd93fa975819de5ae633361e09e1ff72
texastribune/emissions-database,texastribune/emissions-database,texastribune/emissions-database,texastribune/emissions-database
emission_events/emission_events/settings/production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy\nfrom gazebo_msgs.msg import ModelStates\nfrom geometry_msgs.msg import Twist\n\nfrom constants import DELTA_T, STEPS\nfrom controller import create_controller\nfrom plotter import Plotter\n\n\ndef get_po...
python
edit
1
1
mit
cd38101f097edc60312f0c083385968ed40fd54a
bit0001/trajectory_tracking,bit0001/trajectory_tracking
src/control.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport celery\n\nfrom tornado import ioloop\n\nfrom .connection import ConnectionPool\nfrom .producer import NonBlockingTaskProducer\nfrom .result import AsyncResult\n\nVERSION = (0, 3, 3)\n__versio...
python
edit
1
5
bsd-3-clause
932748b11bce94076f2e2d5637d4e8db8d4d1dbf
qudos-com/tornado-celery,sangwonl/tornado-celery,mher/tornado-celery,shnjp/tornado-celery
tcelery/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport io\nfrom setuptools import setup, find_packages\n\n\ncwd = os.path.abspath(os.path.dirname(__file__))\n\nwith io.open(os.path.join(cwd, 'README.rst'), encoding='utf-8') as fd:\n long_description = fd.read()\n\n\nsetup(\...
python
edit
1
0
apache-2.0
131bc5e7e52ff2cda42647ac7209e40246e857eb
eugeniy/pytest-tornado
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport sys\n\nfrom .generator import Generator\nfrom .repository import Repository\n\n\ndef run(args=sys.argv[1:]):\n parser = argparse.ArgumentParser()\n parser.add_argument('-s', '--source', default='snippets')\n ...
python
edit
1
1
isc
8ad795f86e16209007537cbf47a3466733653e2d
trilan/snippets,trilan/snippets
snippets/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom distutils.core import Command\nimport os\nimport sys\n\n\nclass TestCommand(Command):\n description = \"Run tests\"\n user_options = []\n\n def initialize_options(self):\n pass\n\n def f...
python
edit
4
1
mit
ed0e8654e73ee7c58e680ae9c44dac59ec98e839
cychiang/mafan,hermanschaaf/mafan
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport urlfetch\nimport re\nimport os\nimport sys\n\nsetup(\n name=\"urlfetch\",\n version=urlfetch.__version__,\n author=re.sub(r'\\s+<.*', r'', urlfetch.__author__),\n author_email=re.sub(r'(^.*<)...
python
edit
4
0
bsd-2-clause
f932ed13536fae9b5ad2b4082342cd48033b268d
ifduyue/urlfetch
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom heufybot.moduleinterface import IBotModule\nfrom heufybot.modules.commandinterface import BotCommand\nfrom zope.interface import implements\n\n\nclass JoinCommand(BotCommand):\n implements(IPlugin...
python
edit
1
3
mit
21783b68abeb8085b96f6b49fceaac079d23a341
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
heufybot/modules/commands/join.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boto3\nimport sys\nimport time\n\n\ndef health_check_tg(client, tg_arn, max_tries):\n if max_tries == 1:\n return False\n else:\n max_tries -= 1\n try:\n response = client.describ...
python
edit
1
4
apache-2.0
c0ff6cbf293bca3f0757a62e05a14c56dbdf12a4
tmobile/jazz-installer,tmobile/jazz-installer,tmobile/jazz-installer,tmobile/jazz-installer
installscripts/jazz-terraform-unix-noinstances/scripts/health_check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom acronym import abbreviate\n\n\n# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0\n\nclass AcronymTest(unittest.TestCase):\n def test_basic(self):\n self.assertEqual(abbreviate('Port...
python
edit
1
1
mit
080e4336675ea29b28b63698e5a0e77e91d54a2b
jmluy/xpython,smalley/python,exercism/xpython,exercism/python,smalley/python,jmluy/xpython,pheanex/xpython,pheanex/xpython,exercism/xpython,behrtam/xpython,exercism/python,N-Parsons/exercism-python,N-Parsons/exercism-python,mweb/python,mweb/python,behrtam/xpython
exercises/acronym/acronym_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n=====================\nCollectionViewer demo\n=====================\n\nDemo of CollectionViewer for viewing collections of images. This demo uses\nsuccessively darker versions of the same image to fake an image collection.\n\nYou ca...
python
edit
3
0
bsd-3-clause
43afda1fa0ae2d0011d6b87b5c05e3eb1fe13a21
rjeli/scikit-image,juliusbierk/scikit-image,vighneshbirodkar/scikit-image,Midafi/scikit-image,newville/scikit-image,SamHames/scikit-image,bennlich/scikit-image,vighneshbirodkar/scikit-image,ofgulban/scikit-image,blink1073/scikit-image,GaZ3ll3/scikit-image,keflavich/scikit-image,michaelpacer/scikit-image,chintak/scikit-...
viewer_examples/viewers/collection_viewer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom gdata.youtube.service import YouTubeService, YouTubeVideoQuery\nfrom django.utils.encoding import smart_str\nimport re\n\nclass YoutubeMusic:\n def __init__(self):\n self.service = YouTubeService()\n\n def search(self, art...
python
edit
1
9
mit
ca4d1454bd68715098001f9815af5325d157e786
6/GeoDJ,6/GeoDJ
geodj/youtube.py
rejected_duplicate
Near-duplicate of sample 3267
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, absolute_import, division\nfrom builtins import map, range, object, zip, sorted\n\nfrom .context import amplpy\nimport unittest\nimport tempfile\nimport ...
python
edit
7
3
bsd-3-clause
48394c55599968c456f1f58c0fcdf58e1750f293
ampl/amplpy,ampl/amplpy,ampl/amplpy
amplpy/tests/TestBase.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom defaults import *\n\nDATABASES = {\n 'default': {\n #'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'ENGINE': 'django.contrib.gis.db.backends.postgis',\n# 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
2
0
mit
bda756847e31e97eb8363f48bed67035a3f46d67
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
settings/travis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lettuce import step\nfrom lettuce import world\n\nfrom lettuce_webdriver.util import assert_true\nfrom lettuce_webdriver.util import assert_false\n\nimport logging\nlog = logging.getLogger(__name__)\n\ndef wait_for_elem(browser, xpath,...
python
edit
3
3
mit
a229e1737542a5011e70c3fa63c360638e96e754
koterpillar/aloe_webdriver,aloetesting/aloe_webdriver,macndesign/lettuce_webdriver,ponsfrilus/lettuce_webdriver,aloetesting/aloe_webdriver,macndesign/lettuce_webdriver,infoxchange/aloe_webdriver,bbangert/lettuce_webdriver,aloetesting/aloe_webdriver,koterpillar/aloe_webdriver,infoxchange/lettuce_webdriver,infoxchange/al...
lettuce_webdriver/css_selector_steps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"distutils\n\nThe main package for the Python Module Distribution Utilities. Normally\nused from a setup script as\n\n from distutils.core import setup\n\n setup (...)\n\"\"\"\n\n# This module should be kept compatible with Python...
python
edit
1
0
mit
aa1f421161e9afe20e0f28532d2b0327a8654a13
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/distutils/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\n\n__all__ = [\n 'ExtensionManager',\n 'EnabledExtensionManager',\n 'NamedExtensionManager',\n 'HookManager',\n 'DriverManager',\n]\n\nfrom .extension import ExtensionManager\nfrom .enabled import EnabledExtens...
python
edit
1
0
apache-2.0
72e3e1177dc23b4f3d358294d68b58c01d7c5931
openstack/stevedore
stevedore/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport http.client\n\n\ndef __is_online(domain, sub_path, response_status, response_reason):\n conn = http.client.HTTPSConnection(domain, timeout=1)\n conn.request(\"HEAD\", sub_path)\n response = conn.getresponse()\n conn.close...
python
edit
1
2
mit
14e98bc2038f50f38244550a1fa7ec3f836ed5f3
thatsIch/sublime-rainmeter
http/online_checker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first code for NeuralNetwork class." }, { "role": "assistant", "content": "import numpy as np\nimport theano\nimport theano.tensor as T\n\n\nclass NeuralNetwork(object):\n\n def __init__(self, layers, miniBatchSize):\n\t\t...
python
new_file
14
4
cc0-1.0
8910a61025062a40a3129f7a4330964b20337ec2
cn04/insanity
insanity/core.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom bs4 import BeautifulSoup\nimport requests\n\nr = requests.get(\"https://projects.archlinux.org/\")\nsoup = BeautifulSoup(r.text)\nrepos = soup.select(\".sublevel-repo a\")\n\nrepo_names = []\nfor repo in repos:\n ...
python
edit
1
0
unlicense
8c34cc43d23e0d97c531e1aa5d2339693db554e0
djmattyg007/archlinux,djmattyg007/archlinux
projects/projectdl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name=\"ioc_writer\",\n version=\"0.2.0\",\n author=\"William Gibb\",\n author_em...
python
edit
1
1
apache-2.0
7973a88d5980b84606671fea8ebdfe60fff6166f
mandiant/ioc_writer
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\npeople = 30\ncars = 40\nbuses = 55\n\n\nif cars > people:\n print \"We should take the cars.\"\nelif cars < people:\n print \"We should not take the cars.\"\nelse:\n print \"We can't decide.\"\n\nif buses > cars:\n print \"That'...
python
edit
12
0
mit
df91557edb813fc4b62b040b54e914f2f9b5237e
jaredmanning/learning,jaredmanning/learning
lpthw/ex30.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n#\n# Author: Massimo Menichinelli\n# Homepage: http://www.openp2pdesign.org\n# License: MIT\n#\n\nimport xlsxwriter\n\nworkbook = xlsxwriter.Workbook('FabLab-BusinessPlan.xlsx')\nworksheet = workbook.add_worksheet...
python
edit
1
0
mit
9657f6f428134a47bfbb41f889305dff355551d8
openp2pdesign/FabLab-BusinessPlan
fablab-businessplan.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nScript to test the import workflow.\n\nIt will remove an existing Nikola installation and then install from the\npackage directory.\nAfter that it will do create a new site with the import_wordpress\ncommand...
python
edit
1
3
mit
6926ddbb9cdbf05808339412cee5106e581f66cb
damianavila/nikola,xuhdev/nikola,getnikola/nikola,berezovskyi/nikola,TyberiusPrime/nikola,kotnik/nikola,atiro/nikola,servalproject/nikola,gwax/nikola,schettino72/nikola,kotnik/nikola,lucacerone/nikola,okin/nikola,s2hc-johan/nikola,andredias/nikola,masayuko/nikola,x1101/nikola,s2hc-johan/nikola,Proteus-tech/nikola,techd...
tests/import_wordpress_and_build_workflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom django.core import validators\nfrom .validators import validate_disposable_email\n\n\nclass DisposableEmailField(forms.CharField):\n default_validators = [validators.validate_emai...
python
edit
1
0
bsd-3-clause
a8cefc5330909150b9ad2ee04d08b8fff8a51108
aaronbassett/DisposableEmailChecker
disposable_email_checker/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nimport logging\nimport os\nimport datetime\nfrom rtrss import config\nfrom rtrss.models import User\nfrom rtrss.database import session_scope\n\n\n_logger = logging.getLogger(__name__)\n\n\ndef save_debug_file(filename, contents...
python
edit
1
4
apache-2.0
cdbcc903c72ba7bf8acb45d69248e62fdc10efcd
notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss
rtrss/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport termstyle\n\nfrom sniffer.api import file_validator, runnable\n\nfrom tmuxp.testsuite import main\n\n# you can customize the pass/fail colors like this\npass_fg_color = termstyle.green\npass_bg_color = termstyle.bg_defau...
python
edit
1
3
bsd-3-clause
7d6ad23cd8435eac9b48a4ea63bb9a2e83239c4a
thomasballinger/tmuxp,thomasballinger/tmuxp,mexicarne/tmuxp,tony/tmuxp,mexicarne/tmuxp
scent.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nimport operator\nsys.path.insert(1, os.path.abspath('..'))\nfrom wsinfo import Info\n\ncnt = 0\nmax_cnt = 100\nservers = {}\n\nwith open(\"urls.txt\", \"r\") as f:\n for url in f.readlines():\n url = url[:-1...
python
edit
1
0
mit
b922273cb4786e72dbf018b33100814e2a462ebe
linusg/wsinfo
examples/list_stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Markdown Exporter class\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# ...
python
edit
1
1
bsd-3-clause
3a0cf1f6114d6c80909f90fe122b026908200b0a
ipython/ipython,ipython/ipython
IPython/nbconvert/exporters/markdown.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\nfrom requests.utils import get_unicode_from_response\nfrom lxml import html as lxml_html\n\nclass BaseProvider(object):\n # ==== HELPER METHODS ====\n def parse_html(self, url, css_selector):\n htm...
python
edit
1
5
mit
a09689c570e70c80ad7cadd9702133b3851c63b9
EmilStenstrom/nephele
providers/provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ndef test_bar_fixture(testdir):\n testdir.tmpdir.join('test_foo.py').write('''\ndef test_a(bar):\n assert bar == \"something\"\n'''\n result = testdir.runpytest('--foo=something')\n\n\ndef test_foo_option(...
python
edit
1
1
mit
7e88a5d648d8e9aec82be14cd55667136adb3754
luzfcb/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin
pytest-{{cookiecutter.plugin_name}}/test_{{cookiecutter.plugin_name}}.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport amqp\nfrom contextlib import closing\n\n\ndef __get_channel(connection):\n return connection.channel()\n\ndef __declare_queue(channel, queue):\n channel.queue_declare(queue=queue, durable=True, auto_delete=False)\n\ndef __get_m...
python
edit
1
1
mit
3b4ec8893fe40f811716a893f11858f7bbf2ec80
jdgillespie91/trackerSpend,jdgillespie91/trackerSpend
utils/get_message.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 10.08.2017 23:20\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import TestCase, main\nfrom grammpy import *\nfrom grammpy.exceptions import NonterminalDoesNotExi...
python
edit
9
1
mit
95d0461cf2f06534f81a954b1f95658cbb019ec6
PatrikValkovic/grammpy
tests/startsymbol_tests/NonterminalNotInGrammarTest.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom skyfield.trigonometry import position_angle_of\nfrom skyfield.units import Angle\n\ndef test_position_angle():\n a = Angle(degrees=0), Angle(degrees=0)\n b = Angle(degrees=1), Angle(degrees=1)\n assert str(position_angle_of(a,...
python
edit
1
1
mit
3b366b32afedfd4bdae45ed5811d37679b3def0b
skyfielders/python-skyfield,skyfielders/python-skyfield
skyfield/tests/test_trigonometry.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright © 2014-2015 Colin Duquesnoy\n# Copyright © 2009- The Spyder Developmet Team\n#\n# Licensed under the terms of the MIT License\n# (see LICENSE.txt for details)\n\n\"\"\"\nProvides QtTest and functions\...
python
edit
3
1
mit
442f0df33b91fced038e2c497e6c03e0f82f55b2
spyder-ide/qtpy,davvid/qtpy,goanpeca/qtpy,davvid/qtpy,goanpeca/qtpy
qtpy/QtTest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pymw\nimport pymw.interfaces\n\nimport artgraph.plugins.infobox\n\nfrom artgraph.node import NodeTypes\nfrom artgraph.node import Node\n\nclass Miner(object):\n nodes = []\n relationships = []\n master = None\n task_queue...
python
edit
1
4
mit
fe1e6e4af9bf9b85be1046dd9b831e9741aaa677
dMaggot/ArtistGraph
src/artgraph/miner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nfrom django.db import models\n\n\nDIRECTION_CHOICES = (\n (\"I\", \"Incoming\"),\n (\"O\", \"Outgoing\"))\n\n\nclass HttpTesterMessage(models.Model):\n direction = models.CharF...
python
edit
1
0
bsd-3-clause
b78b14214e317d1149b37bcdcf5ba0681212431b
eHealthAfrica/rapidsms,peterayeni/rapidsms,ehealthafrica-ci/rapidsms,ehealthafrica-ci/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,eHealthAfrica/rapidsms,lsgunth/rapidsms,caktus/rapidsms,ehealthafrica-ci/rapidsms,catalpainternational/rapidsms,catalpainternational/rapidsms,peterayeni/rapidsms,catalpainternational/rapidsms...
rapidsms/contrib/httptester/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Tests for /query api endpoint.\"\"\"\n\nfrom datetime import datetime\nfrom operator import itemget...
python
edit
1
3
apache-2.0
e924f67b37c1a7612e520cca9715152029ddf338
selahssea/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,josthkko/g...
test/integration/ggrc/services/test_query_snapshots.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n#coding: utf-8\nimport requests\nimport re\nif __name__==\"__main__\":\n\tpage = requests.get('https://movie.douban.com/nowplaying/beijing/')\n\tcontent=page.text.encode(\"utf-8\")\n\tpattern=re.compile(r'(?<=id=\")\\d+(?...
python
edit
2
2
apache-2.0
5e2111a5ccc0bcbe7b9af4fec09b9b46eb03ebd3
ModernKings/MKMovieCenter,ModernKings/MKMovieCenter,ModernKings/MKMovieCenter
GenNowPlayingMovieID.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, unicode_literals\nimport logging\nimport os\nimport sys\n__version__ = '1.10.0'\n\n__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',\n 'mechlinker', 'preassembler',...
python
edit
16
1
bsd-2-clause
3f909cdfba61719dfa0a860aeba1e418fe740f33
bgyori/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra
indra/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from .. import api, shared as G\n from ... import editor\n from ..exc_fmt import str_e\n from ..protocols import floo_proto\nexcept (ImportError, ValueError):\n from floo import editor\n from floo.common import api,...
python
edit
1
3
apache-2.0
4a6a2155878d309e6bc96a948811daafa4a92908
Floobits/plugin-common-python
protocols/no_reconnect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom south.db import db\nfrom south.v2 import SchemaMigration\n\n\nclass Migration(SchemaMigration):\n\n def forwards(self, orm):\n db.rename_table('system_key_value', 'system_kv')\n\n def backwards(sel...
python
edit
4
1
bsd-3-clause
d3675b777dc95f296f26bdd9b8b05311ceac6ba5
akeym/cyder,murrown/cyder,zeeman/cyder,akeym/cyder,OSU-Net/cyder,murrown/cyder,OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,akeym/cyder,murrown/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder
cyder/core/system/migrations/0006_rename_table_from_system_key_value_to_system_kv.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport sys\nfrom distutils.core import setup\n\n\nsetup(\n name='pathlib',\n version=open('VERSION.txt').read().strip(),\n py_modules=['pathlib'],\n license='MIT License',\n description='Object-oriente...
python
edit
3
0
mit
2c03fec9a1afb22e2075fa537615d3802fef7ec6
mcmtroffaes/pathlib2,saddingtonbaynes/pathlib2
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add backwards compatible CharLCD wrapper" }, { "role": "assistant", "content": "import warnings\n\nfrom .common import Alignment, CursorMode, ShiftMode, BacklightMode\nfrom .contextmanagers import cursor, cleared\nfrom .gpio impo...
python
new_file
8
1
mit
decb1699fe036c55d33c7d3b77a834cf8c3ee785
GoranLundberg/RPLCD,thijstriemstra/RPLCD,dbrgn/RPLCD,paulenuta/RPLCD
RPLCD/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom os.path import join, dirname\nimport sys\n\nif sys.version_info.major < 3:\n print(\"Sorry, currently only Python 3 is supported!\")\n sys.exit(1)\n\nsetup(\n name = 'CollectionBatc...
python
edit
1
0
mit
fc8d9f995b0abd66da9b2db02dc3588f5e99e66a
jmenglund/CollectionBatchTool
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\n# This file is only used if you use `make publish` or\n# explicitly specify it as your config file.\n\nimport os\nimport sys\nsys.path.append(os.cu...
python
edit
2
0
mit
e5deebe61fdf5e1a186673a252743ebdabe4c0e5
pappasam/pappasam.github.io,pappasam/pappasam.github.io
publishconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport vx\n\ndef _expose(f, name=None):\n if name is None:\n name = f.__name__.lstrip('_')\n if getattr(vx, name, None) is not None:\n raise AttributeError(\"Cannot expose duplicate name: '{}'\".format(name))\n setatt...
python
edit
1
4
mit
4e1ff55e0575e710648867ada8fe421df280fb6a
philipdexter/vx,philipdexter/vx
utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport uuid\nimport hmac\n\nfrom django.db import models\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\n\ntry:\n from hashlib import sha1\nexcept ImportE...
python
edit
1
2
mit
5e1daf36d604ee1898e8486458013e63010d6888
YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,opps/opps,opps/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,williamroot/opps
opps/api/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Module:\t__init__\n# Date:\t\t3rd October 2008\n# Author:\tJames Mills, prologic at shortcircuit dot net dot au\n\n\"\"\"Circuits Library - Web\n\ncircuits.web contains the circuits full stack web server that is HTTP\nand WSGI compliant.\...
python
edit
20
0
mit
ab06e871a6c820845da2d4d60bb6b1874350cf16
eriol/circuits,eriol/circuits,nizox/circuits,treemo/circuits,treemo/circuits,eriol/circuits,treemo/circuits
circuits/web/__init__.py
rejected_lint
Too many lint violations: 20
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport atexit\nimport tempfile\nimport sys\nimport mock\nfrom selenium import webdriver\nimport os\n\n\ndef build_mock_mapping(name):\n mock_driver = mock.Mock()\n browser_mapping = {name: mock_driver}\n mock_driver.return_value.na...
python
edit
1
2
mit
311a858ecbe7d34f9f68a18a3735db9da8b0e692
alisaifee/holmium.core,alisaifee/holmium.core,alisaifee/holmium.core,alisaifee/holmium.core
tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis import serializers\nfrom rest_framework import serializers\n\nfrom people.models import Customer\nfrom people.models import InternalUser\n\n\nclass CustomerSerializer(serializers.ModelSerializer):\n phone_number =...
python
edit
2
2
apache-2.0
8af0f327b0f9b975f9fc05e41aff2f99bb26abce
rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory
people/serializers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update Urls from nora_menu app" }, { "role": "assistant", "content": "# -*- encoding: utf-8 -*-\nfrom django.conf.urls import url, include\nfrom django.views.decorators.csrf import csrf_exempt\nfrom .views import CreateMenu,ListM...
python
new_file
4
0
mit
4d7df38e056d0132af41759062cf8e380c736250
semorale/backend-test,semorale/backend-test,semorale/backend-test
django_backend_test/noras_menu/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test data\"\"\"\nfrom pathlib import Path\n\n\ndef patharg(path):\n \"\"\"\n Back slashes need to be escaped in ITEM args,\n even in Windows paths.\n\n \"\"\"\n return str(path).replace('\\\\', '\\\\\\\\\\\\')\n\n\nFIXT...
python
edit
1
1
bsd-3-clause
70ba84dc485ed3db4ccf5008db87b2c9f003634b
PKRoma/httpie,jakubroztocil/httpie,jkbrzt/httpie,jakubroztocil/httpie,jkbrzt/httpie,jakubroztocil/httpie,jkbrzt/httpie,PKRoma/httpie
tests/fixtures/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request\nfrom flask import url_for\nfrom flask import abort\n\nfrom siege.service import app, db\nfrom siege.models import Device\nfrom view_utils import jsonate\n\n\n@app.route('/devices')\ndef devices_index():\n respo...
python
edit
1
2
bsd-2-clause
aaa3f6b8154f03eab16528c05d889c6160e63f22
WalterCReel3/siege,WalterCReel3/siege,WalterCReel3/siege,WalterCReel3/siege
server/siege/views/devices.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom fabric.api import env, run, sudo, task\nfrom fabric.context_managers import cd, prefix\n\nenv.use_ssh_config = True\nhome = '~/jarvis2'\n\n\n@task\ndef pull_code():\n with cd(home):\n run('git pull --...
python
edit
1
2
mit
3885fcbb31393f936bc58842dc06bdc9ffe55151
Foxboron/Frank,mpolden/jarvis2,martinp/jarvis2,Foxboron/Frank,mpolden/jarvis2,mpolden/jarvis2,martinp/jarvis2,Foxboron/Frank,martinp/jarvis2
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom bulbs.content.models import Content, FeatureType\nfrom bulbs.content.tasks import post_to_instant_articles_api\n\nimport timezone\n\n\nclass Command(BaseCommand):\n\n def add_ar...
python
edit
1
4
mit
4bf218a843c61886c910504a47cbc86c8a4982ae
theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,theonion/django-bulbs
bulbs/content/management/commands/migrate_to_ia.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Copyright (C) 2016 Google Inc., authors, and contributors\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\nfrom .bootstrap import db, logger\n\n```\n\nApply this change: Remove logger from ggrc init\n\n...
python
edit
1
0
apache-2.0
4a75df6e253401cbed7b31e1882211946f02093a
selahssea/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-co...
src/ggrc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nranges = []\nfor line in open('input.txt', 'r'):\n ranges.append(tuple(map(int, line.split('-'))))\nranges.sort()\n\nlowest = 0\nfor l, r in ranges:\n if l <= lowest <= r:\n lowest = r + 1\n\nprint(lowest)\ninput()\n\n```\n\nAp...
python
edit
1
0
unlicense
30c21806dcc347326d6ac51be2adac9ff637f241
ultramega/adventofcode2016
day20/part1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: set fileencoding=utf-8 :\n# Andre Anjos <<EMAIL>>\n# Fri 20 Sep 14:45:01 2013\n\n\"\"\"Blitz++ Array bindings for Python\"\"\"\n\nfrom ._library import array, as_blitz, __version__, __api_version__, versions\n\...
python
edit
7
1
bsd-3-clause
0a51f23417034e6cdada4ac01e3d3dcf8026f822
tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz,tiagofrepereira2012/bob.blitz
xbob/blitz/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\nfrom .psparser import LIT\n\nimport six #Python 2+3 compatibility\n\n## PDFColorSpace\n##\nLITERAL_DEVICE_GRAY = LIT('DeviceGray')\nLITERAL_DEVICE_RGB = LIT('DeviceRGB')\nLITERAL_DEVICE_CMYK = LIT('DeviceCMYK')\n\n\ncla...
python
edit
3
1
mit
b6c63bedc6fcd2294aae60643f41df4acb2ee681
goulu/pdfminer,pdfminer/pdfminer.six
pdfminer/pdfcolor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, Extension\n\nnadis_impl = Extension('nadis_impl',\n sources = [\n 'src/driver.c',\n 'src/parser.c',\n 'src/serializer.c',\n 'src/connection.c',\n 'src/circular_buffer.c'\n ])\n\ns...
python
edit
1
0
mit
9aada64ad8425b7e1a64a136d531e39a036ea3c9
gviot/nadis,gviot/nadis,gviot/nadis
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nreadme_path = os.path.join(os.path.dirname(\n os.path.abspath(__file__)),\n 'README.rst',\n)\nlong_description = open(readme_path).read()\nversion_path = os.path.join(os.path.dirname(\n os.path....
python
edit
4
0
mit
73007bf3b2764c464dd475fa62d8c2651efe20eb
mwielgoszewski/flask-ldap3-login,nickw444/flask-ldap3-login
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nimport os\nfrom tasklib import TaskWarrior\n\ntime_attributes = ('wait', 'scheduled')\n\ndef is_new_local_recurrence_child_task(task):\n # Do not affect tasks not spun by recurrence\n if not task['pare...
python
edit
1
4
mit
21bff1460ae71c1664ab3fbccd678bc5be0b8dd3
tbabej/task.shift-recurrence
pirate_add_shift_recurrence.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint, render_template\nfrom flask_security import login_required\n\nadmin = Blueprint('admin', __name__)\n\n\n@admin.route('/')\n@admin.route('/index')\n@login_required\ndef index():\n return render_template('admin...
python
edit
1
2
mit
7801c5d7430233eb78ab8b2a91f5960bd808b2c7
Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger
app/admin/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hmac\n\nimport bcrypt\n\nfrom sqlalchemy.schema import Column\nfrom sqlalchemy.types import Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\n\n__all__ = ['Base', 'Account']\n\nBase = declarative_base()\n\nMAX...
python
edit
3
2
bsd-3-clause
c7601ed4144b12717f536f2fc2fc0ddb5745ec27
EclecticIQ/OpenTAXII,Intelworks/OpenTAXII,EclecticIQ/OpenTAXII,Intelworks/OpenTAXII
opentaxii/auth/sqldb/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from setuptools import setup\n from setuptools import find_packages\n packages = find_packages()\nexcept ImportError:\n from distutils.core import setup\n import os\n packages = [x.strip('./').replace('/','.') for x...
python
edit
1
0
bsd-2-clause
4f133cb1c9bb389156175268eb1b989d76e4d280
angr/cle
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uuid import uuid1\n\nfrom django.conf import settings\nfrom django.contrib.auth import models as auth_models\nfrom django.db import models\nimport facepy\nimport simplejson\n\nfrom facebook_auth import utils\n\nclass FacebookUser(auth_...
python
edit
1
2
mit
12cf7d220408971509b57cb3a60f2d87b4a37477
jgoclawski/django-facebook-auth,pozytywnie/django-facebook-auth,pozytywnie/django-facebook-auth,jgoclawski/django-facebook-auth
facebook_auth/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.10.1\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\...
python
edit
1
0
mit
7ce419de1f39050940b8399401a77b2096b74ca2
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom .models import AwareModel, NaiveModel\nfrom ..templatetags.boardinghouse import *\n\nclass TestTemplateTags(TestCase):\n def test_is_schema_aware_filter(self):\n self.assertTrue(is_schema_a...
python
edit
1
1
bsd-3-clause
a8283f5d2c1d970b7b676d491ad8c9472abfe667
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/tests/test_template_tag.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom abc import ABC, abstractmethod\n\n\nclass TVShowNotFound(Exception):\n \"\"\" Raised when a reference does not match any TV Show available \"\"\"\n\n\nclass EpisodeSource(ABC):\n \"\"\"\n Abstract base class to define the inte...
python
edit
1
1
mit
b35d4292e50e8a8dc56635bddeac5a1fc42a5d19
tveebot/tracker
tveebot_tracker/source.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom defprogramming.settings import *\n\nALLOWED_HOSTS = ['*']\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\n# Update database configuration with $DATABASE_URL.\nimport dj_database_url\ndb_from_env = dj_database_url.config(conn_max_age=500)\n...
python
edit
3
0
mit
38ae4ddab1a5b94d03941c4080df72fea4e750bc
daviferreira/defprogramming,daviferreira/defprogramming,daviferreira/defprogramming
defprogramming/settings_production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# dashcam.py\n# A Raspberry Pi powered, GPS enabled, 3D printed bicycle dashcam\n# By Matthew Timmons-Brown, The Raspberry Pi Guy\n\nimport pygame\nimport picamera\nimport os\n\nos.putenv('SDL_VIDEODRIVER', 'fbcon')\nos.putenv('SDL_FBDEV' ...
python
edit
5
0
mit
eae4b06bd798eab3a46bdd5b7452411bb7fb02e1
the-raspberry-pi-guy/bike_dashcam,the-raspberry-pi-guy/bike_dashcam
dashcam.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lib.actions import BaseAction\n\n__all__ = [\n 'CreatePoolMemberAction'\n]\n\n\nclass CreatePoolMemberAction(BaseAction):\n api_type = 'loadbalancer'\n\n def run(self, region, pool_id, node_id, port):\n driver = self._g...
python
edit
1
1
apache-2.0
8a975088008ab33e6cb3dc42567cb1ca195563fa
armab/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,pidah/st2contrib,StackStorm/st2contrib,armab/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,armab/...
packs/dimensiondata/actions/create_pool_member.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.contrib.sites.models import SITE_CACHE\n\nfrom pages import settings\nfrom pages.models import Page, Content\nfrom pages.utils import auto_render, ...
python
edit
3
6
bsd-3-clause
fbcdd58775be1b6a72e1d1415f62a7bfade3dbd1
remik/django-page-cms,akaihola/django-page-cms,oliciv/django-page-cms,akaihola/django-page-cms,akaihola/django-page-cms,remik/django-page-cms,oliciv/django-page-cms,batiste/django-page-cms,pombredanne/django-page-cms-1,pombredanne/django-page-cms-1,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page...
pages/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDjango Settings that more closely resemble SAML Metadata.\n\nDetailed discussion is in doc/SETTINGS_AND_METADATA.txt.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\n\nCERTIFICATE_...
python
edit
1
3
mit
0b8cc130f00b51b18e55805f82ba661fdf66fba6
mobify/dj-saml-idp,mobify/dj-saml-idp,mobify/dj-saml-idp
saml2idp/saml2idp_metadata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.6.1'\n\n```\n\nApply this change: Increment patch version to 0.6.2" }, { "role": "assistant", "content": "\"\"\"yolk\n\nAut...
python
edit
1
0
bsd-3-clause
806e3b4f92fdc72a83cac18d338d7293673f9650
myint/yolk,myint/yolk
yolk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport time\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n\nfrom redis import StrictRedis\nfrom rq import Queue\nfrom apscheduler.schedulers.blocking import BlockingScheduler\n\nfrom d1lod import jobs\n\nconn = Stri...
python
edit
3
1
apache-2.0
1dade842098292f2201502fa55239a98628dfc2b
ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod
scheduler/schedule.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nimport yaml\n\n\ndef parse_arguments_based_on_yaml(yaml_file):\n with open(yaml_file) as f:\n yaml_data = yaml.load(f)\n\n # to start with, support only a single parameter\n key = list(yaml_data.keys())[0]...
python
edit
1
2
mit
6dfb0c1ea4fb3d12d14a07d0e831eb32f3b2f340
krasch/yaml_argparse,krasch/quickargs
yaml_argparse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n'''\nThe main entry point for salt-api\n'''\n# Import python libs\nimport logging\nimport multiprocessing\n\n# Import salt-api libs\nimport salt.loader\n\nlogger = logging.getLogger(__name__)\n\n\nclass NetapiClient(objec...
python
edit
1
3
apache-2.0
baacda228682a50acc5a4528d43f5d3a88c7c6ec
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/client/netapi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport getpass\nfrom distutils.command import upload as orig\n\n\nclass upload(orig.upload):\n \"\"\"\n Override default upload behavior to obtain password\n in a variety of different ways.\n \"\"\"\n\n def finalize_options(s...
python
edit
1
4
mit
a3b119e14df4aff213231492470587f88457a241
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/command/upload.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nfrom StringIO import StringIO\n\nimport boto3\n\nfrom dmr_marc_users_cs750 import (\n get_users, get_groups,\n write_contacts_csv,\n write_contacts_xlsx\n )\n\n\ndef s3_contacts(contacts, bucket, key):\n ...
python
edit
1
4
apache-2.0
73e8864e745ca75c2ea327b53244c9f2f4183e1a
ajorg/DMR_contacts
lambda_function.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom thinglang import utils\nfrom thinglang.execution.execution import ExecutionEngine\nfrom thinglang.lexer.lexer import lexer\nfrom thinglang.parser.analyzer import Analyzer\nfrom thinglang.parser.parser import parse\nfrom th...
python
edit
1
3
mit
bb86433e80c1361b57c58fb32a2e250e915b1b05
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('signal', parent_package, top_path)\n\n config.add_data_dir('tests')\n\n ...
python
edit
1
1
bsd-3-clause
b757a5e24fa8018647827b8194c985881df872d5
andyfaff/scipy,sauliusl/scipy,newemailjdm/scipy,jor-/scipy,mikebenfield/scipy,jsilter/scipy,mortada/scipy,josephcslater/scipy,jjhelmus/scipy,trankmichael/scipy,larsmans/scipy,jamestwebber/scipy,jonycgn/scipy,haudren/scipy,petebachant/scipy,endolith/scipy,vigna/scipy,e-q/scipy,raoulbq/scipy,aeklant/scipy,fredrikw/scipy,...
scipy/signal/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ObjectDoesNotExist\nimport requests\nfrom apps.meetings.models import Meeting, RSVP\n\n\ndef meetup_meeting_sync(api_key, meetup_event_id):\n url = \"http://api.meetup.com/2/rsvps\"\n params = dict(k...
python
edit
1
3
mit
7822598afa31f0f556766c53ecff27cb8aca76d6
brianray/chipy.org,brianray/chipy.org,bharathelangovan/chipy.org,tanyaschlusser/chipy.org,chicagopython/chipy.org,agfor/chipy.org,brianray/chipy.org,tanyaschlusser/chipy.org,chicagopython/chipy.org,agfor/chipy.org,chicagopython/chipy.org,bharathelangovan/chipy.org,chicagopython/chipy.org,agfor/chipy.org,tanyaschlusser/...
chipy_org/apps/meetings/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',...
python
edit
1
2
mit
94c55abd918cae7aba02d729c44067ad006ee20d
Doist/todoist-python
setup.py
rejected_duplicate
Near-duplicate of sample 2235
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014-present PlatformIO <<EMAIL>>\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
4
apache-2.0
b2771e6b33bd889c971b77e1b30c1cc5a0b9eb24
platformio/platform-ststm32,platformio/platform-ststm32
platform.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (c) Stefan Countryman 2017\n# set up an interactive environment with gracedb rest api access.\nimport ligo.gracedb.rest\nclient = ligo.gracedb.rest.GraceDb()\n\n```\n\nApply this change: Add gcn_notice_filename function to igrace" }, ...
python
edit
2
2
mit
bb22c2f673e97ff1f11546d63e990bede4bb2526
stefco/dotfiles,stefco/dotfiles,stefco/dotfiles
linkfiles/.config/ipython/profile_grace/startup/30-grace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport sys\nif 'darwin' in sys.platform:\n sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')\nsys.path.append('.')\n\nimport adapter\nadapter.main.run_tcp_server()\n\n...
python
edit
1
0
mit
1e8c094c0f806b624a41447446676c1f2ac3590d
vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb
tools/debug_adapter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nMPI_COMMAND = 'mpirun -n {n_proc} {executable}'\n\ndef set_mpi_command(command):\n \"\"\"\n Set the MPI Command to use.\n \n This should contain {n_proc} to indicate the number of processes, and\n {executable} to indicate the...
python
edit
1
1
bsd-3-clause
9dad4033e4a66208ca00bcb0340f6a2271f1090f
vterron/montage-wrapper,astrofrog/montage-wrapper,astropy/montage-wrapper,astrofrog/montage-wrapper,jat255/montage-wrapper
montage_wrapper/mpi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lib import BaseTest\n\n\nclass ShowMirror1Test(BaseTest):\n \"\"\"\n show mirror: regular mirror\n \"\"\"\n fixtureCmds = [\"aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy\"]\n runCmd = \"aptly mirror...
python
edit
1
0
mit
db4ccce9e418a1227532bde8834ca682bc873609
gearmover/aptly,bsundsrud/aptly,adfinis-forks/aptly,vincentbernat/aptly,gdbdzgd/aptly,ceocoder/aptly,adfinis-forks/aptly,seaninspace/aptly,neolynx/aptly,scalp42/aptly,gdbdzgd/aptly,sobczyk/aptly,neolynx/aptly,scalp42/aptly,aptly-dev/aptly,seaninspace/aptly,aptly-dev/aptly,bsundsrud/aptly,gdbdzgd/aptly,bankonme/aptly,ad...
system/t04_mirror/show.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmissing = object()\n\n\nclass GlobalSecondaryIndex(object):\n def __init__(self, hash_key=None, range_key=None,\n write_units=1, read_units=1, name=missing):\n self._model_name = None\n self._backing_name = ...
python
edit
1
2
mit
7520e1285af36292def45f892808841e78cc4a2b
numberoverzero/bloop,numberoverzero/bloop
bloop/index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport serial\nimport threading\n\nprint('Starting server...')\n\ntemperature_usb = '/dev/ttyAMA0'\nBAUD_RATE = 9600\ntemperature_ser = ser.Serial(temperature_usb, BAUD_RATE)\n\ndef process_line(line):\n\tprint('Need to process line: {}'.fo...
python
edit
1
3
mit
21844df3e266803cc119d049faadddb5bf5410f0
illumenati/duwamish-sensor,tipsqueal/duwamish-sensor
run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom os.path import dirname\n\nMIU_TEST_ROOT = dirname(__file__)\n\nINSTALLED_APPS = [\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"markitup\",\n \"tests\",\n \"...
python
edit
1
0
bsd-3-clause
5356aee78495dd7846cec6625b3980ba93be86e6
zsiciarz/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup
tests/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef raindrops(number):\n if is_three_a_factor(number):\n return \"Pling\"\n if is_five_a_factor(number):\n return \"Plang\"\n return \"{}\".format(number)\n\ndef is_three_a_factor(number):\n return number % 3 == 0\...
python
edit
1
4
mit
f802111f1f241444f874119e5949f3da4abd1c85
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
python/raindrops/raindrops.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nfrom scell import Selector\nfrom pytest import raises, fixture\n\n\ndef test_select(selector):\n res = list(selector.select())\n assert res\n for event in res:\n assert event.ready\n\n\...
python
edit
4
2
mit
9dc253b79d885ca205b557f88fca6fa35bd8fe21
eugene-eeo/scell
tests/test_selector.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom buildbot.status import html, words\nfrom buildbot.status.web.authz import Authz\nfrom buildbot.status.web.auth import BasicAuth\n\n# authz = Authz(\n# forceBuild=True,\n# forceAllBuilds=True,\n# pingBuilder=True,\n# gra...
python
edit
5
1
bsd-3-clause
bddab649c6684f09870983dca97c39eb30b62c06
hochanh/django-buildmaster,jacobian-archive/django-buildmaster
djangobotcfg/status.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Namespaces for Scopus XML\nns = {'dtd': 'http://www.elsevier.com/xml/svapi/abstract/dtd',\n 'dn': 'http://www.elsevier.com/xml/svapi/abstract/dtd',\n 'ait': \"http://www.elsevier.com/xml/ani/ait\",\n 'cto': \"http://www.els...
python
edit
1
2
mit
4be668a7d8cdb692c20be2eabf65c20e294e16a8
scopus-api/scopus,jkitchin/scopus
scopus/utils/get_encoded_text.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport traceback\n\nimport click\n# Ignore error, logging set up in logging utils\nfrom spoppy import logging_utils\nfrom spoppy.navigation import Leifur\n\nlogger = logging.getLogger(__name__)\n\n\n@click.command()\n@click....
python
edit
3
5
mit
cb3240d07ed44349687128c4aa49459f08030c09
sindrig/spoppy,sindrig/spoppy
spoppy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nclass Handler(object):\n def __init__(self, db):\n # Each handlers is formatted following\n # the pattern : [ command,\n # default return value,\n ...
python
edit
1
5
mit
feecf02f831394747cdee63892d12811f137938c
oleiade/Elevator
elevator/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom django.forms.widgets import MultiWidget, Select, NumberInput\n\nfrom . import ureg\n\n\nclass QuantityWidget(MultiWidget):\n\n def get_choices(self, allowed_types=None):\n allowed_types = allowed_types or dir(ure...
python
edit
1
3
mit
7b1a0022b41dbf17de352e4686458e5250b28e49
bharling/django-pint,bharling/django-pint
quantityfield/widgets.py
accepted
null
true