messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n\nclass Graph(object):\n ''' Create an empty graph. '''\n def __init__(self):\n self.graph = {}\n return\n\n def...
python
edit
1
3
mit
ea1389d6dfb0060cda8d194079aacc900bbf56ae
constanthatz/data-structures
simple_graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFunctions that return external URLs, for example for the Vesper documentation.\n\"\"\"\n\n\nimport vesper.version as vesper_version\n\n\n_USE_LATEST_DOCUMENTATION_VERSION = False\n\"\"\"Set this `True` during development, `False` fo...
python
edit
1
2
mit
fc3e5201935653228a71d4a52eeffb94de284141
HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper
vesper/external_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport signal\n\nimport diesel\n\nstate = {'triggered':False}\n\ndef waiter():\n diesel.signal(signal.SIGUSR1)\n state['triggered'] = True\n\ndef test_can_wait_on_os_signals():\n # Start our Loop that will wait on USR1\n...
python
edit
2
2
bsd-3-clause
2d50e06c7e55c19e3055d555d78fac699c61104d
dieseldev/diesel
tests/integration/test_os_signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_auth_ldap.backend import LDAPBackend\n\nclass NumbasAuthBackend(LDAPBackend):\n \n \"\"\"Authentication backend overriding LDAPBackend.\n \n This could be used to override certain functionality within the LDAP authen...
python
edit
1
1
apache-2.0
caa3b8a7c06f3e1fffb7ec6b957216bd6d147f23
numbas/editor,numbas/editor,numbas/editor
numbas_auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom rmc.config.flask_base import *\nimport rmc.shared.secrets as s\n\nJS_DIR = 'js_prod'\nDEBUG = False\nENV = 'prod'\nGA_PROPERTY_ID = 'UA-35073503-1'\nLOG_DIR = '/home/rmc/logs'\nLOG_PATH = os.path.join(LOG_DIR, 'server/serv...
python
edit
2
0
mit
c7d03f4f8d4d50ce837cf0df446a52b24e891cee
sachdevs/rmc,MichalKononenko/rmc,sachdevs/rmc,ccqi/rmc,JGulbronson/rmc,MichalKononenko/rmc,JGulbronson/rmc,JGulbronson/rmc,sachdevs/rmc,rageandqq/rmc,MichalKononenko/rmc,JGulbronson/rmc,ccqi/rmc,shakilkanji/rmc,MichalKononenko/rmc,rageandqq/rmc,UWFlow/rmc,UWFlow/rmc,UWFlow/rmc,ccqi/rmc,rageandqq/rmc,UWFlow/rmc,duaayous...
config/flask_prod.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom markdown2 import markdown, markdown_path\nfrom weasyprint import HTML, CSS\n\nfrom .exceptions import ValidationError\n\n\n__title__ = 'md2pdf'\n__version__ = '0.2.1'\n__author__ = 'Julien Maupetit'\n__license_...
python
edit
1
5
mit
bb6b6b46860f6e03abc4ac9c47751fe4309f0e17
jmaupetit/md2pdf
md2pdf/core.py
rejected_duplicate
Near-duplicate of sample 2301
true
[ { "role": "user", "content": "Write python code for the following: Add arg normalizing function for labels and index\n\nRefactored from code in `center_of_mass`, the `_norm_input_labels_index`\nfunction handles the normalization of `input`, `labels`, and `index`\narguments. As these particular arguments wil...
python
new_file
1
4
bsd-3-clause
8a0ce66150bb4e1147f5fb88fdd8fd0d391c7daa
dask-image/dask-ndmeasure
dask_ndmeasure/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Load the trained q table and make actions based on that.\n\"\"\"\n\nimport time\nimport env\nimport rl\n\nrl.load_q()\nenv.make(\"pygame\")\n\nwhile True:\n env.reset()\n for _ in range(15):\n if env.done:\n br...
python
edit
1
0
mit
931ae68671abef1fedde46d585a4057b24ecbb04
danieloconell/Louis
reinforcement-learning/play.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cmdtree import group, argument, entry\n\n\n@group(\"docker\")\n@argument(\"ip\")\ndef docker():\n pass\n\n\n# nested command\n@docker.command(\"run\")\n@argument(\"container-name\")\ndef run(ip, container_name):\n print(\n ...
python
edit
1
1
mit
22cb22dfdb5ec4c19e8a90f65483cf372c5731a0
winkidney/cmdtree,winkidney/cmdtree
src/examples/command_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.command.bdist import bdist\nimport sys\n\nif 'egg' not in bdist.format_commands:\n bdist.format_command['egg'] = ('bdist_egg', \"Python .egg file\")\n bdist.format_commands.append('egg')\n\ndel bdist, sys\n\n```\n\nAppl...
python
edit
1
0
mit
b8d50cf4f7431ed617957e7d6e432a1729656524
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/command/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .formatter import *\n\n\nclass FormatterRegistry():\n def __init__(self):\n self.__formatters = []\n\n def populate(self):\n self.__formatters = [\n ClangFormat(), ElmFormat(), GoFormat(), JavaScriptForma...
python
edit
10
3
mit
0e19f960b2234fcd9711f123526f8de507ed2d99
Rypac/sublime-format
src/registry.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nclass facility(object):\n \"\"\" A Facility currently under monitoring\n\n \"\"\"\n\n def __init__(self , data) :\n self.validated_data = data\n\n...
python
edit
8
2
mit
e392998022ec41b82276464ffecbd859d5e13c63
grlurton/orbf_data_validation,grlurton/orbf_data_validation
src/models/facility_monitoring.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .config import PartitionConfig\n\nPROXY_APP = 'sql_proxy_accessors'\nSQL_ACCESSORS_APP = 'sql_accessors'\n\nFORM_PROCESSING_GROUP = 'form_processing'\nPROXY_GROUP = 'proxy'\nMAIN_GROUP = 'main'\n\n\nclass PartitionRouter(object):\n\n ...
python
edit
1
4
bsd-3-clause
6b1ad76140741fd29d8a0d0a0e057b59cd312587
dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/sql_db/routers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom google.appengine.api import users\n\nimport webapp2\n\n\nclass MainPage(webapp2.RequestHandler):\n\n def get(self):\n\n self.response.set_status(200)\n self.response.headers['Content-Type'] = 'text/html; charset=utf-8'\n\n...
python
edit
1
1
apache-2.0
d82588adaded8943543b9f0300e0d683925496ce
luisibanez/appengine-python-101
01/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data import anagram_index, crossword, warehouse\nfrom spec.data.fixtures import tries\n\n\ndef _get_unigram_anagram_index():\n return anagram_index.AnagramIndex(warehouse.get('/words/unigram/trie'))\n\ndef _get_unigram_trie():\n retu...
python
edit
1
1
mit
fac2335ddbd0b3924ab5fe899ce547734b286471
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
spec/data/fixtures/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n\nclass Task(object):\n\n def __init__(self, taskID, sheetID, name, description, maxPoints, reachedPoints=0):\n self.id = taskID\n self.sheetID = sheetID\n self.name = name\...
python
edit
1
1
mit
7c47a2960d644b34ce3ff569042fb5e965270e8c
hhucn/netsec-uebungssystem,hhucn/netsec-uebungssystem,hhucn/netsec-uebungssystem
netsecus/task.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Email\n\n\nclass EmailAdmin(admin.ModelAdmin):\n exclude = ('targetted_users', 'is_sent')\n\nadmin.site.register(Email, EmailAdmin)\n\n```\n\nApply this change: Customize how fields...
python
edit
1
2
mit
4283aa4bc2c831dc99968929c24b11496078fd26
avinassh/nightreads,avinassh/nightreads
nightreads/emails/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#init for reconst aka the reconstruction module\n\n# Test callable\nfrom numpy.testing import Tester\ntest = Tester().test\nbench = Tester().bench\n\ndel Tester\n\n\n\n\n\n```\n\nApply this change: Update code in dipy/reconst (PEP8)\n\nUsin...
python
edit
1
0
bsd-3-clause
d1f1664f7c15a156270dc7e506bb3edb37dc517d
FrancoisRheaultUS/dipy,FrancoisRheaultUS/dipy,nilgoyyou/dipy,nilgoyyou/dipy
dipy/reconst/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom django import get_version\n\nmyPath = os.path.dirname(os.path.abspath(__file__))\nsys.path.insert(0, myPath)\n\nVERSION = (0, 7, 18)\n\ndefault_app_config = 'django_q.apps.DjangoQConfig'\n\n# root imports will sl...
python
edit
null
null
mit
81b3e9c6ec89123eedaf53931cfa9c9bc6817d3c
Koed00/django-q
django_q/__init__.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom django.db import models\ntry:\n import json\nexcept ImportError:\n from django.utils import simplejson as json\nfrom django.utils.timezone import now\nfrom django.utils.translation import ugettext_lazy as _\n\nJS...
python
edit
1
2
bsd-3-clause
c20a0eb932f99ee4d1336560f25e3e46f86d9d17
JordanReiter/django-oembed,JordanReiter/django-oembed
oembed/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n MAC Types\n\n\"\"\"\n\nfrom util import mactobinary\n\n\nclass VppMacAddress():\n def __init__(self, addr):\n self.address = addr\n\n def encode(self):\n return {\n 'bytes': self.bytes\n }\n\n...
python
edit
1
3
apache-2.0
dd89173cc177f7130eca426eb4fa5737ec59c91d
chrisy/vpp,vpp-dev/vpp,FDio/vpp,FDio/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,vpp-dev/vpp,chrisy/vpp,vpp-dev/vpp,vpp-dev/vpp,vpp-dev/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,chrisy/vpp,vpp-dev/vpp,vpp-dev/vpp,FDio/vpp,chrisy/vpp,FDio/vpp
test/vpp_mac.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Asset:\n \"\"\"\n This is an ooni-probe asset. It is a python\n iterator object, allowing it to be efficiently looped.\n To create your own custom asset your should subclass this\n and override the next_asset method and...
python
edit
1
2
bsd-2-clause
74f25eccd2153bd63eff338fff19721dc1488b5c
kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,hackerberry/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,lordappsec/oon...
plugoo/assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport os\nfrom SCNIC.general import simulate_correls\nfrom SCNIC.between_correls import between_correls\n\n\n@pytest.fixture()\ndef args():\n class Arguments(object):\n def __init__(self):\n self.table1 ...
python
edit
1
1
bsd-3-clause
f6cfe079cadd545a27ad62ec416115d3bbcf357f
shafferm/SCNIC
tests/test_between_correls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import request\nfrom flask.views import MethodView\nfrom flask_helpers.build_response import build_response\n\n# Import the Game Controller\nfrom Game.GameController import GameController\n\n\nclass GameModes(Me...
python
edit
1
3
apache-2.0
d5597911837967c1f34d1c904282f9464e38e767
dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server
flask_controllers/GameModes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2009 Testrepository Contributors\n# \n# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause\n# license at the users choice. A copy of both licenses are available in the\n# project source as Apache-2....
python
edit
1
1
apache-2.0
2c02816c05f3863ef76b3a412ac5bad9eecfafdd
masayukig/stestr,masayukig/stestr,mtreinish/stestr,mtreinish/stestr
testrepository/tests/test_setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Kay Hayen, mailto:<EMAIL>\n#\n# Python test originally created or extracted from other peoples work. The\n# parts from me are in the public domain. It is at least Free Software\n# where it's copied from other people. In...
python
edit
6
1
apache-2.0
519ab89b892a3caead4d1d56a2bf017ef97c135d
wfxiang08/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,kayhayen/Nuitka,wfxiang08/Nuitka
tests/basics/OverflowFunctions.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport inspect\n\n\nclass PreconditionError (TypeError):\n pass\n\n\ndef preconditions(*precs):\n\n precinfo = []\n for p in precs:\n spec = inspect.getargspec(p)\n if spec.varargs or spec.keywords:\n raise...
python
edit
1
6
mit
1455b0a77d323812417e561e50dbd69a219cc9e6
nejucomo/preconditions
preconditions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sparkperf.cluster import Cluster\nimport json\nimport re\nimport os\nimport sys\nimport time\nimport urllib2\n\n\nclass MesosCluster(Cluster):\n \"\"\"\n Functionality for interacting with a already running Mesos Spark cluster.\n...
python
edit
1
2
apache-2.0
792a4c92c9718e202fb8b180f76c8a08b374e223
arijitt/spark-perf,jkbradley/spark-perf,feynmanliang/spark-perf,mengxr/spark-perf,XiaoqingWang/spark-perf,databricks/spark-perf,mengxr/spark-perf,nchammas/spark-perf,zsxwing/spark-perf,XiaoqingWang/spark-perf,zsxwing/spark-perf,arijitt/spark-perf,Altiscale/spark-perf,Altiscale/spark-perf,nchammas/spark-perf,jkbradley/s...
lib/sparkperf/mesos_cluster.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['CloneableMeta']\n\n\nclass CloneableMeta(type):\n\n def __new__(metacls, cg_name, bases, clsdict):\n new_cls = super(CloneableMeta, metacls).__new__(metacls, cg_name, bases, clsdict)\n return new_cls\n```\n\nApp...
python
edit
1
1
mit
b2cbc41f0ba422bfa666022e93be135899441430
maxalbert/tohu
tohu/cloning.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os # require by lmod output evaluated by exec()\n\nfrom functools import partial\nfrom os import environ\nfrom subprocess import Popen, PIPE\n\nLMOD_SYSTEM_NAME = environ.get('LMOD_SYSTEM_NAME', '')\n\ndef module(command, *args):\n ...
python
edit
3
5
mit
ed658354ebfa068441b974fe61056ed74aa4254d
cmd-ntrf/jupyter-lmod,cmd-ntrf/jupyter-lmod,cmd-ntrf/jupyter-lmod
lmod/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport os\n\nfrom twisted.web import server, guard, resource\nfrom twisted.cred import portal\n\nfrom lbrynet import conf\nfrom .auth import PasswordChecker, HttpPasswordRealm\nfrom .util import initialize_api_key_file\n\nlo...
python
edit
1
2
mit
3f7091cbf22c483672aa6c07ad640ee2c3d18e5b
lbryio/lbry,lbryio/lbry,lbryio/lbry
lbrynet/daemon/auth/factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.4 on 2017-04-25 09:25\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\nimport wooey.models.mixins\n\n\nclass Migration...
python
edit
1
0
bsd-3-clause
9e706341fafc8a931a662ea497df39fff6f9408b
wooey/Wooey,wooey/Wooey,wooey/Wooey,wooey/Wooey
wooey/migrations/0028_add_script_subparser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from PIL import Image\nexcept ImportError:\n import Image\n\n\ndef crop_ci_box(im, size, ci_box=False, **kwargs):\n \"\"\"\n Crop image based on very specific pixel values (x,y,width,height)\n\n ci_box\n Crop th...
python
edit
4
4
mit
255d4d551b9eb576c787396f67ca165addf99dbe
rewardz/cropimg-django,rewardz/cropimg-django,rewardz/cropimg-django
cropimg/thumbnail_processors.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport aiohttp\n\n\nasync def aiohttp_request(loop, method, url, output='text', **kwargs): # NOQA: E999\n async with aiohttp.ClientSession(loop=loop) as session: # NOQA: E999\n response = await session.request(method, url, **kwa...
python
edit
1
4
mit
6ab508d67d5e178abbf961479cab25beb0b6dc32
kevin1024/vcrpy,kevin1024/vcrpy,graingert/vcrpy,graingert/vcrpy
tests/integration/aiohttp_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom terrabot.util.streamer import Streamer\n\nfrom terrabot.events.events import Events\n\n\nclass PacketEParser(object):\n def parse(self, world, player, data, ev_man):\n\n #If player is active\n if data[2] == 1:\n ...
python
edit
3
3
mit
fbdf73e3e9fb5f2801ec11637caa6020095acfdf
flammified/terrabot
terrabot/packets/packetE.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright (c) 2012-2013 SEOmoz, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the...
python
edit
3
1
mit
2033c71a84f03e7e8d40c567e632afd2e013aad3
seomoz/url-py,seomoz/url-py
url/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\n\n\nclass DBControl:\n def __init__(self, db_name : str=\":memory:\"):\n self.db_conn = sqlite3.connect(db_name)\n\n def create_tables(self):\n c = self.db_conn.cursor()\n c.execute(\"\"\"CREATE TA...
python
edit
1
2
mit
39ec7961bb3c4431bda67956f0208ab524a80213
10nin/blo,10nin/blo
blo/DBControl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.admin import register\nfrom . import models\n\n@register(models.FalmerUser)\nclass FalmerUserModelAdmin(admin.ModelAdmin):\n list_display = ('name_or_email', 'identifier', 'authority'...
python
edit
1
0
mit
0edc91468c5f424a57be80675422723f9bac4a89
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/auth/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 The ChromiumOS Authors\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom recipe_engine.post_process import Filter\n\nPYTHON_VERSION_COMPATIBILITY = \"PY3\"\n\nDE...
python
edit
1
1
bsd-3-clause
a10e21a8fe811e896998ba510255592a966f0782
google/crosvm,google/crosvm,google/crosvm,google/crosvm
infra/recipes/build_windows.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nChatterBot is a machine learning, conversational dialog engine.\n\"\"\"\nfrom .chatterbot import ChatBot\n\n__version__ = '0.5.4'\n__author__ = 'Gunther Cox'\n__email__ = '<EMAIL>'\n__url__ = 'https://github.com/gunthercox/ChatterBo...
python
edit
3
0
bsd-3-clause
088295e7d4d81b5e2fb23564b49ddd08beb3f720
Reinaesaya/OUIRL-ChatBot,Gustavo6046/ChatterBot,gunthercox/ChatterBot,davizucon/ChatterBot,Reinaesaya/OUIRL-ChatBot,maclogan/VirtualPenPal,vkosuri/ChatterBot
chatterbot/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nfrom flask_app.database import init_db\n\n# Generate new secret key\nsecret_key = os.urandom(24).encode('hex').strip()\nwith open('flask_app/secret_key.py', 'w') as key_file:\n key_file.write('secret_key = \"\"\"' + secret_k...
python
edit
1
0
mit
ea54f0a306c6defa4edc58c50794da0083ed345d
szeestraten/kidsakoder-minecraft,szeestraten/kidsakoder-minecraft,szeestraten/kidsakoder-minecraft,szeestraten/kidsakoder-minecraft
setup_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport logging\nimport time\n\nlog = logging.getLogger(__name__)\n\n__all__ = ['BaseParser']\n\n\nclass BaseParser:\n \"\"\"This abstract class represents a language backed by a PyParsing statement\n\n Multi...
python
edit
1
2
mit
aa008a13d9d10107f440dca71085f21d9622cd95
pybel/pybel,pybel/pybel,pybel/pybel
src/pybel/parser/baseparser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask import url_for\n\n\ndef test_view_build_log(test_client):\n test_client.get(url_for('log.build_log', sha='123456'))\n\n\ndef test_view_lint_log(test_client):\n test_client.get(url_for('log.lint_log'...
python
edit
1
1
mit
0ccb85a45e56438a5e4b7c0566634587624f0ce4
bosondata/badwolf,bosondata/badwolf,bosondata/badwolf
tests/test_log.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"first_django URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_ap...
python
edit
1
0
apache-2.0
1a77599911f26cf660e9d11693ab95aef38d44b7
wmh-demos/django-first-demo,wmh-demos/django-first-demo
first_django/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nINDENT = r\"(?P<indent>^ *)\"\nVARIABLE = r\"(?P<variable>.+):\"\nVALUE = r\"(?P<value>((?P<q2>['\\\"]).*?(?P=q2))|[^#]+?)\"\nNEWLINE = r\"$\\n\"\nBLANK = r\" +\"\nINLINE_COMMENT = r\"( +#.*)?\"\n\nCOMMENT = r\"^ ...
python
edit
1
0
mit
ef497d6bac0f60dee04e47a8ec742744c1ab9427
hackebrot/poyo
poyo/patterns.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2006-2007 Open Source Applications Foundation\n# Copyright (c) 2008-2009 Mikeal Rogers <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complian...
python
edit
4
2
apache-2.0
e4b516f612d60eac8cb278d1c8675b3fdbad8652
ept/windmill,ept/windmill,ept/windmill
windmill/server/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Line SPW setup for 16B projects\nlinespw_dict = {0: [\"HI\", \"1.420405752GHz\"],\n 3: [\"OH1612\", \"1.612231GHz\"],\n 5: [\"OH1665\", \"1.6654018GHz\"],\n 6: [\"OH1667\", \"1.667359GHz\"],...
python
edit
1
0
mit
0451d8e1ee2ad136e3b0f69c43dca9658fdbb85c
e-koch/VLA_Lband,e-koch/VLA_Lband
16B/spw_setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport os\nfrom flask import Flask, jsonify, send_from_directory, abort, Response, request\nimport psycopg2\n\napp = Flask(__name__)\n\nconn = psycopg2.connect(\"dbname='rivers' user='nelson' host='localhost' passwor...
python
edit
7
1
bsd-3-clause
f1941a96a08545ac83ff15675331939bc2beddcb
r-barnes/waterviz,HydroLogic/waterviz,r-barnes/waterviz,HydroLogic/waterviz,r-barnes/waterviz,HydroLogic/waterviz,r-barnes/waterviz,HydroLogic/waterviz
server/gauges.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.command.install import install\nimport os\nimport shutil\n\nclass issue(Exception):\n def __init__(self, errorStr):\n self.errorStr = errorStr\n def __str__(self):\n retur...
python
edit
2
5
apache-2.0
349b0ca88a85a8e9f234debe35807d2c9bc93544
deepgrant/deep-tools
src/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nDeploy builds to a Rancher orchestrated stack using rancher-compose\n\"\"\"\nimport os\n\nimport drone\nimport subprocess\n\n\ndef main():\n \"\"\"The main entrypoint for the plugin.\"\"\"\n payload = dr...
python
edit
null
null
apache-2.0
b179423a7678aef0a8e286977055b25b9b0aac99
dangerfarms/drone-rancher
plugin/main.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.contrib.auth.decorators import login_required\n\nfrom . import views\n\nurlpatterns = [\n url(r'^u/(?P<url>http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)$',...
python
edit
1
0
mit
12eea471fb50c229dff5627e1e97b7ddeceedd18
WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight
TWLight/ezproxy/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Request, Response\nclass RqRequest(Request):\n def rq_headers(self):\n headers = {}\n if 'Authorization' in self.headers:\n headers['Authorization'] = self.headers['Authorization']\n if s...
python
edit
3
3
mit
43acbf596e615f68eef119fb828aff55df0586d5
Timothee/Passeplat
FlaskRequests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom types import UnicodeType, StringType\n\nclass PropertyMappingFailedException(Exception):\n pass\n\ndef get_transformed_properties(source_properties, prop_map):\n results = {}\n for key, value in prop_map.iteritems():\n ...
python
edit
1
6
mit
a2776a5cfcad7e9957eb44ab5882d36878026b1e
OpenBounds/Processing
property_transformation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport datetime\nimport time\n\nimport picamera\n\nfrom PIL import Image, ImageStat, ImageFont, ImageDraw\n\n\nwith picamera.PiCamera() as camera:\n camera.resolution = (1024, 768)\n camera.rotation = 180\n\n time.sleep(...
python
edit
1
0
mit
c181c54ee749408401b47c9528e9ee085b582692
dvl/raspberry-pi_timelapse,dvl/raspberry-pi_timelapse
timelapse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport shutil\n\nimport os\n\n\ndef install(src, dest):\n \"\"\"\n Copy src (file) into dest (file) and make dest executable.\n\n On trouble, prints message and exits with an error code.\n \"\"\"\n try:\n _...
python
edit
2
6
mit
397e4b3841dde6f82ad7f1d3f6458f99da69d678
walles/px,walles/px
px/px_install.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport hashlib\n\nprefix = ''\nnumber = 1\n\nwith open('../inputs/04.txt') as f:\n prefix = f.readlines()\n\nprefix = prefix[0].rstrip()\n\nwhile True:\n md5 = hashlib.md5()\n md5.update('{0}{1}'.format(prefix...
python
edit
2
0
mit
3b7e9d42db8ba0f4f3330544d3789427e7e3858c
opello/adventofcode
python/04-1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Handles all imports from jnius to prevent conflicts resulting from attempts\nto set JVM options while the VM is already running.\"\"\"\n\nfrom __future__ import absolute_import, print_function, unicode_literals\nfrom builtins import d...
python
edit
7
3
bsd-2-clause
6c49d28370cdcd96917286cf68e6a8218db4b8a5
johnbachman/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,bgyori/indra,sorgerlab/belpy
indra/java_vm.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.views.generic import RedirectView\nfrom django.core.urlresolvers import reverse_lazy\n\nfrom .views import AppView, reports_export\n\n\n# Instead of using a wildcard for our app views we insert ...
python
edit
1
0
bsd-2-clause
87c5f39d5cb072a778bb145e6e5fc49c8d4b350d
cdubz/timestrap,overshard/timestrap,overshard/timestrap,cdubz/timestrap,cdubz/timestrap,overshard/timestrap
core/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom froide.publicbody.models import (PublicBody, FoiLaw, PublicBodyTopic,\n Jurisdiction)\n\n\nclass PublicBodyAdmin(admin.ModelAdmin):\n prepopulated_fields = {\"slug\": (\"name\",)}\n list_d...
python
edit
1
0
mit
fb82b4f77379ddd1525947cc61f1c46c34674da4
LilithWittmann/froide,fin/froide,ryankanno/froide,CodeforHawaii/froide,okfse/froide,stefanw/froide,ryankanno/froide,okfse/froide,stefanw/froide,catcosmo/froide,fin/froide,ryankanno/froide,CodeforHawaii/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,okfse/froide,okfse/froide,LilithWittmann/froide,fin/f...
froide/publicbody/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom os.path import isdir, isfile\nfrom corpus import Corpus\nfrom gensim import models\n\n\nclass W2VCorpus(Corpus):\n\n def __init__(self, dir, dict_loc, vec_loc):\n Corpus.__init__(self, dir)\n # Todo: Tweak ...
python
edit
3
6
mit
f1f500488197a40a007af67c2c8dcc0aaef60dd3
PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project
src/project/word2vec_corpus.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef sum_of_multiples(limit, factors):\n return sum(all_multiples(limit, factors))\n\n\ndef all_multiples(limit, factors):\n multiples = set()\n for factor in factors:\n multiples = multiples.union(get_multiples(limit, factor...
python
edit
1
4
mit
54d55ada152338cc038a4249e03ee25c4739c68f
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
python/sum-of-multiples/sum_of_multiples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\"\"\"\nTests for ``admin.acceptance``.\n\"\"\"\n\nfrom zope.interface.verify import verifyObject\nfrom twisted.trial.unittest import SynchronousTestCase\n\nfrom ..acceptance imp...
python
edit
1
1
apache-2.0
0c3ed07548cd196ceac2641a38f4d20a1e104d11
jml/flocker,lukemarsden/flocker,wallnerryan/flocker-profiles,AndyHuu/flocker,adamtheturtle/flocker,mbrukman/flocker,lukemarsden/flocker,hackday-profilers/flocker,achanda/flocker,w4ngyi/flocker,1d4Nf6/flocker,Azulinho/flocker,mbrukman/flocker,LaynePeng/flocker,w4ngyi/flocker,moypray/flocker,w4ngyi/flocker,LaynePeng/floc...
admin/test/test_acceptance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproject = u'bee...
python
edit
1
0
mit
6eed42d2abbc458b7df4d06faf55a70e33404030
mried/beets,SusannaMaria/beets,Freso/beets,madmouser1/beets,Freso/beets,ibmibmibm/beets,MyTunesFreeMusic/privacy-policy,jcoady9/beets,parapente/beets,ibmibmibm/beets,parapente/beets,beetbox/beets,Freso/beets,madmouser1/beets,SusannaMaria/beets,MyTunesFreeMusic/privacy-policy,beetbox/beets,mried/beets,xsteadfastx/beets,...
docs/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom been.core import DirectorySource, source_registry\n\nclass MarkdownDirectory(DirectorySource):\n kind = 'markdown'\n def process_event(self, event):\n lines = event['content'].splitlines()\n event['title'] = lines[0...
python
edit
3
1
bsd-3-clause
21f74472d8e229d6e662eff39f90886f4357d8c3
chromakode/been
been/source/markdown.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# importing modules/ libraries\nimport pandas as pd\nimport random\nimport numpy as np\n\n# create a sample of prior orders\norders_df = pd.read_csv(\"Data/orders.csv\")\ns = round(3214874 * 0.1)\ni = sorted(random.sample(list(orders_df[ord...
python
edit
3
0
mit
39ed9fecd03f837c1ca7436b4695734b1602a356
rjegankumar/instacart_prediction_model
create_sample.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rich.console import Console\nfrom rich.markdown import Markdown\nfrom rich.syntax import Syntax\n\n\ndef process_syntax(code, lang, theme, line_numbers, code_width, word_wrap):\n syntax = Syntax(\n code,\n lang,\n ...
python
edit
1
4
mit
4ca388ca6ef21d8e93de71e783ea5175a223980e
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
seleniumbase/console_scripts/rich_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef main():\n print (\"Hello world!\")\n\nif __name__ == '__main__':\n main()\n```\n\nApply this change: Read a file from Python" }, { "role": "assistant", "content": "def main():\n try:\n fileName = \"MengZi_Tra...
python
edit
2
3
mit
63fbbd36bc9123fc8fe9ed41481dd36373959549
fan-jiang/Dujing
Helper/Helper/Helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport threading\nimport subprocess\n\nfrom . import px_processinfo\n\nif sys.version_info.major >= 3:\n # For mypy PEP-484 static typing validation\n from . import px_process # NOQA\n from typing import Lis...
python
edit
1
2
mit
195138143ed9cb374175710369b2a77089cac593
walles/px,walles/px
px/px_pager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\nfrom .resources.batches import Batches\nfrom .resources.jobs import Jobs\n\nDEFAULT_API_ROOT = 'http://app.spare5.com/partner/v2'\n\n\nclass Spare5Client(object):\n def __init__(self, username, token, api_root=DEFAULT_...
python
edit
3
1
mit
6487c04c85f890a8d767216efac24bf42fb9e387
roverdotcom/spare5-python
spare5/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import resolve, reverse, Resolver404\nfrom django.http import HttpResponseRedirect\nfrom django.utils import timezone\nfrom datetime import datetime\n\nclass Feb262015Middleware(object):\n\tself.target_url = 'f...
python
edit
1
4
mit
8de4fc98785f130c9b0fdb7d7f022aa2b0c4f389
kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz
uchicagohvz/game/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBinary search\n\"\"\"\n\n\ndef binary_search0(xs, x):\n \"\"\"\n Perform binary search for a specific value in the given sorted list\n\n :param xs: a sorted list\n :param x: the target value\n :return: an index if the...
python
edit
1
4
mit
99ab527550b91d17342ef3112e35f3cdb1be9867
all3fox/algos-py
src/binsearch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Import salt libs\nimport integration\n\nclass KeyTest(integration.CliCase):\n '''\n Test salt-key script\n '''\n def test_list(self):\n '''\n test salt-key -L\n '''\n data = self.run_key('-L')\n ...
python
edit
1
1
apache-2.0
8276c2548bd84c4318a2fff45625a08d2ab38fcd
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/shell/key.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport time\nfrom multiprocessing import Process, Event\n\nimport mfhclient\nimport update\nfrom arguments import parse\nfrom settings import HONEYPORT\n\n\ndef main():\n update_event = Event()\n mfhclient_proce...
python
edit
1
5
mit
f9926da62fc50c8602797cb12ac80264140c8028
Zloool/manyfaced-honeypot
mfh.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass module:\n mod_name = \"unnamed_module\";\n mod_id = -1;\n mod_rect = None;\n mod_surface = None;\n mod_attribs = [];\n\n def __init__(self, _id):\n print(\"Initializing generic module (This shouldn't happen......
python
edit
1
1
bsd-2-clause
8fb958821cd58016c56b5eee2c6531827e4c57b8
halfbro/juliet
modules/juliet_module.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: API: Add LiveSpecFile to callbacks API." }, { "role": "assistant", "content": "from .core import (CallbackBase, CallbackCounter, print_metadata, collector,\n LiveMesh, LivePlot, LiveRaster, LiveTable, CollectThe...
python
new_file
13
0
bsd-3-clause
967b8cd4d11e8619a8da2b6f9935846559df7347
ericdill/bluesky,ericdill/bluesky
bluesky/callbacks/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nRESERVED_NAMES = {\n 'def',\n 'pass',\n 'return',\n 'class',\n 'interface',\n 'data',\n 'if',\n 'elif',\n 'else',\n 'or',\n 'and',\n 'not',\n 'for',\n 'true',\n 'false',\n}\n\nRESERVED_CLASSES = ...
python
edit
1
0
apache-2.0
9442338d329e7f87d6265e0b0d3728a0df18d945
pdarragh/Viper
viper/lexer/reserved_tokens.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask.ext.assets import Bundle\n\napp_css = Bundle(\n 'app.scss',\n filters='scss',\n output='styles/app.css'\n)\n\napp_js = Bundle(\n 'app.js',\n filters='jsmin',\n output='scripts/app.js'\n)\n\nvendor_css = Bundle(\...
python
edit
1
0
mit
c035ee8273b3582133c78353259de026ce81d0b5
hack4impact/flask-base,ColinHaley/Konsole,ColinHaley/Konsole,aharelick/netter-center,AsylumConnect/asylum-connect-catalog,AsylumConnect/asylum-connect-catalog,tobymccann/flask-base,AsylumConnect/asylum-connect-catalog,AsylumConnect/asylum-connect-catalog,hack4impact/flask-base,hack4impact/asylum-connect-catalog,tobymcc...
app/assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.core.checks import Error, register\n\n\n@register()\ndef css_install_check(app_configs, **kwargs):\n errors = []\n\n css_path = os.path.join(\n os.path.dirname(__file__), 'static', 'wagtailadmin', 'css'...
python
edit
1
2
bsd-3-clause
53fb42f275050986072060a550e4fee09ab418f6
nilnvoid/wagtail,gasman/wagtail,wagtail/wagtail,nutztherookie/wagtail,thenewguy/wagtail,rsalmaso/wagtail,kurtw/wagtail,nilnvoid/wagtail,nutztherookie/wagtail,iansprice/wagtail,thenewguy/wagtail,nimasmi/wagtail,nealtodd/wagtail,Toshakins/wagtail,FlipperPA/wagtail,nilnvoid/wagtail,iansprice/wagtail,zerolab/wagtail,mikedi...
wagtail/wagtailadmin/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = \"Raido Pahtma\"\n__license__ = \"MIT\"\n\nimport glob\nimport sys\nimport os\n\n\ndef _list_windows_serial_ports():\n raise NotImplementedError(\"windows support\")\n\n\ndef _list_unix_serial_ports(additional=None):\n po...
python
edit
2
6
mit
788f9a920fdafe6d341432f46295bb737c57cccd
proactivity-lab/python-moteconnection,proactivity-lab/py-moteconnection
moteconnection/serial_ports.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'Nick'\n\nfrom django.conf.urls import url\nfrom search import views\n\nurlpatterns = [\n\turl(r'^$', views.index, name='index'),\n\turl(r'^query$', views.query, name='query')\n]\n```\n\nApply this change: Make sure django does...
python
edit
1
0
mit
56b84d3271ab2312a0bdbd27c6ee3ad60c139920
nh0815/PySearch,nh0815/PySearch
search/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\nfrom yank import version\n\nif version.release:\n docversion = version.version\nelse:\n docversion = 'latest'\n\nos.mkdir(\"docs/_deploy\")\nshutil.copytree(\"docs/_build/html\", \"docs/_deploy/{docversion}\"...
python
edit
1
0
mit
c0ad52072dfe3ae489875c36a3a84561b43583a6
andrrizzi/yank,choderalab/yank,choderalab/yank,andrrizzi/yank,andrrizzi/yank
devtools/travis-ci/set_doc_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests for the MWS.Sellers API class.\n\"\"\"\nimport unittest\nimport mws\nfrom .utils import CommonRequestTestTools\n\n\nclass SellersTestCase(unittest.TestCase, CommonRequestTestTools):\n \"\"\"\n Test cases for Sellers.\n ...
python
edit
1
1
unlicense
b55e58f3619305946decc7c17c558879895f3b1a
Bobspadger/python-amazon-mws,GriceTurrble/python-amazon-mws
tests/request_methods/test_sellers.py
accepted
null
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 removed_items = {\n 'django.core.context_processors....
python
edit
3
4
isc
c45881530694488c5ef139e89c05aa24ddb671ff
alfredhq/djlint
djlint/analyzers/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#: E201\nspam( ham[1], {eggs: 2})\n#: E201\nspam(ham[ 1], {eggs: 2})\n#: E201\nspam(ham[1], { eggs: 2})\n#: Okay\nspam(ham[1], {eggs: 2})\n#:\n\n\n#: E202\nspam(ham[1], {eggs: 2} )\n#: E202\nspam(ham[1], {eggs: 2 })\n#: E202\nspam(ham[1 ], ...
python
edit
5
0
mit
83a5688181ed3fac058cd1b9b15f885e47578409
jayvdb/pep8,pedros/pep8,fabioz/pep8,MeteorAdminz/pep8,ojengwa/pep8,PyCQA/pep8,codeclimate/pep8,reinout/pep8,ABaldwinHunter/pep8,jayvdb/pep8,reinout/pep8,asandyz/pep8,ABaldwinHunter/pep8-clone-classic,pandeesh/pep8,doismellburning/pep8,fabioz/pep8,zevnux/pep8
testsuite/E20.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom docker import Client\nfrom plum import Service\n\n\nclass ServiceTestCase(TestCase):\n def setUp(self):\n self.client = Client('http://127.0.0.1:4243')\n self.client.pull('ubuntu')\n\n ...
python
edit
1
2
apache-2.0
83a086b865c2db791a208d3854c15963ed3fc693
phiroict/docker,xydinesh/compose,unodba/compose,shin-/docker.github.io,bdwill/docker.github.io,bsmr-docker/compose,KevinGreene/compose,Katlean/fig,screwgoth/compose,bobphill/compose,aanand/fig,zhangspook/compose,GM-Alex/compose,KevinGreene/compose,saada/compose,docker-zh/docker.github.io,ekristen/compose,jrabbit/compos...
plum/tests/service_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n#encoding: UTF-8\n\n# Define a function that computes the length of a given list or string. \n# (It is true that Python has the len() function built in, \n# but writing it yourself is nevertheless a good exercise.)\n...
python
edit
2
11
mit
ae4a13da2857a5826fa701f25b242c95d56995d9
giantas/minor-python-tests
string_length.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom ooni.utils import pushFilenameStack\n\nclass TestUtils(unittest.TestCase):\n def test_pushFilenameStack(self):\n f = open(\"dummyfile\", \"w+\")\n f.write(\"0\\n\")\n f.close()\n for i in...
python
edit
3
3
bsd-2-clause
3c86abb5d2a728604b97a33c3f989039231205b0
lordappsec/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-pro...
ooni/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAll class templated which can be derivated.\nList:\n Platform\n Prompt\n\"\"\"\n\n```\n\nApply this change: Make a new entry to import all modules." }, { "role": "assistant", "content": "\"\"\"\nAll class templated...
python
edit
4
0
mit
6aee8af90e5c09fb56d5d9194f0d0db5ce8b38f8
nday-dev/Spider-Framework
tmpl/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\r\nimport urllib2\r\nimport xml.etree.ElementTree as ET\r\n\r\n\r\nMARKET_URL = 'http://api.eve-central.com/api/marketstat?hours=24&%s'\r\n\r\nITEMS = [\r\n\t34, # Tritanium\r\n\t35, # Pyerite\r\n\t36, # Mexallon\r\n\t37, # I...
python
edit
1
4
bsd-2-clause
df98c8bd70f25727810e6eb9d359cf1e14fd6645
madcowfred/evething,Gillingham/evething,cmptrgeekken/evething,madcowfred/evething,cmptrgeekken/evething,cmptrgeekken/evething,cmptrgeekken/evething,madcowfred/evething,Gillingham/evething,madcowfred/evething,cmptrgeekken/evething,Gillingham/evething,Gillingham/evething
update_prices.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom django.db import models, migrations\nfrom django.core.management import call_command\n\n\ndef add_knight_data(apps, schema_editor):\n call_command('loaddata', 'knight...
python
edit
3
1
bsd-2-clause
54f70d759b2e0d384d626f4b55016166f9b26f16
jambonrose/djangocon2014-updj17
camelot/roundtable/migrations/0002_add_knight_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Defining a function to load images\ndef load_image(image_name, fade_enabled=False):\n \"\"\"fade_enabled should be True if you want images to be able to fade\"\"\"\n try:\n #! Add stuff for loading images of the correct resol...
python
edit
8
3
mit
b1a33b1a89c00ee6de7949c529ecd4bcf2d38578
AndyDeany/pygame-template
python/helper/asset_loading.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"A Python calculator\"\"\"\nimport sys\n\ncommand = sys.argv[1]\nnumbers = [float(a) for a in sys.argv[2:]]\na = float(sys.argv[2])\nb = float(sys.argv[3])\n\n\nif command == 'add':\n print sum(numbers)\n\neli...
python
edit
5
0
bsd-3-clause
3103bba12ee3580b3f707e88dd23e853af7b47e0
mkuiper/calc
calc.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n return \"Hello World!\"\n\nif __name__ == \"__main__\":\n app.run(\n port=int(os.environ.get('PORT', 5000))\n )\n\n```\n\nApply...
python
edit
1
1
apache-2.0
8f0d56334243fa51b401b18139cefeefd26b6a9d
nobutakaoshiro/codebox,indykish/codebox,blubrackets/codebox,lcamilo15/codebox,rodrigues-daniel/codebox,rodrigues-daniel/codebox,Ckai1991/codebox,smallbal/codebox,code-box/codebox,rajthilakmca/codebox,fly19890211/codebox,ronoaldo/codebox,quietdog/codebox,LogeshEswar/codebox,listepo/codebox,indykish/codebox,CodeboxIDE/co...
core/cb.project/python/sample/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import date as vanilla_date, timedelta\n\nfrom .base import Calendar\n\nclass JulianDayNumber(Calendar):\n first_ce_day = vanilla_date(1, 1, 1)\n first_ce_day_number = 1721423\n display_name = \"Julian Day Number\"\n\...
python
edit
1
2
apache-2.0
3d48b9b976603ea8c13937a0c6eac8a74d62b72d
jwg4/calexicon,jwg4/qual
calexicon/calendars/other.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContains DemographicInfo class, which stores info found by accounts.\n\"\"\"\n\nfrom collections import UserDict\n\nclass DemographicInfo(UserDict):\n\n def __setitem__(self, key, value):\n if key in self.data:\n ...
python
edit
1
4
bsd-3-clause
8e13a10af23991bbd8aa6e59b6890fa729fe698f
brenns10/social,brenns10/social
social/info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport sys, os\nparser = argparse.ArgumentParser()\nparser.add_argument('pyqlabpath', help='path to PyQLab directory')\nparser.add_argument('qubit', help='qubit name')\nparser.add_argument('stop', help='longest delay in ns'...
python
edit
8
0
apache-2.0
dcc309f0634eac6d7461d506cac4bc5b9cfbc311
BBN-Q/Qlab,BBN-Q/Qlab,BBN-Q/Qlab,BBN-Q/Qlab
experiments/T1T2/RamseySequence.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Dave Kludt\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.o...
python
edit
1
1
apache-2.0
8b46628656e0e649a9c973c911c01e44222906b7
oldarmyc/anchor,oldarmyc/anchor,oldarmyc/anchor
anchor/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bson.objectid import ObjectId\nfrom humbledb import Mongo, Document\n\n\nclass ClassProperty (property):\n \"\"\"Subclass property to make classmethod properties possible\"\"\"\n def __get__(self, cls, owner):\n return sel...
python
edit
3
2
bsd-3-clause
5d9eabe588231444083d13dc50371ea6952d445e
1stvamp/mirrit
mirrit/web/models.py
rejected_duplicate
Near-duplicate of sample 5590
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef index():\n return render_template('index.html')\n\n@app.route(\"/fdc\")\ndef fdc_report_page():\n return render_template('fdc-report.html')\n\ni...
python
edit
6
1
mit
2b5a3f0209d4a5fc5e821ca4f749931d8f6a18be
danmichaelo/wm_metrics,Commonists/wm_metrics,Commonists/wm_metrics,Commonists/wm_metrics,Commonists/wm_metrics,danmichaelo/wm_metrics,danmichaelo/wm_metrics,danmichaelo/wm_metrics
app/wmmetrics.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom fnmatch import fnmatchcase\nimport click\n\n\nclass Ignores(object):\n @classmethod\n def read(cls, path):\n ignores = cls()\n\n with click.open_file(path, 'r') as stream:\n ignores.patterns = ...
python
edit
4
3
mit
87978c2b72777f3ef97cf1ae16f14797977bc34d
mcgid/morenines,mcgid/morenines
morenines/ignores.py
rejected_lint
Too many lint violations: 4
true