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\nRESOURCE_METHODS = ['GET', 'POST', 'DELETE']\nITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']\n\nschema = {\n 'name': {\n 'type': 'string',\n 'minlength': 3,\n 'maxlength': 50,\n 'required': True,\n },\n ... | python | edit | 1 | 0 | mit | e868cf738f2fb994f22364fa8306045c6995a2b1 | waoliveros/historia | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n''' Null tester (when nose not importable)\n\nMerely returns error reporting lack of nose package\n\nSee pkgtester, nosetester modules\n\n'''\n\nnose_url = 'http://somethingaboutorange.com/mrl/projects/nose'\n\nclass NullTester(object):\n ... | python | edit | 3 | 1 | bsd-3-clause | fd81c4cea0d28275123539c23c27dcfdd71e9aef | aman-iitj/scipy,maciejkula/scipy,efiring/scipy,gfyoung/scipy,teoliphant/scipy,pizzathief/scipy,pbrod/scipy,Eric89GXL/scipy,jor-/scipy,larsmans/scipy,anntzer/scipy,behzadnouri/scipy,pschella/scipy,ogrisel/scipy,sriki18/scipy,aarchiba/scipy,WarrenWeckesser/scipy,newemailjdm/scipy,Srisai85/scipy,pbrod/scipy,surhudm/scipy,... | scipy/testing/nulltester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#import benchmark_fibonacci\nimport benchmark_twisted_names\n\n__all__ = ['benchmark_fibonacci', 'benchmark_twisted_names']\n\n```\n\nApply this change: Add back commented out Fibonacci benchmark."
},
{
"role": "assistant",
"con... | python | edit | 1 | 0 | mit | 659614a6b845a95ce7188e86adae4bdc2c5416e7 | AlekSi/benchmarking-py | examples/benchmark/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport torch\nfrom . import Kernel\nfrom gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable\n\n\nclass WhiteNoiseKernel(Kernel):\n def __init__(self, variances):\n super(WhiteNoiseKernel, self).__init__()\n self.regist... | python | edit | 1 | 5 | mit | 704e1457480d6baa8db7fff245d733303f8a17f5 | jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch | gpytorch/kernels/white_noise_kernel.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 | ec7647c264bb702d4211779ef55ca5a694307faf | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/doc/DataSources.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\n\nfrom invisibleroads_macros_security import make_random_string\n\n\nclass DictionarySafe(dict):\n\n def __init__(self, key_length):\n self.key_length = key_length\n\n def put(self, val... | python | edit | 1 | 3 | mit | bcb383612625d9a59f9e5b4174e44700b26bd0e5 | crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute | crosscompute/macros/security.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n''' rename files in local directory with random integer names.\n\nwindows screen saver isn't very good at randomizing fotos shown. \nChange file names regularly to provide more variety\n'''\n\nimport os\nimport re\nimport random\n\n\nrandom... | python | edit | 1 | 0 | mit | 517e22b331f63e80cb344e257789463627b44508 | daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various | utilities/rename-random-number.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom index import db\n\nclass UserModel(db.Model):\n\n __tablename__ = 'User'\n id = db.Column(db.Integer, primary_key=True, nullable=False)\n name = db.Column(db.String(80), unique=True, nullable=False)\n fullname = db.Column(d... | python | edit | 5 | 1 | mit | dd42c1c1b1cd0cbe55c27cafe9d2db5466782bc4 | Madmous/Trello-Clone,Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone | server/users-microservice/src/api/users/userModel.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis module contains Service implementation of Archive.org.\nhttp://archive.org\n\"\"\"\n\n\nfrom . import Service, JSONMixin\n\nfrom six import text_type\nfrom tornado.httpclient import HTTPRequest\n\n\n###... | python | edit | 1 | 9 | mit | cbe447825408d7178e1b4eb4bf981600001ada32 | 9seconds/rymtracks | rymtracks/services/archiveorg.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom javascript_configuration import settings\n\nclass ConfigurationBuilder:\n \"\"\"\n Get javascript configurations from urls.py files from all installed apps.\n \"\"\"\n def __init__(self):\n self.con... | python | edit | 1 | 4 | mit | 27d8f3d637e5071e8eb048cd36218977bf0772ff | pozytywnie/django-javascript-settings | javascript_configuration/configuration_builder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nimport zerver.views\nimport zerver.views.streams\nimport zerver.views.auth\nimport zerver.views.tutorial\nimport zerver.views.report\n\n# Future endpoints should add to urls.py, which includes these legacy ... | python | edit | 1 | 0 | apache-2.0 | 0e835c6381374c5b00b7387057d056d679f635c4 | shubhamdhama/zulip,punchagan/zulip,kou/zulip,showell/zulip,hackerkid/zulip,timabbott/zulip,eeshangarg/zulip,kou/zulip,andersk/zulip,zulip/zulip,synicalsyntax/zulip,zulip/zulip,andersk/zulip,shubhamdhama/zulip,showell/zulip,kou/zulip,hackerkid/zulip,shubhamdhama/zulip,andersk/zulip,eeshangarg/zulip,brainwane/zulip,shubh... | zproject/legacy_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='JekPost',\n version='0.1.0',\n author='Arjun Krishna Babu',\n author_email='<EMAIL>',\n packages=['jekpost'],\n url='https://github.com/arjunkrishnababu96/jekpost',\n l... | python | edit | 1 | 0 | mit | 51603984c3d421ccd4bd66208cf8a8224ff3ee3f | arjunkrishnababu96/jekpost | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function\n\nimport unittest\nimport sys\n\nclass ImportUrllibTest(unittest.TestCase):\n def test_urllib(self):\n \"\"\"\n This should perhaps fail: importing urllib first means ... | python | edit | 3 | 1 | mit | 9eabdbc6b73661865c4d785cbc57d7ee51fe59cd | QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future,krischer/python-future,krischer/python-future,QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future | future/tests/test_imports_urllib.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom types import SimpleNamespace\n\nfrom django.db import models\n\n\n__all__ = (\"Region\", \"Template\", \"create_plugin_base\")\n\n\nclass Region(SimpleNamespace):\n key = \"\"\n title = \"unnamed\"\n inherited = False\n\n\ncla... | python | edit | 1 | 1 | bsd-3-clause | cad4e7e9feaf7fefe9ef91dea18594b095861204 | matthiask/django-content-editor,matthiask/django-content-editor,matthiask/django-content-editor,matthiask/django-content-editor | content_editor/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\n\nfrom y_text_recommender_system.recommender import recommend\n\napp = Flask(__name__)\n\n\nclass InvalidUsage(Exception):\n status_code = 400\n\n def __in... | python | edit | 1 | 4 | mit | e861e74374d22d3684dccfa5e0063ff37549bcfc | joaojunior/y_text_recommender_system | api/app.py | rejected_duplicate | Near-duplicate of sample 1068 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pyblish.api\n\n\nclass ValidateMindbenderID(pyblish.api.InstancePlugin):\n \"\"\"All models must have an ID attribute\"\"\"\n\n label = \"Mindbender ID\"\n order = pyblish.api.ValidatorOrder\n hosts = [\"maya\"]\n fami... | python | edit | 1 | 5 | mit | f55d590004874f9ec64c041b5630321e686bf6f9 | mindbender-studio/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core,MoonShineVFX/core,getavalon/core,pyblish/pyblish-mindbender | mindbender/plugins/validate_id.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPython Bayesian hierarchical clustering (PyBHC).\nHeller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical \n Clustering. Neuroscience, 6(section 2), 297-304. \n doi:10.1145/1102351.1102389\n\"\"\"\n\nfrom bhc import bhc\... | python | edit | 6 | 0 | bsd-3-clause | 5743d7cfbc93b1c806e8f0a38d8000b82445810b | stuartsale/pyBHC | __init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport traceback\nimport unittest\n\nclass PageTestResults(unittest.T... | python | edit | 1 | 2 | bsd-3-clause | ab00a69ee0d5c556af118d9cf76b5b9a0db25e6d | benschmaus/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,benschmaus/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-pro... | telemetry/telemetry/page/page_test_results.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding: utf-8\n\nfrom futaba_serial_servo import RS30X\nimport rospy\nfrom sensor_msgs.msg import JointState\n\nclass Slave:\n def __init__(self):\n self.rs = RS30X.RS304MD()\n self.sub = rospy.Subs... | python | edit | 2 | 2 | mit | 0dc1412ad6e7cbe47eda1e476ce16603b7f6a030 | raspberrypigibbon/raspigibbon_ros | raspigibbon_bringup/scripts/raspigibbon_joint_subscriber.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hlt import *\nfrom networking import *\n\nmyID, gameMap = getInit()\nsendInit(\"MyPythonBot\")\n\nwhile True:\n moves = []\n gameMap = getFrame()\n for y in range(gameMap.height):\n for x in range(gameMap.width):\n ... | python | edit | 16 | 6 | mit | f052666502ef0108d991940ca713ebc0c5d0c036 | dpetker/halite,dpetker/halite | MyBot.py | rejected_lint | Too many lint violations: 16 | true |
[
{
"role": "user",
"content": "Write python code for the following: Change to use holding_area directory"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n#splitString='images/clean/impc/'\nsplitString='images/holding_area/impc/'\n"
}
] | python | new_file | 1 | 0 | apache-2.0 | 4bcb7efc2c95280323995cb0de27cf6449f060b8 | mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData | external_tools/src/main/python/images/common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Config for PyPI.\"\"\"\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n author='Kyle P. Johnson',\n author_email='<EMAIL>',\n classifiers=[\n 'Intended Audience :: Education',\n ... | python | edit | 1 | 0 | mit | 36b35f463f27028ae015bbaea3e2bafbfeb7ddb3 | cltk/cltk,kylepjohnson/cltk,diyclassics/cltk,D-K-E/cltk | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe `safeopt` package provides...\n\nMain classes\n============\n.. autosummary::\n SafeOpt\n SafeOptSwarm\n\nUtilities\n=========\n.. autosummary::\n sample_gp_function\n linearly_spaced_combinations\n plot_2d_gp\n plot... | python | edit | 3 | 0 | mit | 038b56134017b6b3e4ea44d1b7197bc5168868d3 | befelix/SafeOpt,befelix/SafeOpt | safeopt/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport netlib.tutils\nfrom libmproxy import flow_export\nfrom . import tutils\n\nreq_get = netlib.tutils.treq(\n method='GET',\n headers=None,\n content=None,\n)\n\nreq_post = netlib.tutils.treq(\n method='POST',\n headers=No... | python | edit | 1 | 1 | mit | 61a4743b62914559fea18a945f7a780e1394da2f | jvillacorta/mitmproxy,tdickers/mitmproxy,ddworken/mitmproxy,StevenVanAcker/mitmproxy,cortesi/mitmproxy,vhaupert/mitmproxy,tdickers/mitmproxy,mosajjal/mitmproxy,mosajjal/mitmproxy,fimad/mitmproxy,fimad/mitmproxy,ujjwal96/mitmproxy,vhaupert/mitmproxy,dwfreed/mitmproxy,ParthGanatra/mitmproxy,xaxa89/mitmproxy,mhils/mitmpro... | test/test_export_flow.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 (C) 2008 Jason Davies\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution.\n... | python | edit | 1 | 0 | bsd-3-clause | 25d4fabce29433bc1381a03a44a67cc588688e7f | cozy-labs/cozy-fuse,jasondavies/couchdb-fuse | setup.py | rejected_duplicate | Near-duplicate of sample 4305 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py\"\"\"\n\nfrom codecs import open as codecs_open\nfrom setuptools import setup\n\nwith codecs_open('README.rst', 'r', 'utf-8') as f:\n __README = f.read()\nwith codecs_open('HISTORY.rst', 'r', 'utf-8') as f:\n __HISTORY ... | python | edit | null | null | mit | eb2827a94e477c64eeb67076288007326c34a2f9 | bcb/jsonrpcclient | setup.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gevent import monkey\nmonkey.patch_all()\n\nimport time\nfrom threading import Thread\nimport settings\nimport requests\nfrom flask import Flask\nfrom flask.ext.socketio import SocketIO, emit\n\napp = Flask(__name__)\napp.config.from_o... | python | edit | 4 | 2 | mit | 1f112cb553b0170eb948cfb53883913dc2f3b0b3 | Storj/metadisk-websockets | index.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='ChannelWorm',\n long_description=open('README.md').read(),\n install_requires=[\n 'cypy',\n 'sciunit',\n 'PyOpenWorm',\n 'PyNeuroML>=0.0.6'\n ],\n dep... | python | edit | 1 | 0 | mit | 6ca0407f1666a67478832bc72f0ac740cb699598 | joebowen/ChannelWorm,joebowen/ChannelWorm,VahidGh/ChannelWorm,openworm/ChannelWorm,joebowen/ChannelWorm,joebowen/ChannelWormDjango,openworm/ChannelWorm,joebowen/ChannelWorm,gsarma/ChannelWorm,VahidGh/ChannelWorm,openworm/ChannelWorm,joebowen/ChannelWormDjango,joebowen/ChannelWormDjango,cheelee/ChannelWorm,gsarma/Channe... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='Py-Authorize',\n version='1.0.1.2',\n author='Vincent Catalano',\n author_email='<EMAIL>',\n url='https://github.com/vcatalano/py-authorize',\n download_url='',\n descrip... | python | edit | 1 | 0 | mit | 0d40f65817666b5e82028ef9e0a07ddfc922affb | aryeh/py-authorize,ClearcodeHQ/py-authorize,vcatalano/py-authorize,uglycitrus/py-authorize | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport platform\n\nif platform.system() == 'Darwin':\n from Foundation import NSUserNotificationDefaultSoundName\n import objc\n\n NSUserNotification = objc.lookUpClass('NSUserNotification')\n NSUserNotification... | python | edit | 1 | 3 | mit | 51e7cd3bc5a9a56fb53a5b0a8328d0b9d58848dd | JokerQyou/Modder2 | modder/utils/desktop_notification.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom datetime import datetime\n\nTEMPLATE = \"\"\"\nTitle: {title}\nDate: {year}-{month}-{day} {hour}:{minute:02d}\nModified: \nAuthor: \nCategory: \nTags: \n\n\n\n\"\"\"\n\n\ndef make_entry(title):\n today = datetime.today()... | python | edit | 1 | 1 | mit | d3d9885b56ca999cc194c9c84320858e6e7e9c8a | Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website,Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website,Python-Monthly/Python-Monthly-Website,Python-Monthly/pythonmonthly.github.io,Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website | new_post.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration file for harness.py\n\nAuthor: Ian Huston\nFor license and copyright information see LICENSE.txt which was distributed with this file.\n\n\n\"\"\"\nimport logging\n\n##################################################\n# ... | python | edit | 1 | 0 | bsd-3-clause | cca5b6355a376cb1f51a45a3fac5ca5e4b96f5c7 | ihuston/pyflation,ihuston/pyflation | pyflation/configuration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import path\nfrom setuptools import setup\nfrom subprocess import check_call\nfrom distutils.command.build import build\nfrom setuptools.command.develop import develop\n\n\ndef get_submodules():\n if path.exists('.git'):\n ... | python | edit | 1 | 2 | bsd-3-clause | e36744422c615581d366cbbbc3213896e5652f68 | timmyomahony/django-pagedown,timmyomahony/django-pagedown,kaushalaman/django-pagedown,kaushalaman/django-pagedown,ministryofjustice/django-pagedown,ministryofjustice/django-pagedown,timmyomahony/django-pagedown,ministryofjustice/django-pagedown,kaushalaman/django-pagedown | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom sqlalchemy import text\nfrom sqlalchemy.exc import ProgrammingError\nfrom sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine\nfrom sqlalchemy.ext.asyncio import AsyncSession\n\nfrom virtool.models import Ba... | python | edit | 3 | 2 | mit | 5a49e5bea67465528b1e644a98da282c66e9c35f | igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool | tests/fixtures/postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module.\n\nCurrently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include ... | python | edit | 13 | 0 | bsd-2-clause | d2051073d48873408a711b56676ee099e5ff685a | dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy | sunpy/timeseries/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(name=\"manhattan\",\n version='0.2',\n description='Robust Server-Side Analytics',\n long_description='',\n classifiers=[\n 'Development Status :: 5 - Production/Stable',\... | python | edit | 1 | 0 | mit | 7566ba4a701d8da431b6987a7a921b297152615e | storborg/manhattan | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\n\nfrom django.core.management.commands import syncdb\nfrom django.db import models, connection, transaction\n\ntry:\n from south.management.commands import syncdb\nexcept ImportError:\n pass\n\nfrom ...models import Sc... | python | edit | 4 | 4 | bsd-3-clause | bd97e698d3a2a795f4c38d7e54eae63737ed74a6 | schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse | multi_schema/management/commands/syncdb.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python2.7\n\nimport requests\n\n\nclass Slackbot(object):\n\n def __init__(self, slack_name, token):\n self.slack_name = slack_name\n self.token = token\n assert self.token, \"Token should not be blan... | python | edit | 1 | 2 | apache-2.0 | fe4cc596e65f6dc5ec7f99d40f7346143b695633 | TheConnMan/destalinator,royrapoport/destalinator,randsleadershipslack/destalinator,royrapoport/destalinator,TheConnMan/destalinator,randsleadershipslack/destalinator,underarmour/destalinator | slackbot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, Extension\n\nimport os\nfrom Cython.Build import cythonize\n\nif (os.name == \"nt\"):\n compile_args = ['/EHs', '/D_CRT_SECURE_NO_DEPRECATE']\nelse:\n compile_args = ['-Wno-switch-enum', '-Wno-switch', '-... | python | edit | 1 | 0 | bsd-3-clause | a09ac33998debcfa502e650e72e59acb265ffeac | sot/Chandra.Time,sot/Chandra.Time,sot/Chandra.Time | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom measurement.models import Measurement\nfrom threshold_value.models import ThresholdValue\nfrom calendar import timegm\nfrom alarm.models import Alarm\n\n\nclass GraphSeriesSerializer(serializers.... | python | edit | 1 | 2 | mit | bb3ec131261f0619a86f21f549d6b1cb47f2c9ad | sigurdsa/angelika-api | graph/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom google.appengine.ext import db\n\nclass CHPIncident(db.Model):\n\tCenterID = db.StringProperty(required=True)\n\tDispatchID = db.StringProperty(required=True)\n\tLogID = db.StringProperty(required=True)\n\tLogTime = db.DateTimeProperty... | python | edit | 1 | 3 | isc | b9792ce368e3422b28c04c328b22350b2ad991b3 | lectroidmarc/SacTraffic,lectroidmarc/SacTraffic | appengine-experimental/src/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport os.path\nimport re\nimport logging\nfrom pathlib import Path\n\nVIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\\._]g?vimrc|.*\\.vim$)'\n\n\ndef build_environment(cmdargs):\n return {\n 'cmdargs': cmdargs,\n 'home_... | python | edit | 1 | 2 | mit | 6722e16aef43f9cfe03e7e76fc578582139721f6 | Kuniwak/vint,RianFuro/vint,RianFuro/vint,Kuniwak/vint | vint/linting/env.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom ctypeslib.dynamic_module import include\nfrom ctypes import *\n\nif os.name == \"nt\":\n _libc = CDLL(\"msvcrt\")\nelse:\n _libc = CDLL(None)\n\ninclude(\"\"\"\\\n#include <stdio.h>\n\n#ifdef _MSC_VER\n# include <fcnt... | python | edit | 4 | 0 | mit | f4bf48ef24a6d3fcb15c0c86da0cfb48f1533f68 | luzfcb/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib,trolldbois/ctypeslib | ctypeslib/test/stdio.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright 2014 Boundary, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#... | python | edit | 1 | 5 | apache-2.0 | 52841517a575ba7df354b809cb23bc2851c9fcd4 | jdgwartney/boundary-plugin-shell,boundary/boundary-plugin-shell,boundary/boundary-plugin-shell,jdgwartney/boundary-plugin-shell | exec_proc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rdflib import Graph, Namespace, URIRef, Literal\nfrom rdflib.compare import to_isomorphic\nimport unittest\n\n\nclass TestIssue655(unittest.TestCase):\n\n def test_issue655(self):\n PROV = Namespace('http://www.w3.org/ns/prov... | python | edit | 1 | 1 | bsd-3-clause | b83acdc08ed0211c8b53d8f8a158c4ac43c8587c | RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib | test/test_issue655.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport os\nsys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src')\nimport DataVisualizing\n\nif len(sys.argv) != 2:\n print 'usage: create_heatmap.py <data file>'\n ... | python | edit | 5 | 1 | mit | dae3f42c6f6800181bc1d9f2e98cbacf03849431 | LifeWatchINBO/bird-tracking,LifeWatchINBO/bird-tracking | scripts/create_heatmap.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import EmailValidator, RegexValidator\nfrom django.contrib.auth.models import User\n\n# First Name, Last Name: At least one alphanumeric character.\n... | python | edit | 1 | 7 | bsd-3-clause | 1958165c7bf3b9fa45972658b980cefe6a742164 | ResearchSoftwareInstitute/MyHPOM,ResearchSoftwareInstitute/MyHPOM,ResearchSoftwareInstitute/MyHPOM,ResearchSoftwareInstitute/MyHPOM,ResearchSoftwareInstitute/MyHPOM | myhpom/validators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"djangoTemplate URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.10/topics/http/urls/\n\n\"\"\"\nfrom django.conf.urls import url, include\nfrom... | python | edit | 1 | 0 | mit | 62b1c49c67c72c36d4177c657df49a4700586c06 | tosp/djangoTemplate,tosp/djangoTemplate | djangoTemplate/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\n2.1 - Numpy Array library\n'''\n#!/usr/bin/env\nimport numpy as np\n\ndef main():\n ''''\n # 1) Create two vectors 'a' and 'b', and sum them.\n # Standart\n n = 3\n a = [x**2 for x in range(1, n + 1)]\n b = [x**3 for ... | python | edit | 3 | 4 | unlicense | 2b758185e0de0d41c5ecc9a5511308ee36c60c91 | robotenique/RandomAccessMemory,robotenique/RandomAccessMemory,robotenique/RandomAccessMemory | Python_Data/smpl4.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"setup.py file.\"\"\"\nimport uuid\n\nfrom setuptools import setup\nfrom pip.req import parse_requirements\n\n\ninstall_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())\nreqs = [str(ir.req) for ir in install_reqs]\n\... | python | edit | 1 | 0 | apache-2.0 | 5eabda987c43c727ea03a8bd56c32e4c1490c918 | napalm-automation/napalm-ansible,napalm-automation/napalm-ansible | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gi\n\ngi.require_version('Unity', '7.0')\nfrom gi.repository import Unity, Dbusmenu\n\nlauncher = Unity.LauncherEntry.get_for_desktop_id(\"furikura.desktop\")\n\ndef update_counter(count):\n launcher.set_property(\"count\", count)... | python | edit | 1 | 2 | mit | f5f728074b257aac371fc59af8de02e440e57819 | benjamindean/furi-kura,benjamindean/furi-kura | furikura/desktop/unity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ntemplates_path = ['_templates']\nsource_suffix = '.rst'\nmaster_doc = 'index'\nproject = u'dotnetexample'\ncopyright = u'2015, rtfd'\nauthor = u'rtfd'\nversion = '0.1'\nrelease = '0.1'\nlanguage = None\nexclude_pa... | python | edit | 1 | 0 | mit | 49897f091c159220a7aa1fac2d5e03f42236053f | rtfd/sphinx-autoapi,rtfd/sphinx-autoapi,rtfd/sphinx-autoapi,rtfd/sphinx-autoapi | tests/dotnetexample/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# appengine_config.py\nfrom google.appengine.ext import vendor\n\n# Add any libraries install in the \"lib\" folder.\nvendor.add('lib')\n\nimport os\n\nif os.environ.get('SERVER_SOFTWARE', '').startswith('Development'):\n import imp\n ... | python | edit | 1 | 0 | mit | 858c029ccadcbdb7365c6f7d28fa426bb11c9ab2 | egenerat/flight-manager,egenerat/flight-manager,egenerat/flight-manager,egenerat/flight-manager,egenerat/gae-django,egenerat/gae-django,egenerat/gae-django | appengine_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\r\nModule for adding new entries\r\n\"\"\"\r\nimport re\r\nimport api\r\nimport conf\r\n\r\n\r\ndef add(target_url, title=None, star=False, read=False):\r\n conf.load()\r\n\r\n valid_url = False\r\n if not re.compile(\"(?i)h... | python | edit | 1 | 10 | mit | 5bc1731288b76978fa66acab7387a688cea76b4c | Nepochal/wallabag-cli | wallabag/wallabag_add.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nCopyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)\nSee the file 'doc/COPYING' for copying permission\n\"\"\"\n\nimport re\n\nfrom lib.core.common import randomRange\nfrom lib.core.data import kb... | python | edit | 2 | 8 | mit | 02da417b238256878cfab7c0adef8f86f5532b01 | dtrip/.ubuntu,RexGene/monsu-server,RexGene/monsu-server,dtrip/.ubuntu | tamper/randomcomments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.varLib.featureVars import (\n overlayFeatureVariations)\n\n\ndef test_explosion(n = 10):\n conds = []\n for i in ra... | python | edit | 2 | 2 | mit | 8005d43146669e98d921bb36c4afd5dffb08e2e3 | googlefonts/fonttools,fonttools/fonttools | Tests/varLib/featureVars_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Tuttle\"\"\"\n\nimport sys\nfrom tuttle import __version__\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n print(\"Tuttle needs setuptools in order to build. Install it using\"\n... | python | edit | 2 | 0 | mit | c55a20928c3f98fee19d20f7fb0dc3bb9be1acb4 | lexman/tuttle,lexman/tuttle,lexman/tuttle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.mail import EmailMultiAlternatives\nfrom django.template.loader import get_template\nfrom django.template import Context\n\ndef send_group_mail(request, to_email, subject, email_text_templa... | python | edit | 1 | 1 | bsd-3-clause | c6c397dab0e5549ddce59c388dbf0235bc6b44c3 | nikdoof/test-auth | app/groups/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nimport fabric.api as fab\nimport cuisine\n\n\ndef install(filename, user=\"root\", append=False):\n \"\"\"\n Installs crontab from a given cronfile\n \"\"\"\n new_crontab = fab.run(\"mktemp fabixcron.XXXX\")\n ... | python | edit | 1 | 2 | mit | aa0b61b44e631c3a12a16025e93d7e962de23c2f | vmalavolta/fabix | fabix/system/crontab.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"engine.SCons.Platform.darwin\n\nPlatform-specific initialization for Mac OS X systems.\n\nThere normally shouldn't be any need to import this module directly. It\nwill usually be imported through the generic SCons.Platform.Platform()... | python | edit | 3 | 1 | mit | 06df514496612f194a6103167b867debf6657f5e | datalogics/scons,azverkan/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons,datalogics-robb/scons,azverkan/scons,azverkan/scons,datalogics-robb/scons,datalogics/scons,datalogics/scons,datalogics-robb/scons,azverkan/scons | src/engine/SCons/Platform/darwin.py | rejected_duplicate | Near-duplicate of sample 989 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.1.0'\n\nsetup(name='mytardisbf',\n version=version,\n description=\"Bioformats App for MyTardis\",\n long_description=\"\"\"\\\nBioformats App for ex... | python | edit | 4 | 0 | mit | 9bc09627813c446bc5e155f92a2f03a7bde56d88 | keithschulze/mytardisbf | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n\n\nurlpatterns = [\n url(r'^admin/', include(admin.site.urls)),\n url(r'^healthcheck.html$', 'opendebates.views.health_check', name='health_check'),\n ur... | python | edit | 1 | 0 | apache-2.0 | f59ac3cc752698ce1755d8953c8771dc978ae6b7 | caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates | opendebates/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport dataproperty\n\nfrom ._text_writer import TextTableWriter\n\n\nclass CsvTableWriter(TextTableWriter):\n ... | python | edit | 1 | 2 | mit | 65abd52d1bfd54097ca6bd01b1924e6ffcad8840 | thombashi/pytablewriter | pytablewriter/_csv_writer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom ez_setup import use_setuptools\nuse_setuptools()\n\nimport os\nfrom setuptools import setup, find_packages\n\nhere = os.path.dirname(__file__)\n\nversion_file = os.path.join(here, 'src/iptools/__init__.py')\nd ... | python | edit | 2 | 0 | bsd-2-clause | 4aa4a52adc2b4cdf9e021a4191211c47763a9962 | ancat/python-iptools,malonlabe/python-iptools,timmerk/python-iptools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\"\"\"\n<Put Your Tool Name Here>\n-------------------------\n\n:author: <your name> (<your email>)\n\"\"\"\n\n# Make the URL of the server, timeout and other items configur... | python | edit | 1 | 0 | bsd-3-clause | 1ff4dab34d4aa6935d4d1b54aa354882790b9b44 | imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery | astroquery/astrometry_net/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.views.generic import TemplateView\nfrom django.contrib.auth.decorators import login_required\n\nfrom . import views\n\nurlpatterns = [\n url(r'^learningcircles/$', views.LearningCircleListVie... | python | edit | 4 | 0 | mit | afa3cd7c6e4c82f94eef7edd4bc8db609943226c | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | api/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport bpy\n\n\nclass Scene:\n \"\"\"Scene object\"\"\"\n def __init__(self, filepath, render_engine='CYCLES'):\n self.filepath = filepath\n self.render_engine = 'CYCLES'\n\n def setup(self):\n self._cleanup()\... | python | edit | 1 | 1 | mit | c94598b8ce59b98213367b54164b1051d56a28da | josuemontano/blender_wrapper | scene.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'example.views.home', name='home'),\n # url(r'^blog/', include... | python | edit | null | null | mit | 973496ad5111e408ea4832962987098d8c9ca003 | dkdndes/django-flatpages-example | example/example/urls.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom flask import Flask\nfrom flask_selfdoc import Autodoc\n\n\nclass TestErrorHandling(unittest.TestCase):\n def test_app_not_initialized(self):\n app = Flask(__name__)\n autodoc = Autodoc()\n wit... | python | edit | 1 | 1 | mit | 842441bebc328329caef0a7e7aae6d8594318097 | jwg4/flask-autodoc,jwg4/flask-autodoc | tests/test_error_handling.py | rejected_duplicate | Near-duplicate of sample 865 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nfrom datetime import datetime\nfrom django.core.management import setup_environ\nfrom sendinel import settings\nsetup_environ(settings)\n\nfrom sendinel.backend.models import ScheduledEvent\n\ndef run(run_only_one_time = False)... | python | edit | 5 | 7 | mit | 1ba61fc10e2d77f16314da74b5346ddaa7fc9500 | Sendinel/Sendinel,Sendinel/Sendinel,Sendinel/Sendinel,Sendinel/Sendinel | sendinel/backend/scheduler.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Update master branch to 0.9.5.1"
},
{
"role": "assistant",
"content": "# This is the only location where the version will be written and changed.\n# Based on https://packaging.python.org/single_source_version/\n__version__ = '0.9... | python | new_file | 1 | 0 | mit | 392af193a2059bd7b25c3014fa8cbdf6fbade032 | pastas/pasta,pastas/pastas,gwtsa/gwtsa | pastas/version.py | rejected_duplicate | Near-duplicate of sample 1794 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/env python2.7\n\nimport argparse\nimport os\n\nparser = argparse.ArgumentParser(description=\"Run unit tests\")\nparser.add_argument(\"-g\", \"--gui\", help=\"start in GUI mode\",\n action=\"store_true\")\nparser.a... | python | edit | 1 | 0 | apache-2.0 | f4eff6d839d05731a6e29d3e769363e981a32739 | tudortimi/vgm_svunit_utils,tudortimi/vgm_svunit_utils | test/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nsys.path.insert(1, \"../../../\")\nimport h2o\n\ndef bigcatRF(ip,port):\n # Connect to h2o\n h2o.init(ip,port)\n\n # Training set has 100 categories from cat001 to cat100\n # Categories cat001, cat003, ... are perfec... | python | edit | 1 | 1 | apache-2.0 | 65cd0c8865761af434756b313c7e29b1904e647c | spennihana/h2o-3,h2oai/h2o-3,PawarPawan/h2o-v3,mathemage/h2o-3,datachand/h2o-3,mrgloom/h2o-3,printedheart/h2o-3,weaver-viii/h2o-3,weaver-viii/h2o-3,bospetersen/h2o-3,mathemage/h2o-3,h2oai/h2o-3,pchmieli/h2o-3,mathemage/h2o-3,datachand/h2o-3,YzPaul3/h2o-3,ChristosChristofidis/h2o-3,mathemage/h2o-3,mrgloom/h2o-3,madmax98... | h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nDT_FORMAT = \"%Y-%m-%dT%H:%M:%S.%f\"\n\n\ndef get_timestamp():\n \"\"\"\n Serialize actual datetime provided as simplified ISO 8601 (without timezone)\n string\n\n :type datetime: datetime\n :... | python | edit | 1 | 1 | mit | 3f764874dbb805d661d38719bb4e78b6a52f9f79 | m4tx/techswarm-receiver | parser/timestamp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nclass MutableTree:\n\n def __init__ (self, value = Non... | python | edit | 1 | 3 | bsd-3-clause | aaaaa179f43b720d207377cf17dcd6cec0c19321 | mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation | falcom/tree/mutable_tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gdb\nimport struct\n\n\nclass DeviceMemory:\n def __init__(self):\n self.inferior = gdb.selected_inferior()\n\n def __del__(self):\n del self.inferior\n\n def read(self, address):\n return struct.unpack(... | python | edit | 1 | 2 | mit | 731e48b1b81e9249fc8bdd0f826c6e009559fcc3 | fmfi-svt-deadlock/hw-testing,fmfi-svt-deadlock/hw-testing | mempoke.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.test import RequestFactory\nfrom django.test import TestCase\nfrom openid_provider.tests.utils import *\nfrom openid_provider.views import *\n\n\nclass CodeFlowTestCase(TestCase):\n\... | python | edit | 7 | 1 | mit | a3c131776678b8e91e1179cd0f3c3b4b3fbbf6fb | wayward710/django-oidc-provider,bunnyinc/django-oidc-provider,wayward710/django-oidc-provider,juanifioren/django-oidc-provider,ByteInternet/django-oidc-provider,wojtek-fliposports/django-oidc-provider,ByteInternet/django-oidc-provider,django-py/django-openid-provider,torreco/django-oidc-provider,django-py/django-openid... | openid_provider/tests/test_code_flow.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Jasy - JavaScript Tooling Refined\n# Copyright 2010 Sebastian Werner\n#\n\n#\n# Configure logging\n#\n\nimport logging\n\nlogging.basicConfig(filename=\"log.txt\", level=logging.INFO, format=\"%(asctime)s - %(levelname)s - %(message)s\... | python | edit | 11 | 0 | mit | 15c0ecf0e8ecd71017d8a1f2414204944b134fbd | sebastian-software/jasy,zynga/jasy,sebastian-software/jasy,zynga/jasy | lib/jasy/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.conf import settings\n\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.auth.admin import GroupAdmin, UserAdmin\nfrom django.contrib.auth.forms import UserChangeForm\n\nf... | python | edit | 1 | 0 | bsd-3-clause | 8165aa65e96d32ed908cdf8e3c475c28181e0d93 | zhangguiyu/django-hierarchical-auth,digitalemagine/django-hierarchical-auth | hierarchical_auth/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom models import TestName\n\nclass TestNameAdmin(admin.ModelAdmin):\n model = TestName\n alphabet_filter = 'sorted_name'\n\nadmin.site.register(TestName, TestNameAdmin)\n```\n\nApply this change: Pu... | python | edit | 1 | 1 | apache-2.0 | fd96170fd15ccbe0b42463fe8d4ac78f511d10c7 | bltravis/django-alphabetfilter,affan2/django-alphabetfilter,affan2/django-alphabetfilter,affan2/django-alphabetfilter,bltravis/django-alphabetfilter,bltravis/django-alphabetfilter | example/testtags/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: UTF-8 -*-\nfrom fabric.api import *\n\n#def dev()\n#def prod()\n\n#def setup_host()\n\ndef hello():\n print(\"Hello world!\")\n \ndef clean_db():\n local(\"rm -rf database/fst_demo.db;python manage.py syncdb --noinput... | python | edit | 4 | 1 | bsd-3-clause | 9c36417af3364b77853b62d9a924d5693e44dce0 | rinfo/fst,kamidev/autobuild_fst,kamidev/autobuild_fst,rinfo/fst,kamidev/autobuild_fst,rinfo/fst,kamidev/autobuild_fst,rinfo/fst | fabfile.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom axes.models import AccessAttempt\n\n\ndef reset(ip=None, username=None):\n \"\"\"Reset records that match ip or username, and\n return the count of removed attempts.\n \"\"\"\n count = 0\n\n attempts = AccessAttempt.obje... | python | edit | 1 | 6 | mit | f277007e46b7c6d8c978011d7356b7527ba91133 | jazzband/django-axes,django-pci/django-axes | axes/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import lru_cache\n\nimport boto3\nfrom pydantic import BaseSettings, Field, root_validator\n\n\n@lru_cache\ndef get_secrets_client():\n return boto3.client(\"secretsmanager\")\n\n\n@lru_cache\ndef get_secret(secret_id):\n ... | python | edit | 1 | 4 | mit | 30f32266a1f8ac698d9da5da79c88867e781084a | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/reward-root-submitter/reward_root_submitter/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto3\n\ndef get_table(name):\n dynamo = boto3.resource('dynamo')\n return dynamo.Table(name)\n\ndef get_object(reference):\n table = get_table('mediachain')\n obj = table.get_item(Key={'multihash': reference})\n byte_... | python | edit | 3 | 2 | mit | 27c3972a57e09faf35f86b82b35eb815dadc4688 | mediachain/mediachain-client,mediachain/mediachain-client | mediachain/reader/dynamo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport h5py\nimport numpy as np\n\nfrom ..sph import construct_octree\n\nDATA = os.path.join(os.path.dirname(__file__), 'data')\n\n\ndef test_construct_octree():\n\n np.random.seed(0)\n\n N = 5000\n px = np.random.unif... | python | edit | 1 | 1 | bsd-2-clause | 09fc3d53b2814f940bcaf7d6136ed2ce0595fb2f | hyperion-rt/hyperion,bluescarni/hyperion,hyperion-rt/hyperion,hyperion-rt/hyperion,bluescarni/hyperion | hyperion/importers/tests/test_sph.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom behave import given\n\nfrom captainhook.checkers.utils import bash\n\n\n@given('I have installed captainhook')\ndef step_impl(context):\n bash('captainhook')\n\n```\n\nApply this change: Fix behave tests to use install command."
}... | python | edit | 1 | 1 | bsd-3-clause | bb732b97536bd1bec605c96440ce1f18d5edb59a | Friz-zy/captainhook,alexcouper/captainhook,pczerkas/captainhook | features/steps/install_steps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pylint: disable=wildcard-import,unused-wildcard-import,missing-docstring\n\nfrom __future__ import absolute_import\n\nfrom unittest import TestCase\n\nfrom nose.tools import *\nfrom mock import *\n\nfrom dear_astrid.rtm.importer import Im... | python | edit | 9 | 2 | mit | faf047e7ac3b9a703ffd76bd3c5de2e3ef5d93b6 | rwstauner/dear_astrid,rwstauner/dear_astrid | dear_astrid/test/test_rtm_importer.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nfrom django.conf import settings\nfrom django.contrib.sites.models import get_current_site\nfrom django.utils.functional import SimpleLazyObject\nfrom django.utils.timezone import utc\nfrom downtime.models import Period\nfr... | python | edit | 4 | 3 | apache-2.0 | fb4d11f1c96d48dd71bc12921763681149da4616 | emory-libraries/django-eultheme,emory-libraries/django-eultheme,emory-libraries/django-eultheme | eultheme/context_processors.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Handle nicovideo.jp user_session.\"\"\"\n# Copyright 2015-2016 Masayuki Yamamoto\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You ma... | python | edit | 1 | 0 | apache-2.0 | 718a04f14f3ede084a2d9391e187b4d943463c6f | ma8ma/yanico | yanico/session/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport time\nfrom functools import wraps\n\nfrom . import compat\n\ncompat.patch() # monkey-patch time.perf_counter\n\nlog = logging.getLogger('amqpy')\n\n\ndef synchronized(lock_name):\n \"\"\"Decorator for automaticall... | python | edit | 1 | 4 | mit | 944188858ed41ae43ef950649dc9e3aa9613b5d9 | veegee/amqpy,gst/amqpy | amqpy/concurrency.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc... | python | edit | 4 | 0 | bsd-3-clause | f931a434839222bb00282a432d6d6a0c2c52eb7d | numpy/numpy,endolith/numpy,charris/numpy,rgommers/numpy,numpy/numpy,jakirkham/numpy,seberg/numpy,mattip/numpy,jakirkham/numpy,endolith/numpy,rgommers/numpy,mattip/numpy,mattip/numpy,seberg/numpy,pdebuyl/numpy,pdebuyl/numpy,endolith/numpy,endolith/numpy,mattip/numpy,jakirkham/numpy,charris/numpy,seberg/numpy,mhvk/numpy,... | numpy/array_api/_typing.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.4\n#\n# Copyright 2008 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\... | python | edit | 1 | 1 | apache-2.0 | 6c9bf9ee4428fbb3b35985d1bbd1c1e29b882f5c | wtanaka/google-app-engine-helper-for-django,clones/google-app-engine-django | appengine_django/db/creation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Created by JHJ on 2016. 10. 5.\n\nfrom django.conf.urls import url\n\nfrom . import views\n\napp_name = 'board'\nurlpatterns = [\n url(r'^$', views.board_list, name='board_list'),\n url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list... | python | edit | 1 | 0 | mit | 483800541ee66de006392c361e06177bc9db4784 | guswnsxodlf/k-board,kboard/kboard,cjh5414/kboard,kboard/kboard,hyesun03/k-board,hyesun03/k-board,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,darjeeling/k-board,cjh5414/kboard,kboard/kboard,guswnsxodlf/k-board | kboard/board/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# Copyright 2012 Software Freedom Conservancy.\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 L... | python | edit | 1 | 1 | apache-2.0 | 06d1039ccbf4653c2f285528b2ab058edca2ff1f | misttechnologies/selenium,markodolancic/selenium,uchida/selenium,yukaReal/selenium,mestihudson/selenium,alb-i986/selenium,jabbrwcky/selenium,krmahadevan/selenium,jabbrwcky/selenium,AutomatedTester/selenium,s2oBCN/selenium,asolntsev/selenium,twalpole/selenium,o-schneider/selenium,jsakamoto/selenium,compstak/selenium,tku... | py/test/selenium/webdriver/common/proxy_tests.py | rejected_duplicate | Near-duplicate of sample 3641 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, unicode_literals\nimport argparse\nimport json\nimport sys\nimport textwrap\n\nfrom tagalog import io, stamp, tag\nfrom tagalog import shipper\n\nparser = argparse.ArgumentParser(description=textwrap.d... | python | edit | 1 | 5 | mit | a475fc39480b52d4f38d37e58b3e3c45e8335a1e | nickstenning/tagalog,nickstenning/tagalog,alphagov/tagalog,alphagov/tagalog | tagalog/command/logship.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"URL routing for the general application.\"\"\"\n\nfrom django.conf.urls import url\n\nfrom . import views\n\nurlpatterns = [\n url(r\"^$\", views.GeneralIndexView.as_view(), name=\"home\"),\n url(r\"^about/$\", views.GeneralAbou... | python | edit | 1 | 0 | mit | 5b8edee2b6fa13fc1b05e15961d8b7920e6f9739 | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | csunplugged/general/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ngithub3\n=======\n\n:copyright: (c) 2012 by Ian Cordasco\n:license: Modified BSD, see LICENSE for more details\n\n\"\"\"\n\n__title__ = 'github3'\n__author__ = 'Ian Cordasco'\n__license__ = 'Modified BSD'\n__copyright__ = 'Copyright... | python | edit | 4 | 0 | bsd-3-clause | 1e4f4ce012de2ae0ac98b8397a494cbf1fac184a | h4ck3rm1k3/github3.py,icio/github3.py,jim-minter/github3.py,degustaf/github3.py,ueg1990/github3.py,itsmemattchung/github3.py,wbrefvem/github3.py,christophelec/github3.py,krxsky/github3.py,agamdua/github3.py,sigmavirus24/github3.py,balloob/github3.py | github3/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n# Authentication and Authorisation\nfrom functools import wraps\n\nfrom . import http\n\n\ndef permit(test_func, response_class=http.Forbidden):\n '''Decorate a handler to control access'''\n ... | python | edit | 1 | 2 | bsd-3-clause | 771f429433d201463ab94439870d1bc803022722 | limbera/django-nap | nap/auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\nimport logging\nfrom gi.repository import Gst, GstNet\n\n__all__ = ['Clock', 'NetTimeProvider']\nport = 9998\n\nlog = logging.getLogger('Clock')\n\nlog.debug(\"Obtaining System-Clock\")\nClock = Gst.SystemClock.obtain()\... | python | edit | 1 | 0 | mit | 82572b32e5ddc8dd8eade591708eb2ab45ea2ae3 | h01ger/voctomix,voc/voctomix,voc/voctomix,h01ger/voctomix | voctocore/lib/clock.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Algoritmi z drugih vaj\n\ndef euclid(m, n):\n \"\"\"Evklidov algoritem\"\"\"\n while n != 0:\n m, n = n, m % n\n return m\n\ndef exteuclid(m, n):\n \"\"\"\n Razširjeni Evklidov algoritem.\n\n... | python | edit | 1 | 2 | mit | 26421bf58344f241452064ae0648d6eb9435d28a | jaanos/PSA1,markun9/PSA1 | vaje/vaje2.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.