messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\nimport io\nimport zipfile\nfrom unittest import mock\n\nfrom tornado import testing\n\nfrom waterbutler.core import streams\n\nfrom tests import utils\n\n\nclass TestZipHandler(utils.HandlerTestCase):\n\n def setUp(self):...
python
edit
4
1
apache-2.0
6038bcd507c43eb86e04c6a32abf9b8249c8872e
rdhyee/waterbutler,kwierman/waterbutler,hmoco/waterbutler,CenterForOpenScience/waterbutler,cosenal/waterbutler,Ghalko/waterbutler,rafaeldelucena/waterbutler,felliott/waterbutler,icereval/waterbutler,RCOSDP/waterbutler,TomBaxter/waterbutler,chrisseto/waterbutler,Johnetordoff/waterbutler
tests/server/handlers/test_zip.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDebug Blueprints.\n\"\"\"\nfrom flask import Blueprint, current_app, redirect, jsonify, url_for, request\n\ndebug_pages = Blueprint('debug', __name__)\n\n\n@debug_pages.route(\"/clear_all\", methods=['GET', 'POST'])\ndef clear_all()...
python
edit
1
2
mit
8ecaaa14cba2a84606dc6d31f0c16c09dbfae017
ShinNoNoir/likelines-player,ShinNoNoir/likelines-player,ShinNoNoir/likelines-player
server/LikeLines/debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"\n\nfrom grammpy import Grammar\n\n\ndef _copy_grammar(grammar):\n return Grammar(terminals=(item.s fo...
python
edit
1
12
mit
9b0618d3b52c74bf2abd65a581807087cbaa2ca4
PatrikValkovic/grammpy
grammpy_transforms/NongeneratingSymbolsRemove/nongeneratingSymbolsRemove.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2010 Inoi Oy\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, inclu...
python
edit
2
0
mit
0f21ef4fe5a1e95668f5fdbeda4d8a37da65484f
inoi/trombi
trombi/__init__.py
rejected_duplicate
Near-duplicate of sample 3318
true
[ { "role": "user", "content": "Write python code for the following: Add note to remove file" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# This file is here to ensure that upgrades of salt remove the external_ip\n# grain, this file should be removed in the Boron release\n\n" ...
python
new_file
1
0
apache-2.0
e9c23c7a0c622e8db29d066f1cd1a679dc6eb1bf
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/grains/external_ip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport threading, socket\n\n\n\n\"\"\"\nDummy server using for unit testing\n\"\"\"\n\nclass Server(threading.Thread):\n def __init__(self, handler, host='localhost', port=8021):\n threading.Thread.__init__(se...
python
edit
1
2
apache-2.0
9a2cc99b068b2aaa572f52b4516852b239577c34
psf/requests
dummyserver/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom notifications_python_client.base import BaseAPIClient\nfrom app.notify_client import _attach_current_user\n\n\nclass JobApiClient(BaseAPIClient):\n def __init__(self, base_url=None, client_id=None, secret=None):\n super(sel...
python
edit
1
4
mit
47352af38ace09af3572bc63d8c1da4d27cafb86
alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin
app/notify_client/job_api_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nltk.sentiment.util import mark_negation\nfrom nltk.util import trigrams\nimport re\nimport validators\nfrom .happy_tokenizer import Tokenizer\n\n\nclass SentimentTokenizer(object):\n def __init__(self):\n self.tknzr = Tokeni...
python
edit
1
3
apache-2.0
35a9de1ba8f6c1bcb6ae35c9f965657de973412f
chuajiesheng/twitter-sentiment-analysis
tokenizers/sentiment_tokenizer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom timeit import default_timer as timer\nimport bifrost as bf\nfrom bifrost import pipeline as bfp\nfrom bifrost import blocks as blocks\nfrom bifrost_benchmarks import PipelineBenchmarker\n\nclass SigprocBenchmarker(PipelineBenchmarker):...
python
edit
2
1
bsd-3-clause
a5e8f6af93debd98b626ee382a843d5dedbf70f8
ledatelescope/bifrost,ledatelescope/bifrost,ledatelescope/bifrost,ledatelescope/bifrost
test/benchmarks/general/blocks/read_sigproc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\n Check your Facebook notifications on command line.\n Author: Amit Chaudhary ( <EMAIL> )\n'''\nimport json\n\n# Configuration\nnotifications = 5 # Number of Notifications\nprofile_id = '1XXXXXXXXXXXXXX'\ntoken = 'write token her...
python
edit
3
3
mit
aa6cf034e41f9426e6b4688ffe832f802efb7864
studenton/facebook-alerts
fbalerts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 D-Wave Systems Inc.\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
d697266e41f2e073c801221b7da46455a0ef1116
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
rejected_duplicate
Near-duplicate of sample 1547
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright 2012 Cisco Systems, Inc.\n#\n# Author: Soren Hansen <<EMAIL>>\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 ob...
python
edit
1
1
apache-2.0
ea6c57de01f420bdd344194e5529a0e91036c634
sorenh/python-django-greenfan,sorenh/python-django-greenfan
greenfan/management/commands/create-job-from-testspec.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module implements a portion of the Input Format Module. In this\ncase the input is the tabular data necessary for the different interpolations.\n\"\"\"\n\nimport numpy as np\n\n\ndef read_num_col(filename):\n with open(file...
python
edit
1
4
bsd-2-clause
0f5a632d625d65f4edf9e31efa75708a79eee16c
JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software
CaseStudies/glass/Implementations/Python_Simplified/Implementation/readTable.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Blocks of unicode ranges\"\"\"\nfrom pprint import pprint\n\nimport requests\nURL = \"https://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt\"\n\n\ndef load_blocks():\n blocks = {}\n data = requests.ge...
python
edit
1
5
bsd-2-clause
afa76e2643ed75c6864d2281afd3e220b848e487
coblo/isccbench
iscc_bench/textid/unicode_blocks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom waterbutler.core import metadata\n\nclass BaseOsfStorageMetadata:\n @property\n def provider(self):\n return 'osfstorage'\n\n\nclass OsfStorageFileMetadata(BaseOsfStorageMetadata, metadata.BaseFileMetadata):\n\n @proper...
python
edit
1
2
apache-2.0
ba6f29106ba6b8957d82cf042753e4b48a671da6
rdhyee/waterbutler,hmoco/waterbutler,CenterForOpenScience/waterbutler,Johnetordoff/waterbutler,TomBaxter/waterbutler,kwierman/waterbutler,RCOSDP/waterbutler,Ghalko/waterbutler,icereval/waterbutler,cosenal/waterbutler,felliott/waterbutler,chrisseto/waterbutler,rafaeldelucena/waterbutler
waterbutler/providers/osfstorage/metadata.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport climate\nimport joblib\nimport lmj.cubes\nimport numpy as np\n\n\ndef _check(t):\n t.load()\n t.add_velocities(smooth=0)\n vel = abs(t.df[t.marker_velocity_columns].values).flatten()\n vel = vel[n...
python
edit
1
2
mit
91ad56ea892d2f2fdb2af97f81ec70a7b9f9305c
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/sanity-check-velocity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n'''\nTests for the salt-run command\n'''\n\n# Import Salt Testing libs\nfrom salttesting.helpers import ensure_in_syspath\nensure_in_syspath('../../')\n\n# Import salt libs\nimport integration\n\n\nclass ManageTes...
python
edit
1
1
apache-2.0
05f0969ee8b9374c2fe5bce2c753fb4619432f0d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/runners/jobs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom mezzanine.core.admin import StackedDynamicInlineAdmin, DisplayableAdmin\n\nfrom fullcalendar.models import *\n\nclass EventCategoryAdmin(admin.M...
python
edit
5
0
mit
010c87de588009371adbab8a234de78d9da4ebbd
jonge-democraten/mezzanine-fullcalendar
fullcalendar/admin.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool import plugin_pool\nfrom django.utils.translation import ugettext as _\nfrom django.conf import settings\n\nfrom .models import Filer...
python
edit
1
5
bsd-3-clause
4a85ecaaae1452e74acc485d032f00e8bedace47
stefanfoulis/cmsplugin-filer,creimers/cmsplugin-filer,wlanslovenija/cmsplugin-filer,jschneier/cmsplugin-filer,creimers/cmsplugin-filer,divio/cmsplugin-filer,yvess/cmsplugin-filer,brightinteractive/cmsplugin-filer,yvess/cmsplugin-filer,nephila/cmsplugin-filer,jschneier/cmsplugin-filer,stefanfoulis/cmsplugin-filer,sephii...
cmsplugin_filer_link/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\n\n\nclass Plugin:\n def __init__(self, vk_bot):\n self.vk_bot = vk_bot\n self.vk_bot.add_command('uptime', self.uptime)\n\n async def uptime(self, vk_api, sender, message):\n await self.vk_bot.send_me...
python
edit
1
1
mit
0cccd467ac4c0bd8b8110fcfe47f81d73a238aa9
roman901/vk_bot
plugins/uptime.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom irma.database.nosqlhandler import NoSQLDatabase\nfrom bson import ObjectId\n\n\nclass FileObject(object):\n _uri = None\n _dbname = None\n _collection = None\n\n def __init__(self, dbname=None, id=None):\n if dbname:...
python
edit
1
3
apache-2.0
be86fc3f3c7ec9dc213f8f527da59d5578be8b2a
hirokihamasaki/irma,hirokihamasaki/irma,quarkslab/irma,hirokihamasaki/irma,hirokihamasaki/irma,quarkslab/irma,hirokihamasaki/irma,quarkslab/irma,quarkslab/irma
irma/fileobject/handler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport threading\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom cms.models.pluginmodel import CMSPlugin\nfrom cmsplugin_simple_markdown import utils\n\n\nlocaldata = threading.local()\nlocaldata...
python
edit
1
1
bsd-3-clause
c25b7820ccd52b943586af42d09ce53c3633ed96
Alir3z4/cmsplugin-simple-markdown,Alir3z4/cmsplugin-simple-markdown
cmsplugin_simple_markdown/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nimport os\n\n\nurlpatterns = []\n\n\n# load the rapidsms configuration\nfrom rapidsms.config import Config\nconf = Config(os.environ[\"RAPIDSMS_INI\"])\n\n\n# iterate each of the active...
python
edit
10
0
bsd-3-clause
e26434ee69545b8c16b62ebd78e5bec0c95d579a
rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy
lib/rapidsms/webui/urls.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom redash import settings, db, app\nimport redash.models\n\n# TODO: this isn't pretty...\nsettings.DATABASE_CONFIG = {\n 'name': 'circle_test',\n 'engine': 'peewee.PostgresqlDatabase',\n 'threadloca...
python
edit
1
1
bsd-2-clause
21e02ee04ef359abfcaacf35375176b296ae7ea1
rockwotj/redash,crowdworks/redash,pubnative/redash,stefanseifert/redash,pubnative/redash,akariv/redash,amino-data/redash,jmvasquez/redashtest,ninneko/redash,useabode/redash,stefanseifert/redash,crowdworks/redash,pubnative/redash,stefanseifert/redash,stefanseifert/redash,getredash/redash,amino-data/redash,M32Media/redas...
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom lingcod.features.forms import FeatureForm\nfrom lingcod.bookmarks.models import Bookmark\nfrom django import forms\n\nclass BookmarkForm(FeatureForm):\n name = forms.CharField(label='Bookmark Name')\n latitude = forms.FloatField(...
python
edit
1
0
bsd-3-clause
25478444e1ec5b4b1c9f811fea7fe0b401f14514
Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap,Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap,Alwnikrotikz/marinemap,Alwnikrotikz/marinemap
lingcod/bookmarks/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nif __name__ == '__main__':\n all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')\n unittest.TextTestRunner().run(all_tests)\n\n```\n\nApply this change: Fix an issue when unit tests always return ...
python
edit
1
0
mit
48af7d169bac32898763af671f3a30170b85d2cd
sergeymironov0001/twitch-chat-bot
tests/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nDATABASES = {\"default\": {\"ENGINE\": \"django.db.backends.sqlite3\"}}\n\nSECRET_KEY = \"secrekey\"\n\nINSTALLED_APPS = [\"phonenumber_field\", \"tests\"]\n\n```\n\nApply this change: Set DEFAULT_AUTO_FIELD for the test project\n\nhttps://...
python
edit
1
0
mit
9dc35ebafb3e33c3736c8d58a8cb2353695ddedb
stefanfoulis/django-phonenumber-field
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# -*- coding: utf-8 -*-\nfrom .cmd2 import __version__, Cmd, CmdResult, Statement, categorize\nfrom .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category\n\n```\n\nApply this change: Add EmptySta...
python
edit
12
0
mit
9217bfc6bab0d152e33d9fda60218c404b61d064
python-cmd2/cmd2,python-cmd2/cmd2
cmd2/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nfrom ..player import Player\nfrom ..utils import utility\n\n\nclass AlphaBeta(Player):\n\n name = 'Alpha-Beta'\n\n def __init__(self, eval_func=utility, max_depth=1000):\n self._eval = eval_func\n self._ma...
python
edit
3
6
mit
e2126518957d0e3e360af3f80b1657bde9053b23
davidrobles/mlnd-capstone-code
capstone/game/players/alphabeta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom . import models\nfrom pola.forms import (CommitDescriptionMixin,\n FormHorizontalMixin, SaveButtonMixin,\n ReadOnlyFieldsMixin)\n\n\nclass CompanyForm(ReadOnlyFi...
python
edit
1
0
bsd-3-clause
605339144c61c4860f1dc7dec5fc5a0ff959600f
KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend
company/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helpers for parsing files and strings" }, { "role": "assistant", "content": "\"\"\"Coil: A Configuration Library.\"\"\"\n\n__version__ = \"0.3.0\"\n\nfrom coil.parser import Parser\n\ndef parse_file(file_name):\n \"\"\"Ope...
python
new_file
1
1
mit
a17c2ce30f30d0441b1475457b0bc9d04da9f143
tectronics/coil,marineam/coil,kovacsbalu/coil,kovacsbalu/coil,marineam/coil,tectronics/coil
coil/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom settings import DeploymentType\n\ndef default(request):\n context = {}\n context['DEPLOYMENT'] = settings.DEPLOYMENT\n context['site'] = Site.obje...
python
edit
1
3
mit
559fa4bf1982de6dd4a8943939b535972731bd08
bueda/django-comrade
comrade/core/context_processors.py
rejected_duplicate
Near-duplicate of sample 15105
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"FreeBSD port building infrastructure.\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom . import event\n\ndef stop(kill=False, kill_clean=False):\n \"\"\"Stop building ports and cleanup.\"\"\"\n from os import killpg\n from s...
python
edit
3
16
bsd-2-clause
f664609d579e7b709945756def90092f0814998e
DragonSA/portbuilder,DragonSA/portbuilder
libpb/__init__.py
rejected_complexity
Cyclomatic complexity too high: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of python-markups module\n# License: BSD\n# Copyright: (C) Dmitry Shachnev, 2012\n\nimport os.path\n\n# Some common constants and functions\n(LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3)\nCONFIG...
python
edit
1
3
bsd-3-clause
1b97aa2dae43a8988802ca532a3200f444f85db3
retext-project/pymarkups,mitya57/pymarkups
markups/common.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom distutils.version import LooseVersion\n\nfrom django.db import models, migrations\n\ndef set_position_value_for_levin_classes(apps, schema_editor):\n i = 0\n Lev...
python
edit
1
3
mit
0ad7be235135303cb9d902df2a89b17da8aac918
aymara/verbenet-editor,aymara/verbenet-editor,aymara/verbenet-editor
syntacticframes_project/syntacticframes/migrations/0012_auto_20150220_1836.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\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\nimport sys\n\nimport logbook\nimport subprocrunner\n\nimport tcconfig\nfrom .traffic_control ...
python
edit
1
4
mit
fdbf12d560a18724b5293e4cee8aa3a03a48c90b
thombashi/tcconfig,thombashi/tcconfig
tcconfig/tcdel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom importlib import import_module\n\nfrom django.conf import settings\nfrom django.contrib.sessions import middleware\nfrom django.db import connection\nfrom django.utils import translation\n\nfrom tenant_extras.middleware import tenant_t...
python
edit
1
5
bsd-3-clause
15c596ea224fb0a624404d425a2580ab3503807d
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/utils/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\n\ntry:\n __version__ = pkg_resources.get_distribution(__name__).version\nexcept pkg_resources.DistributionNotFound:\n __version__ = None\n\n```\n\nApply this change: Add \"no cover\" pragma to version setting cod...
python
edit
1
0
bsd-2-clause
67c671260858cc2c3d3041188cebda63cac1c4eb
suutari-ai/prequ,suutari/prequ,suutari/prequ
prequ/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nclass Listener(object):\n def __init__(self):\n import zmqclient\n\n self.artist = None\n self.title = None\n pub = zmqclient.pub()\n\n def new_media_status(self, status):\n ...
python
edit
1
6
apache-2.0
31d973be4f50e2e26d8ff65dd86d96d55e6b6250
hackeriet/nfcd,hackeriet/nfcd,hackeriet/pyhackeriet,hackeriet/pyhackeriet,hackeriet/nfcd,hackeriet/pyhackeriet
contrib/zmq/chromecast-snoop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport autocomplete_light\n\nfrom models import Contact, Address\n\nclass MyGenericChannel(autocomplete_light.GenericChannelBase):\n def get_querysets(self):\n return {\n Contact: Contact.objects.all(),\n Add...
python
edit
1
4
mit
05cb698d45ce4e33e2f4bfdc38f9633083a284a7
Eraldo/django-autocomplete-light,spookylukey/django-autocomplete-light,Perkville/django-autocomplete-light,jonashaag/django-autocomplete-light,yourlabs/django-autocomplete-light,shubhamdipt/django-autocomplete-light,Perkville/django-autocomplete-light,Visgean/django-autocomplete-light,dsanders11/django-autocomplete-lig...
test_project/project_specific/generic_channel_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\nimport typing\nfrom datetime import datetime\n\nimport discord\n\nfrom cogbot.types import ServerId, ChannelId\n\n\nlog = logging.getLogger(__name__)\n\n\nclass CogBotServerState:\n def __init__(self, bot, se...
python
edit
5
3
mit
f6dd7d0ca966856325adc50f4c5ca2cc48dda0a5
Arcensoth/cogbot
cogbot/cog_bot_server_state.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport glob\nimport re\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ncsv_files = glob.glob('*.csv')\n\nfig = plt.figure()\nax = fig.add_subplot(111)\n\ncolors = iter(plt.cm.ra...
python
edit
1
0
bsd-3-clause
50451c69d337228c2016851258ff7249bf906440
nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting
profiling/plot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport argparse\n\ndef run():\n\tos.system(\"gunicorn server:app --reload --config gunicorn_config.py\")\n\ndef deploy():\n\tos.system(\"git push heroku master\")\n\ndef main():\n\tparser = argparse.Argumen...
python
edit
1
2
mit
f62ec2304bb42b0bf0eba121c1b88adb35cec6d3
EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger
run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\ndef froide(request):\n return {\"froide\": settings.FROIDE_CONFIG}\n\ndef site_settings(request):\n return {\"SITE_NAME\": settings.SITE_NAME,\n \"SITE_URL\": settings.SITE_URL,\n ...
python
edit
1
1
mit
6171b8111359cc54a4af2c3444ce0e0e2db5ba80
okfse/froide,ryankanno/froide,fin/froide,LilithWittmann/froide,okfse/froide,fin/froide,ryankanno/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,CodeforHawaii/froide,stefanw/froide,catcosmo/froide,ryankanno/froide,catcosmo/froide,catcosmo/froide,okfse/froide,fin/froide,ryankanno/froide,stefanw/froide,...
froide/helper/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# -*- coding: utf8 -*-\n\nimport tweepy\n\nconsumer_key = \"\"\nconsumer_secret = \"\"\n\naccess_token = \"\"\naccess_token_secret = \"\"\n\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_acces...
python
edit
4
5
mit
d8ce56feada64d287306d7f439ec12a42acda0d6
zhangyubaka/tweepy_favbot
bot.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader\nfrom corehq.apps.reports.generic import GenericTabularReport\nfrom corehq.apps.reports.standard import CustomProjectReport, DatespanMixin\n\n\nclass MultiTabular...
python
edit
1
4
bsd-3-clause
a24faf712d8dfba0f6ac9fc295807552dca37ae9
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/inddex/reports/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nGeneral-purpose fixtures for vdirsyncer's testsuite.\n'''\nimport logging\nimport os\n\nimport click_log\n\nfrom hypothesis import HealthCheck, Verbosity, settings\n\nimport pytest\n\n\n@pytest.fixture(autouse=True)\ndef setup_logging(...
python
edit
1
1
mit
3037c15a658ee05a4483c5b1c8c137a06e9d7707
untitaker/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flexmock import flexmock\nfrom flask.ext.storage import MockStorage\nfrom flask_uploads import init\n\n\nclass TestCase(object):\n added_objects = []\n committed_objects = []\n created_objects = []\n deleted_objects = []\n\...
python
edit
1
2
mit
46c33ca68c1124fb06c4ba62306cb00ba61d7e5c
FelixLoether/flask-uploads,FelixLoether/flask-image-upload-thing
tests/__init__.py
rejected_duplicate
Near-duplicate of sample 16662
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Copyright 2019 - 2020 The MediaPipe Authors.\n\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 at\n\n http:...
python
edit
1
0
apache-2.0
8c8b668ba3684c3e756bf9fccafbd1bd8e1a7cfe
google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe
mediapipe/__init__.py
rejected_duplicate
Near-duplicate of sample 3094
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\"\"\"Terminal-based IPython entry point.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012, IPython Development Team.\n#\n# Distributed under the terms of the...
python
edit
1
0
bsd-3-clause
24b78a4d510606563106da24d568d5fb79ddca2b
ipython/ipython,ipython/ipython
IPython/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# MIT licensed\n# Copyright (c) 2013-2017 lilydjwg <<EMAIL>>, et al.\n\nfrom flaky import flaky\nimport pytest\npytestmark = pytest.mark.asyncio\n\n@flaky(max_runs=5)\nasync def test_aur(get_version):\n assert await get_version(\"asciido...
python
edit
1
1
mit
189847ffdca0264ddd6248faa9974ba35eaea373
lilydjwg/nvchecker
tests/test_aur.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom dateutil.relativedelta import relativedelta\n\nfrom legalaid.models import Case\nfrom cla_butler.tasks import DeleteOldData\n\n\nclass FindAndDeleteCasesUsingCreationTime(DeleteOldDa...
python
edit
1
4
mit
a9e80e81fe2e6ad1325047cb3045ab12640f984f
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport os\nfrom contextlib import contextmanager\n\nfrom selenium import webdriver\n\nfrom aloe import around, world\n\nhere = os.path.dirname(__file__)\nhtml_pages = os.path.join(here, 'html_pages')...
python
edit
1
3
mit
6d22cc47174139b56fad7d94696b08d9830a7ea4
koterpillar/aloe_webdriver,infoxchange/aloe_webdriver,infoxchange/aloe_webdriver,aloetesting/aloe_webdriver,aloetesting/aloe_webdriver,aloetesting/aloe_webdriver,koterpillar/aloe_webdriver
lettuce_webdriver/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom typing import Tuple\n\nfrom opwen_email_server import azure_constants as constants\nfrom opwen_email_server import config\nfrom opwen_email_server.services.queue import AzureQueue\nfrom opwen_email_server.services.sendgrid import Sendg...
python
edit
1
2
apache-2.0
73c1900a05fa3e4f68224f4e0d5dce2c08687254
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
opwen_email_server/backend/email_sender.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='flake8-config-4catalyzer',\n version='0.2.1',\n url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer',\n author=\"Alex Rothberg\",\n author_email='<...
python
edit
1
0
mit
dd5d81263842066bf1faa3699c12da47f9453401
4Catalyzer/python
packages/flake8-config-4catalyzer/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport queue\nimport threading\n\n\ndef loop(queue, actor):\n while True:\n message = queue.get()\n actor.behavior(message)\n\n \nclass Actor(object):\n\n def __init__(self):\n pass\n \n def _star...
python
edit
1
2
mit
155822548be11161aefdb0d93d5ec86095ab3624
waltermoreira/tartpy
rt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport discord\nfrom modules.botModule import BotModule\nfrom modules.help import *\nimport time\nimport datetime\n\nclass Status(BotModule):\n name = 'status'\n\n description = 'Allow for the assignment and removal of roles.'...
python
edit
6
3
mit
dcb1fc943ec4fe39bd752b1015ba11f6d8145c27
suclearnub/scubot
modules/status.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nSELECT_MOVIES_ORDERED_BY_RATING = '''\n SELECT *\n FROM MOVIE\n ORDER BY RATING;\n'''\n\nSELECT_PROJECTION_FOR_MOVIE = '''\n SELECT p.*, COUNT(r.ROW * r.COL)\n FROM PROJECTION as p\n LEFT JOIN RESERVATION as r\n ON r.PR...
python
edit
1
0
mit
cb2a6c44fcff3453bbf20dbecbd807ee8e640e8e
BrickText/JHROM
database/queries/select_queries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\ndef usage():\n print '%s all -- build all bsp' % os.path.basename(sys.argv[0])\n print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0])\n print '%s project -- update all prject files' % os....
python
edit
5
1
apache-2.0
2313424f811c59563090e77966d906dd3eb7f127
RT-Thread/rt-thread,FlyLu/rt-thread,weiyuliang/rt-thread,ArdaFu/rt-thread,weiyuliang/rt-thread,geniusgogo/rt-thread,weety/rt-thread,igou/rt-thread,weiyuliang/rt-thread,hezlog/rt-thread,armink/rt-thread,wolfgangz2013/rt-thread,armink/rt-thread,ArdaFu/rt-thread,hezlog/rt-thread,AubrCool/rt-thread,geniusgogo/rt-thread,yon...
tools/buildbot.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dbaas_cloudstack.provider import CloudStackProvider\nfrom pre_provisioned.pre_provisioned_provider import PreProvisionedProvider\nimport logging\n\nLOG = logging.getLogger(__name__)\n\nclass IaaSManager():\n \n @classmethod\n ...
python
edit
1
4
bsd-3-clause
01cd080395533b9e8d53f4c203ef6be185d97ebc
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/integrations/iaas/manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 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\nimport os\n\nimport pyauto_functional # must b...
python
edit
1
3
bsd-3-clause
ef73cc38e08db709a33321cde47ceb6dfce3504d
TheTypoMaster/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa...
chrome/test/functional/chromeos_private_view.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport nodeconductor.core.fields\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('openstack', '0022_...
python
edit
1
0
mit
dc1a7bc4d674fd6e7235222612f1d147112d77db
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind
src/nodeconductor_assembly_waldur/packages/migrations/0002_openstack_packages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"\nWarn for use of `--interactive` inside Makefiles (#11468).\n\nEncourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of\n`$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to\nforget on...
python
edit
1
0
bsd-3-clause
db43b3b3079842fb2baf6d181ef39374acf0053c
sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc
.gitlab/linters/check-makefiles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom registration.models import RegistrationProfile\n\n\nclass RegistrationAdmin(admin.ModelAdmin):\n list_display = ('__unicode__', 'activation_key_expired')\n search_fields = ('user__username', 'u...
python
edit
1
0
bsd-3-clause
94596f036270f8958afd84eb9788ce2b15f5cbd4
rafaduran/django-pluggable-registration,rbarrois/django-registration,maraujop/django-registration,thedod/django-registration-hg-mirror,CoatedMoose/django-registration,AndrewLvov/django-registration,AndrewLvov/django-registration,aptivate/django-registration,fedenko/django-registration,CoatedMoose/django-registration,ch...
registration/admin.py
rejected_duplicate
Near-duplicate of sample 444
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.16.2\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\...
python
edit
1
0
mit
5e504ae82c37b47ad2c1781cc74d13cdccc72495
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
rejected_duplicate
Near-duplicate of sample 16639
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass DotDict(dict):\n\n __getattr__ = dict.__getitem__\n __setattr__ = dict.__setitem__\n __delattr__ = dict.__delitem__\n\n def __init__(self, d={}):\n for key, value in d.items():\n if hasattr(value, 'keys')...
python
edit
1
6
mit
5a69162e82c2c6031587448b975f5867c94873ed
storborg/pyramid_es
pyramid_es/dotdict.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, request, render_template\n\nimport os\n\n\napp = Flask(__name__)\napp.debug = True\n\n# Secret Key setting based on debug setting\nif app.debug:\n app.secret_key = \"T3st_s3cret_k3y!~$@\"\nelse:\n app.secret_k...
python
edit
2
6
apache-2.0
552d216f2cbcb780c08cc351a7456fb97ac3c3dd
bunseokbot/proxy_register,bunseokbot/proxy_register
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom uni_form.helper import FormHelper\nfrom uni_form.layout import Submit, Layout, Fieldset, ButtonHolder\nfrom Instanssi.ext_programme.models import ProgrammeEvent\n\nclass ProgrammeEve...
python
edit
1
1
mit
f4500e6422f1c6af8e9ce7d2d79d81e7479f0b7f
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/admin_programme/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Adler Brediks Medrado\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://w...
python
edit
1
0
apache-2.0
e49163ceecc5da949fe01281a87b56be513784d5
adlermedrado/abbr
abbr/languages/pt_br/dictionary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom traceback import format_exc\n\nfrom django.conf import settings\n\n\nclass GraphQLError(Exception):\n def __init__(self, message):\n super(GraphQLError, self).__init__(message)\n self.message = message\n self.lo...
python
edit
1
2
mit
792b9d42167208b39a5e37f2ddf608547238af4f
melinath/django-graph-api,melinath/django-graph-api
django_graph_api/graphql/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport platform\nimport textwrap\nimport sysconfig\n\nimport pytest\n\nfrom distutils import ccompiler\n\n\ndef _make_strs(paths):\n \"\"\"\n Convert paths to strings for legacy compatibility.\n \"\"\"\n i...
python
edit
1
3
mit
71cffcb8a8ec7e36dc389a5aa6dc2cc9769a9e97
pypa/setuptools,pypa/setuptools,pypa/setuptools
distutils/tests/test_ccompiler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: fdm=indent\n# author: Fabio Zanini\n# date: 02/08/17\n# content: Support module for filenames related to the Google Sheet APIs.\n# Modules\nimport os\nimport yaml\n\n\n# Globals\nconfig_filename = os.getenv(\n 'SI...
python
edit
1
0
mit
0fbc02b40f4414d96686d879aa9f7611e8fbb85d
iosonofabio/singlet,iosonofabio/singlet
singlet/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# on_rtd is whether we are on readthedocs.org\nimport os\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\nif not on_rtd: # only import and set the theme if we're building docs locally\n import sphin...
python
edit
1
0
apache-2.0
08489ea2c1596a067b482878ff4450db43c08612
Kurento/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,Kurento/doc-kurento,Kurento/doc-kurento,SanMi86/doc-kurento
conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .rest import RestClient\n\n\nclass Blacklists(object):\n def __init__(self, domain, jwt_token):\n url = 'https://%s/api/v2/blacklists/tokens' % domain\n\n self.client = RestClient(endpoint=url, jwt=jwt_token)\n\n de...
python
edit
1
1
mit
aed9b3066f9d796e5c89e38d833c87e130a421c3
auth0/auth0-python,auth0/auth0-python
auth0/v2/blacklists.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module contains the testing framework for the display driver functionality, and is responsible for testing whether\nthe pi can correctly and sufficiently connect to the display.\n\"\"\"\n\nfrom mock import patch\nfrom display_a...
python
edit
1
2
mit
407a032acb307e5f936437aec4975ef69133d0c5
CO600GOL/Game_of_life,CO600GOL/Game_of_life,CO600GOL/Game_of_life
DisplayAdapter/testing/test_display_adapter/test_display_driver/test_display_drivers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom logging import Handler\nfrom datetime import datetime \n\nclass DBLogHandler(Handler, object):\n def __init__(self):\n super(DBLogHandler, self).__init__()\n \n def emit(self, record):\n ...
python
edit
3
3
mit
deeaed14e40b9deca39c46ec7879f775606898c0
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/dblog/handlers.py
rejected_duplicate
Near-duplicate of sample 11428
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\n\nclass ExceptionFilter(logging.Filter):\n def __init__(self, debug=None):\n self.debug = debug\n\n def filter(self, record):\n if self.debug:\n return True\n\n # clear exceptions when...
python
edit
1
2
mit
3e4094d838df26afadfa7074a16c6a21f06ba6b8
inirudebwoy/bamp
bamp/logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom FbFeed import NewsFeed\n\n\nusername = raw_input('Enter your email id registered with facebook : ')\npassword = raw_input('Enter your Password : ')\nprint('Creating new session on Firefox..')\nfb = NewsFeed(username,password)\nprint('L...
python
edit
4
0
mit
92e5ff34737feef0d196e25b97dbc817b502a59d
ashishpahwa7/Fb-Feedirator
demo.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\nfrom shutil import copyfile\ntry:\n from jinja2 import Template\nexcept:\n print \"Could not import Jinja2, run 'easy_install Jinja2'\"\n exit()\n\noutput_dir = os.path.join('./', 'chrome_webstore')\n\nif not os.pat...
python
edit
3
1
mit
fc3408e0d8336ca2324b272dbb4aa0e69914a27c
youtify/youtify,youtify/youtify,youtify/youtify
build_chrome_webapp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom demoapp.forms import DemoLoginForm\nfrom django.shortcuts import render_to_response\nfrom django.shortcuts import redirect\nfrom demoapp import app_settings\nfrom demoapp.utils import get_salt\n\n\ndef login_view(request):\n if requ...
python
edit
1
3
unlicense
61d7c9e99398874745d11720cd8d985bdc3d7514
dboczek/django-demo,dboczek/django-demo
demoapp/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport redis\nfrom celery import Celery\n\nfrom .driller import Driller\n\napp = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost')\nredis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1)\n\n@app.t...
python
edit
1
1
bsd-2-clause
df1617a7518f66d87470f948e057e4d7d7d8f026
shellphish/driller
driller/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef FlagsForFile(filename, **kwargs):\n\n flags = ['-std=c++14', '-I/usr/local/include']\n\n proj_root = os.path.dirname(os.path.abspath(__file__))\n libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include...
python
edit
3
1
mit
a85d148eb00f83052a97d66da8ff9dd79b40f172
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
.ycm_extra_conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass LazyModel(object):\n \"\"\"\n It's a helper class that is used in case you have model_class and object\n primary key. You might need to use only object id.\n \n If you try to access other fields of the model class then ...
python
edit
1
3
mit
5c1615d9e3e16c1f48be41733997d8c39355bcb4
ProstoKSI/django-distributed-queue
django_distributed_queue/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Channel(models.Model):\n def __str__(self):\n return self.name\n\n name = models.CharField(max_length=20, unique=True)\n\n\nclass Message(models.Model):\n def __str__(self):\n r...
python
edit
1
2
mit
238da6f5cb5409409f54980f4ce018fda897a766
dionyziz/ting,gtklocker/ting,dionyziz/ting,gtklocker/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting
API/chat/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom model_utils import Choices\n\nfrom ohashi.constants import OTHER\n\n\nBLOOD_TYPE = Choices('A', 'B', 'O', 'AB')\n\nCLASSIFICATIONS = Choices(\n (1, 'major', 'Major Unit'),\n (2, 'minor', 'Minor Unit'),\n (4, 'temporary', 'Temp...
python
edit
1
0
apache-2.0
7d898ec04733d25c1df33c8faf151f2b42a69ec9
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/components/people/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .plcorebase import PlCoreBase\nfrom .planetstack import PlanetStack\nfrom .project import Project\nfrom .singletonmodel import SingletonModel\nfrom .service import Service\nfrom .service import ServiceAttribute\nfrom .tag import Tag\nf...
python
edit
55
0
apache-2.0
afc5b02f2520382fc0ebb3370538ca2baeb04dd4
cboling/xos,zdw/xos,open-cloud/xos,open-cloud/xos,open-cloud/xos,zdw/xos,cboling/xos,opencord/xos,opencord/xos,cboling/xos,zdw/xos,cboling/xos,zdw/xos,cboling/xos,opencord/xos
planetstack/core/models/__init__.py
rejected_lint
Too many lint violations: 55
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport scrapy\n\n\nclass DataScienceJobsSpider(scrapy.Spider):\n name = \"data-science-jobs\"\n allowed_domains = [\"www.data-science-jobs.com\"]\n start_urls = (\n 'http://www.data-science-jobs.com/...
python
edit
1
1
mit
96b9c25268e98e9464d8b068aa12de113ad1c66f
cyberbikepunk/job-spiders
joby/spiders/data_science_jobs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom operator import itemgetter\nfrom itertools import chain\n\nimport os\n\nimport yaml\nimport requests\n\nyaml.load_all\n\ndirectory = \"_companies\"\n\nflat = chain.from_iterable\n\ndef link_status_company(filename):\n (name, _) = fi...
python
edit
1
2
apache-2.0
d81a1ba12add244cb246efeae5c292a6d995c9b8
Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai
deadlinks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Aparajita Fishman\n# Copyright (c) 2013 Aparajita Fishman\n#\n# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep25...
python
edit
1
1
mit
64cbf90dbb8378752398d15d75ee5af9aa5b32ed
SublimeLinter/SublimeLinter-pep257
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nfrom ..models import Testimonial\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef random_testimonials(number):\n return Testimonial.objects.filter(active=True).order_by(\"?\")[:number]\n\n\n@...
python
edit
1
2
mit
8bfb43e6af19e6335a95768289036fb73caac559
pinax/pinax-testimonials
pinax/testimonials/templatetags/pinax_testimonials_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nsys.path.insert(0, \"../financialScraper\")\nimport pandas as pd\nfrom financialScraper import getqf\nfrom sqlalchemy import create_engine\n\nrunning = True\n\n\n# engine = create_engine(os.environ.get('DATABASE_URL')...
python
edit
4
0
mit
f3ea9820a96536e74e6f74f13387140c97ea9f2e
caseymacphee/green_quote,caseymacphee/green_quote
backgroundworker.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom .command import Command\nfrom matador import utils\n\n\nclass DeployTicket(Command):\n\n def _add_arguments(self, parser):\n parser.add_argument(\n '-e', '--environment',\n type=st...
python
edit
1
1
mit
8868cb556851d3caf227281873d619ec3ddc726a
Empiria/matador
matador/commands/deploy_ticket.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe.utils.scheduler import disable_scheduler, enable_scheduler\n\ndef...
python
edit
1
2
mit
644660b6c41f029f271a0b8866387f358f8fdf54
BhupeshGupta/frappe,letzerp/framework,saurabh6790/frappe,rmehta/frappe,elba7r/builder,suyashphadtare/sajil-frappe,rohitw1991/frappe,saguas/frappe,indictranstech/tele-frappe,nerevu/frappe,indictranstech/omnitech-frappe,vCentre/vFRP-6233,gangadharkadam/saloon_frappe,aboganas/frappe,indictranstech/phr-frappe,gangadharkada...
frappe/patches/v4_0/enable_scheduler_in_system_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scrapi.base import helpers\n\n\nclass TestHelpers(object):\n\n def test_format_one_tag(self):\n single_tag = ' A single tag '\n single_output = helpers.format_tags(single_tag)\n assert single_output == ['a singl...
python
edit
1
1
apache-2.0
59a345f29d77026c9bd8b2ec27df71253dc3d1e6
fabianvf/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,icereval/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,felliott/scrapi,erinspace/scrapi,fabianvf/scrapi,felliott/scrapi,mehanig/scrapi,alexgarciac/scrapi,erinspace/scrapi
tests/test_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\n\nimport re\n\nimport astroid\n\nfrom . import tools, test_mark_tokens\n\n\nclass TestAstroid(test_mark_tokens.TestMarkTokens):\n\n is_astroid_test = True\n ...
python
edit
1
3
apache-2.0
8f82336aed62a18b2c6f824fcf0e6b1a1d00b8d3
gristlabs/asttokens
tests/test_astroid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom registration.forms import RegistrationForm\n\nfrom .mode...
python
edit
1
2
mit
71f007559ca2adf69d09f3c6f720383bfd784897
muhummadPatel/raspied,muhummadPatel/raspied,muhummadPatel/raspied
students/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom raven.conf import load\nfrom unittest2 import TestCase\n\n\nclass LoadTest(TestCase):\n def test_basic(self):\n dsn = 'https://foo:<EMAIL>/1'\n res = {}\n load(dsn, res)\n self.assertEquals(res, {\n ...
python
edit
1
1
bsd-3-clause
0692cc324d3759703ee52e117ac19e75d82df6a6
inspirehep/raven-python,jmagnusson/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,akalipetis/raven-python,inspirehep/raven-python,nikolas/raven-python,hzy/raven-python,smarkets/raven-python,beniwohli/apm-agent-python,icereval/raven-python,jmagnusson/raven-python,percipient/raven-python,dirtycoder/opbeat_pyth...
tests/config/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nUnit tests for see.py\n\"\"\"\nfrom __future__ import print_function, unicode_literals\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nimport see\n\n\ncl...
python
edit
1
1
bsd-3-clause
48075a16190bbcc3d260dfa242a5553b129de8a8
araile/see
tests/test_see.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom pytest import fixture\n\nfrom iamport import Iamport\n\nDEFAULT_TEST_IMP_KEY = 'imp_apikey'\nDEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O'\n 'qDMnxyeB9...
python
edit
1
1
mit
4ef8681f9dcd0f92be524925d3cacdae68c45616
iamport/iamport-rest-client-python
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Code snippet to test the Java ServerProxy interface to the Pings server.\"\"\"\n\nimport ServerProxy, ClientInfo\n\nsp = ServerProxy('localhost', 6543)\n\nif False:\n # Need to change permissions on ServerProxy Java class for this ...
python
edit
8
0
bsd-3-clause
af79bd6dce28e8147994a8fe2afb4df742dcd3eb
lisa-lab/pings,lisa-lab/pings,lisa-lab/pings,lisa-lab/pings
client/test_server_proxy.py
rejected_lint
Too many lint violations: 8
true