messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request, render_template, flash, url_for, abort\nfrom itsdangerous import URLSafeSerializer\n\nfrom ca import app, db\nfrom ca.forms import RequestForm\nfrom ca.models import Request\n\ns = URLSafeSerializer(app.con...
python
edit
5
2
mit
85e7433948785b233876bb0f85795adf49636712
freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net
ca/views.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Middleware used by the history links service.\"\"\"\n\nfrom django.shortcuts import redirect\nfrom cms.apps.historylinks.models import HistoryLink\n\n\nclass HistoryLinkFallbackMiddleware(object):\n \n \"\"\"Middleware that atte...
python
edit
1
5
bsd-3-clause
fe1d8b2172aecf4f2f7cebe3c61eeb778f3db23a
etianen/cms,etianen/cms,danielsamuels/cms,danielsamuels/cms,danielsamuels/cms,dan-gamble/cms,etianen/cms,lewiscollard/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,jamesfoley/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,jamesfoley/cms
src/cms/apps/historylinks/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom distutils.version import LooseVersion\nfrom marshmallow.utils import missing\n\n# Make marshmallow's validation functions importable from webargs\nfrom marshmallow import validate\n\nfrom webargs.core import Va...
python
edit
1
0
mit
87f4bb8cdcb607cb4f15ecbda9a3cb50a3fd5319
sloria/webargs
src/webargs/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic model for the identifications" }, { "role": "assistant", "content": "from django.db import models\nfrom django.contrib.auth.models import User\n\nclass Credentials(models.Model):\n \"Keeps track of issued MAC credent...
python
new_file
1
0
mit
3b1c42b5001bf70fff47a53a1cf003538b619c53
ndevenish/auth_mac
auth_mac/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pathlib\n\n\n# RELEASE-UPDATE\nAPP_DIR = pathlib.Path(os.path.realpath(__file__)).parent.parent\nROOT_DIR = APP_DIR.parent\nDEFAULT_DB_PATH = '/instance/storage/storage.db'\nPROJECT_NAME = 'Zordon'\nPROJECT_VERSION = '4.0....
python
edit
1
0
mit
83c7fb070d0d79036ce697835e69c5e0aa2e14b7
KrusnikViers/Zordon,KrusnikViers/Zordon
app/core/info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom aqt import mw, QAction, QFileDialog\n\nsys.path.append(os.path.join(os.path.dirname(__file__), \"dist\"))\n\nfrom .anki.hook_vendor import HookVendor\nfrom .anki.ui.action_vendor import ActionVendor\nfrom .util...
python
edit
1
2
mit
b353441e33e8f272177b16505f12358f8a30fe6a
Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki
crowd_anki/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# (C) Datadog, Inc. 2010-2016\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\nimport os\n\nimport pytest\n\nfrom .common import INSTANCE, HOST\nfrom datadog_checks.dev import docker_run, get_here, run_command\...
python
edit
1
1
bsd-3-clause
24fd469296951fd8445e18d482a97ad5bb9108e7
DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras
storm/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys, os\nimport ads\nfrom nameparser import HumanName\n\nreload(sys)\nsys.setdefaultencoding('utf8')\n\nnames_file = open(sys.argv[1])\n\n#Default abstract storage\nabstract_directory = \"abstracts\"\nif len(sys....
python
edit
2
0
unlicense
ab59cf04530dbbcecf912b60dce181a0b24c6d29
MilesCranmer/research_match,MilesCranmer/research_match
download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nkay.models\n\n:Copyright: (c) 2009 Takashi Matsuo <<EMAIL>> All rights reserved.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\n\nfrom google.appengine.ext import db\nfrom kay.utils import crypto...
python
edit
2
4
bsd-3-clause
9f7bc70713dfc5864841b9f90fe2ec4bbd406b8d
Letractively/kay-framework,Letractively/kay-framework,Letractively/kay-framework,Letractively/kay-framework
kay/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\r\n# coding: utf-8\r\n\r\nimport sys\r\nimport signal\r\nimport logging\r\nimport argparse\r\n\r\nfrom lib.DbConnector import DbConnector\r\nfrom lib.Acquisition import Acquisition\r\nfrom lib.SystemMonitor import SystemMo...
python
edit
1
1
mit
e2dc271f20e6115f54ab4aac123f6790fcc7764c
ftoulemon/Dilebhome,ftoulemon/Dilebhome,ftoulemon/Dilebhome,ftoulemon/Dilebhome
backend/start.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"service_control URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.11/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from m...
python
edit
1
0
mit
9717271fc02b3294b08b3989913c14da68285601
desenho-sw-g5/service_control,desenho-sw-g5/service_control
service_control/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\n\nfrom django.template.base import TemplateDoesNotExist, TemplateSyntaxError # NOQA\nfrom django.template.backends.base import BaseEngine\nfrom django.template.backends.utils import csrf_input_lazy, csr...
python
edit
3
3
mit
4a7ca3439c9ad8368849accc25bbb554daae1940
funkybob/knights-templater,funkybob/knights-templater
knights/dj.py
rejected_duplicate
Near-duplicate of sample 14771
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom .models import Tale \n\ndef tale_list(request):\n\ttale_list = Tale.objects.all()\n\n\n\treturn render(request, 'booksite/index.html', {'tale_list' : tale_list})\n\n\ndef create_book(request, tale_i...
python
edit
1
1
apache-2.0
7da00e458525302b009da35d3410dcaccf55fa94
mark-graciov/bookit,mark-graciov/bookit
booksite/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom datatyping.datatyping import validate\n\n\ndef test_empty():\n with pytest.raises(TypeError):\n assert validate([], ()) is None\n\n\ndef test_empty_reversed():\n with pytest.raises(TypeError):\n asser...
python
edit
1
3
mit
6612f0e3cd98a037f8b441cba1b3defc46977d66
Zaab1t/datatyping
tests/test_structure_check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.http import HttpResponse\nfrom django.http import HttpResponseRedirect\n\ndef index(request):\n return render(request, 'index.html')\n\ndef append(request):\n # open(\"data\", \"a\").wr...
python
edit
3
1
mit
1baa04b3f47c92a14c61e7bbb6b32dc35dd51f5d
sonicyang/chiphub,sonicyang/chiphub,sonicyang/chiphub
chatroom/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/python3\n\nimport math\nimport os\nimport random\nimport re\nimport sys\n\n# See https://en.wikipedia.org/wiki/Longest_common_subsequence_problem\ndef commonChild(s1, s2):\n matrix = [[0 for i in range(len(s2) + 1)] for j in range...
python
edit
6
6
mit
6451808c2dfb3d207bdd69c8aa138554f52cf5ba
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/common-child.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyQt4 import QtCore, QtGui\nfrom utilities.backend_config import Configuration\nfrom qt_interfaces.settings_ui_new import Ui_ClientConfiguration\nfrom utilities.log_manager import logger\n\n\n# Configuration Ui section\nclass ClientCon...
python
edit
1
1
mit
9a86ba51893b6f03d3ffde12ec2f331339ddd0f1
lakewik/storj-gui-client
UI/client_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport unittest\n\nimport six\nif six.PY3:\n from unittest import mock\nelse:\n import mock\n\nfrom engineio import async_eventlet\n\n\nclass TestServer(unittest.TestCase):\n def setUp(self):\n logging.getLog...
python
edit
1
1
mit
d1969d6bc016b0e3dc66df7eeb30a9c76debc6b6
miguelgrinberg/python-engineio,miguelgrinberg/python-engineio,miguelgrinberg/python-engineio
tests/test_async_eventlet.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nName: Paul Briant\nDate: 12/11/16\nClass: Introduction to Python\nAssignment: Final Project\n\nDescription:\nCode for Final Project\n\"\"\"\n\nimport pandas\nfrom datetime import datetime\n\n\ndef clean(data):\n \"\"\"\n Take ...
python
edit
3
1
unlicense
1df25ada51d0be794f2d689161b1c93e81512d3b
UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016
students/psbriant/final_project/clean_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef sort(arr, length):\n\t\n\tif length == 1:\n\t\treturn\n\n\tpivot = choose_pivot(arr, length)\n\n\treturn (arr, length, pivot)\n\n\ndef choose_pivot(arr, length):\n\n\treturn arr[0]\n\n\nif __name__ == '__main__':\n\t\n\tunsorted = list(...
python
edit
2
4
mit
90fe4c98b5e93058c6cfd090958922070351a04d
timpel/stanford-algs,timpel/stanford-algs
quicksort/quicksort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Admin for schedule-related models.\"\"\"\n\nfrom pygotham.admin.utils import model_view\nfrom pygotham.schedule import models\n\n# This line is really long because pep257 needs it to be on one line.\n__all__ = ('DayModelView', 'RoomMo...
python
edit
1
0
bsd-3-clause
9d79893f119d696ead124d9e34b21acf34cd6f8f
pathunstrom/pygotham,PyGotham/pygotham,djds23/pygotham-1,PyGotham/pygotham,djds23/pygotham-1,djds23/pygotham-1,PyGotham/pygotham,pathunstrom/pygotham,PyGotham/pygotham,djds23/pygotham-1,pathunstrom/pygotham,pathunstrom/pygotham,djds23/pygotham-1,pathunstrom/pygotham,PyGotham/pygotham
pygotham/admin/schedule.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unit test module for auth\"\"\"\nimport json\nfrom flask.ext.login import login_user, logout_user\nfrom tests import TestCase, LAST_NAME, FIRST_NAME, TEST_USER_ID\n\nfrom portal.extensions import db\nfrom portal.models.auth import Cli...
python
edit
8
1
bsd-3-clause
099ab577bf3d03bd5f2d579bbf82a8035690219e
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
tests/test_auth.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..vtask import VTask\nimport time\nfrom ..sparts import option\nfrom threading import Event\n\n\nclass PeriodicTask(VTask):\n INTERVAL = None\n\n interval = option('interval', type=float, metavar='SECONDS',\n ...
python
edit
1
4
bsd-3-clause
92aecd24a28f92d05bdb123d98b19d45fc749427
fmoo/sparts,bboozzoo/sparts,facebook/sparts,pshuff/sparts,facebook/sparts,pshuff/sparts,djipko/sparts,djipko/sparts,fmoo/sparts,bboozzoo/sparts
sparts/tasks/periodic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Author model for Zinnia\"\"\"\nfrom django.db import models\nfrom django.contrib.auth import get_user_model\nfrom django.utils.encoding import python_2_unicode_compatible\n\nfrom zinnia.managers import entries_published\nfrom zinnia.m...
python
edit
1
2
bsd-3-clause
8d46db626298f2d21f4f1d8b6f75fdc08bd761dc
bywbilly/django-blog-zinnia,Zopieux/django-blog-zinnia,petecummings/django-blog-zinnia,ZuluPro/django-blog-zinnia,petecummings/django-blog-zinnia,marctc/django-blog-zinnia,Maplecroft/django-blog-zinnia,petecummings/django-blog-zinnia,Fantomas42/django-blog-zinnia,1844144/django-blog-zinnia,marctc/django-blog-zinnia,Fan...
zinnia/models/author.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom . import routes, views, model # noqa\n\nMODELS = [\n model.AddonFigShareUserSettings,\n model.AddonFigShareNodeSettings,\n model.FigShareGuidFile\n]\nUSER_SETTINGS_MODEL = model.AddonFigShareUserSettings\nNODE_SE...
python
edit
1
0
apache-2.0
78463a6ba34f1503f3c6fd5fdb287a0593f4be68
chennan47/osf.io,baylee-d/osf.io,HarryRybacki/osf.io,mluo613/osf.io,jolene-esposito/osf.io,binoculars/osf.io,petermalcolm/osf.io,caneruguz/osf.io,haoyuchen1992/osf.io,zamattiac/osf.io,arpitar/osf.io,amyshi188/osf.io,jnayak1/osf.io,mluke93/osf.io,RomanZWang/osf.io,cldershem/osf.io,abought/osf.io,doublebits/osf.io,Halcyo...
website/addons/figshare/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = 'Joao Moreira'\nSITENAME = 'Joao Moreira'\nSITEURL = ''\nBIO = 'lorem ipsum doler umpalum paluuu'\nPROFILE_IMAGE = \"avatar.jpg\"\n\nPATH ...
python
edit
1
0
mit
7ed3a8452de8d75a09d2ee2265d7fa32b4a25c7c
jagmoreira/jagmoreira.github.io,jagmoreira/jagmoreira.github.io
pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/env python\n#\n# cat_StarterLog.py\n#\n# Print out the StarterLog for a glidein output file\n#\n# Usage: cat_StarterLog.py logname\n#\n\nimport os.path\nimport sys\nSTARTUP_DIR=sys.path[0]\nsys.path.append(os.path.join(STARTUP_DIR,\"...
python
edit
2
2
bsd-3-clause
a4135626721efada6a68dab6cb86ce2dfb687462
bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old
factory/tools/cat_StarterLog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*_\nfrom openerp import fields, models\n\nclass Session(models.Model):\n\n _name = 'openacademy.session'\n\n name = fields.Char(required=True)\n start_date = fields.Date()\n duration = fields.Float(digits=(6...
python
edit
1
0
apache-2.0
64cb1130811c5e0e1d547ff7a3a03139b831dea5
glizek/openacademy-project
openacademy/model/openacademy_session.py
rejected_duplicate
Near-duplicate of sample 4073
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, unicode_literals\nimport logging\n__version__ = '1.3.0'\n\nlogging.basicConfig(format='%(levelname)s: indra/%(name)s - %(message)s',\n level=logging.INFO)\n\nlogging.getLogger('reque...
python
edit
15
0
bsd-2-clause
98dd8df628079357b26a663d24adcbc6ac4d3794
pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,johnbachman/belpy,jmuhlich/indra,sorgerlab/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,jmuhlich/indra,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,bgyori/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/belpy,so...
indra/__init__.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Write python code for the following: Document how the Dmark protocol is expected to work." }, { "role": "assistant", "content": "\nfrom vumi.transports.httprpc import HttpRpcTransport\n\n\nclass DmarkUssdTransportConfig(HttpRpcTransport.CONFIG_CLASS):\n \"\"\"Con...
python
new_file
1
2
bsd-3-clause
dc002c23891ea5d2fe37e059cee6de0381c284cf
TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix
vumi/transports/dmark/dmark_ussd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom django.views.generic import TemplateView\n\nfrom voting.models import Bill\nfrom voting.models import Member\n\n\nclass HomeView(TemplateView):\n template_name = \"website/in...
python
edit
1
2
mit
3e8f45368b949cbd140a2a61fcba7afec563a7a1
openkamer/openkamer,openkamer/openkamer,openkamer/openkamer,openkamer/openkamer
website/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: iso-8859-1 -*-\r\nfrom serial import SerialException\r\nimport importlib\r\nimport threading\r\nimport logging\r\n\r\n\r\nclass ConectorError(Exception):\r\n pass\r\n\r\n\r\nclass ConectorDriverComando:\r\n driver = None...
python
edit
4
3
mit
9334d20adb15f3a6be393c57c797311e31fcd8fc
ristorantino/fiscalberry,ristorantino/fiscalberry,ristorantino/fiscalberry,ristorantino/fiscalberry
ConectorDriverComando.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals, division, absolute_import\nfrom datetime import timedelta, datetime\n\nfrom flexget.manager import Session\nfrom flexget.plugins.filter.movie_queue import queue_add, QueuedMovie\nfrom tests import Fl...
python
edit
3
2
mit
c651d511c5c730f1a0ffdcd1a19e15443fda5e9f
drwyrm/Flexget,crawln45/Flexget,antivirtel/Flexget,ianstalk/Flexget,spencerjanssen/Flexget,qvazzler/Flexget,Pretagonist/Flexget,Pretagonist/Flexget,cvium/Flexget,tsnoam/Flexget,poulpito/Flexget,tarzasai/Flexget,camon/Flexget,thalamus/Flexget,v17al/Flexget,tsnoam/Flexget,lildadou/Flexget,Flexget/Flexget,ratoaq2/Flexget,...
tests/test_emit_movie_queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pytest\nimport tempfile\n\nimport pandas\nfrom skan import pipe\n\n@pytest.fixture\ndef image_filename():\n rundir = os.path.abspath(os.path.dirname(__file__))\n datadir = os.path.join(rundir, 'data')\n return os....
python
edit
1
1
bsd-3-clause
79c8ab721fd5d00bff3e96b52e6155e16ae255b2
jni/skan
skan/test/test_pipe.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nMinimal config file for kahvibot. Just define values as normal Python code.\n\"\"\"\n\n# put your bot token here as a string\nbot_token = \"\"\n\n# the tg username of the bot's admin.\nadmin_username = \"\"\n\n# if a message contain...
python
edit
1
0
mit
7420030ef8253580942412c479f2868ea7091eaa
mgunyho/kiltiskahvi
config-example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2007-2009 Christopher Lenz\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\nimport uuid\...
python
edit
2
4
bsd-3-clause
14b9ed3052054cf983fe6b7b1903faca3f1a0a13
djc/couchdb-python,djc/couchdb-python,infinit/couchdb-python,Roger/couchdb-python
couchdb/tests/testutil.py
rejected_duplicate
Near-duplicate of sample 375
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# CoffeeOutsideBot\n# Copyright 2016, David Crosby\n# BSD 2-clause license\n#\n# TODO - add rest of the locations, etc\n# TODO - automate weather forecast lookup\n# TODO - automate Cyclepalooza event creation\n# TODO ...
python
edit
9
0
bsd-2-clause
17905bc0f7f21331476d27c6eb302408b4382e4b
dafyddcrosby/coffeeoutsidebot,yycbike/coffeeoutsidebot,yycbike/coffeeoutsidebot
coffeeoutsidebot.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ast\n\nfrom .base import BaseAnalyzer, ModuleVisitor, Result\n\n\nclass ContextProcessorsVisitor(ast.NodeVisitor):\n\n def __init__(self):\n self.found = []\n\n deprecated_items = {\n 'django.core.context_processo...
python
edit
3
4
isc
bbe765d404ff756e5a8cc828e6aa744dd6228285
alfredhq/djlint
djlint/analyzers/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom datetime import datetime\nfrom courtutils.databases.postgres import PostgresDatabase\nfrom courtreader import readers\nfrom courtutils.logger import get_logger\n\nlog = get_logger()\nreader = readers.DistrictCourtReader()\n...
python
edit
1
4
mit
9ea98f37ca4c1ea00fd6c77d5a651b4a928a237d
bschoenfeld/va-court-scraper,bschoenfeld/va-court-scraper
fix_past_due_issue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nMinimal config file for kahvibot. Just define values as normal Python code.\n\"\"\"\n\n# put your bot token here as a string\nbot_token = \"\"\n\n# the tg username of the bot's admin.\nadmin_username = \"\"\n\n# The size of the pict...
python
edit
1
0
mit
456b72757cda81c8dd6634ae41b8a1008ff59087
mgunyho/kiltiskahvi
config-example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Implements the Runner interface fo LDA\n\"\"\"\n\nfrom microscopes.common import validator\nfrom microscopes.common.rng import rng\nfrom microscopes.lda.kernels import lda_crp_gibbs\nfrom microscopes.lda.kernels import lda_sample_disp...
python
edit
4
2
bsd-3-clause
0af76c93eab508ca93228ce902427df35ff34bca
datamicroscopes/lda,datamicroscopes/lda,datamicroscopes/lda
microscopes/lda/runner.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom nose.tools import (assert_equal, assert_in, assert_true)\nfrom ...helpers.logging import logger\nfrom qipipe.interfaces import GroupDicom\nfrom ... import ROOT\nfrom ...helpers.logging import logger\n\n# The test fixture.\nF...
python
edit
3
2
bsd-2-clause
b2e26c044e9d5890945e01364d62f814fcd07949
ohsu-qin/qipipe
test/unit/interfaces/test_group_dicom.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nversion = (0, 1, 0)\n\n__title__ = \"Process Kit\"\n__author__ = \"Oleiade\"\n__license__ = \"MIT\"\n\n__version__ = '.'.join(map(str, version))\n\nfrom pkit.process import Process\n\n```\n\nApply this change: Add a wait option to Process.t...
python
edit
1
0
mit
63ad1bc8f237a90975c7fa883143021faa679efd
botify-labs/process-kit
pkit/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nsys.path.insert(1, \"../../\")\nimport h2o, tests\n\ndef length_check():\n # Connect to a pre-existing cluster\n\n frame = h2o.import_file(path=h2o.locate(\"smalldata/junit/cars_trim.csv\"), col_types=[\"string\",\"numeric...
python
edit
1
1
apache-2.0
4b222e60b5ae6ff9c3390c033356c303e8af3900
madmax983/h2o-3,YzPaul3/h2o-3,YzPaul3/h2o-3,madmax983/h2o-3,kyoren/https-github.com-h2oai-h2o-3,madmax983/h2o-3,jangorecki/h2o-3,h2oai/h2o-3,mathemage/h2o-3,mathemage/h2o-3,spennihana/h2o-3,pchmieli/h2o-3,michalkurka/h2o-3,brightchen/h2o-3,pchmieli/h2o-3,spennihana/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,spenn...
h2o-py/tests/testdir_munging/pyunit_length.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow compute driver to load correctly\n\nIn certain environments the load order can be confused between nova\nand zun. This can cause boot issues where 'No module named cmd.compute'\ncan be thrown because the python code is looking in zun/n...
python
new_file
1
0
apache-2.0
2909374a77ac3cd5e2247dda3433c520ad043c71
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
nova/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom allauth.account.forms import SignupForm\nfrom rest_framework.response import Response\n\nfrom keybar.api.base import Endpoint, ListEndpoint\nfrom keybar.models.user import User\nfrom keybar.serializers.user import UserSerializer\n\n\nc...
python
edit
1
2
bsd-3-clause
8cfdc9ddf14b44ee2deeef42dd990b5313caf2cf
keybar/keybar
src/keybar/api/endpoints/users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, jsonify, make_response, request, current_app\nfrom gevent import monkey\nfrom gevent import wsgi\nimport app\n\nmonkey.patch_all()\napp = Flask(__name__)\n\nserver = wsgi.WSGIServer(('203.29.62.211'...
python
edit
7
1
apache-2.0
4166bf21aa8ff9264724ef8101231557f40b80ef
ishgroup/lightbook,ishgroup/lightbook,ishgroup/lightbook
production.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\nfrom xml.dom import minidom\n\nclass XMLTranslator:\n\n # Parse any other node of the PML file\n def parse_nodes(self, nodes, depth, processes_sofar, process_current, resources_sofar):\n pass\n\n #...
python
edit
2
3
mit
f95754249f3ffa364def26741b7a875521d7dec1
CS4098/GroupProject,CS4098/GroupProject,CS4098/GroupProject
src/main/translator-xml/XMLTranslator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .query_tests import QueryTestCase\nfrom .sql_builder_tests import SqlBuilderTestCase\nfrom .transaction_tests import TransactionTestCase\n\nfrom rebel.database import Database\nfrom rebel.exceptions import NotInsideTransaction, MixedPo...
python
edit
1
1
mit
980b7f55968d76b6f9222b7c381e1c98e144ddeb
hugollm/rebel,hugollm/rebel
tests/database_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack Foundation\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance wit...
python
edit
1
0
apache-2.0
943856b68531b54e0ec4b34a74c2408311760d23
n0ano/ganttclient
nova/tests/scheduler/__init__.py
rejected_duplicate
Near-duplicate of sample 397
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport broadbean as bb\n\n\n@pytest.fixture\ndef virgin_blueprint():\n \"\"\"\n Return an empty instance of BluePrint\n \"\"\"\n return bb.BluePrint()\n\n##################################################\n# TEST ...
python
edit
1
1
mit
a08fff5946f5faa5d174cf7536bd4e71e6d299a0
WilliamHPNielsen/broadbean
tests/test_blueprint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rctkdemos.demos import serve_demo\nfrom rctk.widgets import StaticText\nfrom rctk.layouts import GridLayout\n\nclass Demo(object):\n title = \"Grid\"\n description = \"Demonstrates the Grid using padding and different col/rowspan...
python
edit
1
1
bsd-2-clause
0ba5b555c4ccb559b5f666e800cc7102b5d9729f
rctk/demos
rctkdemos/layouts_grid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom fluent_comments.moderation import moderate_model, comments_are_open, comments_are_moderated\nfrom fluent_comments.models import get_comments_for_model, Comment...
python
edit
1
1
apache-2.0
e1e430f74902d653e9c46878a8f254f8feb478ca
django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments,edoburu/django-fluent-comments,django-fluent/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments
example/article/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Authors: Yuancheng Peng\n# License: MIT\n\"\"\"Computes the arc distance between a collection of points\n\nThis code is challenging because it requires efficient vectorisation of\ntrigonometric functions that are note natively supported i...
python
edit
1
1
mit
523293a2785df1229159ad5d0d430195404b9334
numfocus/python-benchmarks,numfocus/python-benchmarks
arc_distance/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sevenbridges.models.file import File\n\n\ndef map_input_output(item, api):\n \"\"\"\n Maps item to appropriate sevebridges object.\n :param item: Input/Output value.\n :param api: Api instance.\n :return: Mapped object.\...
python
edit
1
10
apache-2.0
47540d79fbf3009f1dff27d45f935859460349f9
sbg/sevenbridges-python
sevenbridges/models/compound/tasks/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom pathlib import Path\n\nimport sys\nimport sqlalchemy as sa\nfrom invoke import task\n\nFANTASY_DB_SQL = Path.cwd() / 'fantasy-database' / 'schema.sql'\nFANTASY_DB_DATA = Path.cwd() / 'fantasy-database' / 'data.json'\n\n\n@...
python
edit
3
6
mit
69853e5ef1ef297c776fd23a48b0ac0b2356f06f
vovanbo/aiohttp_json_api
examples/fantasy/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A collection of classes for MusicBrainz.\n\nThis package contains the following modules:\n\n 1. L{model}: The MusicBrainz domain model, containing classes like\n L{Artist <model.Artist>}, L{Release <model.Release>}, or\n L{Track...
python
edit
1
0
bsd-3-clause
d7f744cfe542fffc398c3301699541190087ccbd
mineo/python-musicbrainz2
src/musicbrainz2/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import (assert_is_instance, assert_less_equal, assert_equal,\n assert_greater, assert_in)\n# from nose import with_setup\n\n# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi...
python
edit
9
1
mit
620bb416b0e44cc002679e001f1f0b8ab7792685
csdms/bmi-tester
bmi_tester/tests_pytest/test_grid.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThe fmcapi __init__.py file is called whenever someone imports the package into their program.\n\"\"\"\n\n# from .fmc import *\n# from .api_objects import *\n# from .helper_functions import *\nimport logging\n\n# logging.getLogger(_...
python
edit
1
1
bsd-3-clause
832f0887eb617691dc50688a35a0bef04e4e3346
daxm/fmcapi,daxm/fmcapi
fmcapi/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom seleniumbase import BaseCase\n\n\nclass MyTestClass(BaseCase):\n\n def test_basic(self):\n self.open('http://xkcd.com/353/')\n self.assert_element('img[alt=\"Python\"]')\n self.click('a[rel=\"license\"]')\n ...
python
edit
1
1
mit
85c7784982e70b2962af0ae82d65fb0a6c12fa78
seleniumbase/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
integrations/node_js/my_first_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .exceptions import MalformedRequestException\n\n\nclass Request(object):\n def __init__(self, version, metadata, **kwargs):\n self._version = version\n self._metadata = metadata\n self._arguments = kwargs\n\n ...
python
edit
1
3
mit
44c174807d7362b5d7959f122f2a74ae9ccb7b38
cbigler/jackrabbit
coney/request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.snippet.transfer.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom enum import Enum\nfrom typing import Ne...
python
edit
1
1
bsd-3-clause
b4399f3dfb8f15f1a811fbcc31453575ad83d277
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps
byceps/services/snippet/transfer/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /bin/env python\n\nfrom landlab.io.vtk.writer import VtkWriter\nfrom landlab.io.vtk.vtktypes import VtkUniformRectilinear\nfrom landlab.io.vtk.vtkxml import (\n VtkRootElement,\n VtkGridElement,\n VtkPieceElement,\n VtkPointD...
python
edit
1
1
mit
329fa135faca80bd9dee74989110aa6222e44e2b
landlab/landlab,landlab/landlab,cmshobe/landlab,cmshobe/landlab,amandersillinois/landlab,cmshobe/landlab,amandersillinois/landlab,landlab/landlab
landlab/io/vtk/vti.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numpy.testing import assert_almost_equal\n\nfrom statsmodels.datasets import statecrime\nfrom statsmodels.regression.linear_model import OLS\nfrom statsmodels.stats.outliers_influence import reset_ramsey\nfrom statsmodels.tools import ...
python
edit
3
1
bsd-3-clause
1716d38b995638c6060faa0925861bd8ab4c0e2b
josef-pkt/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,bashtage...
statsmodels/stats/tests/test_outliers_influence.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport subprocess\nimport pickle\nimport base64\n\ntry:\n from shlex import quote\nexcept ImportError:\n from pipes import qu...
python
edit
4
3
apache-2.0
c7e4fc5038cb2069193aa888c4978e9aeff995f7
4degrees/segue
source/segue/backend/processor/background.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nKnowledge provider that will respond to requests made by the rdf publisher or another bot.\n\"\"\"\nfrom sleekxmpp.plugins.base import base_plugin\nfrom rhobot.components.storage.client import StoragePayload\nfrom rdflib.namespace i...
python
edit
1
3
bsd-3-clause
033773dce75dc2c352d657443cf415775e3b30cc
rerobins/rho_erudite
erudite/components/knowledge_provider.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom .base import Base\n\n\nclass SGD(Base):\n def __init__(self, cost, params, lr=0.1, momentum=0.9):\n super().__init__(cost, params, lr)\n self.momentum = momentum\n self.velocity = self._init_...
python
edit
1
2
apache-2.0
15a792e38152e9c7aa6a10bbc251e9b5f0df1341
upul/Aurora,upul/Aurora,upul/Aurora
aurora/optim/sgd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport gettext\n\nimport eventlet\nimport os\nfrom stand.socketio_events import StandSocketIO\n\nlocales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locale...
python
edit
1
0
apache-2.0
9a221d5b0ca59a3384b3580c996aa518aaa90b0c
eubr-bigsea/stand,eubr-bigsea/stand
stand/runner/stand_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim\nfrom numba import cuda\nfrom numba.core import config\n\n\nclass MyError(Exception):\n pass\n\n\nregex_pattern = (\n r'In function [\\'\"]test_exc[\\'\"], file [\\...
python
edit
3
3
bsd-2-clause
4490e59bfe54874e17d3afd00ede0ad410dc7957
gmarkall/numba,stuartarchibald/numba,stuartarchibald/numba,stonebig/numba,sklam/numba,seibert/numba,numba/numba,stonebig/numba,stuartarchibald/numba,sklam/numba,stuartarchibald/numba,cpcloud/numba,IntelLabs/numba,numba/numba,sklam/numba,cpcloud/numba,stonebig/numba,stonebig/numba,seibert/numba,gmarkall/numba,seibert/nu...
numba/cuda/tests/cudapy/test_userexc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module tests the small scripts - admin, model, and wsgi.\"\"\"\n\nimport unittest\n\n\nclass SmallScriptsTest(unittest.TestCase):\n def test_admin(self):\n import api.admin\n\n def test_models(self):\n import ...
python
edit
5
1
apache-2.0
d0fe2fd4bc619a45d18c3e5ba911b15045366849
apel/rest,apel/rest
api/tests/test_small_scripts.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\n\nfrom flaskext.debugtoolbar.panels import DebugPanel\n\n_ = lambda x: x\n\nflask_version = pkg_resources.working_set.require('flask')[0].version\n\nclass VersionDebugPanel(DebugPanel):\n \"\"\"\n Panel that disp...
python
edit
1
1
bsd-3-clause
79dc15a4db8f74bed5e06d19c5c4f8d895c04189
dianchang/flask-debugtoolbar,lepture/flask-debugtoolbar,lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar
flaskext/debugtoolbar/panels/versions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"OFX downloader.\"\"\"\n\nfrom ofxtools.Client import OFXClient, BankAcct\nfrom ofxtools.Types import DateTime\nfrom yapsy.IPlugin import IPlugin\n\n\ndef make_date_kwargs(config):\n return {k:DateTime().convert(v) for k,v in config...
python
edit
1
3
unlicense
ba6b70be6bd329e952491eae387281c613794718
cgiacofei/pyledgertools,cgiacofei/pyledgertools
pyledgertools/plugins/download/ofx.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os, requests, getSchedule\nfrom flask import Flask, request, jsonify, render_template, abort\n\napp = Flask(__name__)\n\n@app.route('/')\ndef root():\n\treturn render_template('index.html')\n\n@app.route('/m'...
python
edit
1
2
mit
5351ad8324fa8388ea3b82425d03f43ac16d7313
alykhank/NextRide,alykhank/NextRide
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.template import RequestContext\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.template import Template\nfrom cancer_browser.core.http import HttpResponseSendFile\nfrom ...
python
edit
1
2
apache-2.0
01b17ee30889afe1eadf8ec98c187ca9b856d0f7
ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,acthp/ucsc-xena-client
connector/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport re\nimport subprocess\n\ndef main():\n source = open(\".gitmodules\").read()\n paths = re.findall(r\"path = (.*)\", source)\n\n for path in paths:\n print \"{repo} {sha}\".format(\n rep...
python
edit
3
2
mit
5bb4a72f9541fa59fa3770a52da6edb619f5a897
localhots/satan,localhots/satan,localhots/satan,localhots/satan
submodules-to-glockfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tangled.web import Resource, config\n\nfrom tangled.site.resources.entry import Entry\n\n\nclass Docs(Entry):\n\n @config('text/html', template='tangled.website:templates/docs.mako')\n def GET(self):\n static_dirs = self.a...
python
edit
3
3
mit
0bf7bf5ee30ddfd1510d50f189d3bb581ec5048d
TangledWeb/tangled.website
tangled/website/resources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import encoding\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.views import exception_handler as drf_exc...
python
edit
1
7
bsd-2-clause
e72b6272469c382f14a6732514777aacbd457322
django-json-api/rest_framework_ember,Instawork/django-rest-framework-json-api,leifurhauks/django-rest-framework-json-api,hnakamur/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,lukaslundgren/django-rest-framework-json-api,leo-naeka/rest_framework_...
rest_framework_json_api/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom unittest import TestCase\n\nfrom pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix\n\nclass PipetteOpTests(TestCase):\n def setUp(self):\n self.mix = PrePostMix(\n volume=\"5:microliter\",\n ...
python
edit
1
1
bsd-2-clause
392f58abf7b163bb34e395f5818daa0a13d05342
naderm/pytranscriptic,naderm/pytranscriptic
pyscriptic/tests/instructions_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport sys\nsys.path.append('.')\n\nfrom vacker.importer import Importer\n\nimporter = Importer()\n# Need to obtain from arguments\nimporter.import_directory('../sample_photos')\n\n```\n\nApply this change: Update impor...
python
edit
1
0
apache-2.0
b665da9bdebb6736eef08f782d7361a34dcd30c5
MatthewJohn/vacker,MatthewJohn/vacker,MatthewJohn/vacker
bin/import_media.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nimport argparse\nimport unittest\n\nfrom nose.tools import ok_\ntry:\n from unittest.mock import patch\nexcept ImportError:\n from mock import patch\n\nfrom streamparse.cli.r...
python
edit
1
1
apache-2.0
0a60495fc2baef1c5115cd34e2c062c363dfedc8
Parsely/streamparse,Parsely/streamparse
test/streamparse/cli/test_run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA geometry module for the SymPy library. This module contains all of the\nentities and functions needed to construct basic geometrical data and to\nperform simple informational queries.\n\nUsage:\n======\n\n\nNotes:\n======\n Cur...
python
edit
20
0
bsd-3-clause
385e9c0b8af79de58efd3cf43b1981b7981d0a53
postvakje/sympy,Mitchkoens/sympy,farhaanbukhsh/sympy,sampadsaha5/sympy,kumarkrishna/sympy,MechCoder/sympy,lindsayad/sympy,maniteja123/sympy,yashsharan/sympy,sahilshekhawat/sympy,MechCoder/sympy,rahuldan/sympy,yashsharan/sympy,kevalds51/sympy,Designist/sympy,jaimahajan1997/sympy,emon10005/sympy,skidzo/sympy,mcdaniel67/s...
sympy/geometry/__init__.py
rejected_lint
Too many lint violations: 20
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\n\nfrom django.views.generic import TemplateView\n\nfrom votes.views import VoteView\n\nurlpatterns = [\n url(r'^(?P<vote_name>[\\w-]+)$', VoteView.as_view()),\n]\n\n```\n\nApply this change: Add...
python
edit
4
0
mit
683765c26e0c852d06fd06a491e3906369ae14cd
kuboschek/jay,kuboschek/jay,OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay
votes/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add version to module init" }, { "role": "assistant", "content": "# allow high-level functions to be accessed directly from the mappyfile module\nfrom mappyfile.utils import load, loads, find, findall, dumps, write\n\n__version__...
python
new_file
8
0
mit
697fcbd5135c9c3610c4131fe36b9a2723be1eeb
geographika/mappyfile,geographika/mappyfile
mappyfile/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nfrom . import export\n\n@export\ndef fuzzyfinder(input, collection, accessor=lambda x: x):\n \"\"\"\n Args:\n input (str): A partial string which is typically entered by a user.\n coll...
python
edit
1
5
bsd-3-clause
4180680c9964661d3edd9eafad23b8d90699170d
amjith/fuzzyfinder
fuzzyfinder/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.util.instances\n~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\n\nclass ReprBuilder(object):\n \"\"\"An instance r...
python
edit
1
1
bsd-3-clause
f5aa886ed3a38971fe49c115221c849eae1a8e10
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
byceps/util/instances.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as stream:\n long_desc = stream.read()\n\nrequires = ['Sphinx>=0.6']\n\nsetup(\n name='sphinxcontrib-doxylink',\n version='0.3',\n\tu...
python
edit
1
0
bsd-2-clause
07f81307d10062cc15704a09015e542197edcafa
sphinx-contrib/spelling,sphinx-contrib/spelling
doxylink/setup.py
accepted
null
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\n\"\"\"Configuration file for android gtest suites.\"\"\"\n\n# Add new...
python
edit
1
0
bsd-3-clause
e80d4b35472e692f05e986116a5910e1a9612f74
markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,dednal/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster...
build/android/pylib/gtest/gtest_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, boto, os\nfrom bucketeer import commit\n\nclass BuckeeterTest(unittest.TestCase):\n\n # Constants - TODO move to config file\n global existing_bucket, test_dir, test_file\n existing_bucket = 'bucket.exists'\n test_dir =...
python
edit
3
2
mit
17ef821757df8eadfe8bf4769e57503625464f7b
mgarbacz/bucketeer
bucketeer/test/test_commit.py
rejected_duplicate
Near-duplicate of sample 11705
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nfrom .tokenizer_exceptions import TOKENIZER_EXCEPTIONS\nfrom .stop_words import STOP_WORDS\n\nfrom ..tokenizer_exceptions import BASE_EXCEPTIONS\nfrom ...language import Language\nf...
python
edit
1
0
mit
a4a37a783efcfd1cbb21acc29077c8096a0a0198
honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/s...
spacy/lang/pl/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport ceph_medic.main\n\n\nclass TestMain(object):\n def test_main(self):\n assert ceph_medic.main\n\n def test_invalid_ssh_config(self, capsys):\n argv = [\"ceph-medic\", \"--ssh-config\", \"/does/not/ex...
python
edit
1
1
mit
b39ea7848141037c7829a01d789591d91a81398e
alfredodeza/ceph-doctor
ceph_medic/tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom s3backup.clients import compare, LocalSyncClient\n\n\ndef sync():\n local_client = LocalSyncClient('/home/michael/Notebooks')\n current = local_client.get_current_state()\n index = local_client.get_i...
python
edit
1
1
mit
194557f236016ec0978e5cc465ba40e7b8dff714
MichaelAquilina/s3backup,MichaelAquilina/s3backup
s3backup/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom functools import partial\n\nfrom . import handlers # noqa\nfrom .message import send_error\nfrom .registry import HANDLERS\n\nREQUIRED_FIELDS = ['type', 'id']\n\n\ntry:\n DECODE_ERRORS = (json.JSONDecodeError, TypeErro...
python
edit
1
7
mit
36998345ef900286527a3896f70cf4a85414ccf8
axsemantics/rohrpost,axsemantics/rohrpost
rohrpost/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom werkzeug.urls import url_decode\nfrom oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY\n\nimport foauth.providers\n\n\nclass Rdio(foauth.providers.OAuth1):\n # General info about the provider\n provider_url = 'http://www.rdio.c...
python
edit
2
2
bsd-3-clause
530b1b09b7fd6215822283c22c126ce7c18ac9a9
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
services/rdio.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom getpass import getpass\nfrom netmiko import ConnectHandler\n\ndef main():\n\n password = getpass()\n\n pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}\n p...
python
edit
2
2
apache-2.0
7486f423d018aaf53af94bc8af8bde6d46e73e71
linkdebian/pynet_course
class4/exercise6.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The client of DDuplicated tool.\nfrom os import path as opath, getcwd\nfrom pprint import pprint\nfrom sys import argv\n\nfrom dduplicated import commands\n\ndef get_paths(params):\n\tpaths = []\n\tfor param in params:\n\t\tpath = opath.j...
python
edit
1
7
mit
d9a205dce1f67151ff896909413bb7128e54a4ec
messiasthi/dduplicated-cli
dduplicated/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\n\nfrom typing import List\n\nfrom zulint.linters import run_pyflakes\n\n\ndef check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:\n suppress_patterns = [\n (\"scripts/lib/pythonrc.py\", \"import...
python
edit
1
2
apache-2.0
3decbd1e235a6a43541bb8e9846ea1d08bec1ef8
timabbott/zulip,eeshangarg/zulip,synicalsyntax/zulip,eeshangarg/zulip,showell/zulip,timabbott/zulip,synicalsyntax/zulip,kou/zulip,zulip/zulip,hackerkid/zulip,brainwane/zulip,punchagan/zulip,timabbott/zulip,showell/zulip,brainwane/zulip,brainwane/zulip,eeshangarg/zulip,kou/zulip,timabbott/zulip,hackerkid/zulip,zulip/zul...
tools/linter_lib/pyflakes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport json\nimport requests\n\nES_HOST = 'localhost'\nES_PORT = '9200'\nELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)\n\n\ndef find_indices():\n \"\"\"Find indices created by logstash.\"\"\"\n url =...
python
edit
3
2
apache-2.0
ab0fd99e1c2c336cd5ce68e5fdb8a58384bfa794
mancdaz/rpc-openstack,busterswt/rpc-openstack,npawelek/rpc-maas,git-harry/rpc-openstack,sigmavirus24/rpc-openstack,jpmontez/rpc-openstack,mattt416/rpc-openstack,xeregin/rpc-openstack,busterswt/rpc-openstack,stevelle/rpc-openstack,xeregin/rpc-openstack,miguelgrinberg/rpc-openstack,cfarquhar/rpc-openstack,xeregin/rpc-ope...
elasticsearch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom indra.sources import eidos\nfrom indra.sources.hume.make_hume_tsv import make_file\nfrom indra.java_vm import autoclass\n\neidos_package = 'org.clulab.wm.eidos'\n\nif __name__ == '__main__':\n bbn_path = 'hume_examaples.tsv'\n ma...
python
edit
1
0
bsd-2-clause
cb2746f60cd63019b41eebedb148bfc5a25c1ba0
pvtodorov/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,johnbachman/belpy
indra/preassembler/make_wm_ontmap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.core.exceptions import ValidationError\n\nfrom wye.profiles.models import UserType\n\nfrom . import models\n\n\nclass RegionalLeadForm(forms.ModelForm):\n\n class Meta:\n model = models.Region...
python
edit
1
7
mit
5231efb00409ffd0b1b0e1cf111d81782468cdd3
shankig/wye,harisibrahimkv/wye,shankisg/wye,shankisg/wye,shankisg/wye,harisibrahimkv/wye,pythonindia/wye,pythonindia/wye,shankig/wye,DESHRAJ/wye,harisibrahimkv/wye,pythonindia/wye,shankig/wye,shankig/wye,shankisg/wye,DESHRAJ/wye,harisibrahimkv/wye,DESHRAJ/wye,DESHRAJ/wye,pythonindia/wye
wye/regions/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import partial\nfrom itertools import imap\nfrom itertools import islice\nfrom operator import itemgetter\n\n\ndef yield_getter_of(getter_maker, iterator):\n \"\"\"\n Iteratively map iterator over the result of getter_m...
python
edit
1
2
apache-2.0
a3ec10088f379c25e0ab9c7b7e29abd2bf952806
johnwlockwood/karl_data,johnwlockwood/stream_tap,johnwlockwood/stream_tap,johnwlockwood/iter_karld_tools
karld/iter_utils.py
accepted
null
true