messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nimport json\nimport os\n\nimport yaml\n\nfrom oonib.handlers import OONIBHandler\n\nfrom oonib import config\n\nclass InputDescHandler(OONIBHandler):\n def get(self, inputID):\n #XXX return the input descriptor\n ...
python
edit
3
4
bsd-2-clause
b7fd4b9db379fc9bc28f22f6608c804e9f08e181
DoNotUseThisCodeJUSTFORKS/ooni-backend,DoNotUseThisCodeJUSTFORKS/ooni-backend,dstufft/ooni-backend,dstufft/ooni-backend
oonib/input/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.encoding import python_2_unicode_compatible\n\nfrom .. import settings\n\n\n@python_2_unicode_compatible\nclas...
python
edit
1
1
mit
8548822ed0755a17cc3dc95cac582683a1ffb11c
ulule/django-linguist
linguist/models/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport yaml\n\nfrom dogapi import dog_stats_api, dog_http_api\n\n\ndef setup():\n \"\"\"\n Initialize connection to datadog during locust startup.\n\n Reads the datadog api key from (in order):\n 1) An environment var...
python
edit
3
2
apache-2.0
ea287daca69d0385c2792cd0021a0b1a23fb912b
edx/edx-load-tests,edx/edx-load-tests,edx/edx-load-tests,edx/edx-load-tests
helpers/datadog_reporting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lobster.core.command import Command\n\n\nclass Elk_Update(Command):\n @property\n def help(self):\n return 'update Kibana objects'\n\n def setup(self, argparser):\n pass\n\n def run(self, args):\n args....
python
edit
1
1
mit
e85102e3c5e76c0e695aef2eb14ba973fb0da660
matz-e/lobster,matz-e/lobster,matz-e/lobster
lobster/commands/elk.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom .abc import Writer\n\nimport cgi\n\n\nclass HtmlWriter(Writer):\n def __init__(self):\n self._fragments = []\n \n def text(self, text):\n self._fragments.append(_escape_...
python
edit
1
3
bsd-2-clause
1599d4ed14fb3d7c7e551c9f6ce3f86d9df17cbd
mwilliamson/python-mammoth
mammoth/writers/html.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom ookoobah import core\nfrom ookoobah import utils\n\ngame = core.Game()\n\nutils.populate_grid_from_string(game.grid, \"\"\"\n ######\n #>..\\#\n #.#..#\n #....#\n #.\\./#\n ######\n\"\"\")\n\n...
python
edit
3
0
mit
bb190d54324e15ed6ce99845047228eaef5e57cb
vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah
test_core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom .. import http\nfrom .publisher import Publisher\n\nfrom django.db import transaction\nfrom django.shortcuts import get_object_or_404\n\n\nclass ModelPublisher(Publisher):\n '''A Publisher ...
python
edit
1
2
bsd-3-clause
8ecc24ab865ff9dec647fe69d78af0a63f0a902a
MarkusH/django-nap,limbera/django-nap
nap/rest/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Model for handling operations on map data\"\"\"\nimport json\n\ndef persist_map(map_data, metadata, cursor, player_id):\n \"\"\"Method for persisting map data\"\"\"\n serialized_map_data = json.dumps(map_data)\n\n map_sql = \...
python
edit
1
2
mit
7c91429412119f887e611c5f6a52a5ebc32a99b0
P1X-in/Tanks-of-Freedom-Server
tof_server/map_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom yeast_harness import *\n\n\nclass TestYeast(unittest.TestCase):\n def test_single_c_source(self):\n\n mk = Makefile(\n spores=SporeFile(\n sources=CSourceFile('tree'),\n ...
python
edit
8
3
mit
7f2d9b94bdcbfb90870591d7cb497bb0aa2ac069
sjanhunen/yeast,sjanhunen/moss,sjanhunen/gnumake-molds,sjanhunen/moss
test/test_yeast.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom grazer.core import crawler\nfrom bs4 import BeautifulSoup\n\n\ndef test_extract_links():\n text = \"\"\"\n <html><head><title>The Dormouse's story</title></head>\n <body>\n <p class=\"title\"><b>The Dormouse's story</b></p>...
python
edit
1
1
mit
77d0fe3daec4f6e4f9166dcd32943b21384a2073
CodersOfTheNight/verata
tests/test_core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\n# the type of float to use throughout the session.\n_FLOATX = 'float32'\n_EPSILON = 10e-8\n\n\ndef epsilon():\n return _EPSILON\n\n\ndef set_epsilon(e):\n global _EPSILON\n _EPSILON = e\n\n\ndef floatx():\n ...
python
edit
1
2
apache-2.0
2161910a53604bdc48027c5c4e71f9af4228cbaa
keras-team/keras,nebw/keras,daviddiazvico/keras,kemaswill/keras,DeepGnosis/keras,keras-team/keras,dolaameng/keras,relh/keras,kuza55/keras
keras/backend/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render, get_object_or_404\n\nfrom config.utils import get_active_event\n\nfrom .models import Talk\n\n\ndef list_talks(request):\n event = get_active_event()\n talks = event.talks.prefetch_related(\n ...
python
edit
1
1
bsd-3-clause
4f27be336a58d0bba66a4f7ab57126d9dd734ab9
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
talks/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom neo.io.basefromrawio import BaseFromRaw\nfrom neo.rawio.nixrawio import NIXRawIO\n\n# This class subjects to limitations when there are multiple asymmetric blocks\n\n\nclass NixIO(NIXRawIO, BaseFromRaw):\n\n name = 'NIX IO'\n\n _...
python
edit
1
3
bsd-3-clause
b2d121a2ee8750afd0f4d527c80371bd501f841c
NeuralEnsemble/python-neo,JuliaSprenger/python-neo,samuelgarcia/python-neo,INM-6/python-neo,rgerkin/python-neo,apdavison/python-neo
neo/io/nixio_fr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pcbnew\nimport sys\nimport os\n\npretties = []\nfor dirname, dirnames, filenames in os.walk(sys.argv[1]):\n # don't go into any .git directories.\n if '.git' in dirnames:\n dirnames.remove('.git')\n\n for filename in ...
python
edit
1
0
mit
5bb7cc09df33debb46eba17d12f078f043131db0
monostable/haskell-kicad-data,monostable/haskell-kicad-data,kasbah/haskell-kicad-data
kicad_footprint_load.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import * # noqa\n\n\nSECRET_KEY = \"test\"\n\nDATABASES = {\n \"default\": {\"ENGINE\": \"django.db.backends.sqlite3\", \"NAME\": base_dir_join(\"db.sqlite3\"),}\n}\n\nSTATIC_ROOT = \"staticfiles\"\nSTATIC_URL = \"/static/\"\...
python
edit
4
0
mit
96ef8f3f2c81822df635a373496d2f638178f85a
vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate
backend/project_name/settings/test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport lintreview.tools as tools\n\nfrom lintreview.diff import DiffCollection\nfrom lintreview.review import Problems\nfrom lintreview.review import Review\n\nlog = logging.getLogger(__name__)\n\n\nclass Processor(object):\...
python
edit
1
2
mit
8da30d3752fd6a056891960aa2892bcd8001c79b
markstory/lint-review,markstory/lint-review,adrianmoisey/lint-review,zoidbergwill/lint-review,zoidbergwill/lint-review,adrianmoisey/lint-review,zoidbergwill/lint-review,markstory/lint-review
lintreview/processor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTesting Helpers\n~~~~~~~~~~~~~~~\n\nCollection of Mocks and Tools for testing APIs.\n\n\"\"\"\nfrom odin.codecs import json_codec\n\nfrom odinweb.constants import Method\n\n\nclass MockRequest(object):\n \"\"\"\n Mocked Reques...
python
edit
4
6
bsd-3-clause
0c67cff030592cd44023444a5f10eef6570bfdf0
python-odin/odinweb,python-odin/odinweb
odinweb/testing.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef transform(dataset, axis1, axis2):\n \"\"\"Swap two axes in a dataset\"\"\"\n\n data_py = dataset.active_scalars\n dataset.active_scalars = data_py.swapaxes(axis1, axis2)\n\n```\n\nApply this change: Convert array back to fortra...
python
edit
1
1
bsd-3-clause
f62ccee6bffa4dff9047a2f4b7499412dd3e2fb1
OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz
tomviz/python/SwapAxes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor=0\npatch=16\nbranch=\"master\"\ntimestamp=1376507917.4\n```\n\nApply this change: Tag commit for v0.0.17-master generated by gitmake.py" }, { "role": "assistant", "content": "major = 0\nminor=0\npatch=17\nbranch...
python
edit
1
0
mit
3f5ac069710679201cb0a3a041a0ca75186c9e03
ryansturmer/gitmake
version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nfrom kitchen.settings import KITCHEN_LOCATION\n\ndef load_data(data_type):\n retval = []\n nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)\n if not os.path.isdir(nodes_dir):\n raise IOError('I...
python
edit
1
4
apache-2.0
ce42ab724ad8a76dd04e24e4df6d20d96255989f
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
kitchen/lib/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nodeconductor.core import NodeConductorExtension\n\n\nclass SharepointExtension(NodeConductorExtension):\n\n @staticmethod\n def django_app():\n return 'nodeconductor_saltstack.sharepoint'\n\n @staticmethod\n def res...
python
edit
1
1
mit
f365c36cb726f6ace05cf05f1a11635337963270
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/sharepoint/extension.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env 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\"\"\" Run GYP to generate project files. \"\"...
python
edit
1
1
bsd-3-clause
74a3fe9d83c3ccf2f6972277df3a34c47bc06c26
Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbo...
slave/skia_slave_scripts/run_gyp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport urllib2\nimport socket\n\nfrom google.appengine.api import datastore_errors\nfrom google.appengine.runtime import apiproxy_errors\n\nMAX_ATTEMPTS = 10\n\n\ndef retry(func, *args, **kwargs):\n for attempt in range(MAX_...
python
edit
5
5
mit
74c770b8b457b14a297193e0cd8e9d5bb6b4b031
jcrocholl/nxdom,jcrocholl/nxdom
utils/retry.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.http import HttpResponse\nfrom django.template.response import TemplateResponse\n\nfrom us_ignite.maps.models import Location\n\n\ndef location_list(requ...
python
edit
1
2
bsd-3-clause
5558b19b46fbe1db6f25b227ac581095fedcff2e
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/maps/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom braces.views import UserPassesTestMixin\n\n\nclass CustomUserTest(UserPassesTestMixin):\n \"\"\"User must be a member of this organization to view this content.\n\n This also requires that a user be logged in, so it's not needed ...
python
edit
1
3
mit
497b0c8e9581cee76398c18c78ea8eb4362ef5b2
ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet
project/editorial/views/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 The Pontem Authors. All rights reserved.\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...
python
edit
1
0
apache-2.0
2c914f6e438906296860983a01e593ab1f9a5cd7
GoogleCloudPlatform/pontem,GoogleCloudPlatform/pontem
CloudSQLReplicator/google/cloud/pontem/sql/replicator/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n# forms wtf config\nWTF_CSRF_ENABLED = True\nSECRET_KEY = 'impossible-to-guess'\n\n# sqlalchemy database config\nSQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedi...
python
edit
1
0
mit
b6308afbc33f80b621e68c3d2b635fe64666c51a
pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control
wcontrol/conf/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom .models import Service, Category, ServicePhoto\n\n\nclass CategorySerializer(serializers.ModelSerializer):\n class Meta:\n model = Category\n fields = ('id', 'name', 'photo', '...
python
edit
1
0
mit
61b4f72045ea683a83a358d5d66bd32f7711598b
Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform
services/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\n\n\napp = Flask(__name__)\napp.config.from_object('url_shortener.default_config')\napp.config.from_envvar('URL_SHORTENER_CONFIGURATION')\ndb = SQLA...
python
edit
1
0
mit
a4f03e82b72287027a57101fe67f7fc26d312801
piotr-rusin/url-shortener,piotr-rusin/url-shortener
url_shortener/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include\nfrom django.contrib import admin\n\n\nadmin.autodiscover()\n\n\nurlpatterns = [\n (r'^admin/', include(admin.site.urls)),\n (r'^account/', include('rapidsms.urls.login_logout')),\n (r'^schedule...
python
edit
1
0
bsd-3-clause
d9f26a1d2831546517aec163a447dcf83cc80701
caktus/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app
decisiontree/tests/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"Example for aiohttp.web websocket server\n\"\"\"\n\nimport os\n\nfrom aiohttp import web\n\n\nWS_FILE = os.path.join(os.path.dirname(__file__), 'websocket.html')\n\n\nasync def wshandler(request):\n resp = w...
python
edit
1
9
apache-2.0
58d3efa146f006fe518b02234b4eb0d6708cecc8
rutsky/aiohttp,arthurdarcet/aiohttp,arthurdarcet/aiohttp,KeepSafe/aiohttp,rutsky/aiohttp,KeepSafe/aiohttp,KeepSafe/aiohttp,rutsky/aiohttp,arthurdarcet/aiohttp
examples/web_ws.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"Basic folder controller.\n\nAdditional views on asset contents.\n\"\"\"\n\nimport datetime\nfrom web.extras.contentment.api import action, view\nfrom web.extras.contentment.components.asset.controller import Asset...
python
edit
4
7
mit
5a4e9d19f75bb02dc359099931310c7e6dd1ac99
marrow/contentment,marrow/contentment
web/extras/contentment/components/folder/controller.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom motobot import match, Notice, Eat, __VERSION__\nfrom time import strftime, localtime\n\n\n@match(r'\\x01(.+)\\x01', priority=Priority.max)\ndef ctcp_match(bot, context, message, match):\n mapping = {\n 'VERSION': 'MotoBot Ver...
python
edit
1
2
mit
b5a43a7fdfc69abfa687d2b31a2add0d52ed5235
Motoko11/MotoBot
motobot/core_plugins/ctcp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bin_heap as bh\n\n\nclass Priority(object):\n \"\"\"docstring for priority\"\"\"\n def __init__(self):\n self.bin_heap = bh\n\n def insert(self, item, rank):\n bh.push(item, rank)\n\n def pop(self):\n ...
python
edit
1
1
mit
54c46aaafe5b99b4da01911b4133dfaace7f6a43
jwarren116/data-structures
_priorityQ.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import http\r\nfrom django.contrib import auth\r\nfrom django.core import exceptions\r\n\r\n\r\nclass TokenMiddleware(object):\r\n \"\"\"\r\n Middleware that authenticates against a token in the http authorization\r\n h...
python
edit
1
4
mit
33448ac669e192143655560dd52299e7069585ac
jasonbeverage/django-token
django_token/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nimport datetime\nfrom django.utils.translation import ugettext as _\nfrom events.models import CalendarEventsPlugin as CalendarEventsPluginModel\nfrom event...
python
edit
1
1
bsd-3-clause
5dbea33ce9d2b2d9354a8e86e271c087723dc748
theherk/django-theherk-events
events/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom docutils.core import publish_parts\nimport coffeescript\nfrom scss import Scss\nfrom stylus import Stylus\n\nfrom .util import as_unicode\n\n\n\ndef rst_to_html(source):\n # This code was taken from http://wiki.python.org/moin/ReStr...
python
edit
1
1
mit
376fcbd76bb2f0de3c738ac66ac5526b6685d18a
kxxoling/Plim
plim/extensions.py
rejected_duplicate
Near-duplicate of sample 16656
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\nfrom django.contrib import admin\nfrom sorl.thumbnail.admin import AdminImageMixin\n\nfrom .models import Section, Group, Item, Image, Area\n\n\nclass ImageInline(AdminImageMixin, admin.StackedInline):\n model = ...
python
edit
1
0
mit
db1c0183b3d42c611eaefa77f4b3bc4f33cb8267
inoks/dcf,inoks/dcf
django_classified/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim:ts=4:sw=4:noexpandtab\n\nfrom __future__ import absolute_import\n\nimport socket\nimport logging\n\nfrom .dictlib import ConfigDict\n\nconfig = ConfigDict(\n\tbot_nickname = 'pmxbot',\n\tdatabase = 'sqlite:pmx...
python
edit
1
0
mit
2cb7c80bc4358631b897e3ea91d3c7eff684f69b
jawilson/pmxbot,jawilson/pmxbot
pmxbot/__init__.py
rejected_duplicate
Near-duplicate of sample 11401
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport struct, socket\n\n\ndef unpack_address(u):\n addrtype = u.unpack_uint()\n\n if self.addrtype == 1:\n self.address = u.unpack_fopaque(4)\n\n if self.addrtype == 2:\n self.address = u.unpack_fopaque(16)\n \n ...
python
edit
1
3
mit
ac31a10d00508ddd354d9c30055d2955b306d516
ducted/duct,ducted/duct,ducted/duct,ducted/duct
duct/protocol/sflow/protocol/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import views, serializers\nfrom rest_framework.decorators import permission_classes\nfrom rest_framework.parsers import FileUploadParser\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework.respon...
python
edit
3
2
mit
108c11d5187f7ec4647351c924df8cd881020b8a
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
falmer/matte/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\nfrom nodeconductor.quotas import models, utils\nfrom nodeconductor.core.serializers import GenericRelatedField\n\n\nclass QuotaSerializer(serializers.HyperlinkedModelSerializer):\n scope = Generi...
python
edit
1
1
mit
17cc0e9ab4f32e74c9a03124e38628c0f6640f40
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/quotas/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\nfrom django.core.management.base import BaseCommand\nfrom rest_framework.authtoken.models import Token\n\n\nUserModel = get_user_model()\n\n\nclass Command(BaseCommand):\n help = 'Create DR...
python
edit
1
2
bsd-2-clause
34c38e0cfe5e880e678704c4d473f082787fca64
dmwyatt/django-rest-framework,ossanna16/django-rest-framework,jpadilla/django-rest-framework,tomchristie/django-rest-framework,jpadilla/django-rest-framework,kgeorgy/django-rest-framework,kgeorgy/django-rest-framework,tomchristie/django-rest-framework,tomchristie/django-rest-framework,ossanna16/django-rest-framework,jp...
rest_framework/authtoken/management/commands/drf_create_token.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#I got this code on http://stackoverflow.com/questions/12090503/listing-available-com-ports-with-python\n#So, yeah. I didn't wrote this code :-P\nimport sys\nimport glob\nimport serial\n\ndef serial_ports():\n\t\"\"\" Lists serial port name...
python
edit
1
8
mit
c1f63f381b167d6bfe701a36e998727cf4ed3bec
MU-Software/Project_Musica_for_Contest
client/software/resources/modules/hardware_auto_find.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nFFMPEG_PATH = '/usr/local/bin/ffmpeg'\n\nVIDEO_CODEC = 'h264' # used with ffprobe to detect whether or not we need to encode\nVIDEO_ENCODER = 'h264_omx'\n\nAUDIO_CODEC = 'aac' # used with ffprobe to detect whether or not we need to encode\n...
python
edit
1
0
mit
171144db2109e4bbe357b44ca37ad5578e1c3996
danielbreves/auto_encoder
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass CommandException(Exception):\n\t\"\"\"\n\tThis custom exception can be thrown by commands when something goes wrong during execution.\n\tThe parameter is a message sent to the source that called the command (a channel or a user)\n\t\"...
python
edit
1
1
mit
112d12aa4622b77a55f0f90b6c0cb7c3ac3d407e
Didero/DideRobot
CommandException.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Looks up a term from urban dictionary\n@package ppbot\n\n@syntax ud <word>\n\n\"\"\"\nimport requests\nimport json\n\nfrom modules import *\n\nclass Urbandictionary(Module):\n\n def __init__(self, *args, **kwargs):\n \"\"\"C...
python
edit
6
3
mit
20d1cd153d54f2eab88197c76c201ed5e7814536
billyvg/piebot
modules/urbandictionary.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\nimport textwrap\nfrom veryprettytable import VeryPrettyTable\nfrom plugins import BasePlugin\n\n__author__ = 'peter'\n\n\nclass BasicInfoPlugin(BasePlugin):\n name = 'BasicInfoPlugin'\n short_description = 'Basic info:'...
python
edit
1
7
mit
7c6a128b707db738d0a89c2897b35ed7d783ade0
Sakartu/stringinfo
plugins/basic_info_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n flaskext.clevercss\n ~~~~~~~~~~~~~\n\n A small Flask extension that makes it easy to use cleverCSS with your Flask\n application.\n\n :copyright: (c) 2010 by Steve Losh.\n :copyright: (c) ...
python
edit
1
7
mit
2e9b87a7409f1995f96867270361f23a9fc3d1ab
suzanshakya/flask-clevercss,suzanshakya/flask-clevercss
flaskext/clevercss.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Request:\n GET = 'get'\n POST = 'post'\n\n def __init__(self, url, type, data=None):\n self.url = url\n self.type = type\n self.data = data\n\n\nclass RequestData:\n def __init__(self, data=None):\n ...
python
edit
2
3
mit
f7f3907da8ec31cafaec3d7e82755cfa344ed60e
BakeCode/performance-testing,BakeCode/performance-testing
performance/web.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nimport subprocess\nimport threading\n\nDEBUG = False\n\n# Base rsync command template: rsync -arv <local> <remote>\nbase_cmd = \"rsync -arv {0} {1}\"\n\nclass SyncOnSaveCommand(sublime_plugin.EventListener):\...
python
edit
1
4
mit
9fb302a4e8d5d69fa4c9727c72f7953f26d1f13f
aldld/SyncOnSave
SyncOnSave.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management import BaseCommand\nfrom podcasts.models import Podcast\n\n\nclass Command(BaseCommand):\n help = 'Initialize podcasts with data from their RSS feeds'\n\n def handle(self, *args, **kwargs):\n for pod...
python
edit
1
4
mit
137b834f166eea13781311b1f050f0eaf2e1d610
matachi/sputnik,matachi/sputnik,matachi/sputnik,matachi/sputnik
podcasts/management/commands/updatepodcasts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Get info about jobs running on this cluster.\"\"\"\nimport pyslurm\n\nfrom job import Job\n\n\nclass Jobs(object):\n \"\"\"A service object to inspect jobs.\"\"\"\n\n @property\n def _jobs(self):\n \"\"\"Fetch fresh da...
python
edit
1
5
mit
1bd344a3ccda43f4ac1d4b94b1a18fc816c9b6ae
afgane/slurmscale,afgane/slurmscale
slurmscale/jobs/jobs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add get_starcheck_catalog_at_date to top level items in mica.starcheck" }, { "role": "assistant", "content": "from .starcheck import get_starcheck_catalog, get_starcheck_catalog_at_date, main, get_mp_dir\n" } ]
python
new_file
6
0
bsd-3-clause
d3f73b55dc68ec18fb5f4c43dcff59f3766d752f
sot/mica,sot/mica
mica/starcheck/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include\n\n\nurlpatterns = patterns(\n (r'^jmbo/', include('jmbo.urls')),\n (r'^comments/', include('django.contrib.comments.urls')),\n (r'^post/', include('post.urls')),\n)\n\n```\n\nApply th...
python
edit
1
0
bsd-3-clause
06122b26a944455576b41501cae6fb73af1bf901
praekelt/jmbo-post,praekelt/jmbo-post
post/tests/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls.defaults import *\n\nfrom .profiles import urls as profiles_urls\n\nfrom django.views.generic.simple import direct_to_template\n\nfrom django.contrib import admin\nadmin.autodiscover()...
python
edit
17
0
bsd-3-clause
56ff6b21e9530edf823a9ff178b4b24702df4ace
lmorchard/badg.us,deepankverma/badges.mozilla.org,mozilla/badges.mozilla.org,lmorchard/badg.us,deepankverma/badges.mozilla.org,lmorchard/badg.us,mozilla/badg.us,mozilla/badges.mozilla.org,mozilla/badg.us,mozilla/badges.mozilla.org,lmorchard/badg.us,mozilla/badg.us,deepankverma/badges.mozilla.org,deepankverma/badges.moz...
badgus/urls.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\"\nTests of io.axonio\n\"\"\"\n\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nfrom neo.io import AxonIO\nfrom neo.test.io.common_io_test import BaseTestIO\n\n\nclass TestAxonIO(...
python
edit
1
0
bsd-3-clause
a6dd8aee6a3b6272372532a19fba3d830d40612a
SummitKwan/python-neo,mschmidt87/python-neo,rgerkin/python-neo,jakobj/python-neo,CINPLA/python-neo,apdavison/python-neo,theunissenlab/python-neo,samuelgarcia/python-neo,guangxingli/python-neo,mgr0dzicki/python-neo,JuliaSprenger/python-neo,NeuralEnsemble/python-neo,npyoung/python-neo,INM-6/python-neo,tclose/python-neo,t...
neo/test/io/test_axonio.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport lxml.etree, lxml.html\nimport re\n\nurl = \"http://redis.io\"\noutput = \"output.txt\"\n\nf = open(output, \"w\");\n\ntree = lxml.html.parse(\"download/raw.dat\").getroot()\ncommands = tr...
python
edit
4
0
apache-2.0
81cf4bc40fd23ba8e93b0e4bc96eff8e866c014b
souravbadami/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,samskeller/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,nikhilsingh291/ze...
redis_commands/parse.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom .api import (\n EmwfOptionsView,\n CaseListFilterOptions,\n DeviceLogUsers,\n DeviceLogIds,\n MobileWorkersOptionsView,\n ReassignCaseOptions,\n)\nfrom .location import LocationGrou...
python
edit
1
0
bsd-3-clause
9ce7de86b7d9c1e9288fa5c09f97414516cabc63
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/reports/filters/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ncount = 0\nfor line in sys.stdin:\n if count == 0:\n B = int(line)\n elif count == 1:\n N = int(line)\n else:\n c, r = line.rstrip().split(' ')\n cost = int(c)\n reliability = float(...
python
edit
1
0
mit
aee157ce27aa4f00a798b87e07583dc795265eb4
scrasmussen/ProsaicOeuvre,scrasmussen/ProsaicOeuvre,scrasmussen/ProsaicOeuvre
methodAndKnottiness/reliability.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) Calico Development Team.\n# Distributed under the terms of the Modified BSD License.\n# http://calicoproject.org/\n\nfrom jupyter_kernel import Magic, option\n\nclass PythonMagic(Magic):\n env = {}\n\n def line_python(...
python
edit
1
4
bsd-3-clause
b499cf14eeb3d793a06d74c5eb2f581d49a9926e
Calysto/metakernel
jupyter_kernel/magics/python_magic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Algorithm:\n\t\"\"\"\n\tAlgorithm Class\n\n\tBase class for the page substitution algorithms.\n\t\"\"\"\n\tdef __init__(self, input = []):\n\t\t\"\"\"\n\t\tAlgorithm Constructor.\n\n\t\tParameters\n\t\t----------\n\t\tinput : list\n\t...
python
edit
1
4
mit
99a1ce2ecee6dd761113515da5c89b8c7da5537f
caiomcg/OS-PageSubstitution
Python/Algorithm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass RRDDataSource(object):\n name = \"\"\n data_source_type = \"\"\n heartbeat = \"\"\n temp_value = 0\n\n def __init__(self, name, data_source_type, heartbeat):\n self.name = name\n self.data_source_type = da...
python
edit
1
1
mit
7186faebdb22f4aacffb2e0603fe6918f6b89ee7
netgroup/OSHI-monitoring,StefanoSalsano/OSHI-monitoring,ferrarimarco/OSHI-monitoring,StefanoSalsano/OSHI-monitoring,netgroup/OSHI-monitoring,ferrarimarco/OSHI-monitoring
rrd_data_source.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\n\nclass Options(object):\n service = ''\n agent_host = ''\n agent_port = 0\n log_level = logging.ERROR\n\n def __init__(self, **kwds):\n self.__dict__.update(kwds)\n\n```\n\nApply this change: Switch ...
python
edit
1
1
mit
91825c1883d0d95c593707a1f3f9d4f85b9154f1
instana/python-sensor,instana/python-sensor
instana/options.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os, tempfile\n\npid = int(sys.argv[1])\nmytid = int(sys.argv[2])\n\n# FIXME: optionally attach GDB to each thread since GDB won't find Pintool threads by itself\n#for tid in os.listdir('/proc/%d/task' % ...
python
edit
6
0
mit
0605e11672b76aa9582ed8024006b524f90d0c79
abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper
tools/pinboost_debugme.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado import ioloop, web\nfrom jsonrpcserver import method, async_dispatch as dispatch\n\n\n@method\nasync def ping():\n return \"pong\"\n\n\nclass MainHandler(web.RequestHandler):\n async def post(self):\n request = sel...
python
edit
1
2
mit
88da3432dc0676cbe74c0d9f170fbd6f18f97f8a
bcb/jsonrpcserver
examples/tornado_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test client that connects and sends infinite data.\"\"\"\n\nimport sys\n\nfrom tulip import *\n\ndef dprint(*args):\n print('source:', *args, file=sys.stderr)\n\nclass Client(Protocol):\n\n data = b'x'*16*1024\n\n def con...
python
edit
7
2
apache-2.0
00fd8b13e36c5e7020b7769f6dcd1afecfb79fb3
Martiusweb/asyncio,manipopopo/asyncio,jashandeep-sohi/asyncio,manipopopo/asyncio,ajdavis/asyncio,1st1/asyncio,gvanrossum/asyncio,manipopopo/asyncio,1st1/asyncio,fallen/asyncio,vxgmichel/asyncio,haypo/trollius,gvanrossum/asyncio,vxgmichel/asyncio,fallen/asyncio,ajdavis/asyncio,gsb-eng/asyncio,jashandeep-sohi/asyncio,Mar...
examples/source.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom docker import Client\nimport logging\nimport os\nimport re\nimport yaml\n\nfrom ..project import Project\nfrom .docopt_command import DocoptCommand\nfrom .formatter import Formatter\nfrom .utils import cached_property\n\nlog = logging....
python
edit
1
4
apache-2.0
ff65a3e1b0f061100a20462dea4f654b02707a6f
MSakamaki/compose,alexisbellido/docker.github.io,prologic/compose,KevinGreene/compose,phiroict/docker,calou/compose,rillig/docker.github.io,docker/docker.github.io,phiroict/docker,vlajos/compose,ekristen/compose,JimGalasyn/docker.github.io,albers/compose,zhangspook/compose,charleswhchan/compose,talolard/compose,nhumric...
fig/cli/command.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom tslearn.metrics import cdist_gak\nfrom tslearn.svm import TimeSeriesSVC\n\n__author__ = 'Romain Tavenard romain.tavenard[at]univ-rennes2.fr'\n\n\ndef test_svm_gak():\n n, sz, d = 15, 10, 3\n rng = np.random....
python
edit
1
2
bsd-2-clause
d5b0234cca1bbab1a0bd20091df44380aca71ee8
rtavenar/tslearn
tslearn/tests/test_svm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Test to see if openpty works. (But don't worry if it isn't available.)\n\nimport os\nfrom test.test_support import verbose, TestFailed, TestSkipped\n\ntry:\n if verbose:\n print \"Calling os.openpty()\"\n master, slave = os.o...
python
edit
6
0
mit
036a89ce97d8160fe6b4cb10a95f3cf9e8a855ff
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_openpty.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport os.path\nimport subprocess\n\nfrom module import Module\n\nclass git(Module):\n def __init__(self, scrap):\n super(git, self).__init__(scrap)\n scrap.register_event(\"git\", \"msg\", self.distribute)\n ...
python
edit
1
3
mit
e44f4ce0db6c56309107bc7280ac4e2b41616ab2
tcoppi/scrappy,johnmiked15/scrappy,johnmiked15/scrappy,tcoppi/scrappy
modules/git/git.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nself.gauge( ... ) # Sample a gauge metric\n\nself.increment( ... ) # Increment a counter metric\n\nself.decrement( ... ) # Decrement a counter metric\n\nself.histogram( ... ) # Sample a histogram metric\n\nself.rate( ... ) # Sample a point,...
python
edit
8
0
bsd-3-clause
e731c3a4a8590f5cddd23fd2f9af265749f08a38
inokappa/documentation,macobo/documentation,macobo/documentation,jhotta/documentation,jhotta/documentation,inokappa/documentation,macobo/documentation,macobo/documentation,inokappa/documentation,jhotta/documentation,jhotta/documentation,jhotta/documentation,jhotta/documentation,inokappa/documentation,inokappa/documenta...
code_snippets/guides-agentchecks-methods.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test.runner import DiscoverRunner\nfrom django.db import connection\n\nfrom tenant_schemas.utils import get_tenant_model\n\nfrom bluebottle.test.utils import InitProjectDataMixin\n\n\nclass MultiTenantRunner(DiscoverRunner, Init...
python
edit
1
1
bsd-3-clause
ed48c19844ee4f78c897c26555bdba9977a9a6ac
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/test/test_runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICE...
python
edit
1
1
apache-2.0
4ba0b5fe7f31d4353e9c091b03df7324d1c20e88
noironetworks/heat,noironetworks/heat,openstack/heat,openstack/heat
heat/common/pluginutils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport foauth.providers\n\n\nclass Fitbit(foauth.providers.OAuth1):\n # General info about the provider\n provider_url = 'https://www.fitbit.com/'\n docs_url = 'https://dev.fitbit.com/'\n category = 'Fitness'\n\n # URLs to in...
python
edit
1
1
bsd-3-clause
78af66131240f79e43fba811cb8769b1911fa013
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
services/fitbit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom logging.handlers import TimedRotatingFileHandler\n\nclass PriestLogger:\n\n\tdef __init__(self):\n\t\tlogHandler = TimedRotatingFileHandler(\"C:\\\\lucas\\\\PriestPy\\\\Dropbox\\\\logs\\\\HowToPriest\",when=\"midnight\"...
python
edit
3
3
mit
25395cbd3536c1bc2ee1a6bc44a34ea7fc5b2a13
lgkern/PriestPy
src/priestLogger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom pygraylog.pygraylog import graylogapi\n\ndef test_get():\n api = graylogapi.GraylogAPI('http://echo.jsontest.com/one/two', \n username = 'Zack',\n password = 'Zack')\n res = api._get()\n expected =...
python
edit
1
1
apache-2.0
6da466984143d2a9176870583ca5dba8d1b9764c
zmallen/pygraylog
test/integration/test_graylogapi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom IPython.display import display\nimport json\n\n\n# Running `npm run build` will create static resources in the static\n# directory of this Python package (and create that directory if necessary).\n\n\ndef _jupyter_labextension_paths():...
python
edit
null
null
cc0-1.0
a3dd19f7825bcbc65c666dc5e45af1084c061a12
gnestor/mimerender-cookiecutter,jupyterlab/mimerender-cookiecutter,jupyterlab/mimerender-cookiecutter,gnestor/mimerender-cookiecutter
{{cookiecutter.extension_name}}/{{cookiecutter.extension_name}}/__init__.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n Unit tests for salt.utils.yamldumper\n'''\n\n# Import python libs\nfrom __future__ import absolute_import, print_function, unicode_literals\n\n# Import Salt Libs\nimport salt.utils.yamldumper\n\n# Import Sa...
python
edit
1
1
apache-2.0
20bc9544830f329c07c8f80e2f38a7fc9fdb3245
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/utils/test_yamldumper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nimport requests\nimport lxml.html\n\nfrom parliament.models import PoliticalParty\n\n\ndef create_parties():\n url = 'https://www.tweedekamer.nl/kamerleden/fracties'\n page = requests.get(url)\n tree = lxml.html.fromst...
python
edit
1
4
mit
c52e8e27d7b245722e10887dc97440481d0871f4
openkamer/openkamer,openkamer/openkamer,openkamer/openkamer,openkamer/openkamer
scraper/political_parties.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chalice.extensions import db\nfrom chalice import init_app\nfrom chalice.blog.models import Tag, Post\nfrom chalice.auth.models import User\n\nif __name__ == '__main__':\n app = init_app()\n with app.test_request_context():\n ...
python
edit
2
0
bsd-2-clause
491d2ad7cea58597e15b095b94930b6ff1dbf4d2
andrimarjonsson/chalice,andrimarjonsson/chalice
createdb.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fusionbox.fabric_helpers import *\n\nenv.roledefs = {\n 'dev': ['dev.fusionbox.com'],\n }\n\nenv.project_name = 'django-widgy'\nenv.short_name = 'widgy'\nenv.tld = ''\n\n\ndef stage_with_docs(pip=False, migrate=False, syn...
python
edit
14
1
apache-2.0
7e0ef4ba74bf2d6ea93f49d88c58378e7a1f9106
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
fabfile.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib import urlencode\nfrom urllib2 import urlopen\nfrom corehq.apps.sms.util import clean_phone_number\nfrom corehq.apps.sms.models import SQLSMSBackend\nfrom dimagi.ext.couchdbkit import *\nfrom corehq.messaging.smsbackends.tropo.f...
python
edit
2
1
bsd-3-clause
dd63394499c7c629033e76afa0196dfe48547da2
dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/messaging/smsbackends/tropo/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom oscar.apps.basket import signals\n\n\ndef track_voucher_addition(basket, voucher, **kwargs):\n voucher.num_basket_additions += 1\n voucher.save()\n\n\ndef track_voucher_removal(basket, voucher, **kwargs):\n voucher.num_basket_...
python
edit
1
1
bsd-3-clause
d7ea84800b89255137300b8e8d83b4b6abfc30b2
jmt4/django-oscar,mexeniz/django-oscar,michaelkuty/django-oscar,pasqualguerrero/django-oscar,binarydud/django-oscar,saadatqadri/django-oscar,jmt4/django-oscar,michaelkuty/django-oscar,nickpack/django-oscar,pasqualguerrero/django-oscar,okfish/django-oscar,sasha0/django-oscar,okfish/django-oscar,sasha0/django-oscar,bnprk...
src/oscar/apps/voucher/receivers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nfrom contextlib import contextmanager\nfrom typing import Any, Dict, List\n\nfrom pylama.lint import Linter as BaseLinter\n\nfrom . import api\n\n\n@contextmanager\ndef supress_stdout():\n stdout = sys.stdout\n ...
python
edit
1
2
mit
2823efda9d6ec2a14606c9e22ef8085f111d8842
PyCQA/isort,PyCQA/isort
isort/pylama_isort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.conf.urls import url\nfrom alapage.views import HomepageView, PageView, PagesmapView\n\n\nurlpatterns = []\n\nurlpatterns.append(\n url(r'^sitemap/$', PagesmapView.as_view(), name=\"alapage-map\"))\...
python
edit
1
0
mit
01cc82642273af950caedba471ed4cc9e788b615
synw/django-alapage,synw/django-alapage,synw/django-alapage
alapage/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter4, a code checking framework for Sublime Text 3\n#\n# Written by Markus Liljedahl\n# Copyright (c) 2017 Markus Liljedahl\n#\n# License: MIT\n#\n\n\"\"\"This module exports the AnsibleLint plugin cla...
python
edit
1
0
mit
691dae3963d049664605084438714b2850bd0933
mliljedahl/SublimeLinter-contrib-ansible-lint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nfrom time import time\n\n\nclass Client:\n def __init__(self, host, requests, do_requests_counter):\n self.host = host\n self.requests = requests\n self.counter = do_requests_counter\n\n\nclass Reque...
python
edit
3
3
mit
a27a525650571b6f3756edf7f0fdf82d724f22d3
BakeCode/performance-testing,BakeCode/performance-testing
performance/web.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport socket\nimport subprocess\nimport string\nimport logging\n\nlog = logging.getLogger('terminal')\n\nclass Terminal:\n def __init__(self, tty, socket):\n self.tty = tty\n self.socket = socket\n\n def __de...
python
edit
3
5
mit
84597d8b8135af36056f968d10699c206dd06942
vadimcn/vscode-lldb,vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,vadimcn/vscode-lldb,NeroProtagonist/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb
adapter/terminal.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport capture\nfrom picamera import PiCamera\nimport time\n\n\ndef image_cap_loop(camera, status=None):\n \"\"\"Set image parameters, capture image, set wait time, repeat\"\"\"\n\n resolution = (854, 480)\n camera.rotation = 90\n ...
python
edit
1
2
mit
9d6975b2a07315d7fe907ed332300409d226085c
gnfrazier/YardCam
flycam.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom mock import Mock\nimport sys\nimport os\nimport datetime\n\nfrom pytrac import Ticket\n\n\nclass TestTicket(unittest.TestCase):\n\n def setUp(self):\n server = Mock()\n self.ticket = Ticket(server)\n\n...
python
edit
4
1
apache-2.0
ac605b9efdfa0a195a4c9a76800e969098a003ae
Jimdo/pytrac,Jimdo/pytrac
test/test_ticket.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom context import models\n\nfrom models import model\n\n\nimport unittest\n\nclass test_logic_core(unittest.TestCase):\n def setUp(self):\n self.room = model.Room(20, 'new_room')\n self.room1 = model.Room(6, 'new_room1')\...
python
edit
3
1
mit
9bb1aebbfc0ca0ff893bafe99de3c32c2ba99952
georgreen/Geoogreen-Mamboleo-Dojo-Project
tests/test_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport xlrd\nimport json\nimport sys\nimport os\nimport argparse\n\ndef run(argv):\n parser = argparse.ArgumentParser()\n parser.add_argument('--size')\n parser.add_argument('--start')\n parser.add_argument('--action')\n parser.add_arg...
python
edit
1
7
mit
c6d345d01f59965155d9d912615a1eef939c32cb
arodiss/XlsBundle,arodiss/XlsBundle
Xls/Reader/excel_xlrd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\nimport pytest\nfrom simplesqlite import set_log_level, set_logger\n\n\nlogbook = pytest.importors...
python
edit
2
1
mit
083d71834e82815dd338a873090df4cda64d74f4
thombashi/SimpleSQLite,thombashi/SimpleSQLite
test/test_logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import View\n\nfrom nap.datamapper.models import ModelDataMapper\nfrom nap.rest import views\n\nfrom .models import Poll\n\n\nclass PollMapper(ModelDataMapper):\n class Meta:\n model = Poll\n field...
python
edit
3
0
bsd-3-clause
ea56607fa7ae7257682170e881c67ae5e0f6719c
MarkusH/django-nap,limbera/django-nap
tests/rest_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\r\nimport statistics\r\n\r\n\r\nclass estimatedtime:\r\n def __init__(self, numberofpoints):\r\n self.listoftimes = []\r\n self.points = numberofpoints\r\n\r\n def append(self, timeinseconds, infer...
python
edit
1
2
mit
3a414d5d4763802bc4bc506a57c1f487655d470a
DavidLutton/EngineeringProject
engineering_project/estimatedtime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport rethinkdb as r\nimport argparse\n\n\nparser = argparse.ArgumentParser(description='Set up RethinkDB locally')\nargs = parser.parse_args()\n\nconn = r.connect()\nr.db_create('muzhack').run(conn)\nr.db('muzhack'...
python
edit
1
0
mit
f253feac7a4c53bd17958b0c74adbec528ae2e17
muzhack/musitechhub,muzhack/musitechhub,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack
rethinkdb/setup-rethinkdb.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport document\nimport time\nevalstr = '''\nvar a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);\n'''\nb = document.createElement('button')\n...
python
edit
4
1
mit
48ea5605807ec9798b77317a73446f4dc335f70a
Zirientis/skulpt-canvas,Zirientis/skulpt-canvas
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#coding=utf-8\n\n#imports\nimport pystache as ps\nimport sys\nimport json\nimport imp\nviews = imp.load_source('views', 'swedish/views.py')\n#from views import Invoice\n\ndef main():\n\tconfigFile = \"invoice.json\"\n\thtmlFile = \"invoice....
python
edit
1
2
mit
7559b61aec08dbab4b01affbe017f26a85a108e6
SudoQ/yig,SudoQ/yig
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.blueprints.snippet.views\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom flask import abort, g\n\nfrom ...services.snippet impor...
python
edit
1
2
bsd-3-clause
ee130df5b48d1e4196bb9159de64e279656cdfcf
m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/blueprints/snippet/views.py
accepted
null
true