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 python3\n\nfrom glob import glob\n\nfor bl_file in glob('bad_*.txt') + glob('blacklisted_*.txt'):\n with open(bl_file, 'r') as lines:\n for lineno, line in enumerate(lines, 1):\n if line.endswith('\\r\\n'...
python
edit
1
7
apache-2.0
be0ca3d4a1759fd68f0360fb3b6fe06cdc4cf7ea
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector
test/test_blacklist_integrity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\nfrom push.models import DeviceTokenModel, NotificationModel\nfrom datetime import datetime\n\nimport push_notification\n\...
python
edit
4
2
apache-2.0
24c5497b0c91ce032fb4cf99e79fffc5fa27cb84
nnsnodnb/django-mbaas,nnsnodnb/django-mbaas,nnsnodnb/django-mbaas
push/management/commands/startbatches.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Basic scenarios, symmetric tests\"\"\"\nimport pytest\nfrom bloop import (\n BaseModel,\n Column,\n GlobalSecondaryIndex,\n Integer,\n MissingObjects,\n)\n\nfrom .models import User\n\n\ndef test_crud(engine):\n engi...
python
edit
1
1
mit
221bb27796036b348c5cf0fd06a0d57984b3591c
numberoverzero/bloop,numberoverzero/bloop
tests/integ/test_basic.py
rejected_duplicate
Near-duplicate of sample 13786
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import istest, assert_equal\nfrom lxml import etree\n\nfrom wordbridge import openxml\nfrom wordbridge.htmlgeneration import HtmlGenerator\nfrom wordbridge.html import HtmlBuilder\n\ngenerator = HtmlGenerator()\nhtml = HtmlB...
python
edit
3
1
bsd-2-clause
f364b55a643c2768f80cb559eb0ec1988aa884c8
mwilliamson/wordbridge
tests/htmlgeneration_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\n\ndef default_graph_layout_options():\n \"\"\"Default layout options for all graphs.\n \"\"\"\n return {\n 'font': {\n 'color': 'rgba(0, 0, 0, 1)...
python
edit
1
1
bsd-2-clause
6ec4307173f3eafa87fd063978914bf5816ecb0a
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
reports/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport pystache\n\n\nclass HelloWorld():\n def __init__(self):\n with open('models/hello_world.json') as config_file:\n self.config = json.load(config_file)\n self.message = self.config['message'...
python
edit
1
1
mit
f1dd26bfb449f8bba69f93cae02ab904e0a9cba0
wpkita/automation-station,wpkita/automation-station,wpkita/automation-station
tasks/hello_world.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\nimport importlib\nimport importlib._bootstrap\nimport unittest\n\n\nusing___import__ = False\n\n\ndef import_(*args, **kwargs):\n \"\"\"Delegate to allow for injecting different implementations of import.\"\"\"\n if ...
python
edit
3
2
mit
556054ecbaa265b8e734860f3393acf3bc3e840e
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/importlib/test/import_/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import jsonify, request\nfrom jsonschema.exceptions import ValidationError\n\nfrom app import api_user\nfrom app.dao import templates_dao\nfrom app.schema_validation import validate\nfrom app.v2.templates import v2_templates_blue...
python
edit
3
2
mit
c33b876c664178de92099b6553a6030789bdaaa4
alphagov/notifications-api,alphagov/notifications-api
app/v2/templates/get_templates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom django.conf import settings\nfrom django.core.exceptions import MiddlewareNotUsed\nfrom django.http import HttpResponse\n\n\n\nlog = logging.getLogger(\"tcmui.core.middleware.RequestLogMiddleware\")\n\n\n\nclass Reque...
python
edit
1
2
bsd-2-clause
44f56e0c6b53849f7cb97c595e844b706864a780
bobsilverberg/moztrap,mozilla/moztrap,shinglyu/moztrap,shinglyu/moztrap,shinglyu/moztrap,mccarrmb/moztrap,mccarrmb/moztrap,mccarrmb/moztrap,shinglyu/moztrap,mozilla/moztrap,shinglyu/moztrap,bobsilverberg/moztrap,bobsilverberg/moztrap,bobsilverberg/moztrap,mozilla/moztrap,mozilla/moztrap,mccarrmb/moztrap,mozilla/moztrap...
ui/tcmui/debug/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .victim import Victim\nfrom .target import Target\nfrom .round import Round\nfrom .sampleset import SampleSet\n\n```\n\nApply this change: Add __all__ to models init file" }, { "role": "assistant", "content": "__all__ = ['v...
python
edit
9
0
mit
6dfed291a253174672d7003700ab770aabcacae4
dimriou/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dion...
backend/breach/models/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom timeit import timeit, repeat\n\n\nresults, single_results = [], []\nfor handnr in range(1, 5):\n single_results.append(\n timeit(f'PokerStarsHandHistory(HAND{handnr})', number=100000,\n setup=\"from handhistory ...
python
edit
1
0
mit
c5e47e61a6b51da99126a9faa4064a621acf017c
pokerregion/poker
tests/handhistory/speed_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n\"\"\"\nWait\n^^^^\n\n.. moduleauthor:: Martin Poppinga <<EMAIL>>\n\nJust waits for something (i.e. that preconditions will be fullfilled)\n\"\"\"\nimport rospy\n\nfrom bitbots_body_behaviour.body.actions.go_to impor...
python
edit
1
3
bsd-3-clause
9ee87588b2d6694cafea6415af50110ba5263d3e
bit-bots/bitbots_behaviour
bitbots_body_behaviour/src/bitbots_body_behaviour/body/actions/wait.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport sys\nimport os\nimport sphinx_rtd_theme\n\nextensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinxcontrib.napoleon']\nadd_module_names = False\nsource_suffix = '.rst'\nmaster_doc = 'index'\nprojec...
python
edit
4
0
bsd-3-clause
df7c783937d90b74c9b477b100709ed04ac0133e
nuagenetworks/monolithe,little-dude/monolithe,little-dude/monolithe,nuagenetworks/monolithe,little-dude/monolithe,nuagenetworks/monolithe
monolithe/vanilla/sphinx/conf.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 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\"\"\"A module to hold linux specific action implementations.\"\"\"\n\nim...
python
edit
2
1
bsd-3-clause
3f5a6d6cbf959cccddd2cb944eb93cd8f963f4a4
PeterWangIntel/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/c...
tools/cr/cr/actions/linux.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom txircd.modbase import Mode\n\nclass SecretMode(Mode):\n\tdef listOutput(self, command, data):\n\t\tif command != \"LIST\":\n\t\t\treturn data\n\t\tcdata = data[\"cdata\"]\n\t\tif \"s\" in cdata[\"channel\"].mode and cdata[\"channel\"]....
python
edit
1
4
bsd-3-clause
c301e99bbf5b32e3c66d68f422fdfc271390adf4
Heufneutje/txircd,ElementalAlchemist/txircd,DesertBus/txircd
txircd/modules/cmode_s.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\nimport time\nimport sys\n\nfrom busybees import worker\nfrom busybees import hive\n\nimport pash\n\nclass ErrWorker(worker.Worker):\n def work(self, command):\n proc = pash.ShellProc()\n proc.run(command)\...
python
edit
4
4
bsd-3-clause
dc884cfd49133a9a25cc5ba6276b94dd44d18729
iansmcf/busybees
test/test_general.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Download the Python helper library from twilio.com/docs/python/install\nfrom twilio.rest import Client\n\n# Your Account Sid and Auth Token from twilio.com/user/account\naccount_sid = \"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\nauth_token = \...
python
edit
1
0
mit
b66d8c2d43a28ce6e0824543bd879dc3528e3509
TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets
rest/available-phone-numbers/local-basic-example-1/local-get-basic-example-1.6.x.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nimport markdown as md\nimport bleach\nimport copy\n\nregister = template.Library()\n\ndef markdown(value):\n \"\"\"convert to markdown\"\"\"\n allowed_tags = bleach.ALLOWED_TAGS + ['p', 'br', 'hr', 'h1', '...
python
edit
3
1
apache-2.0
233e5b2f48ae567f50843dc3b8b4301a21c12b71
kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2
cloud_notes/templatetags/markdown_filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom axiom import iaxiom, userbase\n\nfrom xmantissa import website, offering, provisioning\n\nimport hyperbola\n\nfrom hyperbola import hyperbola_model\nfrom hyperbola.hyperbola_theme import HyperbolaTheme\n\nhyperbolaer = provisioning.Ben...
python
edit
4
0
mit
249a49d2f174571db22860ebfffc37637cacd9be
twisted/hyperbola,twisted/hyperbola
xmantissa/plugins/hyperbolaoff.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\nimport json\nfrom unittest.mock import Mock\nfrom unittest.mock import ANY\n\nfrom queue_functions import do_work\nfrom server import handle_post\nfrom uploaders.s3 import get_url\nfrom uploaders.s3 import upload\n\ndef test...
python
edit
1
1
bsd-2-clause
3b7dcc4d2a19b5ac03eebae35600c25dd038fe33
algorithmic-music-exploration/amen-server,algorithmic-music-exploration/amen-server
tests/test_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\ndef sum_matrix(n):\n \"\"\" Returns a sum of all elements in a\n given matrix \"\"\"\n p = [sum(x) for x in n]\n print (len(p))\n return sum(p)\n\n\nif __name__ == '__main_...
python
edit
1
2
bsd-3-clause
6d118fed4df334e093840d0bcaad98a06214793b
sevgo/Programming101
week1/the_real_deal/sum_matrix.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom phaseplot import phase_portrait\nimport matplotlib\n\nclass TestBasics(unittest.TestCase):\n \"\"\"A collection of basic tests with no particular theme\"\"\"\n \n def test_retval(self):\n \"\"\"phase_po...
python
edit
5
1
mit
3b14ed7d9ec092baaf10c9f81955dda28508db35
rluce/python-phaseplot
tests/test_basics.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport bson.json_util as bju\nimport emission.core.get_database as edb\nimport argparse\nimport emission.core.wrapper.user as ecwu\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser()\n parser.add_argument(\...
python
edit
4
0
bsd-3-clause
ca8600faac6b10f5e1bda42d74208f3189efe529
shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server
bin/debug/load_timeline_for_day_and_user.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest2\n\nfrom cfn_sphere.stack_configuration import Config, StackConfig, NoConfigException\n\n\nclass ConfigTests(unittest2.TestCase):\n def test_properties_parsing(self):\n config = Config(config_dict={'region': 'eu-we...
python
edit
1
1
apache-2.0
7dacd28007097f83713b08d8b768d8ba8f6629d2
ImmobilienScout24/cfn-sphere,cfn-sphere/cfn-sphere,marco-hoyer/cfn-sphere,cfn-sphere/cfn-sphere,cfn-sphere/cfn-sphere
src/unittest/python/stack_configuration/stack_configuration_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BytecodeBase:\n def __init__(self):\n # Eventually might want to add subclassed bytecodes here\n # Though __subclasses__ works quite well\n pass\n\n def execute(self, machine):\n pass\n\n\nclass Push(...
python
edit
1
1
bsd-3-clause
435cdbda7d93287db6dcd652a79324a86becd9b8
darbaga/simple_compiler
bytecode.py
rejected_duplicate
Near-duplicate of sample 2421
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom csv import reader\nfrom sys import stdin\n\nfrom xmlrpc.client import ServerProxy\nfrom ssl import create_default_context, Purpose\n\n\n# Script to user account notes to the Shared account configuration repor...
python
edit
1
0
mit
02d971ae2533336ba0625561a70c968b9d71b936
PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples
PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py
rejected_duplicate
Near-duplicate of sample 14040
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.\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 Licen...
python
edit
1
4
apache-2.0
5c60aad725b0b98008ee467c5130931339c12d48
stackforge/python-openstacksdk,redhat-openstack/os-client-config,openstack/python-openstacksdk,dtroyer/python-openstacksdk,openstack/os-client-config,dtroyer/os-client-config,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,switch-ch/os-client-config
os_client_config/cloud_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom .cache import DummyCache\n\nclass Settings:\n ENDPOINT_URL = os.environ.get('ENDPOINT_URL', 'https://api.nasjonalturbase.no')\n LIMIT = 20\n CACHE = DummyCache()\n CACHE_LOOKUP_PERIOD = 60 * 60 * 24\n CACHE_...
python
edit
1
3
mit
f879bf6304fcd31e32b55c40462dce06ff859410
Turbasen/turbasen.py
turbasen/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport smtplib\n\n#SMTP server settings\nSMTP_SERVER = 'smtp.server.com' #e.g. smtp.gmail.com\nSMTP_PORT = 587\nSMTP_USERNAME = '<EMAIL>' #your login name, e.g. <EMAIL>\nSMTP_PASSWORD = 'yourpassword' #CAUTION: This is st...
python
edit
1
0
mit
34e78e686b967bbc6d3cc64786b5d12757210e87
rexcontrols/REXexamples,rexcontrols/REXexamples,rexcontrols/REXexamples,rexcontrols/REXexamples,rexcontrols/REXexamples,rexcontrols/REXexamples,rexcontrols/REXexamples
Function_blocks_Advanced/EPC_Email_Notification/email_notification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport requests\nimport yaml\n\n# query nvidia docker plugin for the command-line parameters to use with the\n# `docker run` command\nresponse = requests.get('http://localhost:3476/docker/cli/json')\ndocker_cli_para...
python
edit
4
0
bsd-3-clause
fbbe736b649a85cddf773548b895ccaa9ead8c67
ORNL-CEES/DataTransferKit,dalg24/DataTransferKit,amccaskey/DataTransferKit,dalg24/DataTransferKit,ORNL-CEES/DataTransferKit,Rombur/DataTransferKit,dalg24/DataTransferKit,Rombur/DataTransferKit,dalg24/DataTransferKit,amccaskey/DataTransferKit,ORNL-CEES/DataTransferKit,ORNL-CEES/DataTransferKit,Rombur/DataTransferKit,amc...
docker/nvidia/setup_nvidia_docker_compose.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. 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\n#\n# ...
python
edit
1
0
apache-2.0
1272a93f4ea5b35b9b4030d984264b7e7fb7969e
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_prometheus.db.common import DatabaseWrapperMixin\nfrom django.db.backends.mysql import base\n\n\nclass DatabaseFeatures(base.DatabaseFeatures):\n \"\"\"Our database has the exact same features as the base one.\"\"\"\n pass...
python
edit
1
1
apache-2.0
7092293a569c382dac4f2f9ac69b879ea4b500d1
korfuri/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus,obytes/django-prometheus
django_prometheus/db/backends/mysql/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport Adafruit_BBIO.UART as UART\nimport serial\n\nLOGGER = logging.getLogger(__name__)\n\ndef setup(port, baudrate):\n # Setup UART\n UART.setup(\"UART1\")\n\n ser = serial.Serial(port=port, baudrate=baudrate,\n...
python
edit
1
2
apache-2.0
3c982cd4d7742600d5785f8620d0b982d0fd741e
VDL-PRISM/dylos
sensors/dylos.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. 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\n#\n# ...
python
edit
1
0
apache-2.0
b7bdd73fdfe0036ceb0a423e3d2619a8a4a35a1f
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Profile, Skill, DutyTime, Group\n\nadmin.site.register(Profile)\nadmin.site.register(Skill)\nadmin.site.register(DutyTime)\nadmin.site.register(Group)\n\n```\n\nApply this change: Add fi...
python
edit
1
0
mit
959b5fd80a2eeb4ddb56dea07edd16c1aeabc4ff
hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website
userprofile/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass DBMutex(models.Model):\n \"\"\"\n Models a mutex lock with a ``lock_id`` and a ``creation_time``.\n\n :type lock_id: str\n :param lock_id: A unique CharField with a max length of 256\n\n ...
python
edit
1
0
mit
7a5fdf50f4a986336c577ce57ed73da1c445b6cd
ambitioninc/django-db-mutex,minervaproject/django-db-mutex
db_mutex/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n test_list_manager.py - Integration test for list management of mailchimp_manager\n\"\"\"\nfrom mailchimp_manager import MailChimpManager\nimport unittest\n\nTEST_EMAIL = u'<EMAIL>'...
python
edit
1
1
bsd-3-clause
ed68f3f8961fd9cc212c2bc7700ba758af51d335
Kudo/mailchimp_manager
mailchimp_manager/tests/test_list_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'rainforest_makers.views.home', name='home'),\n # url(r'^blog/...
python
edit
4
0
mit
4503294985c45e02e284dc3ab7dac4631856c126
bjorncooley/rainforest_makers,bjorncooley/rainforest_makers
rainforest_makers/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport author\nimport commit\nimport config\n\nimport os\nimport pygit2\nimport sqlalchemy\n\nrepo = pygit2.Repository(config.REPO_PATH)\n\n# Probably want to completly reset the DB\nif config.RESET_DB and os.path.exists(config.DB_PATH):\n ...
python
edit
1
0
mit
91c3f218bdd5a660568238daa16c217501d39d05
mglidden/git-analysis,mglidden/git-analysis
create_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\"\"\"H/t to eholtam for posting in slack\"\"\"\n\nimport json\nimport os\n\nprint(\"Personal: \")\nf = open(os.path.expanduser('~/.dropbox/info.json'), 'r').read()\ndata = json.loads(f)\nprint(data.get('personal', {}).ge...
python
edit
1
0
mit
8664741930e5a21bfbdcffe2fc0ca612b4b3e4ea
clburlison/scripts,clburlison/scripts,clburlison/scripts
clburlison_scripts/dropbox_folder_location/dropbox_folder_location.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport os\n\nimport stripe\nfrom flask import Flask, request\n\nstripe.api_key = os.environ.get('STRIPE_SECRET_KEY')\nwebhook_secret = os.environ.get('WEBHOOK_SECRET')\n\napp = Flask(__name__)\n\n\n@...
python
edit
1
3
mit
a795274811b3df67a04593b1889d9c93fed40737
stripe/stripe-python
examples/webhooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\nimport logging\n# We are assuming, that there is an already configured logger present\nlogger = logging.getLogger(__name__)\n\nclass Structure(object):\n\t\"\"\"Simple struct-like object.\n\t...
python
edit
1
4
mit
a89f2f52170ffbb238d01f58650bcb4e55f3253a
hastern/jelly
structure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 The TensorFlow 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 Licens...
python
edit
3
3
apache-2.0
28681f8b2f88f818c2b5a0197a00df90d3065aaf
tensorflow/tpu,tensorflow/tpu,tensorflow/tpu,tensorflow/tpu
models/official/detection/configs/factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import forms\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .widgets import AppHookConfigWidget\n\n\nclass AppHookConfigField(models.ForeignKey):\n\n de...
python
edit
1
1
bsd-3-clause
fedd90e80a6c56ab406e52b9b0ece14b324fa5d5
aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config
aldryn_apphooks_config/fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import absolute_import, division, print_function\n\nimport pytest\nfrom astropy import units as u\n\nfrom astrodynamics.util import verify_unit\n\n\ndef test_verify_unit():\n # Implicit dimensionless valu...
python
edit
1
1
mit
16002b001a120410e4f993ad6fb93b123de183cb
python-astrodynamics/astrodynamics,python-astrodynamics/astrodynamics
astrodynamics/tests/test_util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\n\nexceptions.py\n\nLicensed under a 3-clause BSD license.\n\nRevision history:\n 13 Feb 2016 J. Sánchez-Gallego\n Initial version\n\n\"\"\"\n\nfrom __future__ import division\nfrom _...
python
edit
1
2
bsd-3-clause
4932279ce1b43162c8c37cabd4e62e0620f4e3ce
albireox/marvin,bretthandrews/marvin,albireox/marvin,sdss/marvin,albireox/marvin,sdss/marvin,sdss/marvin,albireox/marvin,bretthandrews/marvin,bretthandrews/marvin,bretthandrews/marvin,sdss/marvin
python/marvin/core/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django_polymorphic_auth.models import User\nfrom django_polymorphic_auth.usertypes.email.models import EmailUser\nfrom django_polymorphic_auth.usertypes.username.model...
python
edit
1
3
mit
5d57c43ba7a01dc0f94ab41e4014484d1b78c1cb
whembed197923/django-polymorphic-auth,ixc/django-polymorphic-auth
django_polymorphic_auth/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nThis script will create a presigned url and fields for POSTING to an s3 bucket. This allows someone without permissions\non the bucket to upload a file.\n\nThis script must be run by an entity with the right p...
python
edit
1
1
mit
e8fb50e265d62086fa2501f55e7763e49b775440
alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws
scripts/generate-s3-post-url-data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mopidy import settings\nfrom mopidy.frontends.mpd.protocol import handle_pattern\nfrom mopidy.frontends.mpd.exceptions import MpdPasswordError\n\n@handle_pattern(r'^close$')\ndef close(context):\n \"\"\"\n *musicpd.org, connectio...
python
edit
1
2
apache-2.0
4db9c0139b42cdaf7c22ac2032b5edfec9394ce4
dbrgn/mopidy,diandiankan/mopidy,rawdlite/mopidy,adamcik/mopidy,vrs01/mopidy,tkem/mopidy,ali/mopidy,ZenithDK/mopidy,vrs01/mopidy,pacificIT/mopidy,hkariti/mopidy,kingosticks/mopidy,bacontext/mopidy,glogiotatidis/mopidy,jodal/mopidy,kingosticks/mopidy,swak/mopidy,quartz55/mopidy,quartz55/mopidy,mopidy/mopidy,swak/mopidy,Z...
mopidy/frontends/mpd/protocol/connection.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pandas as pd\nimport sys\n\n\ndf = pd.read_csv(sys.argv[1])\ndf.columns = [c.lower() for c in df.columns]\n\nfrom sqlalchemy import create_engine\nengine = create_engine('postgresql://postgresql.service.consul:5432/germline_genotype_...
python
edit
3
0
mit
be093e7df91ca68e4e9c73e37d18042cc5029b87
llevar/germline-regenotyper,llevar/germline-regenotyper
bootstrap/conf/salt/state/run-tracking-db/scripts/import_sample_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport utu\nimport unittest\n\ndef run_test(test):\n runner = unittest.runner.TextTestRunner()\n loader = unittest.loader.defaultTestLoader\n test = loader.loadTestsFromTestCase(test)\n runner.run(test)\n\nclass UtuTest(unittest...
python
edit
1
1
bsd-2-clause
bcf7d7eb689ec4e926a659bce3bf8301c23bd7e0
p/utu
test/utu_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, absolute_import\n\nfrom django.contrib.auth.models import AbstractUser\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.utils.encoding...
python
edit
1
1
mit
998da5c8d68dff5ad612847a2d16fb6464e30bc2
Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform
semillas_backend/users/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\ndef newman_media(request):\n \"\"\"\n Inject NEWMAN_MEDIA_URL to template. Use NEWMAN_MEDIA_PREFIX value from\n settings, if not available, use MEDIA_URL + 'newman_media/' combination\n \"\"\"...
python
edit
1
2
bsd-3-clause
6194e5b9cb1a07f96e1844155863fe622f11bb91
WhiskeyMedia/ella,petrlosa/ella,whalerock/ella,MichalMaM/ella,whalerock/ella,ella/ella,whalerock/ella,petrlosa/ella,MichalMaM/ella,WhiskeyMedia/ella
ella/newman/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n }\n}\n\nMODELTREES = {\n 'default': {\n 'model': 'tests.Employee'\n }\n}\n\nINSTALLED_APPS = (\n 'avocado',\n 'avocado.meta',\n 'avo...
python
edit
1
0
bsd-2-clause
f313c9c476f6ae441f65567552ed835e96c62cb3
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
avocado/tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom hoomd.triggers import Trigger\nfrom hoomd.meta import _Operation, _TriggeredOperation\n\n\nclass DummySimulation:\n def __init__(self):\n self.state = DummyState()\n self.operations = DummyOperations()\n self._c...
python
edit
1
1
bsd-3-clause
e71f23f0bef4307831b240ee162bd9e2cf84e212
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
hoomd/pytest/dummy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Methods for converting data between systems or formats.\"\"\"\n\n\ndef make_cm_url(url):\n \"\"\"Turns a Geokey url into a Community Maps url.\"\"\"\n protocol, address = url.split('//')\n address_parts = address.split('/')\n...
python
edit
1
6
mit
c5ae3a8708023039b877a47bcfedec6997ec1583
ExCiteS/geokey-wegovnow,ExCiteS/geokey-wegovnow
geokey_wegovnow/conversions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.country.service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nfrom __future__ import annotations\nimport codecs\nfro...
python
edit
1
2
bsd-3-clause
7f53f8da79a41591498b73356770ff1cf417adf4
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/services/country/service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" This package contains native Python implementations of several `The NURBS Book <http://www.springer.com/gp/book/9783642973857>`_ algorithms for generating B-spline / NURBS curves and surfaces. It also provides a data structure for st...
python
edit
1
0
mit
51b362ab66ed8a1a793dc9995a6f06067230085b
orbingol/NURBS-Python,orbingol/NURBS-Python
geomdl/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport jinja2\nimport os\nimport types\nimport yaml\n\nfrom debug.debug import dprint\n\ndef load_templates(template_dir=os.path.join(os.getcwd(), 'template')):\n loader = jinja2.FileSystemLoader(template_dir)\n envir...
python
edit
1
1
mit
4f183ee9c24814cdb136f39effb9d932058650d5
sjbarag/poorly-named-resume-generator,sjbarag/poorly-named-resume-generator
generate_resume.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nimport sys, os\n\nmyPath = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(myPath + \"/../src/\")\nfrom app import create_app\n\n\n@pytest.fixture(scope=\"function\", autouse=True)\ndef app():\n return create...
python
edit
1
1
apache-2.0
62549a211ff41e2b84a9b085e784649efc76c5d9
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
apps/domain/tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2008 Paul Hodge\n\nimport os, string\n\ndef run(functionsDirectory, outputFilename):\n\n print \"dir is: \" +functionsDirectory\n\n files = os.listdir(functionsDirectory)\n functionNames = []\n for file in files:\n ...
python
edit
2
3
mit
3d98b426b3eb9b1ddc42e4726f7b0c99c2e488e3
andyfischer/circa,andyfischer/circa,andyfischer/circa,andyfischer/circa
scripts/generate_setup_builtin_functions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .job import Job\nfrom .utils import get_backend\n\nfrom . import app_settings\n\nclass task(object):\n def __init__(self, queue='default'):\n self.queue = queue\n\n app_settings.WORKERS.setdefault(self.queue, 1)\n\n ...
python
edit
1
1
bsd-3-clause
b9e2ee470308231f4ea4d23297f7b07fab711dba
lamby/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,thread/django-lightweight-queue,prophile/django-lightweight-queue
django_lightweight_queue/task.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lettuce import *\nimport requests\nimport json\n\n\ntenantList = [ \"511\", \"615\", \"634\", \"515\" ]\n\ndef initialize():\n with open(\"properties.json\") as config_file:\n world.config = json.load(config_file)\n\n@before.each_s...
python
edit
7
2
apache-2.0
6b49db80a4508c3cba7f410db8ed3f23b5234e3b
telefonicaid/fiware-keypass,telefonicaid/fiware-keypass,telefonicaid/fiware-keypass
src/behavior/features/terrain.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.auth.models import User\n\nfrom ...models import (\n Transcript, TranscriptPhraseVote\n)\nfrom ...tasks import update_transcript_stats\n\n\nclass C...
python
edit
1
3
mit
166c002f9129c9c244532f8d490b55a884c6708b
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py
rejected_duplicate
Near-duplicate of sample 4893
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nimport shutil\n\nsql = \"\"\"\n-- Remove empty values from the milestone list\nDELETE FROM milestone WHERE COALESCE(name,'')='';\n\n-- Add a description column to the version table, and remove unnamed versions\nCREATE TEMP T...
python
edit
1
4
bsd-3-clause
3d813e9960a44bfacd94551b95caf489b85ea3bb
exocad/exotrac,dafrito/trac-mirror,dokipen/trac,dokipen/trac,dokipen/trac,exocad/exotrac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,moreati/trac-gitsvn,dafrito/trac-mirror,exocad/exotrac,moreati/trac-gitsvn,dafrito/trac-mirror,moreati/trac-gitsvn
trac/upgrades/db11.py
rejected_duplicate
Near-duplicate of sample 16516
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# based on https://www.raspberrypi.org/learning/sense-hat-marble-maze/worksheet/\n\nfrom sense_hat import SenseHat\nimport time\n\nsense = SenseHat()\nsense.clear()\n\ntime.sleep(0.5)\n\nr = (255, 0, 0 )\nb = (0,0,0)\n\nmaze = [[r,r,r,r,r,r...
python
edit
1
0
mit
1b0fbe54406f22017bd5f40cee52333f31807272
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
hardware/sense_hat/marble_maze.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport fnmatch\nimport re\nimport subprocess\nimport sys\nimport json\nimport imp\nimport time\n\nclass pipeline(object):\n def __init__(self):\n self.name = ''\n self.taskId = ''\n self.taskPath = ''\n ...
python
edit
9
3
mit
a8515cf56837ef3f32ea53003f88275a47c4d249
s4553711/HiScript
src/pipeline.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django import forms\nfrom django.contrib.auth.models import Group\n\nfrom osf.models import AdminProfile\n\n\nclass LoginForm(forms.Form):\n email = forms.CharField(label=u'Email', required=...
python
edit
1
0
apache-2.0
b89b6a3d609c29ed544e2ab6b0995932b475ef96
Johnetordoff/osf.io,adlius/osf.io,adlius/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,erinspace/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,pattisdr/osf.io,mfraezz/osf.io,baylee-d/osf.io,cslzchen/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,cslzchen/osf.io,mattclark/os...
admin/common_auth/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cement.core.foundation import CementApp\nimport command\nimport util.config\n\nutil.config.Configuration()\n\n\nclass Manager(CementApp):\n class Meta:\n label = 'QLDS-Manager'\n handlers = [\n command.defau...
python
edit
3
0
mit
133a085f40f1536d5ebb26e912d15fa3bddcc82c
rzeka/QLDS-Manager
manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ckan.lib.navl.validators import ignore_empty, not_empty\nfrom ckan.logic.validators import (\n name_validator, boolean_validator, is_positive_integer, isodate,\n group_id_exists)\n\n\ndef default_inventory_entry_schema():\n sc...
python
edit
6
1
apache-2.0
20d355c52a73e38ae421aa3e4227c2c60d6ae2ff
govro/ckanext-inventory,govro/ckanext-inventory,govro/ckanext-inventory,govro/ckanext-inventory
ckanext/inventory/logic/schema.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom foreman import define_parameter\n\nfrom templates import pods\n\n\n(define_parameter('image-version')\n .with_doc('HAProxy image version.')\n .with_default('1.8.9'))\n\n\n@pods.app_specifier\ndef haproxy_app(_):\n return pods.App(\n...
python
edit
1
1
mit
505e6ee2643dc9179565db5aad9bdddaea849b86
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
shipyard/rules/third-party/haproxy/build.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom datetime import datetime, timedelta\n\nfrom changes.config import queue\nfrom changes.constants import Status\nfrom changes.models import Task\nfrom changes.queue.task import TrackedTask, track...
python
edit
1
3
apache-2.0
86cd447a9d724489ed3c23157d411fa4a9208b30
wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes
changes/jobs/cleanup_tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\nfrom .models import Document\n\n\ndef documents(request):\n docs = Document.objects.all().order_by(\"title\")\n return render(request, 'home.html', {'documents': docs})\n\n```\n\nApply this chang...
python
edit
1
1
mit
3c60fd42d7ce84b0f90d80d6e04b46c8affb5ff5
n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb
maedchenbund/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom django_tablib import ModelDataset, Field\n\nfrom .models import TestModel\n\n\nclass DjangoTablibTestCase(TestCase):\n def test_declarative_fields(self):\n class TestModelDataset(ModelDatas...
python
edit
1
1
mit
c42393a99435278f577b508e204bdfe1a9a6ff68
ebrelsford/django-tablib,joshourisman/django-tablib,ebrelsford/django-tablib,joshourisman/django-tablib
testproject/tablib_test/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\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/LICENSE...
python
edit
1
1
apache-2.0
5bbef2ebbe959dd2dcfc53272305fa249acfa17d
dtroyer/python-openstackclient,openstack/python-openstackclient,redhat-openstack/python-openstackclient,redhat-openstack/python-openstackclient,BjoernT/python-openstackclient,BjoernT/python-openstackclient,openstack/python-openstackclient,dtroyer/python-openstackclient
functional/tests/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n #\n # Copyright 2004 Apache Software Foundation \n # \n # Licensed under the Apache License, Version 2.0 (the \"License\"); you\n # may not use this file except in compliance with the License. You\n # may obtain a copy of the License at\n...
python
edit
6
0
apache-2.0
e68dcc13d6152b15f2b7c5c151e03437d9cda314
Distrotech/mod_python,Distrotech/mod_python,Distrotech/mod_python
lib/python/mod_python/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport sys, os\nsys.path.insert(0, os.path.abspath('./python-tastypie-client'))\n\nimport tastypie_client\n\nurl_root = \"http://vorol-dev.cdlib.org/\"\npath_collection_registry = \"collection_registry/api/v1\"\nurl_api = ur...
python
edit
7
0
bsd-3-clause
37f6d1a693134785dbfb2cb50b4b6e562be83f1e
mredar/ucldc_collection_registry_client
collection_registry_client.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom azure.storage import *\n\n\ndef store(image, entity, entity_id):\n blob_service = BlobService(account_name='shnergledata',\n account_key=os.environ['BLOB_KEY'])\n myblob = image.read()\n...
python
edit
1
1
mit
ce889047cd06714c1da86daf787583e84a59956a
shnergle/ShnergleServer
api/azure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2018 Siphon Contributors.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"\nNDBC Buoy Data Request (of any type)\n====================================\n\nThe NDBC k...
python
edit
1
0
bsd-3-clause
230d7745f2f1bbc5099e1288ab482c92262e4126
Unidata/siphon
examples/ndbc/buoy_type_request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom .base import BaseWrapper\nfrom .database import Database\nfrom ..constants import URL_BASE\n\nclass Account(BaseWrapper):\n \"\"\"An object encapsulating a billing account on Luminoso's servers\"\"\"\n def __init__(self, acct_n...
python
edit
1
2
mit
9ce2faa950086f95f5a9c1f3e4f22e0a52622d8f
LuminosoInsight/luminoso-api-client-python
luminoso_api/wrappers/account.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n# ui.View subclass for the top ten iTunes songs.\n# Pull requests gladly accepted.\n\nimport feedparser, requests, ui\n\nurl = 'https://itunes.apple.com/us/rss/topsongs/limit=10/xml'\n\ndef get_image_urls(itunes_url):\n ...
python
edit
1
2
apache-2.0
de6a32e4b9a94103c923188894da6455ca14956c
cclauss/Pythonista_ui
TopTenView.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import date\nfrom django.core.urlresolvers import reverse\nfrom django.contrib.staticfiles.testing import StaticLiveServerTestCase\nfrom django.utils import formats\nfrom selenium import webdriver\n\n\nclass HomeNewVisitorTest...
python
edit
4
1
mit
c24dc7db961b03c947a98454fc3e8655c5f938ff
iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert,iAmMrinal0/django_moviealert
functional_tests/test_all_users.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. import acq_stats\n\n\ndef test_calc_stats():\n acq_stats.calc_stats(17210)\n\n```\n\nApply this change: Add a test that makes a new acq stats database" }, { "role": "assistant", "content": "import tempfile\nimport os\...
python
edit
1
1
bsd-3-clause
ceeb64c9e46a74f95178be88566fba3d7f080fa1
sot/mica,sot/mica
mica/stats/tests/test_acq_stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.conf import settings\n\nfrom mptt.forms import MPTTAdminForm\n\nfrom .models import Page\n\n\nTEMPLATE_CHOICES = getattr(settings, 'PAGE_TEMPLATES', (\n ('', 'Default'),\n))\n\n\nclass PageAdminForm(...
python
edit
1
0
bsd-3-clause
8898f23a429112cd80e6a2c8321b0de44aeaee7e
blancltd/blanc-basic-pages
blanc_basic_pages/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement\n\n\nclass BallClose(AbstractDecisionElement):\n def __init__(self, blackboard, dsd, parameters=None):\n super(BallClose, self).__init__(blackboar...
python
edit
1
3
bsd-3-clause
408297aed41966b22d8486c559716b33bc2e2984
bit-bots/bitbots_behaviour
bitbots_body_behavior/src/bitbots_body_behavior/decisions/ball_close.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom interruptingcow import timeout\nimport time\n\nwhile True:\n # simulate waiting for laser A\n print(\"Waiting for laser A\")\n time.sleep(2)\n print(\"laser A tripped\")\n try:\n with timeout(.25, exception=Runtim...
python
edit
2
0
apache-2.0
dd0d047829e65e613e4d2e9ccd9a6411fa9e301f
pjcoleman73/UVaLibRoomCount
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Functions to call the api and test it \"\"\"\n\nimport sys\nimport fenix\n\napi = fenix.FenixAPISingleton()\nprint('Testing Fenix API SDK Python')\nauth_url = api.get_authentication_url()\nprint(auth_url)\napi.set_code(sys.argv[1])\n...
python
edit
1
0
mit
8c8307ff5313b1f6c69d976853f763daf2aece0c
samfcmc/fenixedu-python-sdk
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport snmpy\n\nclass log_processor(snmpy.plugin):\n def create(self):\n for k, v in sorted(self.conf['objects'].items()):\n extra = {\n 'count': re.compile(v['count']),\n 'reset...
python
edit
1
11
mit
7aa68e0f7c553a964725ddf63c8de44eff3b3f10
mk23/snmpy,mk23/snmpy
lib/log_processor.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Code to load project paths\n#\n\nimport os, sys\n\nMR_BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), \"/Users/dmhembere44/MR-connectome\" ))\nMR_CMAPPER_PATH = os.path.join(MR_BASE_PATH, \"cmapper\" )\nMR_MRCAP_PAT...
python
edit
1
0
apache-2.0
c4d64672c8c72ca928b354e9cfd35a7d40dbb78f
neurodata/ndmg
MROCPdjangoForm/ocpipeline/mrpaths.py
rejected_duplicate
Near-duplicate of sample 2001
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kombu import Connection, Exchange, Queue\nfrom flask import Flask\nimport os\n\napp = Flask(__name__)\napp.config.from_object(os.environ.get('SETTINGS'))\n\n@app.route(\"/getnextqueuemessage\")\n#Gets the next message from target queue...
python
edit
1
3
mit
905e9e7744d8d5d84978a913b2e641a9c4337912
LandRegistry/register-publisher,LandRegistry/register-publisher
Do_not_deploy/query_outgoing_queue.py
rejected_duplicate
Near-duplicate of sample 3274
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass SiteUser(models.Model):\n def __str__(self):\n return self.user.username\n # Using a OneToOneField so we can add the extra 'company' parameter to the us...
python
edit
1
1
mit
af5ff98f150158e4f2e0bd2281229a6248a8fb52
mgerst/cdc2-2015-www,ISEAGE-ISU/cdc2-2015-www,mg1065/cdc2-2015-www,mgerst/cdc2-2015-www,keaneokelley/Crippling-Debt-Corporation,keaneokelley/Crippling-Debt-Corporation,ISEAGE-ISU/cdc2-2015-www,mg1065/cdc2-2015-www
cdc/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\n\nclass OratioIgnoreParser():\n def __init__(self):\n self.ignored_paths = [\"oratiomodule.tar.gz\"]\n\n def load(self, oratio_ignore_path):\n with open(oratio_ignore_path, \"r\") as f:\n ...
python
edit
1
5
mit
23501afd09b13d1e5f33bdd60614fd9ac7210108
oratio-io/oratio-cli,oratio-io/oratio-cli
oratioignoreparser.py
rejected_duplicate
Near-duplicate of sample 15284
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom viridis import tree\nfrom six.moves import range\n\ndef test_split():\n t = tree.Ultrametric(list(range(6)))\n t.merge(0, 1, 0.1)\n t.merge(6, 2, 0.2)\n t.merge(3, 4, 0.3)\n t.merge(8, 5, 0.4)\n t.merge(7, 8, 0.5)\n ...
python
edit
1
1
mit
e3c660cc4b5e72af3f6155c2426555247a4699b5
jni/viridis
tests/test_ultrametric.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.words.protocols import irc\nfrom txircd.modbase import Mode\n\nclass TopiclockMode(Mode):\n\tdef checkPermission(self, user, cmd, data):\n\t\tif cmd != \"TOPIC\":\n\t\t\treturn data\n\t\tif \"topic\" not in data:\n\t\t\treturn ...
python
edit
1
5
bsd-3-clause
782a4b028c45d3cc37e6679ccc3d482f0518b4b7
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
txircd/modules/cmode_t.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom molly.apps.search.providers import BaseSearchProvider\n\nfrom molly.conf import applications\n\nlogger = logging.getLogger('molly.providers.apps.search.application_search')\n\nclass ApplicationSearchProvider(BaseSearc...
python
edit
3
6
apache-2.0
d3d9d5a7f23bfd95ecfb6c9609c2c0d4be503ae7
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
branches/extracting_oxford/molly/molly/providers/apps/search/application_search.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport h5py\nimport numpy as np\n\nref = h5py.File(\n os.path.expanduser(\n \"~/tensorflow_datasets/downloads/extracted/TAR_GZ.datasets.lids.mit.edu_fastdept_nyudepthBjtXYu6zBBYUv0ByLqXPgFy4ygUuVvPRxjz9Ip5_97M.tar.gz/...
python
edit
1
0
apache-2.0
874ed1f0d97794b56907cffef047d178696591a4
tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets
tensorflow_datasets/testing/nyu_depth_v2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ndef split(string, splitters):\n\tfinal = [string]\n\tfor x in splitters:\n\t\tfor i,s in enumerate(final):\n\t\t\tif x in s and x != s:\n\t\t\t\tleft, right = s.split(x, 1)\n\t\t\t\tfinal[i] = left\n\t\t\t\tfinal.insert(i + 1,...
python
edit
1
0
bsd-3-clause
efa5156a15d2fd945c406792065b3386aa61107e
paulkramme/btsoot
package_deb_replace_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\ndata = '../data/fm_train_real.dat'\nparameter_list = [[data, 20]]\n\ndef converter_stochasticproximityembedding (data_fname, k):\n\ttry:\n\t\tfrom shogun import RealFeatures,StochasticProximityEmbedding, SPE_GLOBAL, S...
python
edit
1
2
bsd-3-clause
8b6eee19707a981fddfa2114be3d90353e049b33
karlnapf/shogun,lisitsyn/shogun,karlnapf/shogun,geektoni/shogun,geektoni/shogun,besser82/shogun,sorig/shogun,sorig/shogun,lisitsyn/shogun,besser82/shogun,lambday/shogun,geektoni/shogun,sorig/shogun,lambday/shogun,lambday/shogun,lambday/shogun,besser82/shogun,geektoni/shogun,lisitsyn/shogun,lisitsyn/shogun,geektoni/shog...
examples/undocumented/python/converter_stochasticproximityembedding.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport RPi.GPIO as GPIO\n\nLED_PIN = 23\nSWITCH_PIN = 24\n\n# new style class\nclass PiThing(object):\n \"\"\"Raspberry Pi Internet 'Thing'.\"\"\"\n \n def __init__(self):\n # use BCM numbering schem...
python
edit
1
1
mit
b7d5767df23aa9b0dcc5c32d83387a622bf9e9e0
beepscore/pi_thing,beepscore/pi_thing,beepscore/pi_thing
webapp/thing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import *\n\n\nclass MessageAdmin(admin.ModelAdmin):\n list_display = ('to_phone_number', 'from_phone_number', 'status', 'date_sent')\n list_display_links = list_display\n list_filter =...
python
edit
5
0
bsd-3-clause
df52bf506fdb6754d51c2320108bcd832a0dfc02
cfc603/django-twilio-sms-models
django_twilio_sms/admin.py
rejected_lint
Too many lint violations: 5
true