messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom multiprocessing import process\n\n\nclass Actor(process.BaseProcess):\n def __init__(self):\n super(Actor, self).__init__()\n self._inbox = list()\n\n def send(self, value):\n self._inbox.append(value)\n\n ...
python
edit
1
1
mit
a48eb39dacba67b4c8638664c9df717837099c05
f1sty/genthreads
genthreads/actor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\nimport pytest\n\nfrom chatexchange.browser import SEChatBrowser, LoginError\n\nimport live_testing\n\n\nif live_testing.enabled:\n def test_openid_login():\n \"\"\"\n Tests login to the Stack Exchange OpenID ...
python
edit
1
1
apache-2.0
733404ba2eb7218bb4d253cd74fe88107ff75afc
ByteCommander/ChatExchange6,hichris1234/ChatExchange,Charcoal-SE/ChatExchange,hichris1234/ChatExchange,ByteCommander/ChatExchange6,Charcoal-SE/ChatExchange
test/test_live_openid_login.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport cherrypy\nfrom flask import Flask\n\napp = Flask(__name__)\n\n@app.route('/')\ndef hello():\n return 'Hello World!'\n\ndef run_server():\n cherrypy.tree.graft(app, '/')\n\n cherrypy.config.update({\n 'engin...
python
edit
1
1
mit
028903036ac4bd3bf4a7b91ceda43a6c450f7e20
pimterry/pipeline-notifier
pipeline_notifier/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf8\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ]\n\n operations = [\n migrations.CreateModel(\n name='Email',\n fields=[\n ...
python
edit
1
0
mit
d9f20935f6a0d5bf4e2c1dd1a3c5b41167f8518b
treyhunner/django-email-log,treyhunner/django-email-log
email_log/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Touhou Community Reliant Automatic Patcher\n# Scripts\n#\n# ----\n#\n\"\"\"Utility functions shared among all the scripts.\"\"\"\n\nimport json\nimport os\n\njson_dump_params = {\n 'ensure_ascii': False,\n ...
python
edit
1
2
unlicense
c11fd9f792afb71e01224f149121bc13a6a9bed8
thpatch/thcrap,thpatch/thcrap,VBChunguk/thcrap,thpatch/thcrap,VBChunguk/thcrap,thpatch/thcrap,thpatch/thcrap,VBChunguk/thcrap
scripts/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nClass Mixins.\n\"\"\"\nfrom django.db import IntegrityError\nfrom django.http import Http404\n\n\nclass MultipleIDMixin(object):\n \"\"\"\n Override get_queryset for multiple id support\n \"\"\"\n def get_queryset(self):...
python
edit
1
5
mit
1fa22ca68394d4ce55a4e10aa7c23f7bcfa02f79
ZeroCater/zc_common,ZeroCater/zc_common
zc_common/remote_resource/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy.dialects import postgresql as pg\nfrom sqlalchemy.sql import func\nfrom sqlalchemy.sql.expression import text\n\nfrom warehouse import db\nfrom warehouse.database.schema import TableDDL\n\n\nclass UUIDPrimaryKeyMixin(object)...
python
edit
1
0
bsd-2-clause
3d3809931b5683b69e57507320b6d78df102f8d1
davidfischer/warehouse
warehouse/database/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render, redirect\nfrom django.http import Http404\nfrom .models import Link, LinkForm\nfrom urlparse import urlparse\n\ndef catchall(request, id):\n try:\n link = Link.objects.get(id=id)\n return re...
python
edit
1
3
mit
099892e56f02c683879d05625b1215212fda7c9e
kudos/min.ie,kudos/min.ie
links/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom indra.sources import eidos\nfrom indra.sources.hume.make_hume_tsv import make_file as mht\nfrom indra.sources.sofia.make_sofia_tsv import make_file as mst\nfrom indra.java_vm import autoclass\n\neidos_package = 'org.clulab....
python
edit
3
0
bsd-2-clause
cf13e81d2e41608bfc8e22d9e1f669382a5bdfc6
sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/indra
indra/preassembler/make_wm_ontmap.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCopyright [2009-2014] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License ...
python
edit
2
0
apache-2.0
6d8e535a56ee2f05f051d101ee5f3903176f19fe
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
rnacentral/rnacentral/local_settings_default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport logging\n\n\nclass Production(object):\n DEBUG = False\n TESTING = False\n SECRET_KEY = '##CHANGEME##'\n SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa'\n SQLALCHEMY_ECH...
python
edit
1
0
mit
3963037eb008d077e439029a33b60516cde399c6
jaapverloop/massa
massa/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for execute commands function\"\"\"\nimport os\nimport subprocess\n\nimport pytest\n\nfrom scout.server.extensions.loqus_extension import execute_command\n\nTRAVIS = os.getenv(\"TRAVIS\")\nGITHUB = os.getenv(\"GITHUB\")\n\n\ndef...
python
edit
1
1
bsd-3-clause
dd336c7555390d2713ef896f49ba27dbadc80a14
Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout
tests/server/extensions/test_execute_command.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef merge_data_by_id(data):\n result = {}\n for datum in data:\n id = datum[\"id\"]\n item = result.get(id, {})\n item.update(datum)\n result[id] = item\n return result.values()\n\n\ndef map_data(klass, ...
python
edit
null
null
mit
be8344c2f796ecab60669630f4729c4ffa41c83b
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/v1/views/utils.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
python
edit
1
4
bsd-3-clause
5a09c6e9545373cece95f87ed28579f05959fced
Hasimir/cryptography,skeuomorf/cryptography,skeuomorf/cryptography,dstufft/cryptography,bwhmather/cryptography,skeuomorf/cryptography,Lukasa/cryptography,bwhmather/cryptography,Hasimir/cryptography,kimvais/cryptography,sholsapp/cryptography,Ayrx/cryptography,Hasimir/cryptography,sholsapp/cryptography,dstufft/cryptograp...
tests/skip_check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom datetime import datetime, timedelta\n\nfrom django.utils.deprecation import MiddlewareMixin\nfrom corehq.apps.domain.project_access.models import Superuse...
python
edit
1
7
bsd-3-clause
bb32f2327d2e3aa386fffd2fd320a7af7b03ce95
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/domain/project_access/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Kiosk():\n def __init__(self, visit_cost, location):\n self.visit_cost = visit_cost\n self.location = location\n print 'initializing Kiosk'\n\n #patient shold be Person\n def visit(self, patient):\n ...
python
edit
4
5
bsd-3-clause
80529d5032b6728adcaad426310c30b5e6366ad4
rkawauchi/IHK,rkawauchi/IHK
solution.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass AMQPMixin(object):\n\n amqp_setup = False\n\n def setupAMQP(self, config):\n if not self.amqp_setup:\n # Create AMQP Connection\n # AMQP connection parameters\n self.amqp_host = config[\"a...
python
edit
1
2
mit
4dbd402879a626d7fb1d6fe5108695d1eeb32c42
hiidef/hiispider,hiidef/hiispider
hiispider/servers/mixins/amqp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\nimport sys\n\nfrom django.apps import apps\nfrom django.core.management.base import BaseCommand\n\nfrom webapp_health_monitor.verification_suit import VerificationSuit\n\n\nclass Command(BaseCommand):\n SUBMODULE_NAME =...
python
edit
1
4
mit
967240f95edb300d731f24cfb259a1fe4f3bdae5
pozytywnie/webapp-health-monitor
webapp_health_monitor/management/commands/verify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes\nfrom bottle import post, request, redirect, mako_view as view\n\n@post(\"/post-tag\")\n@view(\"post-tag\")\nde...
python
edit
1
10
mit
58be36ca646c4bb7fd4263a592cf3a240fbca64f
drougge/wwwwellpapp,drougge/wwwwellpapp,drougge/wwwwellpapp
post_tag.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 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
5
0
apache-2.0
ea96ed757e3709fbf8a7c12640e40ed3392d90fb
DavidNorman/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,davidzchen/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,ten...
tensorflow/python/keras/preprocessing/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\nimport os\n\nLOCAL_OSMOSIS = 'localhost:1010'\nOFFICIAL_OSMOSIS = None\nOFFICIAL_BUILD = False\nWITH_OFFICIAL_OBJECT_STORE = True\nCLEAN = False\n\n\ndef load(filename):\n with open(filename) as f:\n data = yaml.load(...
python
edit
1
8
apache-2.0
f1cabc889dd93e26295501097ac9cbf90890a1cd
Stratoscale/solvent,Stratoscale/solvent
solvent/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lxml import etree\nfrom app import formatting\n\n\ndef get_namespace_from_top(fn, key='xmlns'):\n ac, el = next(etree.iterparse(fn))\n return {'xmlns': el.nsmap[key]}\n\n\ndef generate_tags_multiple_files(input_files, tag, ignore...
python
edit
1
6
mit
16b21e6e3ddf0e26cb1412bffbe2be4acca1deb6
glormph/msstitch
app/readers/basereader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport logging\nimport sys\n\nfrom pre_commit import color\n\n\nLOG_LEVEL_COLORS = {\n 'DEBUG': '',\n 'INFO': '',\n 'WARNING': color.YELLOW,\n 'ERROR': color.RED,\n}\n\n\nclass LoggingH...
python
edit
1
1
mit
5961a8e5f163d35f093e66a649917c7f36201d0a
philipgian/pre-commit,philipgian/pre-commit,pre-commit/pre-commit,pre-commit/pre-commit,pre-commit/pre-commit,Lucas-C/pre-commit,philipgian/pre-commit,Lucas-C/pre-commit,Lucas-C/pre-commit,Lucas-C/pre-commit,philipgian/pre-commit,pre-commit/pre-commit,pre-commit/pre-commit,pre-commit/pre-commit,pre-commit/pre-commit,pr...
pre_commit/logging_handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''module for unit test and task for CI'''\nimport sys\nimport unittest\n\nfrom yatest import testpost, testpage, testutility, testconfig\n\nif __name__ == '__main__':\n all_test_suites = []\n all_test_suites....
python
edit
1
0
mit
056bb4adada68d96f127a7610289d874ebe0cf1b
boluny/cray,boluny/cray
cray_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re as regex\nfrom django.conf.urls import patterns, url\n\n\ndef build_patterns(modules, version):\n pattern_list = []\n\n for module in modules:\n url_string = r'^'\n url_string += str(version) + r'/'\n\n ...
python
edit
1
2
apache-2.0
72919640ac70da7f05ba36e345666909eb002187
SungardAS-CloudDevelopers/ramldoc
python/ramldoc/django_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport simulators\nimport numpy as np\nimport json\n\n\"\"\"Calculate Errors on the Spectrum.\n\n For a first go using an fixed SNR of 200 for all observations.\n\"\"\"\n\n\ndef get_snrinfo(star, obs_num, chip):\n \"\"\"Load...
python
edit
3
4
mit
53c39934e19fdad7926a8ad7833cd1737b47cf58
jason-neal/companion_simulations,jason-neal/companion_simulations
utilities/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DrinkOrder():\n def __init__(self, mug_size, add_ins, name=None):\n self.mug_size = mug_size\n self.add_ins = add_ins\n self.name = name\n\n @classmethod\n def deserialize(cls, data):\n return Drin...
python
edit
1
2
apache-2.0
ff4477c870b9c618b7432047071792c3a8055eb7
umbc-hackafe/htcpcp,umbc-hackafe/htcpcp,umbc-hackafe/htcpcp,umbc-hackafe/htcpcp
coffeeraspi/messages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThe ccdproc package is a collection of code that will be helpful in basic CCD\nprocessing. These steps will allow reduction of basic CCD data as either a\nstand-alone ...
python
edit
7
0
bsd-3-clause
d097f773260d06b898ab70e99596a07b056a7cb3
indiajoe/ccdproc,mwcraig/ccdproc,astropy/ccdproc,evertrol/ccdproc,crawfordsm/ccdproc,pulsestaysconstant/ccdproc
ccdproc/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By:\n# Maintained By:\n\nDEBUG = False\nTESTING = False\nAUTOBUILD_A...
python
edit
1
0
apache-2.0
536801f970702792b0b23e4795929746ae2f92f8
j0gurt/ggrc-core,vladan-m/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,2947721120/sagacious-capsicum,prasannav7/ggrc-core,hasanalom/ggrc-core,kr41/ggrc-core,2947721120/sagacious-capsicum,VinnieJohns/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-c...
src/ggrc/settings/default.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom model import BaseModel\n\nfrom feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature\n\nfrom extractor import Node,Graph,Aggregator,NotEnoughData\n\nfrom bytestream import ByteStream,ByteStreamFeature\n\nfrom d...
python
edit
32
0
mit
fc14e41432fece7d724aef73dd8ad7fef5e85c9a
JohnVinyard/featureflow,JohnVinyard/featureflow
flow/__init__.py
rejected_lint
Too many lint violations: 32
true
[ { "role": "user", "content": "Write python code for the following: Add validity_index to default imports." }, { "role": "assistant", "content": "from .hdbscan_ import HDBSCAN, hdbscan\nfrom .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage\nfrom .validity import validity_...
python
new_file
7
0
bsd-3-clause
7606689e5d83a6c3bfa71ede25e4b92978d94bd4
scikit-learn-contrib/hdbscan,scikit-learn-contrib/hdbscan,lmcinnes/hdbscan,lmcinnes/hdbscan
hdbscan/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom errbot import BotPlugin, botcmd, webhook\n\n\nclass MarxBot(BotPlugin):\n \"\"\"Your daily dose of Marx\"\"\"\n min_err_version = '1.6.0'\n\n @botcmd(split_args_with=None)\n def marx(self, message, args):\n return \"...
python
edit
3
6
mit
dfb79b9f148663617048a3c2a310b2a66a1c7103
AbigailBuccaneer/err-dailymarx
marxbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nimport datetime\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\nfrom pontoon.administration.views import _update_from_repository\nfrom pontoon.base.models import Project\n...
python
edit
2
3
bsd-3-clause
0c22d14992427aae0cafb8525cbd11b44761dfd7
sudheesh001/pontoon,m8ttyB/pontoon,jotes/pontoon,vivekanand1101/pontoon,Osmose/pontoon,Jobava/mirror-pontoon,mastizada/pontoon,mastizada/pontoon,Jobava/mirror-pontoon,participedia/pontoon,vivekanand1101/pontoon,mathjazz/pontoon,mathjazz/pontoon,Jobava/mirror-pontoon,jotes/pontoon,m8ttyB/pontoon,sudheesh001/pontoon,part...
pontoon/administration/management/commands/update_projects.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport helper\nfrom rock import utils\n\n\nclass UtilsTestCase(helper.unittest.TestCase):\n\n def test_shell(self):\n utils.Shell.run = lambda self: self\n s = utils.Shell()\n self.assertTrue(isinstance(s.__enter__()...
python
edit
1
1
mit
b25164e69d255beae1a76a9e1f7168a436a81f38
silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Echo client program\nimport socket\nimport sys\nfrom RemoteFunctionCaller import *\nfrom SocketNetworker import SocketNetworker\n\nHOST = 'localhost' # The remote host\nPORT = 8553 # The same port as us...
python
edit
6
0
mit
19354bd82a89383d795cdada8d6af78e8f12eed8
cnlohr/bridgesim,cnlohr/bridgesim,cnlohr/bridgesim,cnlohr/bridgesim
src/server/test_client.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import division, print_function\nimport click\nfrom .. import __version__\n\n\n# Monkey patch\nclick.core._verify_python3_env = lambda: None\n\n\nCONTEXT_SETTINGS = {\n 'help_option_names': ['-h',...
python
edit
7
4
mit
ad6bb5b787b4b959ff24c71122fc6f4d1a7e7ff9
open2c/cooltools
cooltools/cli/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport copy\n\nfrom django import forms\nfrom django.utils.safestring import mark_safe\nfrom django.template.loader import render_to_string\n\n\nclass JSONEditorWidget(forms.Widget):\n\n template_name = 'django_json_editor/d...
python
edit
3
2
mit
8218b398731e8d9093a91de9bb127e2e933fa6db
abogushov/django-admin-json-editor,abogushov/django-admin-json-editor
json_editor/admin.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\"\"\"\n\nimport os\nimport sys\nimport csv\nimport json\nimport html\n\ndef do_command(args):\n assert os.path.exists(args.input)\n\n writer = csv.writer(args.output)\n writ...
python
edit
1
4
mit
b503a6e893d71b96b3737e567dde16f110db5fc7
arunchaganty/briefly,arunchaganty/briefly,arunchaganty/briefly,arunchaganty/briefly
src/prepare_turk_batch.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nUtilities regarding NTC thermistors\n\nSee http://www.vishay.com/docs/29053/ntcintro.pdf for details\n\"\"\"\nfrom UliEngineering.Physics.Temperature import zero_point_celsius, normal...
python
edit
1
1
apache-2.0
357a445021bd459cc0196269033ea181594a1456
ulikoehler/UliEngineering
UliEngineering/Physics/NTC.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\n\n\n@python_2_unicode_compatible\nclass Email(m...
python
edit
1
1
mit
03b685055037283279394d940602520c5ff7a817
treyhunner/django-email-log,treyhunner/django-email-log
email_log/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"pluss, a feed proxy for G+\"\"\"\nimport logging\n\nfrom pluss.app import app\n\n@app.before_first_request\ndef setup_logging():\n if not app.debug:\n # In production mode, add log handler to sys.stderr.\n handler = l...
python
edit
1
2
mit
4691e024986a24930c88646cf3a3ae95683dc880
ayust/pluss,ayust/pluss
main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport json\nfrom enum import Enum\n\n\nclass BEMessages(Enum):\n ALL_MAIN_BROADCAST = 'ALL_MAIN_BROADCAST'\n\n\nclass FEMessages(Enum):\n pass\n\n\nclass AllMainBroadCast(object):\n\n message_type = BEMess...
python
edit
1
1
mit
9f00aeff695dd587bf7db1e126e57596616ef95e
verekia/hackarena,verekia/hackarena,verekia/hackarena,verekia/hackarena
backend/messages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThese functions are written assuming the under a moto call stack.\nTODO add check is a fake bucket?\n\"\"\"\nimport boto3\n\n\ndef pre_load_s3_data(bucket_name, prefix, region='us-east-1'):\n s3 = boto3.client('s3', region_name=r...
python
edit
6
4
mit
f668956fd37fa2fa0a0c82a8241671bf3cc306cb
DigitalGlobe/gbdxtools,DigitalGlobe/gbdxtools
tests/unit/moto_test_data.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import NoArgsCommand\nfrom bulbs.content.models import Content\n\n\nclass Command(NoArgsCommand):\n help = 'Runs Content.index on all content.'\n\n def handle(self, **options):\n num_processed =...
python
edit
2
4
mit
0415bc9e4a174b7cebb634a449473131fe16b3b2
theonion/django-bulbs,theonion/django-bulbs,pombredanne/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,pombredanne/django-bulbs,theonion/django-bulbs
bulbs/content/management/commands/reindex_content.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\n\nclass ViewTests(unittest.TestCase):\n def setUp(self):\n from pyramid import testing\n self.config = testing.setUp()\n\n def tearDown(self):\n from pyramid import testing\n testing.tear...
python
edit
1
1
apache-2.0
41c6b1820e8b23079d9098526854c9a60859d128
GoogleCloudPlatform/google-cloud-python-expenses-demo,GoogleCloudPlatform/google-cloud-python-expenses-demo
gcloud_expenses/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This program uses the csv module to manipulate .csv files\n\nimport csv\n\n# Writer Objects\noutputFile = open(\"output.csv\", \"w\", newline='')\noutputWriter = csv.writer(outputFile)\nprint(outputWriter.writerow(['spam', 'eggs', 'bacon'...
python
edit
1
1
mit
5d5b59bde655fbeb2d07bd5539c2ff9b29879d1d
JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials
pythontutorials/books/AutomateTheBoringStuff/Ch14/P2_writeCSV.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test that stanc warnings are visible.\"\"\"\nimport contextlib\nimport io\n\nimport stan\n\n\ndef test_stanc_no_warning() -> None:\n \"\"\"No warnings.\"\"\"\n program_code = \"parameters {real y;} model {y ~ normal(0,1);}\"\n ...
python
edit
1
1
isc
2c7065f82a242e6f05eaefda4ec902ddf9d90037
stan-dev/pystan,stan-dev/pystan
tests/test_stanc_warnings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\nimport sys, subprocess\nimport re\n\nif __name__ == '__main__':\n p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE)\n (stdout, stderr) = p.communicate()\n reg = re.compile(r'''Warning(: in file .*?,...
python
edit
1
0
mit
6bcc15b6d018560ebc368efcfc2c2c7d435c7dcc
JasonGross/coq-scripts,JasonGross/coq-scripts
strictify-coqdep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom email.utils import formatdate\nfrom datetime import datetime\nfrom time import mktime\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'keybar.settings')\n\nimport django\ndjango.setup()\n\nfrom django.conf import settings...
python
edit
1
0
bsd-3-clause
d568e040293da3438293fb007a762fd35b8c7483
keybar/keybar
extras/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\n\nfrom typing import Callable, Optional\n\nfrom ._null_logger import NullLogger\n\n\nMODULE_NAME = \"subprocrunner\"\nDEFAULT_ERROR_LOG_LEVEL = \"WARNING\"\n\n\ntry:\n from l...
python
edit
1
4
mit
5bcd0d538bad1393d2ecbc1f91556a7b873343c8
thombashi/subprocrunner,thombashi/subprocrunner
subprocrunner/_logger/_logger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the Caeser module\"\"\"\n\nimport pycipher\n\nfrom lantern.modules import atbash\n\n\ndef _test_atbash(plaintext, *fitness_functions, top_n=1):\n ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True)\n de...
python
edit
1
1
mit
3f26d3c53f4bff36ec05da7a51a026b7d3ba5517
CameronLonsdale/lantern
tests/modules/test_atbash.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Radicale extension forms.\"\"\"\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy\n\nfrom modoboa.lib import form_utils\nfrom modoboa.parameters import forms as param_forms\n\n\nclass ParametersForm(param...
python
edit
1
0
mit
c2060336b7d20a774ce9e5ae93960ad680836274
modoboa/modoboa-radicale,modoboa/modoboa-radicale,modoboa/modoboa-radicale
modoboa_radicale/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 Rackspace\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://...
python
edit
1
2
apache-2.0
068862dc72fa82ec35e7fabc6a0a99dc10f7f034
openstack/octavia,openstack/octavia,openstack/octavia
octavia/common/service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom handlers.handlerbase import HandlerBase\nfrom db import db_session, Session\n\n\nclass LogoutHandler(HandlerBase):\n def handle(self, packet_msg):\n # Remove session\n s = db_session()\n ...
python
edit
1
1
mit
d3bc714478c3f7a665b39dfb1b8d65e7bc59ccd0
katajakasa/utuputki2,katajakasa/utuputki2,katajakasa/utuputki2,katajakasa/utuputki2
utuputki-webui/utuputki/handlers/logout.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import current_app, request, abort\nfrom flask.blueprints import Blueprint\n\nfrom sipa.utils.git_utils import update_repo\n\n\nlogger = logging.getLogger(__name__)\n\nbp_hooks = Blueprint('hooks', __name__, url...
python
edit
1
6
mit
31ee04b2eed6881a4f6642495545868f7c167a20
MarauderXtreme/sipa,agdsn/sipa,agdsn/sipa,agdsn/sipa,MarauderXtreme/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,agdsn/sipa,MarauderXtreme/sipa
sipa/blueprints/hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nCURRENT_MIN_VERSION = 'v3.0'\nCURRENT_MAX_VERSION = 'v3.1'\n\nACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo']\nDEFAULT_COMMAND_TIMEOUT = 60 * 60\n\nCONTROLLER_PROTOCOL = 'controller'\nPROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', C...
python
edit
1
0
apache-2.0
15fe43d0be3c665c09c898864bd2815b39fbc8a5
avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox
toolbox/config/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom conans import ConanFile, CMake\n\nclass CausalSetsExplorer(ConanFile):\n settings = \"os\", \"compiler\", \"build_type\", \"arch\"\n requires = \"boost/1.67.0@conan/stable\", \"catch2/2.3.0@bincrafters/stable\"\n generators = ...
python
edit
1
2
bsd-3-clause
1f409a2732886b6a77d348529e07e9f90fbfd8ba
acgetchell/causal-sets-explorer,acgetchell/causal-sets-explorer
conanfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.db.models.signals import post_save\n\nclass UserProfile(models.Model):\n user = models.ForeignKey(User, blank=True, unique=True)\n url = models.URL...
python
edit
1
2
bsd-3-clause
95788f09949e83cf39588444b44eda55e13c6071
jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website
wluopensource/accounts/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDB_USER = ''\nDB_HOST = ''\nDB_PASSWORD = ''\nDB_NAME = ''\n\n```\n\nApply this change: Allow for representative view display with sample configuration" }, { "role": "assistant", "content": "DB_USER = ''\nDB_HOST = ''\nDB_PASSWO...
python
edit
1
0
mit
52fa6cff088e2032fc8a3a9d732bf8affb9bccae
AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at
config/template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\n\nimport pytest\nfrom mock import MagicMock\n\n\n# At the moment it is not possible to have PyQt5 and PyQt4 installed\n# simultaneously because one r...
python
edit
7
1
bsd-3-clause
f48afc99a7e7aa076aa27b33deda824b5509bab2
glue-viz/qt-helpers
test_qt_helpers_qt5.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': '',\n 'USER': '',\...
python
edit
1
0
bsd-3-clause
35c47f00f914935bd886c0b28ef618f451abc3b3
RocknRoot/LIIT
local_settings_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom openerp import http\nfrom openerp.http import request\n\nfrom openerp.addons.website_sale.controllers.main import website_sale\n\n\nclass controller(website_sale):\n\n @http.route(['/shop/confirm_order'], ty...
python
edit
1
4
mit
985cefd81472069240b074423a831fe6031d6887
it-projects-llc/website-addons,it-projects-llc/website-addons,it-projects-llc/website-addons
website_sale_available/controllers/website_sale_available.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture\ndef app():\n import sys\n sys.path.append('.')\n\n from sample_app import create_app\n\n return create_app()\n\n\n@pytest.fixture\ndef client(app):\n return app.test_client()\n\n\ndef test_...
python
edit
1
1
apache-2.0
9d94a753c4824df210753996edaa9f7910df5fa8
JingZhou0404/flask-bootstrap,scorpiovn/flask-bootstrap,suvorom/flask-bootstrap,BeardedSteve/flask-bootstrap,ser/flask-bootstrap,suvorom/flask-bootstrap,victorbjorklund/flask-bootstrap,BeardedSteve/flask-bootstrap,ser/flask-bootstrap,livepy/flask-bootstrap,victorbjorklund/flask-bootstrap,dingocuster/flask-bootstrap,Coxi...
tests/test_sample_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport agate\n\nDEFAULT_TYPE_TESTER = agate.TypeTester(types=[\n agate.data_types.Number(),\n agate.data_types.Date(),\n agate.data_types.DateTime(),\n agate.data_types.Boolean(),\n agate.data_types.Text()\n])\n\n\ndef tabl...
python
edit
1
2
apache-2.0
30f03692eff862f1456b9c376c21fe8e57de7eaa
analyst-collective/dbt,nave91/dbt,nave91/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,analyst-collective/dbt
dbt/clients/agate_helper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport pkgutil\nimport site\n\nif pkgutil.find_loader(\"gi\"):\n try:\n import gi\n print('Found gi:', os.path.abspath(gi.__file__))\n gi.require_version('Gst', '1.0')\n # from gi.repository import ...
python
edit
1
0
mit
9502de0e6be30e4592f4f0cf141abc27db64ccf4
Kane610/axis
dependencies.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nImplementation of the OpenWeatherMap API.\n\"\"\"\n__author__ = '<EMAIL> (Ajay Roopakalu)'\n\nOPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5'\nWEATHER_URL = '/weather'\n\nimport requests\n\nimport log\n\nlogging = log.Log(_...
python
edit
1
4
mit
8247d3c1b6a9720f14db1130e087293c57587b54
jrupac/nest-wfh
weather.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .find_contours import find_contours\nfrom ._regionprops import regionprops\nfrom .find_contours import find_contours\nfrom ._structural_similarity import ssim\n\n```\n\nApply this change: BUG: Remove double import of find contours." ...
python
edit
5
0
bsd-3-clause
00922099d6abb03a0dbcca19781eb586d367eab0
robintw/scikit-image,WarrenWeckesser/scikits-image,ofgulban/scikit-image,ajaybhat/scikit-image,rjeli/scikit-image,SamHames/scikit-image,chintak/scikit-image,ofgulban/scikit-image,SamHames/scikit-image,dpshelio/scikit-image,chintak/scikit-image,rjeli/scikit-image,oew1v07/scikit-image,almarklein/scikit-image,pratapvardha...
skimage/measure/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nClass for communicating with the GrovePi ultrasonic ranger.\n\nHere we treat it as a binary sensor.\n\"\"\"\n\nimport logging\nlogging.basicConfig()\nLOGGER = logging.getLogger(__name__)\nLOGGER.setLevel(logging.getLevelName('INFO')...
python
edit
1
1
apache-2.0
ed5a151942ff6aeddeaab0fb2e23428821f89fc4
aninternetof/rover-code,aninternetof/rover-code,aninternetof/rover-code
rovercode/drivers/grovepi_ultrasonic_ranger_binary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\\\nCore FFT routines\n==================\n\n Standard FFTs\n\n fft\n ifft\n fft2\n ifft2\n fftn\n ifftn\n\n Real FFTs\n\n refft\n irefft\n refft2\n irefft2\n refftn\n irefftn\n\n Hermite FFTs\n\n hfft\n ih...
python
edit
1
0
bsd-3-clause
d6224333a8c815086cf8f10b0bb9ee23f7aec3ef
illume/numpy3k,Ademan/NumPy-GSoC,jasonmccampbell/numpy-refactor-sprint,jasonmccampbell/numpy-refactor-sprint,illume/numpy3k,illume/numpy3k,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,efiring/numpy-work,efiring/numpy-work,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,efi...
numpy/fft/info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n#\n# This source file is part of appleseed.\n# Visit http://appleseedhq.net/ for additional information and resources.\n#\n# This software is released under the MIT license.\n#\n# Copyright (c) 2015-2016 Esteban Tovagliari, The appleseedh...
python
edit
5
0
mit
8723611817a982907f3f0a98ed4678d587597002
pjessesco/appleseed,dictoon/appleseed,gospodnetic/appleseed,Aakash1312/appleseed,Vertexwahn/appleseed,aiivashchenko/appleseed,luisbarrancos/appleseed,appleseedhq/appleseed,Vertexwahn/appleseed,aytekaman/appleseed,glebmish/appleseed,aytekaman/appleseed,pjessesco/appleseed,est77/appleseed,dictoon/appleseed,luisbarrancos/...
src/appleseed.python/test/runtests.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import Permission\n\nfrom rest_framework import viewsets\n\nfrom .serializers import PermissionSerializer\n\n\nclass PermissionViewSet(viewsets.ReadOnlyModelViewSet):\n queryset = Permission.objects.all()\...
python
edit
1
0
mit
e379aa75690d5bacc1d0bdec325ed4c16cf1a183
GETLIMS/LIMS-Backend,GETLIMS/LIMS-Backend
lims/permissions/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nimport config\nimport logging\n\nfrom celery.schedules import crontab\nfrom lazyblacksmith.app import create_app\nfrom lazyblacksmith.extension.celery_app import celery_app\n\n# disable / enable loggers we want\nl...
python
edit
1
0
bsd-3-clause
3f394e47841b2d9e49554b21c67b06a46f99f25c
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
celery_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import database\n\ndef getAllSettings():\n\tdatabaseConnection = database.ConnectionManager.getConnection(\"main\")\n\tquery = databaseConnection.session.query(database.tables.Setting)\n\tsettings = query.all()\n\treturn {setting.nam...
python
edit
1
2
mit
a1c7773eb889ece3233b910c559b4e22ade3bb32
ollien/Timpani,ollien/Timpani,ollien/Timpani
timpani/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ConfigParser import ConfigParser\nfrom sqlalchemy.engine.url import URL\n\n\ndef parse(cell, config):\n parts = [part.strip() for part in cell.split(None, 1)]\n if not parts:\n return {'connection': '', 'sql': ''}\n if ...
python
edit
1
9
mit
2216caf836c1f2864103e8930f60713c226a8464
catherinedevlin/ipython-sql,catherinedevlin/ipython-sql
src/sql/parse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .results import Result\nfrom . import docx, conversion, style_reader\n\n\ndef convert_to_html(fileobj):\n return docx.read(fileobj).bind(lambda document: \n conversion.convert_document_element_to_html(document, styles=_create...
python
edit
3
1
bsd-2-clause
9ad98b4bbed0c67f25576187996e7e1d534f6a90
mwilliamson/python-mammoth,JoshBarr/python-mammoth
mammoth/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.core.urlresolvers import reverse\nfrom django.views.generic import TemplateView\nfrom django.views.generic import RedirectView\nfrom django.c...
python
edit
8
0
mit
e2eab36586652b2c7fe37ca96fedea89760665fc
SCPR/kpcc_backroom_handshakes,SCPR/kpcc_backroom_handshakes,SCPR/kpcc_backroom_handshakes
kpcc_backroom_handshakes/urls.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tcxparser\nfrom configparser import ConfigParser\nfrom datetime import datetime\nimport urllib.request\nimport dateutil.parser\n\nt = '1984-06-02T19:05:00.000Z'\n# Darksky weather API\n# Create config file manually\nparser = ConfigPa...
python
edit
3
1
mit
27ab83010f7cc8308debfec16fab38544a9c7ce7
briansuhr/slowburn
running.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__author__ = 'Ardy Dedase'\n__email__ = '<EMAIL>'\n__version__ = '1.1.3'\n__copyright__ = \"Copyright (C) 2016 Skyscanner Ltd\"\n__license__ = \"\"\"\nLicensed under the Apache License, Version 2.0 (the \"License\")...
python
edit
1
0
apache-2.0
75457e90381b6ff38becfed0befe214c9d6c0fc1
Skyscanner/skyscanner-python-sdk
skyscanner/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\nimport stripe\n\n\nclass Command(BaseCommand):\n\n help = \"Make sure your Stripe account has the plans\"\n\n def handle(self, *args, **options):...
python
edit
2
3
bsd-3-clause
1fc6eb9ccc9789e2717898108f286adf5b351031
wahuneke/django-stripe-payments,aibon/django-stripe-payments,boxysean/django-stripe-payments,crehana/django-stripe-payments,adi-li/django-stripe-payments,wahuneke/django-stripe-payments,jawed123/django-stripe-payments,jamespacileo/django-stripe-payments,ZeevG/django-stripe-payments,ZeevG/django-stripe-payments,crehana/...
payments/management/commands/init_plans.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Validate GTFS\"\"\"\nimport os\n\nimport mzgtfs.feed\nimport mzgtfs.validation\n\nimport task\n\nclass FeedEaterValidate(task.FeedEaterTask):\n def run(self):\n # Validate feeds\n self.log(\"===== Feed: %s =====\"%self.feedid)\...
python
edit
1
4
mit
3cf9473bdf1714460478b4cd36a54b09b2a57173
transitland/transitland-datastore,transitland/transitland-datastore,transitland/transitland-datastore,brechtvdv/transitland-datastore,brechtvdv/transitland-datastore,brechtvdv/transitland-datastore
lib/feedeater/validate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Mike Place <<EMAIL>>`\n'''\n\n# Import Salt Testing libs\nfrom salttesting import TestCase, skipIf\nfrom salttesting.helpers import ensure_in_syspath\nfrom salttesting.mock import NO_MO...
python
edit
1
2
apache-2.0
4de5050deda6c73fd9812a5e53938fea11e0b2cc
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/minion_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# vim: set hls is ai et sw=4 sts=4 ts=8 nu ft=python:\n\n# built-in modules\n\n# 3rd-party modules\nimport click\n\n# local modules\nfrom mass.monitor.app import app\nfrom mass.scheduler.swf ...
python
edit
3
1
apache-2.0
90d1a40175675b2950cb41b85434b522d6e21c4d
badboy99tw/mass,KKBOX/mass,badboy99tw/mass,badboy99tw/mass,KKBOX/mass,KKBOX/mass
mass/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Standard imports\nimport math\nimport logging\nimport numpy as np\nimport emission.core.common as ec\nimport emission.analysis.section_features as sf\n\ndef calDistance(point1, point2):\n return ec.calDistance([point1.longitude, point1...
python
edit
4
2
bsd-3-clause
380331a54ae09a54e458b30a0fb6a459faa76f37
e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,joshzarrabi/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,yw374cornell/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission...
emission/analysis/point_features.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on 11 jan. 2013\n\n@author: sander\n'''\nfrom abc import abstractmethod, ABCMeta\n\n\nclass Protocol(object):\n __metaclass__ = ABCMeta\n\n header_type = None\n\n @abstractmethod\n def __init__(self, next_header=Non...
python
edit
1
2
bsd-3-clause
695dad10b6d27e2b45a7b98abad29b9d922b976f
steffann/pylisp
pylisp/packet/ip/protocol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy\n\nfrom chainer import function\n\n\nclass Parameter(function.Function):\n\n \"\"\"Function that outputs its weight array.\n\n This is a parameterized function that takes no input and returns a variable\n holding a sha...
python
edit
1
1
mit
f75e245f461e57cc868ee5452c88aea92b6681bf
t-abe/chainer,chainer/chainer,pfnet/chainer,jnishi/chainer,sou81821/chainer,ikasumi/chainer,tigerneil/chainer,delta2323/chainer,1986ks/chainer,chainer/chainer,yanweifu/chainer,ronekko/chainer,muupan/chainer,truongdq/chainer,chainer/chainer,muupan/chainer,okuta/chainer,jnishi/chainer,anaruse/chainer,hvy/chainer,cupy/cup...
chainer/functions/parameter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\nimport numpy as np\nimport plaidml\nimport plaidml.keras\nplaidml.keras.install_backend()\nimport keras.backend as K\n\n\ndef main(code, tensor_A, tensor_B, output_shape):\n print(K.backend())\n op...
python
edit
3
1
apache-2.0
0484d3f14f29aa489bc848f1d83a9fb20183532e
plaidml/plaidml,plaidml/plaidml,plaidml/plaidml,plaidml/plaidml
plaidml/keras/tile_sandbox.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 LimitMode(Mode):\n def checkSet(self, user, target, param):\n intParam = int(param)\n if str(intParam) != param:\n return [False, ...
python
edit
1
6
bsd-3-clause
a2efdbc7c790df31f511d9a347774a961132d565
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
txircd/modules/cmode_l.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext as _, get_language\nfrom django.utils.safestring import mark_safe\n\n\n# RECAPTCHA widgets\nclass RecaptchaResponse(forms.Widget):\n\n def render(self, *args, **kwar...
python
edit
1
2
bsd-3-clause
08cbb4ebd44b5dca26d55a0e177c03930a2beb57
pombredanne/glamkit-stopspam
stopspam/forms/widgets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport unittest\n\nfrom arc_test import ArcTest\nfrom incar_test import InCarTest\nfrom oszicar_test import OsziCarTest\nfrom outcar_test import OutCarTest\nfrom xsd_test import XsdTest\nfrom ...
python
edit
1
1
mit
1f9a11640463df94166be8dffa824e57485154f8
PytLab/VASPy,PytLab/VASPy
tests/vaspy_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom paver.easy import *\nimport paver.doctools\nfrom paver.setuputils import setup\n\n@task\ndef dumpdb():\n print \"Downloading data from App Engine\"\n sh(\"python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo --ema...
python
edit
3
1
bsd-3-clause
3b568b0343e1cbf9256caa181c672449faf01ddc
amarandon/zongo-engine,amarandon/zongo-engine,amarandon/zongo-engine
pavement.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import url, patterns\n\nfrom urls import urlpatterns as main_patterns\n\nurlpatterns = patterns('',\n url(r'^projects/(?P<project_slug>[\\w.-]+)/(?P<lang_slug>\\w{2})/(?P<version_slug>[\\w.-]+)/(?P<filename...
python
edit
1
0
mit
e49ac8daeabf82708f2ba7bb623d7db73e1fcaff
agjohnson/readthedocs.org,kdkeyser/readthedocs.org,istresearch/readthedocs.org,davidfischer/readthedocs.org,KamranMackey/readthedocs.org,espdev/readthedocs.org,ojii/readthedocs.org,singingwolfboy/readthedocs.org,michaelmcandrew/readthedocs.org,SteveViss/readthedocs.org,hach-que/readthedocs.org,raven47git/readthedocs.or...
readthedocs/core/subdomain_urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport responses\n\n\nclass AuthenticationTestMixin(object):\n \"\"\" Mixin for testing authentication. \"\"\"\n def setUp(self):\n super(AuthenticationTestMixin, self).setUp()\n responses.reset()\n\n def _mock_auth_a...
python
edit
1
2
apache-2.0
70f9275d7b87d56ae560a2ff60c3eed3469739af
edx/ecommerce-api-client,edx/edx-rest-api-client
edx_rest_api_client/tests/mixins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom tweepy.streaming import StreamListener\nfrom tweepy import OAuthHandler\nfrom tweepy import Stream\nimport tweepy\n\n#Get Hashtag to track\nargTag = sys.argv[1]\n\n#Class for listening to all tweets\nclass TweetListener(Str...
python
edit
3
1
mit
ca0b10484ca92709be4b30b2aab7079a2f4a2fe1
tim-thompson/TweetTimeTracker
tracker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www....
python
edit
1
1
apache-2.0
583c946061f8af815c32254655f4aed8f0c18dc9
openstack/watcher,openstack/watcher
watcher/tests/api/test_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom midas import mix\nfrom midas.midas import estimate, forecast\n\n\ndef test_estimate(gdp_data, farmpay_data):\n\n y, yl, x, yf, ylf, xf = mix.mix_freq(gdp_data.gdp, farmpay_data.farmpay, 3, 1, 1,\n ...
python
edit
1
1
mit
563220ef19395201aed7f6392519f84db4ec7a77
mikemull/midaspy
tests/test_midas.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Farmer(models.Model):\n first_name = models.CharField(_('first name'), max_length=50)\n surname = models.CharField(_('surname'), max_leng...
python
edit
1
1
bsd-2-clause
16b9f48c2b6548a16e1c34a57c103b325fae381d
tm-kn/farmers-api
farmers_api/farmers/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSending a message:\n Encrypt your plaintext with encrypt_message\n Your id will serve as your public key\nReading a message\n Use decrypt_message and validate contents\n\"\"\"\n\nfrom Crypto.PublicKey import RSA\n\n\n# Gene...
python
edit
1
1
mit
e0c70b2b20349b8f1c0f6df8cc641c3267a63a06
Tribler/decentral-market
crypto.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom flask import Blueprint\nfrom flask import render_template\n\nfrom lazyblacksmith.models import Activity\nfrom lazyblacksmith.models import Item\nfrom lazyblacksmith.models import Region\n\nblueprint = Bluepri...
python
edit
1
3
bsd-3-clause
0dddfcbdb46ac91ddc0bfed4482bce049a8593c2
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
lazyblacksmith/views/blueprint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport re\nimport os\n\n\ndef normalize_path(path):\n \"\"\"\n Normalizes a path:\n * Removes extra and trailing slashes\n * Converts special characters to underscore\n \"\"\"\n path = re.sub(r'/+', '/', path) # re...
python
edit
1
3
mit
1cd3096322b5d4b4c4df0f1fba6891e29c911c53
jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces
spaces/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\n\nclass SetBaseEnv(object):\n \"\"\"\n Figure out which port we are on if we are running and set it.\n\n So that the links will be correct.\n Not sure if we need this always...\n \"\"\"\n\n def __in...
python
edit
1
3
mit
189c7a7c982739cd7a3026e34a9969ea9278a12b
xeor/hohu,xeor/hohu,xeor/hohu,xeor/hohu
api/data/src/lib/middleware.py
accepted
null
true