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\nimport os\nimport pytest\nimport tempfile\nimport shutil\nfrom falafel.content.manager import ContentManager\n\n\n@pytest.fixture\ndef cm():\n tmp_dir = tempfile.mkdtemp()\n yield ContentManager(tmp_dir, \"falafel.tests.plugins\")\n ... | python | edit | 1 | 1 | apache-2.0 | 18baa0b6f963692e6de8ee8425a36f75a21f83d0 | RedHatInsights/insights-core,RedHatInsights/insights-core | falafel/tests/content/test_content_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom ansible.models import Playbook\nimport os\n\n\ndef content_loader(pk, slug):\n playbook = Playbook.query_set.get(pk=pk)\n playbook_dir = playbook.directory\n # TODO: for now assume without val... | python | edit | 3 | 1 | bsd-3-clause | 533ed337dd5f6087ac059ed47f1a0ce344ce48ce | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | src/utils/playbook.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Small helper for perftest runs.\n#\n\nimport os\nimport sys\nimport subprocess\n\ndef main():\n\tcount = int(sys.argv[1])\n\n\ttime_min = None\n\tfor i in xrange(count):\n\t\tcmd = [\n\t\t\t'time',\n\t\t\t'-f', '%U'... | python | edit | 3 | 5 | mit | 0d90da8fca411033d66c3a82096a67e12fca830e | reqshark/duktape,jmptrader/duktape,harold-b/duktape,chenyaqiuqiu/duktape,harold-b/duktape,nivertech/duktape,zeropool/duktape,harold-b/duktape,zeropool/duktape,harold-b/duktape,chenyaqiuqiu/duktape,jmptrader/duktape,harold-b/duktape,chenyaqiuqiu/duktape,kphillisjr/duktape,skomski/duktape,nivertech/duktape,skomski/duktap... | util/time_multi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Generated by Django 3.0.8 on 2020-07-23 02:19\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('jobs', '0002_auto_20200708_2203'),\n ]\n\n operations = [\n ... | python | edit | 1 | 0 | apache-2.0 | 3d7459f7b1d40bb94a64d3f08d41942feabf4c12 | stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub | manager/jobs/migrations/0003_auto_20200723_0219.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\n\nversion = '0.5.1'\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.txt')).read()\n CHANGES = open(os.path.join(here, 'docs/HI... | python | edit | 1 | 0 | mit | 0b5e16ad77aebdde05dbffef78265755c779bb8b | TurboGears/tgext.admin,TurboGears/tgext.admin | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTest obtaining peak audio values with PyAV:\ntime python pyav_audio_vol.py ~/Videos/sample.mp4\n\nReference:\nhttps://ffmpeg.org/doxygen/trunk/group__lavu__sampfmts.html\n\"\"\"\n\n\nimport sys\nimport av\nimport numpy as np\n# impo... | python | edit | 1 | 1 | bsd-2-clause | b172ee1c1ed76836e570e08f0624a456c07cc388 | yan123/BitBox,yan123/QABox,yan123/QABox | get_max_audio.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.http import Http404\nfrom django.contrib.messages import success\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom wagtail.wagtailcore.models import Page\n\nfrom .models import... | python | edit | 1 | 3 | bsd-3-clause | 511a133599b86deae83d9ad8a3f7a7c5c45e07bf | PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari | core/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\nimport sys\n\nfrom server_common.ioc_data_source import IocDataSource\nfrom server_common.mysql_abstraction_layer import SQLAbstraction\nfrom server_common.utilities import print_and_log, SEVERITY\n\n\ndef register_i... | python | edit | 1 | 4 | bsd-3-clause | 2b1b4ab1bfa494021197756d3877f38e1b290435 | ISISComputingGroup/EPICS-inst_servers,ISISComputingGroup/EPICS-inst_servers | server_common/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\n\noutput = '../build/Tween.js';\n\n# os.system(\"java -jar yuicompressor-2.4.2.jar ../src/Tween.js -o ../build/Tween.js --charset utf-8 -v\");\nos.system(\"java -jar compiler.jar --js ../src/Tween.js --js_output_file ... | python | edit | 3 | 0 | mit | aca3cf45ba32cdad69c232794497fc8033b63cc6 | CasualBot/tween.js,JITBALJINDER/tween.js,altereagle/tween.js,gopalindians/tween.js,rocbear/tween.js,Twelve-60/tween.js,wangzuo/cxx-tween,Twelve-60/tween.js,olizilla/tween.js,gopalindians/tween.js,camellhf/tween.js,camellhf/tween.js,olizilla/tween.js,rocbear/tween.js,npmcomponent/bestander-tween.js,altereagle/tween.js,T... | utils/builder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom zope.interface import Interface\n\nfrom filesystems import _PY3\n\n\nclass Path(Interface):\n def __str__():\n \"\"\"\n Render the path as a string.\n \"\"\"\n\n if _PY3:\n def __truediv__(other):\n ... | python | edit | 1 | 1 | mit | 75fc7888cf4db89ae55324b325afc44452799cb3 | Julian/Filesystems | filesystems/interfaces.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import g\nfrom flask.ext.login import current_user\n\nfrom tmi.core import app\nfrom tmi.assets import assets # noqa\nfrom tmi.views.ui import ui # noqa\nfrom tmi.views.auth import login, logout # noqa\nfrom tmi.views.admin impor... | python | edit | 3 | 2 | mit | 8b7aef341aadefb859790684f41453f561813083 | pudo/storyweb,pudo/storyweb | tmi/views/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os.path import dirname, abspath\n\nimport django\nfrom django.conf import settings\n\n\nif len(sys.argv) > 1 and 'postgres' in sys.argv:\n sys.argv.remove('postgres')\n db_engine = 'django.db.ba... | python | edit | 1 | 3 | mit | 83292a4b6f6bec00b20c623fa6f44e15aa82cd2a | coleifer/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nlong_description = (\n open('README.rst').read()\n + '\\n' +\n open('CHANGES.txt').read())\n\ntests_require = [\n 'pytest >= 2.0',\n 'pytest-cov',\n 'WebTest >= 2.0.14',\n ... | python | edit | 1 | 0 | bsd-3-clause | 995f06a33bf92dcff185a50f84743323170a8b7a | faassen/bowerstatic,faassen/bowerstatic | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.gis.geos import Polygon\n\n\nclass ResourceLink(object):\n def __init__(self, type, href):\n self.type = type\n self.href = href\n\n\nclass Resource(object):\n def __init__(se... | python | edit | 1 | 1 | apache-2.0 | 2a5b81ff6272f346bcca3bdc97e3d6d9dfe2b017 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | src/mmw/apps/bigcz/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport unittest\nfrom firmant.utils import get_module\n# Import this now to avoid it throwing errors.\nimport pytz\n\nfrom firmant.configuration import settings\nfrom test.configuration import suite as configuration_tests... | python | edit | 4 | 0 | bsd-3-clause | 37fcbbe7bb8a46bd32fc92341d1b42f2400abc9b | rescrv/firmant | runtests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nedx-lint\n========\n\nA collection of code quality tools:\n\n- A few pylint plugins to check for quality issues pylint misses.\n\n- A command-line tool to generate config files like pylintrc from a master\n file (part of edx_lint),... | python | edit | 1 | 0 | apache-2.0 | 2e9808561c55a729fef493b03e5bcdd13422a92c | edx/edx-lint | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n\nclass VisualFormatWriter(object):\n \"\"\"\n A class responsible for writing observation data in AAVSO\n `Visual File Format`_.\n\n The API here mimics the ``csv`` module in Python st... | python | edit | 1 | 1 | mit | c1d8bf0916e1f59610fc69f0b11909964755ee38 | zsiciarz/pyaavso | pyaavso/formats/visual.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nimport os\n\n__doc__ = \"\"\"\nApp for Django featuring improved form base classes.\n\"\"\"\n\nversion = '1.1.5.dev0'\n\n\ndef read(fname):\n return open(os.path.join(os... | python | edit | 1 | 1 | bsd-2-clause | 682ad4b8c85ae271ab7e5a488867c61082efb175 | fusionbox/django-betterforms,fusionbox/django-betterforms | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom django.conf import settings\nfrom django.core.management import execute_from_command_line\n\nif not settings.configured:\n settings.configure(\n DEBUG = True,\n TEMPLATE_DEBUG = True,... | python | edit | 1 | 1 | bsd-3-clause | 191812e1e16aea352c1a47cd5bd6cd3f0ed67802 | edoburu/django-template-analyzer,edoburu/django-template-analyzer | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function, division\n\nfrom firedrake import *\n\nmesh = UnitSquareMesh(2, 2)\nRT = FiniteElement(\"RT\", triangle, 1)\nV = FunctionSpace(mesh, RT)\nu = TrialFunction(V)\nv = TestFunction(V)\n\nf... | python | edit | 31 | 0 | mit | 1f7f058d97c6599401558a280d85affed7fb5394 | thomasgibson/firedrake-hybridization | testing/hdiv_proj.py | rejected_lint | Too many lint violations: 31 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nfrom optparse import OptionParser\nfrom subprocess import Popen\nimport os\nimport sys\n\n\ndef run_command(cmdline):\n proc = Popen(cmdline, shell=True)\n proc.communi... | python | edit | 1 | 8 | mit | 659659270ef067baf0edea5de5bb10fdab532eaa | akheron/sala,akheron/sala | run-tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport os\n\n\ndef gh_deploy(config):\n if not os.path.exists('.git'):\n print 'Cannot deploy - this directory does not appear to be a git repository'\n return\n\n print \"Copying '%s' to `gh-pages` br... | python | edit | 4 | 5 | bsd-2-clause | 175a8fa2aa595132cf6dbf8ed405bb0682ab95dd | fujita-shintaro/mkdocs,peter1000/mkdocs,waylan/mkdocs,fujita-shintaro/mkdocs,mlzummo/mkdocs,michaelmcandrew/mkdocs,jimporter/mkdocs,kubikusrubikus/mkdocs,samhatfield/mkdocs,d0ugal/mkdocs,williamjmorenor/mkdocs,ericholscher/mkdocs,jeoygin/mkdocs,michaelmcandrew/mkdocs,nicoddemus/mkdocs,tedmiston/mkdocs,cazzerson/mkdocs,... | mkdocs/gh_deploy.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport django\nimport os\nimport sys\n\nif django.VERSION < (1, 5):\n sys.stderr.write(\"ERROR: guardian's example project must be run with \"\n \"Django 1.5 or later!\\n\")\n sys.exit(1)\n\n... | python | edit | 1 | 0 | bsd-2-clause | 2f2695b9a63de7c6695036c34c2db129c22d244a | rmgorman/django-guardian,lukaszb/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian | example_project/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'test checking constant conditions'\n\n# __pychecker__ = ''\n\ndef func1(x):\n 'should not produce a warning'\n if 1:\n pass\n while 1:\n print x\n break\n assert x, 'test'\n return 0\n\ndef func2(x):\n ... | python | edit | 4 | 6 | bsd-3-clause | 352aeadf68c102b03dc7fcc243e46c3442132c1d | smspillaz/pychecker,smspillaz/pychecker,smspillaz/pychecker | pychecker/test_input/test70.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nImport the main names to top level.\n\"\"\"\n\nfrom .compute_fp import compute_fixed_point\nfrom .discrete_rv import DiscreteRV\nfrom .ecdf import ECDF\nfrom .estspec import smooth, periodogram, ar_periodogram\nfrom .graph_tools imp... | python | edit | 34 | 0 | bsd-3-clause | 43dca4ad969e44bb753c152e8f7768febea6fb68 | oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,QuantEcon/QuantEcon.py,oyamad/QuantEcon.py | quantecon/__init__.py | rejected_lint | Too many lint violations: 34 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='gdcdatamodel',\n packages=find_packages(),\n install_requires=[\n 'pytz==2016.4',\n 'graphviz==0.4.2',\n 'jsonschema==2.5.1',\n 'psqlgraph',\... | python | edit | 1 | 0 | apache-2.0 | c8bf52d51a5cc678160add7db937ed92aaa6bb09 | NCI-GDC/gdcdatamodel,NCI-GDC/gdcdatamodel | setup.py | rejected_duplicate | Near-duplicate of sample 626 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom werkzeug.exceptions import ServiceUnavailable\nfrom werkzeug.datastructures import MultiDict\nfrom werkzeug.urls import url_parse\n\nfrom flask import current_app, request, redirect, flash, Markup\n\nfrom .. import m... | python | edit | 3 | 3 | mit | 667182bf3460e2237255b00b0eea20a1cf4a83ab | alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend | app/main/views/feedback.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport hashlib\n\nfrom .. import Session\nfrom .. import models\n\nclass TestSession(unittest.TestCase):\n\tdef setUp(self):\n\t\tself.sess = Session()\n\n\tdef test_public_file_download(self):\n\t\turl = 'https://mega.co.n... | python | edit | 1 | 2 | bsd-3-clause | 067b557258a85945635a880ced65454cfa2b61af | lmb/Supermega | supermega/tests/test_session.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(self.config['media_dir'])\n se... | python | edit | 1 | 4 | mit | 7076e7eb0fcce37159aa58c2c0699674434115d9 | Surye/relaygram | relaygram/http_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetuptools.setup(\n name=\"autograd-gamma\",\n version=\"0.4.2\",\n description=\"Autograd compatible approxi... | python | edit | 1 | 0 | mit | 4a7221a67b23933a2e9314f3bbd2b886d7276b7d | CamDavidsonPilon/autograd-gamma | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Display stock quotes on LEDs.\"\"\"\n\nimport RPi.GPIO as GPIO\nfrom seven_segment import print_leds\nfrom ystockquote import get_price, get_change\n\npins = [17, 23, 24, 22, 27, 25, 5]\nGPIO.setmode(GPIO.BCM)... | python | edit | 1 | 0 | mit | 033ee318e6694ca4b251adf759d8cb62a100fdca | zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie | tickertape.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom framework.mongo import database as proxy_database\n\n\ndef begin(database=None):\n database = database or proxy_database\n database.command('beginTransaction')\n\n\ndef rollback(database=None):\n dat... | python | edit | 1 | 3 | apache-2.0 | 3f4415bd551b52418a5999a1ea64e31d15097802 | erinspace/osf.io,doublebits/osf.io,brandonPurvis/osf.io,brandonPurvis/osf.io,kwierman/osf.io,GageGaskins/osf.io,hmoco/osf.io,amyshi188/osf.io,brandonPurvis/osf.io,felliott/osf.io,cosenal/osf.io,abought/osf.io,kch8qx/osf.io,haoyuchen1992/osf.io,himanshuo/osf.io,sbt9uc/osf.io,bdyetton/prettychart,samchrisinger/osf.io,mon... | framework/transactions/commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport spat_community_generation as sg\nimport sys\n\nSvals = [10, 11, 13, 14, 16, 18, 21, 23, 26, 30, 34, 38, 43, 48, 55, 62, 70, \n 78, 89, 100] \n\nNvals = [120, 186, 289, 447, 694, 1076, 1668, 2587, 4011, 6220, 9646, 14957... | python | edit | 1 | 0 | mit | 161cd07fca220494e675b1da674dbf57254a28b3 | weecology/mete-spatial,weecology/mete-spatial,weecology/mete-spatial,weecology/mete-spatial | scripts/spat_gencomms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python2.7\n\nimport modules.apis.api_base as api\n\nclass SRcomAPI(api.API):\n\n def __init(self, session = None):\n super(SRcomAPI, self).__init__(\"http://www.speedrun.com/api/v1\", session)\n\n def get_user_p... | python | edit | 1 | 1 | mit | 1bc3bd857e6b62d9cd63c6b2edfd7003dd8110b4 | BatedUrGonnaDie/salty_bot | modules/apis/sr_com.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# See: https://developers.google.com/accounts/docs/OAuth2ForDevices\n\nimport httplib2\nfrom six.moves import input\nfrom oauth2client.client import OAuth2WebServerFlow\nfrom googleapiclient.discovery import buil... | python | edit | 1 | 0 | apache-2.0 | 7be606951b22d77a53274d014cd94aae30af93f5 | googleapis/oauth2client,jonparrott/oauth2client,google/oauth2client,jonparrott/oauth2client,clancychilds/oauth2client,googleapis/oauth2client,google/oauth2client,clancychilds/oauth2client | samples/oauth2_for_devices.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# for local run, before pygraphc packaging\nimport sys\nsys.path.insert(0, '../pygraphc/misc')\nfrom IPLoM import *\n\nRawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/'\nRawLogFile = 'auth.log.anon'\nOutputPath = './res... | python | edit | 2 | 0 | mit | 0b3499beebeb789323d293513fdfc98565f6e02a | studiawan/pygraphc | examples/IPLoM_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\nimport sys\nfrom gitaccount import GitAccount\n\n\ndef main():\n if len(sys.argv) < 2:\n print(\"\"\"Usage:\n gitcloner.py [OPTION] [NAME]\n\n OPTIONS:\n -u - for user repositories\n -... | python | edit | 3 | 4 | mit | 97a67e022d094743e806896386bdbe317cb56fb6 | shakib609/gitcloner | gitcloner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport googlemaps\nfrom pyrules2.googlemaps import driving_roundtrip\n\nCOP = 'Copenhagen, Denmark'\nMAD = 'Madrid, Spain'\nBER = 'Berlin, Germany'\nLIS = 'Lisbon, Portugal'\n\nKM = 1000\n\n\nclass Test(unittest.TestCase):\... | python | edit | 1 | 2 | mit | 46e1672bb0226ae8157d63a2d73edbfefcd644e9 | mr-niels-christensen/pyrules | src/test/test_google_maps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n Clean up the AFOS database\n called from RUN_2AM.sh\n\"\"\"\n\nimport psycopg2\nAFOS = psycopg2.connect(database='afos', host='iemdb')\nacursor = AFOS.cursor()\n\nacursor.execute(\"\"\"\n delete from products WHERE \n entered ... | python | edit | 2 | 0 | mit | f3aea781c633c2ee212b59f17a6028684041568c | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | scripts/dbutil/clean_afos.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\r\nfrom tpb import TPB\r\n\r\nt = TPB()\r\n\r\n# when using a proxy site\r\n# t = TPB('http://uberproxy.net/thepiratebay.sx')\r\n\r\n\r\nfor to in t.get_recent_torrents():\r\n print '*' * 50\r\n to.print_torr... | python | edit | 3 | 0 | mit | c0db57b52aa0546fd6f7a2cf4fc0242cbcf76537 | karan/TPB,karan/TPB | test_bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\nimport sys\n\nimport settings\n\ntriggers = set()\ntimers = set()\n\nclass BadApplicationError(Exception): pass\n\ndef trigger(expression):\n def decorator(func):\n triggers.add((re.compile(expression), func)... | python | edit | 3 | 1 | mit | 4792515739c4ee671b86aeed39022ad8934d5d7c | sumeet/artie | artie/applications.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport dash as _dash\nimport sys as _sys\n\ncurrent_path = os.path.dirname(os.path.abspath(__file__))\n\n_dash.development.component_loader.load_components(\n os.path.join(current_path, '../lib/metadata.json'),\n ['content'... | python | edit | 1 | 0 | mit | 52138f389d5b8ef3e2cd25179716b36170b94242 | plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash | packages/dash-html-components/dash_html_components/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\nu\"\"\"\n:author: Joseph Martinot-Lagarde\n\nCreated on Sat Jan 19 14:57:57 2013\n\"\"\"\n\nfrom __future__ import (\n print_function, division, unicode_literals, absolute_import)\n\n\nimport s... | python | edit | 7 | 4 | mit | 260a5601a9b2990374d2f97d92898236e0b9342e | jitseniesen/spyder-memory-profiler,jitseniesen/spyder-memory-profiler,Nodd/spyder_line_profiler,spyder-ide/spyder.line_profiler,spyder-ide/spyder.memory_profiler,spyder-ide/spyder.line-profiler,Nodd/spyder.line_profiler | tests/profiling_test_script.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef restoring_chdir(fn):\n def decorator(*args, **kw):\n try:\n path = os.getcwd()\n return fn(*args, **kw)\n finally:\n os.chdir(path)\n return decorator\n\n\nclass BaseBu... | python | edit | 2 | 2 | mit | 8126ca21bcf8da551906eff348c92cb71fe79e6e | alex/readthedocs.org,safwanrahman/readthedocs.org,royalwang/readthedocs.org,VishvajitP/readthedocs.org,safwanrahman/readthedocs.org,alex/readthedocs.org,tddv/readthedocs.org,dirn/readthedocs.org,takluyver/readthedocs.org,nikolas/readthedocs.org,LukasBoersma/readthedocs.org,mhils/readthedocs.org,royalwang/readthedocs.or... | readthedocs/doc_builder/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom registry.models import *\nfrom operator import attrgetter\n\nfacet_Models = [\n BigAim,\n Category,\n ClinicalArea,\n ClinicalSetting,\n Keyword,\n SafetyTarget,\n]\n\nclass FacetForm:\n def __init__(self):\n ... | python | edit | 8 | 3 | apache-2.0 | bace1847cb9479bfeb271f38eef502f8d3ac240a | ctsit/qipr,ctsit/qipr,ctsit/qipr,ctsit/qipr,ctsit/qipr | qipr/registry/forms/facet_form.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom chatterbot import ChatBot\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\nfrom settings import GITTER\n\n\n# Uncomment the following lines to enable verbose logging\n# import logging\n# logging.basicC... | python | edit | 1 | 0 | bsd-3-clause | 7b6838ea292e011f96f5212992d00c1009e1f6b2 | gunthercox/ChatterBot,vkosuri/ChatterBot | examples/gitter_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport rdflib\nfrom rdflib.py3compat import b\n\ndef testTurtleFinalDot(): \n \"\"\"\n https://github.com/RDFLib/rdflib/issues/282\n \"\"\"\n\n g = rdflib.Graph()\n u = rdflib.URIRef(\"http://ex.org/bob.\")\n g.bind(\"ns\"... | python | edit | 1 | 2 | bsd-3-clause | 5ba9888d267d663fb0ab0dfbfd9346dc20f4c0c1 | RDFLib/rdflib,ssssam/rdflib,armandobs14/rdflib,yingerj/rdflib,RDFLib/rdflib,ssssam/rdflib,ssssam/rdflib,avorio/rdflib,marma/rdflib,marma/rdflib,RDFLib/rdflib,ssssam/rdflib,dbs/rdflib,armandobs14/rdflib,dbs/rdflib,dbs/rdflib,marma/rdflib,avorio/rdflib,marma/rdflib,yingerj/rdflib,RDFLib/rdflib,yingerj/rdflib,dbs/rdflib,a... | test/test_turtle_serialize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom .base import *\n\n# GEOS_LIBRARY_PATH = '/var/task/libgeos_c.so'\n\nALLOWED_HOSTS = ['*']\n\n# Override the database name and user if needed\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.contrib.gis.db.backen... | python | edit | 2 | 0 | mit | 221f77cfba10cb52ab9fbb639cc948d7a61beb98 | DemocracyClub/electionleaflets,DemocracyClub/electionleaflets,DemocracyClub/electionleaflets | electionleaflets/settings/zappa.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nVERSION = \"0.91.2\"\n\n\n\n\nCURRENT_DEBUGGER = [None]\ndef set_trace():\n if CURRENT_DEBUGGER[0] is None:\n from pudb.debugger import Debugger\n dbg = Debugger()\n CURRENT_DEBUGGER[0] = dbg\n\n import sys\n ... | python | edit | 3 | 2 | mit | 32e2d6e866cee45d4955aa020d9b9bd3c0a2b700 | amigrave/pudb,albfan/pudb,amigrave/pudb,albfan/pudb | pudb/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom .settings import *\n\n\ndef get_env_variable(var_name):\n \"\"\"\n Get the environment variable or return exception.\n \"\"\"\n try:\n return os.environ[var_... | python | edit | 4 | 2 | apache-2.0 | 547725be668e1e639ec0e6569e18a1e8bf03585c | NejcZupec/tictactoe,NejcZupec/tictactoe,NejcZupec/tictactoe | tictactoe/settings_production.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\n# Copyright (c) 2013, Theo Crevon\n# Copyright (c) 2013, Greg Leclercq\n#\n# See the file LICENSE for copying permission.\n\nimport boto.swf\n\nfrom . import settings\n\n\nSETTINGS = settings.get()\n\n\nclass Conne... | python | edit | 1 | 4 | mit | 1a9c5c6cee3b8c31d92ab0949fc312907adf6611 | botify-labs/python-simple-workflow,botify-labs/python-simple-workflow | swf/core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: <EMAIL>\n# Documentation: http://scripting101.stoeps.de\n#\n# Version: 2.0\n# Date: 2014-06-04\n#\n# License:... | python | edit | 2 | 0 | apache-2.0 | e0b7b6ccdd947324ac72b48a28d6c68c7e980d96 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | rejected_duplicate | Near-duplicate of sample 536 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef bot_says(channel, text, slack_client):\n return slack_client.api_call(\"chat.postMessage\",\n channel=channel,\n text=text,\n as_user=Tru... | python | edit | 1 | 3 | mit | b0d9a11292b6d6b17fe8b72d7735d26c47599187 | iwi/linkatos,iwi/linkatos | linkatos/printer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nmeta.py\n\nSome useful metaclasses.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nclass LeafClassesMeta(type):\n\t\"\"\"\n\tA metaclass for classes that keeps track of all of them that\n\taren't base classes.\n\t\"\"\"\n\n\t... | python | edit | 1 | 3 | mit | 3cacced39d9cb8bd5d6a2b3db8aa4b5aa1b37f58 | jaraco/jaraco.classes | jaraco/util/meta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = \"0.15.0-dev\"\n__libnetwork_plugin_version__ = \"v0.7.0-dev\"\n__libcalico_version__ = \"v0.10.0-dev\"\n__felix_version__ = \"1.3.0a6-dev\"\n\n```\n\nApply this change: Update docs to version v0.16.0"
},
{
"role": "as... | python | edit | 1 | 0 | apache-2.0 | 7c9648107a4b3e9c06954b794b76675e32f458f4 | TrimBiggs/calico-containers,caseydavenport/calico-docker,TrimBiggs/calico-docker,caseydavenport/calico-docker,projectcalico/calico-docker,projectcalico/calico-containers,caseydavenport/calico-containers,quater/calico-containers,Metaswitch/calico-docker,caseydavenport/calico-containers,Metaswitch/calico-docker,projectca... | calicoctl/calico_ctl/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mangopaysdk.entities.entitybase import EntityBase\nfrom mangopaysdk.types.money import Money\n\n\nclass Transaction (EntityBase):\n \"\"\"Transaction entity.\n Base class for: PayIn, PayOut, Transfer.\n \"\"\"\n\n def __ini... | python | edit | 3 | 1 | mit | a7be90536618ac52c91f599bb167e05f831cddfb | chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk | mangopaysdk/entities/transaction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Objects for datasets serialized in HDF5 format (.h5).\"\"\"\nimport h5py\nfrom pylearn2.datasets.dense_design_matrix import DenseDesignMatrix\n\nclass HDF5Dataset(DenseDesignMatrix):\n \"\"\"Dense dataset loaded from an HDF5 file.\... | python | edit | 1 | 4 | bsd-3-clause | 0e22a642526612ff9d19d1b421a1aacea4109f15 | alexjc/pylearn2,pombredanne/pylearn2,kose-y/pylearn2,TNick/pylearn2,lancezlin/pylearn2,theoryno3/pylearn2,aalmah/pylearn2,se4u/pylearn2,woozzu/pylearn2,daemonmaker/pylearn2,daemonmaker/pylearn2,goodfeli/pylearn2,JesseLivezey/pylearn2,nouiz/pylearn2,ddboline/pylearn2,CIFASIS/pylearn2,w1kke/pylearn2,lamblin/pylearn2,kast... | pylearn2/datasets/hdf5.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cellulario import iocell\nimport asyncio\nimport uvloop\n\nasyncio.set_event_loop_policy(uvloop.EventLoopPolicy())\n\niocell.DEBUG = True\n\n\n```\n\nApply this change: Remove uvloop from test run."
},
{
"role": "assistant",
... | python | edit | 1 | 0 | mit | e9dc10532a0357bc90ebaa2655b36822f9249673 | mayfield/cellulario | test/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\n@date 2015-02-21\n@author Hong-She Liang <<EMAIL>>\n'''\n\nimport os\nimport re\nimport subprocess\nfrom .mouse_constant import *\n\nclass Mouse(object):\n ## return current mouse absolute position\n @classmethod\n def positio... | python | edit | 12 | 4 | apache-2.0 | 7cd3cc1a6a023a093c9c6d8df4dd1b9d6c871faa | starofrainnight/rabird.core,starofrainnight/rabird.auto | auto/src/rabird/auto/mouse_xdotool.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os,sys\nimport json\nimport csv\nimport soundfile as sf\nfrom scipy.fftpack import dct\nfrom features import mfcc,fbank,sigproc,logfbank\n\ndef parseJSON(directory, filename):\n data=[]\n jsonMeta=[]\n #open all files that e... | python | edit | 7 | 2 | mit | b824cadfe61de19b5ff0f7391fe2b21b034c71b4 | lOStres/JaFEM | readdata.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass MonoPackage (Package):\n\tdef __init__ (self):\n\t\tPackage.__init__ (self, 'mono', '2.10.6',\n\t\t\tsources = [\n\t\t\t\t'http://download.mono-project.com/sources/%{name}/%{name}-%{version}.tar.bz2',\n\t\t\t\t'patches/mono-runtime-re... | python | edit | 6 | 2 | mit | 7185c5ef58757949197081808bf237f0111e7a86 | mono/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,bl8/bockbuild,mono/bockbuild | packages/mono.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbc125csv - Channel import and export tool for the Uniden BC125AT, UBC125XLT \nand UBC126AT.\n\nCopyright (c) 2015, fdev.nl. All rights reserved.\nReleased under the MIT license.\n\nUniden and Bearcat are registered trademarks of Uni... | python | edit | 1 | 0 | mit | c5aa1c7ee17313e3abe156c2bfa429f124a451d5 | fdev/bc125csv | bc125csv/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='example_ppp_module',\n version='0.1',\n description='Example python module for the PPP.',\n url='https://github.com/ProjetPP',\n author='... | python | edit | 3 | 0 | mit | 9c84f8f759963b331204095fda9be881862440da | ProjetPP/ExamplePPPModule-Python,ProjetPP/ExamplePPPModule-Python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport extract_metadata\nimport detect_features\nimport match_features\nimport create_tracks\nimport reconstruct\nimport mesh\nimport undistort\nimport compute_depthmaps\nimport export_ply\nimport export_openmvs\n\nopensfm_commands = [\n ... | python | edit | 1 | 0 | bsd-2-clause | 0e779581be648ca80eea6b97f9963606d85659b9 | BrookRoberts/OpenSfM,mapillary/OpenSfM,sunbingfengPI/OpenSFM_Test,BrookRoberts/OpenSfM,sunbingfengPI/OpenSFM_Test,sunbingfengPI/OpenSFM_Test,sunbingfengPI/OpenSFM_Test,oscarlorentzon/OpenSfM,BrookRoberts/OpenSfM,oscarlorentzon/OpenSfM,oscarlorentzon/OpenSfM,oscarlorentzon/OpenSfM,mapillary/OpenSfM,mapillary/OpenSfM,Bro... | opensfm/commands/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom api.views import GraphQLView\nfrom django.contrib import admin\nfrom django.urls import include, path\nfrom django.views.decorators.csrf import csrf_exempt\n\nurlpatterns = [\n path(\"admin/\", admin.site.urls),\n path(\"graphql\... | python | edit | 1 | 0 | mit | 62d7c94968d70564839b32375fac6608720c2a67 | patrick91/pycon,patrick91/pycon | backend/pycon/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\npackage = 'bsdetector'\nversion = '0.1'\nfrom setuptools import setup\nfrom setuptools.command.develop import develop\nfrom setuptools.command.install import install\n\n\n# class PostDevelopCom... | python | edit | 4 | 1 | mit | 20eebb23a0aafd03e62b91fdba154518bb3898e8 | cjhutto/bsd,cjhutto/bsd,cjhutto/bsd | setup.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 couchapp import commands\nfrom couchapp.errors import AppError\n\nfrom mock import Mock, patch\nfrom nose.tools import raises\n\n\n@patch('couchapp.commands.document')\ndef test_init_dest(mock_doc):\n comm... | python | edit | 1 | 1 | apache-2.0 | 2d3e52567d7d361428ce93d02cc42ecaddacab6c | couchapp/couchapp,h4ki/couchapp,couchapp/couchapp,couchapp/couchapp,h4ki/couchapp,h4ki/couchapp,couchapp/couchapp,h4ki/couchapp | tests/test_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom SimpleCV import ColorSegmentation, Image, Camera, VirtualCamera, Display\n\n# Open reference video\ncam=VirtualCamera('/media/bat/DATA/Baptiste/Nautilab/kite_project/zenith-wind-power-read-only/KiteControl-Qt/videos/kiteFlying.avi','... | python | edit | 6 | 0 | mit | 416575ca3cc684925be0391b43b98a9fa1d9f909 | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | ObjectTracking/testTrack.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: UTF-8\n'''\nA simple twitter client that posts current weather to twitter\n'''\nimport tweepy\nimport json\nfrom urllib2 import urlopen\nimport os\n\nroot =os.path.dirname(os.path.abspath(__file__))\n\nc... | python | edit | 2 | 0 | bsd-3-clause | d6b9be8145316f6f90e47bb3a55c861f993a375a | torhve/Amatyr,torhve/Amatyr,torhve/Amatyr | tweetyr.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.re... | python | edit | 1 | 0 | mit | 650682c3643912c53e643d7b1074f1a6c4a1556b | MasterKale/django-cra-helper | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport json\n\nfrom argh import ArghParser, arg\nfrom ghtools import cli\nfrom ghtools.api import GithubAPIClient\n\nparser = ArghParser(description=\"Browse the GitHub API\")\n\n\n@arg('github', nar... | python | edit | 1 | 3 | mit | a02258643b4109ba862f8f927a8a2612b81c2a36 | alphagov/ghtools | ghtools/command/browse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in ... | python | edit | 5 | 0 | bsd-3-clause | 2ebb6b2f4c2f0008355ae0eb268cf156a6eb686e | gasman/Willow,torchbox/Willow,gasman/Willow,torchbox/Willow | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# PYTHON_ARGCOMPLETE_OK\n\"\"\"Module to bundle plotting scripts\n\n`activate-global-python-argcomplete` must be run to enable auto completion \"\"\"\n\nimport argparse\nimport argcomplete\nimport plotter\n\ndef parse... | python | edit | 3 | 2 | mit | 60870a3e471637d44da32f3aac74064e4ca60208 | DerWeh/pyplot | pyplot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport re\n\n#pattern = re.compile(r'^VERSION=(.+)$')\n#version = None\n#for line in open('Makefile'):\n# match = pattern.match(line)\n# if match is None:\n# continue\n# version =... | python | edit | 3 | 0 | bsd-2-clause | f66f4858816646f8f070910de63e11064a69d4e0 | AndBicScadMedia/blueprint,nginxxx/blueprint,volcomism/blueprint,AndBicScadMedia/blueprint,nginxxx/blueprint,devstructure/blueprint,volcomism/blueprint,volcomism/blueprint,AndBicScadMedia/blueprint,devstructure/blueprint,nginxxx/blueprint | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, division, absolute_import, unicode_literals\nimport itertools\nfrom .util import trim\n\ndef render(item, **fields):\n \"\"\" Render the given item\n \"\"\"\n if item ... | python | edit | 1 | 6 | bsd-2-clause | 4f9db35566332778853e993f7791116d66c49dd4 | swayf/grako,swayf/grako | grako/rendering.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='chainpoint', version='1.0',\n description='Federated server for building blockchain notarized Merkle trees.',\n author='Shawn Wilkinson', author_email='<EMAIL>',\n url='http://storj... | python | edit | 1 | 0 | mit | 70ab0f7bb46318330b5e75be107bb380e96b7716 | isghe/chainpoint | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 Paul Tagliamonte <<EMAIL>>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without... | python | edit | 2 | 0 | mit | 3c735d18bdcff28bbdd765b131649ba57fb612b0 | ALSchwalm/hy,aisk/hy,paultag/hy,tianon/hy,hcarvalhoalves/hy,Foxboron/hy,Tritlo/hy,mtmiller/hy,michel-slm/hy,farhaven/hy,freezas/hy,zackmdavis/hy,tianon/hy,gilch/hy,aisk/hy,larme/hy,tuturto/hy,timmartin/hy,farhaven/hy,kirbyfan64/hy,farhaven/hy,algernon/hy,Foxboron/hy,hcarvalhoalves/hy,kirbyfan64/hy,adamfeuer/hy,jakirkha... | hy/models/string.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\n# Import python libs\nimport os\n\n# Import third party libs\nimport yaml\nimport logging\n\n# Import salt libs\nimport salt.utils\n\nlog = logging.getLogger(__name__)\n\n... | python | edit | 9 | 7 | apache-2.0 | 509d1af832ac31d2b6334b82c59c44eb00c0e434 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/grains/extra.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport color\n\ndef parse(mat_node):\n materials = []\n for node in mat_node:\n materials.append(Material(node))\n\n\nclass Material:\n ''' it’s a material\n '''\n\n def __init__(self, node):\n for c in node:\n ... | python | edit | 1 | 6 | mit | b21c5a1b0f8d176cdd59c8131a316f142540d9ec | cocreature/pytracer | materials.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom restlib2.resources import Resource\nfrom avocado.models import DataContext\n\n\nclass BaseResource(Resource):\n param_defaults = {}\n\n def get_params(self, request):\n params = request.GET.copy()\n for param, defau... | python | edit | 1 | 6 | bsd-2-clause | cfa0b71f056c88f14f79f4f47a169ade9ce08096 | rv816/serrano_night,chop-dbhi/serrano,rv816/serrano_night,chop-dbhi/serrano | serrano/resources/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport sys\nfrom java.lang import String\nfrom java.util import HashSet\nfrom java.util import HashMap\nimport java\nglobdict = globals()\ndef loadFilesService():\n global globdict\n execfile(\"filesAdmin.py\", globdict)\n\n```\n\nA... | python | edit | null | null | apache-2.0 | 147a3d1c690b7e1c80fafd6eb4c834585e733564 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/test/loadFunction.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"List repos missing from repos.yaml.\"\"\"\n\nfrom __future__ import print_function\n\nimport yaml\n\nfrom helpers import paginated_get\n\nREPOS_URL = \"https://api.github.com/orgs/{org}/repos\"\n\n# This is hack... | python | edit | 1 | 0 | apache-2.0 | a8d3790e4ef539c2a833fa493aeef4456b4a5dbb | edx/repo-tools,edx/repo-tools | unchecked_repos.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nRetrieves the firendly model name for machines that don't have one yet.\n'''\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom server.models import Machine\nfrom django.db.models import Q\nimport server.utils a... | python | edit | 3 | 2 | apache-2.0 | 93756f6f72d9f797c058bedcb3d6d7546a5a83f3 | sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal | server/management/commands/friendly_model_name.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis package contains core modules and classes for representing structures and\noperations on them.\n\"\"\"\n\n__author__ = \"Shyue Ping Ong\"\n__date__ = \"Dec 15, 2010 7:21:29 PM\"\n\nfrom .periodic_table import *\nfrom .compositi... | python | edit | 10 | 0 | mit | 0770a8e77463ee70851404a37138da050aead5bb | tallakahath/pymatgen,matk86/pymatgen,aykol/pymatgen,matk86/pymatgen,gpetretto/pymatgen,setten/pymatgen,tschaume/pymatgen,ndardenne/pymatgen,gVallverdu/pymatgen,dongsenfo/pymatgen,johnson1228/pymatgen,montoyjh/pymatgen,johnson1228/pymatgen,nisse3000/pymatgen,ndardenne/pymatgen,tschaume/pymatgen,davidwaroquiers/pymatgen,... | pymatgen/core/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"teamscale-client\",\n version=\"3.1.1\",\n author=\"Thomas Kinnen - CQSE GmbH\",\n author_email=\"<EMAIL>\",\n description=(\"A simple service client to interact with Teamscale'... | python | edit | 1 | 0 | apache-2.0 | 6fd86d15d896a5fcfc3d013cb9be47405be6491b | cqse/teamscale-client-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTemplate module to define control systems.\n\"\"\"\n\n\nclass ControlSystem(object):\n \"\"\" Define a control system to be used with a device\n\n It uses channel access to comunicate over the network with\n the hardware.\n... | python | edit | 1 | 1 | apache-2.0 | 73673598e1998252b16b48d31b800ab0fb441392 | willrogers/pml,willrogers/pml | pml/cs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\ndef install(*packages):\n env = os.environ.copy()\n env['DEBIAN_FRONTEND'] = \"noninteractive\"\n subprocess.call(['sudo', '-E', 'apt-get', '-y', 'install'] + packages, env=env)\n \ndef update():\... | python | edit | 1 | 1 | mit | a9bc2a097516b36580946518978c1448df4ded6d | hatchery/genepool,hatchery/Genepool2 | apt/get.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 division\n\n\ndef selection_sort(nums):\n \"\"\"Selection Sort algortihm.\n\n Time complexity: O(n^2).\n Space complexity: O(1).\... | python | edit | 1 | 4 | bsd-2-clause | 71d42d763bdb2d0c1bd8474a4da99695d5b77f91 | bowen0701/algorithms_data_structures | alg_selection_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom distutils import version\n\n__version__ = '0.2.0'\nversion_info = version.StrictVersion(__version__).version\n\n```\n\nApply this change: Make parser and renderer available at package root"
},
{
"role":... | python | edit | 1 | 0 | bsd-2-clause | 12c97be97a8816720899531b932be99743b6d90d | lpomfrey/django-rest-framework-plist,pombredanne/django-rest-framework-plist | rest_framework_plist/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport setuptools\nimport os\n\n\nsetuptools.setup(\n name='endpoints-proto-datastore',\n version='0.9.0',\n description='Endpoints Proto Datastore API',\n long_description=open(os.path.join(os.path.dirnam... | python | edit | 1 | 0 | apache-2.0 | 1c5dbc45213262051ff2472cc0454273d88b82d0 | jbergant/endpoints-proto-datastore,mnieper/endpoints-proto-datastore,maxandron/endpoints-proto-datastore,dhermes/endpoints-proto-datastore,GoogleCloudPlatform/endpoints-proto-datastore | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: UTF-8 -*-\n\nfrom base import TestCase\n\nfrom jinja2_maps.gmaps import gmaps_url\n\nclass TestGmaps(TestCase):\n\n def test_url_dict(self):\n url = \"https://www.google.com/maps/place/12.34,56.78/@12.34,56.78,42z\"\... | python | edit | 1 | 1 | mit | 17015ecf48ec37909de6de2c299454fc89b592e9 | bfontaine/jinja2_maps | tests/test_gmaps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numba.np.ufunc.parallel import get_thread_count\nfrom os import environ as env\nfrom numba.core import config\nimport unittest\n\n\nclass TestParallelEnvVariable(unittest.TestCase):\n \"\"\"\n Tests environment variables related ... | python | edit | 1 | 3 | bsd-2-clause | 554572f327e4b9c920f65b416bfc6a3a5b549846 | numba/numba,stonebig/numba,cpcloud/numba,gmarkall/numba,sklam/numba,stuartarchibald/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,sklam/numba,IntelLabs/numba,stuartarchibald/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,cpcloud/numba,seibert/numba,stuartarchibald/numba,numba/numba,sklam/numba,seibe... | numba/tests/npyufunc/test_parallel_env_variable.py | rejected_duplicate | Near-duplicate of sample 923 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nimport time\nfrom datetime import datetime\n\nfrom django.core.cache import cache\n\n\nclass MemcacheLock(object):\n def __init__(self, identifier, cache, unique_value):\n self.identifier = identifier\n self.... | python | edit | 1 | 6 | bsd-3-clause | 89225ed0c7ec627ee32fd973d5f1fb95da173be2 | potatolondon/djangae,potatolondon/djangae | djangae/contrib/locking/memcache.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport hypothesis\n\nfrom client import SwaggerClient\nfrom templates import APITemplate\nfrom strategies import hypothesize_parameters\n\n\nlog = logging.getLogger(__name__)\n\n\ndef validate_schema(schema_path):\n cli... | python | edit | 1 | 2 | mit | f79644e88d64d387ea653a19fef0c2aa0772195f | olipratt/swagger-conformance | swaggertester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport logging\n\n\ndef init_logger():\n logging.basicConfig(\n stream=sys.stdout,\n format='%(asctime)s - %(levelname)s - %(message)s',\n level=logging.INFO)\n return logging.getLogger('CARTOframes')\... | python | edit | 1 | 3 | bsd-3-clause | bc979e995162c441cd37b3368154e5ed842694f5 | CartoDB/cartoframes,CartoDB/cartoframes | cartoframes/core/logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom ethereum import blocks\nfrom ethereum.db import DB\nfrom ethereum.config import Env\nfrom pyethapp.utils import merge_dict\nfrom pyethapp.utils import update_config_from_genesis_json\nimport pyethapp.config as konfig\nfr... | python | edit | 1 | 1 | mit | 7c5061e4fbf0737ce07f13cb9102cdbbacf73115 | ethereum/pyethapp,gsalgado/pyethapp,gsalgado/pyethapp,changwu-tw/pyethapp,RomanZacharia/pyethapp,changwu-tw/pyethapp,RomanZacharia/pyethapp,ethereum/pyethapp | pyethapp/tests/test_genesis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Google LLC\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 co... | python | edit | 5 | 0 | apache-2.0 | bed1bb8dd9964230a621d065ed5d1a63f4634486 | google/python-lakeside | setup.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom werkzeug import routing\nfrom werkzeug import serving\nfrom werkzeug import wrappers\n\nfrom . import routes\n\n\nclass Steinie(routes.Router):\n def __init__(self, host=\"127.0.0.1\", port=5151, debug=False):\n self.host = h... | python | edit | 1 | 4 | apache-2.0 | c4809f9f43129d092235738127b90dc62f593fb8 | tswicegood/steinie,tswicegood/steinie | steinie/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom huts.utils import export\n\nclass Command(BaseCommand):\n args = ''\n help = 'Dumps the huts, agencies, and regions in the json api format.'\n\n def handle(self, *args, **op... | python | edit | 1 | 2 | mit | 5ed9e43ec451aca9bdca4391bd35934e5fe4aea3 | dylanfprice/hutmap,dylanfprice/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap | huts/management/commands/dumphutsjson.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logtacts.settings import *\nimport dj_database_url\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES['default'] = dj_database_url.parse(get_env_variable('LOGTACTS_DB_URL'))\n\nSECRET_KEY = get_env_variable(\"LOGTACTS_SECRET_KEY\")\... | python | edit | 10 | 0 | mit | a918dbdb18f579543916da8dfc14e7d3d06237ae | phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts | logtacts/prod_settings/__init__.py | rejected_lint | Too many lint violations: 10 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.