messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 ELIFE. All rights reserved.\n# Use of this source code is governed by a MIT\n# license that can be found in the LICENSE file.\nfrom ctypes import CDLL\n\ndef get_libpath():\n \"\"\"\n Get the library path of the the d...
python
edit
4
8
mit
85fce5f5ab57b6c2144c92ec0d9b185740d7dc91
ELIFE-ASU/PyInform
pyinform/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE...
python
edit
1
2
apache-2.0
3a5432e14c18852758afdf92b913c93906808e3e
phenoxim/cinder,Datera/cinder,mahak/cinder,openstack/cinder,j-griffith/cinder,openstack/cinder,mahak/cinder,j-griffith/cinder,Datera/cinder,phenoxim/cinder
cinder/db/sqlalchemy/migrate_repo/versions/115_add_shared_targets_to_volumes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport threading\n\n\ndef pytest_exception_interact(node, call, report):\n \"\"\"\n Drop into PyCharm debugger, if available, on uncaught exceptions.\n \"\"\"\n try:\n import pydevd\n from ...
python
edit
1
5
bsd-3-clause
68fa1fd0df0f4048ac32e80698ebd872fb1f7fba
jlubcke/pytest-pycharm
pytest_pycharm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport argparse\nimport csv\nimport shutil\nimport subprocess\nimport sys\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser(description=\"Chain together Inkscape extensions\")\n parser.add_argum...
python
edit
1
0
mit
d18d4f72ed24177143a9dbcf74fc1c001235ded5
jturner314/inkscape-batch-effect
batch_effect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\nclass WeightedQuickUnion(object):\n\n def __init__(self):\n self.id = []\n self.weight = []\n\n def find(self, val):\n p = val\n while self.id[p] != p:\n ...
python
edit
1
2
mit
844aff45eb1804b461460368f97af4f73a6b62f0
hongta/practice-python,hongta/practice-python
data_structures/union_find/weighted_quick_union.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.10.1 on 2016-10-24 23:38\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('te...
python
edit
1
0
mit
b0e5dff69b9e40b916ad8a6655624de7fa85d247
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
chmvh_website/team/migrations/0002_auto_20161024_2338.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Beyonic API Python bindings\r\n\r\n#default values if any\r\nDEFAULT_ENDPOINT_BASE = 'https://app.beyonic.com/api/'\r\n\r\n#config\r\napi_key = None\r\napi_endpoint_base = None\r\napi_version = None\r\nverify_ssl_certs = True #set to Fals...
python
edit
7
0
mit
1bb03750b997a152a9360be613a15057e59b8a17
beyonic/beyonic-python,beyonic/beyonic-python,beyonic/beyonic-python
beyonic/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport threading\n\n\ndef pytest_exception_interact(node, call, report):\n \"\"\"\n Drop into PyCharm debugger, if available, on uncaught exceptions.\n \"\"\"\n try:\n import pydevd\n from ...
python
edit
1
5
bsd-3-clause
45fcbaa7515faaa2f812bd9ceb0800fbeb64f1e7
jlubcke/pytest-pycharm
pytest_pycharm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\n\ndef import_class(import_str):\n \"\"\"Returns a class from a string including module and class.\"\"\"\n\n mod_str, _sep, class_str = import_str.rpartition(':')\n try:\n __import__(mod_str)\n return get...
python
edit
1
2
apache-2.0
fc9296957122fe7499711c0b0801c96e286b6725
klmitch/turnstile
turnstile/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .atflex import AtfLexer\nfrom .atfyacc import AtfParser\nfrom mako.template import Template\n\n\nclass AtfFile(object):\n\n template = Template(\"${text.serialize()}\")\n\n def __init__(self, content):\n self.content = con...
python
edit
1
2
mit
82f7a48695bc1dd97f9ab2697548f15b124dc82a
UCL/pyoracc
pyoracc/atf/atffile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, argparse\nfrom echolalia.formatter.csver import Formatter\n\nclass CsverTestCase(unittest.TestCase):\n\n def setUp(self):\n self.parser = argparse.ArgumentParser()\n self.data = [{'char': chr(i), 'order': i - 96} for...
python
edit
2
2
mit
ea17a76c4ada65dac9e909b930c938a24ddb99b2
eiri/echolalia-prototype
tests/formatter/test_csver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nsantaPosition = [0, 0]\nroboSantaPosition = [0, 0]\n\nuniquePositions = set()\n\ninput = open(\"data\", \"r\").read()\nfor index, char in enumerate(input):\n\tposition = []\n\n\tif index % 2 == 0:\n\t\tposition = santaPosition\n\telse:\n\t\...
python
edit
2
0
mit
484f3537d634e31f79c2281cff869724707ee2c3
Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015
day03/solution.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 Mirantis 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# http://www.ap...
python
edit
1
1
apache-2.0
a8bb719061a68b5d322868768203476c4ee1e9b9
idegtiarov/gnocchi-rep,leandroreox/gnocchi,sileht/gnocchi,idegtiarov/gnocchi-rep,gnocchixyz/gnocchi,sileht/gnocchi,idegtiarov/gnocchi-rep,gnocchixyz/gnocchi,leandroreox/gnocchi
gnocchi/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom airflow import DAG\nfrom airflow.operators import BashOperator, PythonOperator\nfrom datetime import datetime, timedelta\n\ndefault_args = {\n 'owner': 'airflow',\n 'depends_on_past': False,\n 'start_date': datetime(2015, 6, 1...
python
edit
3
0
mit
7b4fad8b4f08b986b184799817cf4b46958b9e85
llevar/germline-regenotyper,llevar/germline-regenotyper
tracker/src/main/freebayes-regenotype-workflow.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom ..templates import QuandlFT\n\nclass TestTemplates(object):\n\n def test_quandl_ft(self):\n ftemp = QuandlFT(\"xxx\", trim_start=\"yyyy-mm-dd\", authtoken=\"yyy\")\n assert ftemp.sourcing == {'authtoken': 'yyy',\n ...
python
edit
null
null
bsd-3-clause
7cbd21a050a9e94d0f8f1f5c3ce4f81c812e279c
Equitable/trump,Asiant/trump,jnmclarty/trump
trump/templating/tests/test_templates.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\n\n\ndef test_subcommand():\n \"\"\"\n Test that a command from the example project is registered.\n \"\"\"\n output = subprocess.check_output(['textx'], stderr=subprocess.STDOUT)\n assert b'testcommand' in ...
python
edit
1
1
mit
bb229be50e37bb710c32541cec7b159da9508335
igordejanovic/textX,igordejanovic/textX,igordejanovic/textX
tests/functional/subcommands/test_subcommands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\n\n\nif __name__ == \"__main__\":\n usage = []\n\n with open(\"tests/fixtures/2021/03/S3.csv\") as f:\n reader = csv.DictReader(f)\n for row in reader:\n usage.append(row)\n\n print(\"Simple Stor...
python
edit
1
2
apache-2.0
3494282003315b32e8fe139714be041ed4dc2511
ifosch/accloudtant
accloudtant/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport nose.tools as nt\nfrom asyncio import get_event_loop\nfrom asyncio import sleep as async_sleep\n\nfrom pyee import EventEmitter\n\n\ndef test_async_emit():\n \"\"\"Test that event_emitters can handle wra...
python
edit
1
1
mit
1b7634e3a98919df5f2f4d54c57bb72dfbf308df
jfhbrook/pyee
py3-test/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2014 VMware, Inc. 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...
python
edit
1
0
apache-2.0
7252af9442d82c42a881d5dfbb4db470b28fcd3a
ramineni/my_congress,openstack/congress,ekcs/congress,openstack/congress,ramineni/my_congress,ekcs/congress,ekcs/congress,ekcs/congress,ramineni/my_congress,ramineni/my_congress
congress/datasources/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport simple_salesforce\nfrom cumulusci.tasks.salesforce import BaseSalesforceApiTask\n\nclass is_rd2_enabled(BaseSalesforceApiTask):\n def _run_task(self):\n try:\n settings = self.sf.query(\n \"SELECT ...
python
edit
1
4
bsd-3-clause
62d9fdfe0ad3fc37286aa19a87e2890aaf90f639
SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus
tasks/check_rd2_enablement.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom plumeria.command import commands, CommandError\nfrom plumeria.util import http\nfrom plumeria.util.ratelimit import rate_limit\n\n\n@commands.register(\"urbandict\", \"urb\", category=\"Search\")\n@rate_limit()\nasync def urban_diction...
python
edit
1
3
mit
c6f691e5ad67fa1631a37da35b3af9dbdcea3925
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
plumeria/plugins/urban_dictionary.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import deque\n\n\ndef isVerticallyStackable(pile):\n vertical_stack = []\n while pile:\n largest_cube, cube_sizes = remove_largest_cube_from_pile(pile)\n if vertical_stack == []:\n vertical_st...
python
edit
1
4
mit
1441654c46e08b7286999b6887e59c56fa238ff7
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/piling-up.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set the version number to 0.11.wave" }, { "role": "assistant", "content": "from ofxparse import OfxParser, AccountType, Account, Statement, Transaction\n\n__version__ = '0.11.wave'\n" } ]
python
new_file
7
0
mit
93765a8c82d4cc6b988ed5a191fa595e58e64665
hiromu2000/ofxparse,jseutter/ofxparse,rdsteed/ofxparse,udibr/ofxparse,jaraco/ofxparse,egh/ofxparse
ofxparse/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tensorflow as tf\n\n\ndef masked_softmax_cross_entropy(preds, labels, mask):\n \"\"\"Softmax cross-entropy loss with masking.\"\"\"\n loss = tf.nn.softmax_cross_entropy_with_logits(logits=preds, lables=labels)\n mask = tf.ca...
python
edit
1
1
mit
16553fd759e70d93824407f18cdea419703d85d4
tkipf/gcn
gcn/metrics.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test the ``dtool dataset create`` command.\"\"\"\n\nimport os\nimport shutil\n\nfrom click.testing import CliRunner\n\nfrom dtoolcore import DataSet\n\nfrom . import chdir_fixture, tmp_dir_fixture # NOQA\nfrom . import SAMPLE_FILES_D...
python
edit
4
1
mit
91c620e228ad73e2e34efbd60813ed35b3f9ef46
jic-dtool/dtool-create
tests/test_dtool_dataset_freeze.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('scipy',parent_package,top_path)\n #config.add_subpackage('cluster')\n #config.add_subpackage('...
python
edit
1
1
bsd-3-clause
c67acb72d5ddea8a1e4fb8a12aa3a6913629e0cb
lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor
Lib/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport unittest2 as unittest\nfrom tkp.quality.restoringbeam import beam_invalid\n\nfrom tkp.testutil.decorators import requires_data\nfrom tkp import accessors\nfrom tkp.testutil.data import DATAPATH\n\n\nfits_file = os.path.j...
python
edit
1
1
bsd-2-clause
8fc504113e12649067fb2bdcc239f8f2260ad4b8
transientskp/tkp,mkuiack/tkp,mkuiack/tkp,transientskp/tkp,bartscheers/tkp,bartscheers/tkp
tests/test_quality/test_restoringbeam.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm,Textarea\n\n\nfrom .models import Post\n\n\nclass PostForm(ModelForm):\n class Meta:\n model = Post\n fields = ('subject','body')\n widgets = {\n 'body': Textarea(\n ...
python
edit
1
0
mit
884852eeb2dec07dccefc26595f097ec9ae8532b
Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters
forum/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom github import Github\n\nfrom slack.slackbot import SlackerAdapter\nfrom utils.config import Config\nfrom utils.resource import MessageResource\n\nclass GithubManager(object):\n\n def __init__(self):\n self....
python
edit
1
5
mit
48a92a395967aa6a0171495e80566910f76fd06c
DongjunLee/kino-bot
kino/functions/github.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport csv\nimport itertools\n\n\ndef grouper(iterable, n):\n \"\"\"\n Slice up `iterable` into iterables of `n` items.\n\n :param iterable: Iterable to splice.\n :param n: Number of items per slice.\n ...
python
edit
2
3
mit
0e0b96d0d800716102204cfdca7317ccb92cee95
TkTech/pytextql
pytextql/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2018 gRPC authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apach...
python
edit
3
2
apache-2.0
b7335f5c011d9fad3570a097fb1165cc6fbd3cef
mehrdada/grpc,sreecha/grpc,stanley-cheung/grpc,vjpai/grpc,mehrdada/grpc,muxi/grpc,pszemus/grpc,stanley-cheung/grpc,jtattermusch/grpc,donnadionne/grpc,grpc/grpc,mehrdada/grpc,pszemus/grpc,ctiller/grpc,nicolasnoble/grpc,firebase/grpc,donnadionne/grpc,ctiller/grpc,jtattermusch/grpc,donnadionne/grpc,vjpai/grpc,muxi/grpc,do...
src/python/grpcio_tests/tests/unit/_logging_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport procbridge\n# from procbridge import procbridge\n\n\nhost = '127.0.0.1'\nport = 8077\n\nclient = procbridge.ProcBridge(host, port)\n\nprint(client.request('echo', {}))\n\nprint(client.request('add', {\n 'elements': [1, 2, 3, 4, 5]...
python
edit
1
0
mit
e821236194b7e6f132c9fd08758b751edd8f0fc8
gongzhang/proc-bridge,gongzhang/proc-bridge
Python/ProcBridge/example/client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAn OpenID URL fetcher respecting the settings.\n\"\"\"\n\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import st...
python
edit
1
4
mit
cfabcbe0e729eeb3281c4f4b7d6182a29d35f37e
infoxchange/ixprofile-client,infoxchange/ixprofile-client
ixprofile_client/fetchers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .kmapper import KeplerMapper\nfrom .kmapper import cluster\nfrom .kmapper import Cover\nfrom .kmapper import GraphNerve\n\n```\n\nApply this change: Add __version__ variable to package" }, { "role": "assistant", "content": ...
python
edit
6
0
mit
90699f4fa6c1ce2b02e81a8fef9bfafd2175fa7f
MLWave/kepler-mapper,MLWave/kepler-mapper,MLWave/kepler-mapper
kmapper/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom datetime import date, datetime, timedelta\n\nregister = template.Library()\n\n@register.filter(expects_localtime=True)\ndef is_today(value):\n if isinstance(value, datetime):\n value = value.date(...
python
edit
3
2
mit
49ce9aa1bdd3479c31b8aa2e606b1768a444aea2
warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro
irrigator_pro/farms/templatetags/today_filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom synapseclient import Synapse, File\n\nexpression = 'syn11311347'\nmetadata = 'syn11311931'\n\n\ndef upload_file(file_path, login, parent, description=None):\n \"\"\"\n Uploads file to Synapse. Password must be stored...
python
edit
1
2
mit
3b2fae7875d89adb8537b75c7e9b48a8663a9d4f
jvivian/rnaseq-lib,jvivian/rnaseq-lib
src/rnaseq_lib/web/synapse.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport data\nimport model\nimport numpy as np\nfrom keras import optimizers\n\n\n# Localize data through file system relative indexing method\npath = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'\n\n# Use data ...
python
edit
1
0
mit
72d119ef80c4c84ae3be65c93795832a7250fc51
ogrisel/brain2vec
run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Example of expanding and unexpanding string variables in entry fields.\"\"\"\n\nfrom __future__ import print_function\n\nimport bibpy\nimport os\n\n\ndef get_path_for(path):\n return os.path.join(os.path.dirname(os.path.abspath(__f...
python
edit
1
1
mit
0fb5a8b5caa99b82845712703bf53f2348227f78
MisanthropicBit/bibpy,MisanthropicBit/bibpy
examples/string_expansion.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport pip\nfrom .helpers import get_rhino_ironpython_path\n\nif __name__ == '__main__':\n location = None\n if len(sys.argv) > 1:\n location = sys.argv[1]\n rhino_ironpython_path = get_rhino_ironpython_path(loca...
python
edit
1
0
mit
f3dd0c94c0c7be2a5ebc2c0df59dd9fb15969eb9
Digital-Structures/ghpythonremote,pilcru/ghpythonremote
ghpythonremote/_configure_ironpython_installation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os, os.path\nimport sys\nimport unittest\n\nfrom macrotest import JSONSpecMacroTestCaseFactory\n\n\ndef JSONTestCaseLoader(tests_path, recursive=False):\n \"\"\"\n Load JSON specifications for Jinja2 ...
python
edit
3
6
cc0-1.0
2cc55a25b13ac6575424ba70857a8419b796ca76
imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh,imuchnik/cfgov-refresh
_tests/macro_testing/runner.py
rejected_duplicate
Near-duplicate of sample 2608
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division\n\ndef nproc():\n from libtbx.introspection import number_of_processors\n return number_of_processors(return_value_if_unknown=-1)\n\ndef joiner(args):\n from dials.util.scale_down_image import scale_down_i...
python
edit
3
2
bsd-3-clause
02e03748e66ebf516a4a9b24f52563362e6bb895
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
command_line/scale_down_images.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport itertools\n\nfrom thinglang.lexer.values.identifier import Identifier\n\n\"\"\"\nThe internal ordering of core types used by the compiler and runtime\n\"\"\"\n\nINTERNAL_TYPE_COUNTER = itertools.count(1)\n\n# TODO: map dynamically at...
python
edit
1
2
mit
a45c79b10ef5ca6eb4b4e792f2229b2f9b0a7bbf
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/foundation/definitions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Write some logs.\"\"\"\n\nimport sys\nimport time\n\nfrom mdk import start\nmdk = start()\n\n\ndef main():\n session = mdk.session()\n session.info(\"process1\", \"hello\")\n time.sleep(1)\n sys.stdout.write(session.inject...
python
edit
1
1
apache-2.0
64d17f591bfde49d3a7b5f49f987c1138eecebf8
datawire/mdk,datawire/mdk,datawire/mdk,datawire/mdk
tests/source/start_trace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport warnings\nimport collections\n\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\n\n\ndef su_login_callback(user):\n if hasattr(settings, 'SU_LOGIN'):\n warn...
python
edit
1
4
mit
49f1715067df0208c79a1af2e73d6aa314b96bef
adamcharnock/django-su,PetrDlouhy/django-su,PetrDlouhy/django-su,adamcharnock/django-su
django_su/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom calexicon.calendars.tests.test_calendar import JulianGregorianConversion\n\nfrom calexicon.fn import julian_to_gregorian, gregorian_to_julian\nfrom calexicon.fn import julian_to_julian_day_number, julian_day_number_t...
python
edit
1
1
apache-2.0
ba2938267ac6198242e101d091339152767df557
jwg4/calexicon,jwg4/qual
calexicon/fn/tests/test_julian.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom .config import RawConfig\nfrom .exc import RunCommandsError\nfrom .run import run, partition_argv, read_run_args_from_file\n\n\ndef main(argv=None):\n try:\n all_argv, run_argv, command_argv = partition_argv(arg...
python
edit
1
2
mit
59fb7a7de69ffd49849ddcfecf2435af33efde53
wylee/runcommands,wylee/runcommands
runcommands/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nfrom flask import url_for\nfrom Simpoll import db\n\n\nclass Poll(db.Document):\n created_at = db.DateTimeField(default=datetime.datetime.now, required=True)\n question = db.StringField(max_length=255, required=True)\...
python
edit
1
1
mit
4f39c87294a53325c4251da95391b34af81b616a
dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend
models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\n\nfrom jsonschema import Draft4Validator\n\n\ndef validate_mapping(mapping):\n \"\"\" Validate a mapping configuration file against the relevant schema. \"\"\"\n file_path = os.path.join(os.path.dirname(__file_...
python
edit
1
5
mit
a774f3750b506c77f2c37d08b3d33dc66da2a12d
Ramblurr/jsonmapping
jsonmapping/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bpython import autocomplete\n\nimport unittest\ntry:\n from unittest import skip\nexcept ImportError:\n def skip(f):\n return lambda self: None\n\n#TODO: Parts of autocompletion to test:\n# Test that the right matches come...
python
edit
1
1
mit
acdbb1a9ca73b43b2a56b9372ded6859f5945721
wevial/bpython,aktorion/bpython,wevial/bpython,kdart/bpython,aktorion/bpython,kdart/bpython
bpython/test/test_autocomplete.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nc = get_config()\napp = c.InteractiveShellApp\n\n# This can be used at any point in a config file to load a sub config\n# and merge it into the current one.\nload_subconfig('ipython_config.py', profile='default')\n\nlines = \"\"\"\nfrom __f...
python
edit
3
0
bsd-3-clause
606e9731bdcaf61f1358a5fc5341c85c83d18370
ipython/ipython,ipython/ipython
IPython/config/profile/sympy/ipython_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.contrib.auth import views as auth_views\n\n\nurlpatterns = [\n url(r'^login/', auth_views.login, name='login',\n kwargs={'redirect_authentica...
python
edit
1
0
bsd-3-clause
ab0f6115c50bea63856c1e880249ad4bdca3ce42
lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin
src/web/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport wikibugs\nimport configfetcher\nimport unittest\nimport os\n\np = os.path.split(__file__)[0]\n\n\nclass TestWikibugs(unittest.TestCase):\n def setUp(self):\n self.bugs = wikibugs.Wikibugs2(\n configfetcher.Config...
python
edit
1
1
mit
1f22226575455349b3417cdae70a7a5b7181c3b3
wikimedia/labs-tools-wikibugs2,wikimedia/labs-tools-wikibugs2
tests/test_wikibugs2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport matplotlib.pyplot as plt\n\n\ndef grid_axes_labels(f, xlabel=None, ylabel=None, **kws):\n\n axes = f.axes\n\n plt.setp(axes.flat, xlabel=\"\", ylabel=\"\")\n\n if xlabel is not None:\n for ax in axes[-1]:\n ...
python
edit
1
5
bsd-3-clause
12f3cc403f6ba0be957d1fb18253fb7529009764
mwaskom/moss,mwaskom/moss
moss/plotting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.sites.models import Site\nfrom django.template.loader import get_template\nfrom django.utils import translation\n\nfrom bluebottle.clients.context import ClientContext\nfrom bluebottle.clients.mail import EmailMultiAlter...
python
edit
2
5
bsd-3-clause
dd51e13a2a7b4e4005127ca0e409d0882179b39f
onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle
bluebottle/mail/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.shortcuts import render_to_response\nfrom store.models import FandomHierarchy\n\ndef frontpage(request, filter):\n\treturn render_to_response('index.html', {'filter': filter, 'nodes': Fandom...
python
edit
3
1
bsd-3-clause
c53f03c738ad6357ccd87a506cbc05bc1e2a8474
willmurnane/store
views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.13 on 2018-05-08 19:56\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom django.db import migrations\nfrom corehq.sql_db.operations import HqRunPytho...
python
edit
1
5
bsd-3-clause
4c90264d744b177aabcaa1cecba4fe17e30cf308
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/accounting/migrations/0026_auto_20180508_1956.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ntry:\n range_ = xrange\nexcept NameError:\n # For Python3\n range_ = range\n\n\nif os.name == 'java':\n import scisoftpy as numpy\nelse:\n import numpy\n\nnp = numpy\n\n```\n\nApply this change: Replace scisoftpy...
python
edit
1
0
apache-2.0
2b11762c418d1a985c3bd64d76abbf9b515bb8da
dls-controls/scanpointgenerator
scanpointgenerator/compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
6
0
apache-2.0
91a551c0bc29d09cd2f034741c1291bfad7346db
AnishShah/tensorflow,dhalleine/tensorflow,LUTAN/tensorflow,chemelnucfin/tensorflow,brchiu/tensorflow,jalexvig/tensorflow,Intel-tensorflow/tensorflow,benoitsteiner/tensorflow-xsmm,alistairlow/tensorflow,ageron/tensorflow,sandeepdsouza93/TensorFlow-15712,RapidApplicationDevelopment/tensorflow,ravindrapanda/tensorflow,rdi...
tensorflow/tools/docker/jupyter_notebook_config.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\nclass Database(dict):\n \"\"\"Holds a dict that contains all the information about the users in a channel\"\"\"\n def __init__(self, irc):\n super(Database, self).__init__(json.load(open(\"userdb.json\")))\n ...
python
edit
1
4
mit
554ef995f8c4ba42d00482480bf291bac2fd96e1
wolfy1339/Python-IRC-Bot
utils/database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom chainer.training import extension\nimport time\n\n\ndef observe_value(key, target_func):\n \"\"\"Returns a trainer extension to continuously record a value.\n\n Args:\n key (str): Key of observation to record.\n tar...
python
edit
1
1
mit
60497ba61c80863cd0414e39a9cd12b42b519897
cupy/cupy,chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,wkentaro/chainer,jnishi/chainer,tkerola/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,delta2323/chainer,keisuke-umezawa/chainer,ktnyt/chainer,chainer/chainer,ysekky/chainer,chainer/chainer,keisuke-umezawa/cha...
chainer/training/extensions/value_observation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom councilmatic_core.haystack_indexes import BillIndex\nfrom django.conf import settings\nfrom haystack import indexes\nimport pytz\n\nfrom chicago.models import ChicagoBill\n\n\napp_timezone = pytz.timezo...
python
edit
1
4
mit
2814f5b2bbd2c53c165f13009eb85cb2c5030b57
datamade/chi-councilmatic,datamade/chi-councilmatic,datamade/chi-councilmatic,datamade/chi-councilmatic,datamade/chi-councilmatic
chicago/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\nimport base64\nfrom datetime import date\n\nfrom bo import *\nfrom database.oldauth import *\n\n\nclass Login(webapp.RequestHandler):\n def get(self):\n if self.request.get('site'):\n user = users.get_cu...
python
edit
18
4
mit
de9a6f647d0a6082e2a473895ec61ba23b41753e
argoroots/Entu,argoroots/Entu,argoroots/Entu
controllers/oldauth.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on Feb 6, 2015\n\n@author: thomas\n'''\n\nclass Maximum (object):\n\n @staticmethod\n def calculate (measurement_list):\n import numpy as np\n '''\n Find the maximum measurement value for any list of ...
python
edit
1
2
mit
990a3266739e5a4d763dd585f7cb722c0fe2b0f5
brianthomas/astroplpython,brianthomas/astroplpython
astroplpython/function/statistic/Maximum.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nModule for running arbitrary tests with a __virtual__ function\n'''\nfrom __future__ import absolute_import\n\n\ndef __virtual__():\n return False\n\n\ndef test():\n return True\n\n```\n\nApply this chang...
python
edit
1
1
apache-2.0
c8fdc9aaea13567a293237e7a4126f83a52f0a22
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/test_virtual.py
rejected_duplicate
Near-duplicate of sample 200
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"EVELink - Python bindings for the EVE API.\"\"\"\n\nimport logging\n\nfrom evelink import account\nfrom evelink import api\nfrom evelink import char\nfrom evelink import constants\nfrom evelink import corp\nfrom evelink import eve\nfr...
python
edit
2
1
mit
b34eaedad04c32252f8f2972c335635c6783ae79
bastianh/evelink,FashtimeDotCom/evelink,ayust/evelink,Morloth1274/EVE-Online-POCO-manager,zigdon/evelink
evelink/__init__.py
rejected_duplicate
Near-duplicate of sample 1961
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nimport os\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='zorg',\n version=...
python
edit
1
1
mit
6c001251a4df02aa011187bf1444c94ffc4f92db
zorg-framework/zorg,zorg/zorg
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport virtualbox\n\n\ndef list_machines():\n vbox = virtualbox.vb_get_manager()\n for machine in vbox.getArray(vbox, \"Machines\"):\n print \"Machine '%s' logs in '%s'\" % (\n machine.name,\n machine.logF...
python
edit
2
3
apache-2.0
ed76f648f60f96216377e4f12fea7043eaed904b
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICE...
python
edit
1
0
apache-2.0
54a3cf2994b2620fc3b0e62af8c91b034290e98a
rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui
tuskar_ui/infrastructure/dashboard.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 Hardy Jones\n# Copyright (c) 2013\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Hlint plugin class.\"\"\"\n\nimport json\nfr...
python
edit
3
3
mit
d72fad16cbe46fb60d4c5534fa0eb0cc85f1ab3e
SublimeLinter/SublimeLinter-hlint
linter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wagtail.contrib.modeladmin.options import \\\n ModelAdmin, ModelAdminGroup, modeladmin_register\nfrom .models import Indicator, FooterLinkSection\n\n\nclass IndicatorAdmin(ModelAdmin):\n model = Indicator\n menu_icon = 'user'\...
python
edit
1
1
mit
305ba7ee3fff41a7d866968c5332394301c0e83f
terotic/digihel,City-of-Helsinki/digihel,terotic/digihel,City-of-Helsinki/digihel,City-of-Helsinki/digihel,terotic/digihel,City-of-Helsinki/digihel
digi/wagtail_hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom geonamescache import GeonamesCache\nfrom . import mappings\n\n\ndef country(from_key='name', to_key='iso'):\n gc = GeonamesCache()\n dataset = gc.get_dataset_by_key(gc.get_countries(), from_key)\n\n de...
python
edit
1
3
mit
65e041bd03863563b52496c1cec81a0c9425f4ee
yaph/geonamescache,yaph/geonamescache
geonamescache/mappers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Import code for parsing a matrix into a sympy object\nfrom quantum_simulation import parse_matrix\nfrom sympy import latex\nimport json, sys, pipes, urllib\n\n# If the file's being run, rather than loaded as a library\n...
python
edit
2
0
mit
aa196b79102959a9fc5e8837c068307791b76d32
hrickards/shors_circuits,hrickards/shors_circuits,hrickards/shors_circuits
lib/matrix_parser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom isort import SortImports\nimport mothermayi.colors\nimport mothermayi.errors\nimport mothermayi.files\n\ndef plugin():\n return {\n 'name' : 'isort',\n 'pre-commit' : pre_commit,\n }\n\ndef do_sort(filen...
python
edit
1
6
mit
0060a32b58c7769ac97ac894cbaf6a2eaa1b389f
EliRibble/mothermayi-isort
mmiisort/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nfrom pika import BlockingConnection, PlainCredentials, ConnectionParameters\n\n\nclass RabbitMQ:\n\n def __init__(self):\n self.url = flask.current_app.config['ORMENU_QUEUE_URL']\n self.port = flask.current_ap...
python
edit
3
2
apache-2.0
21f209b618850d15734c476bd3c1b359b9a7426e
samueldmq/infosystem
infosystem/queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates.\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport spe...
python
edit
1
1
apache-2.0
1082db1f71ed3e84fd4068d3834ce72e744cdcca
facebook/wangle,facebook/wangle,facebook/wangle
build/fbcode_builder/specs/fbthrift.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# I prefer Markdown to reStructuredText. PyPi does not. This allows people to\n# install and not get any errors.\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept (IOError, ImportError):\n lo...
python
edit
1
0
mit
7e7b71cc9ea8f79b81ef60d0303e59ad77389c06
bnadlerjr/tavi
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mal_scraper\n\n\ndef test_import_mal_scraper():\n \"\"\"Can we import mal_scraper\"\"\"\n assert mal_scraper\n assert mal_scraper.__version__.split('.') == ['0', '1', '0']\n\n\nclass TestAutomaticUserDicoveryIntegration(obje...
python
edit
1
1
mit
101b4e5fb29195e500103230b3bbdae2369fde75
QasimK/mal-scraper
tests/test_mal_scraper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n\"\"\"\npython-hcalendar is a basic h...
python
edit
1
3
mit
3609df9044fd72008234bae9145487f315096fcd
mback2k/python-hcalendar
hcalendar/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom conans import ConanFile\n\n\nclass EnttConan(ConanFile):\n name = \"entt\"\n description = \"Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much mor...
python
edit
1
2
mit
ad69cbc6814e0458ab27412cfad9519fe30545e0
skypjack/entt,skypjack/entt,skypjack/entt,skypjack/entt
conanfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom form_designer.contrib.cms_plugins.form_designer_form.models import CMSFormDefinition\nfrom form_designer.views import process_form\nfrom form_designer import settings\n\nfrom cms.plugin_base import CMSPluginBase\nfrom cms.plugin_pool i...
python
edit
1
2
bsd-3-clause
b8139440a2509d5b197889664f9ec34be9296210
USGM/django-form-designer,USGM/django-form-designer
form_designer/contrib/cms_plugins/form_designer_form/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom distutils.core import setup\ntry:\n long_description = open('README.md', 'r').read()\nexcept:\n long_description = ''\n\nsetup(\n name='samp-client',\n version='2.0.2',\n packages=['samp_client'],\...
python
edit
1
0
mit
e14071cb1bb6a331b6d2a32c65c8a71aa7d85e04
mick88/samp-client
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ndef gather_squares_triangles(p1,p2,depth)\n \"\"\" Draw Square and Right Triangle given 2 points, \n Recurse on new points\n \n args:\n p1,p2 (float,float) : absolute position on base vertices\n depth (int) : decreme...
python
edit
null
null
mit
42d64b71db7a21355132d1c1573e12798e377b4c
kpatel20538/Rosetta-Code-Python-Tasks
incomplete/pythagoras.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest the electricity demand\n\nSPDX-FileCopyrightText: Uwe Krien <<EMAIL>>\nSPDX-FileCopyrightText: Patrik Schönfeldt\n\nSPDX-License-Identifier: MIT\n\n\"\"\"\n\nimport numpy as np\n\nfrom demandlib.examples import heat_demand_exam...
python
edit
1
2
mit
aca158817c21b8baeeb64d7290d61c32a79124f9
oemof/demandlib
tests/test_heat_demand.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.version import StrictVersion\n\nimport rest_framework\nfrom rest_framework import serializers\nfrom django.forms import widgets\n\n\nif StrictVersion(rest_framework.VERSION) < StrictVersion('3.0.0'):\n class Serializer(ser...
python
edit
1
2
mit
7adfe4822bf75d1df2dc2a566b3b26c9fd494431
orf/django-rest-framework-jwt,shanemgrey/django-rest-framework-jwt,GetBlimp/django-rest-framework-jwt,blaklites/django-rest-framework-jwt,plentific/django-rest-framework-jwt,ArabellaTech/django-rest-framework-jwt
rest_framework_jwt/compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os\nimport sys\nimport re\nfrom collections import defaultdict\nimport args\nARGS=None\nargs.add_argument('--noreboots', '-r', action='store_true',\n help='ignore series reboots')\nargs.add_argum...
python
edit
2
7
mit
1dd8e21ac642015cb8c94ae8eddcaeaf619e5692
xchewtoyx/comicmgt,xchewtoyx/comicmgt
ooo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os, sys\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\ndef main():\n setup(\n name='stcrestclient',\n version= '1.0.2',\n author='Andrew Gillis',\n ...
python
edit
4
1
mit
8e502a8041aed0758093c306c012d34e37e62309
Spirent/py-stcrestclient
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'\n\nCELERY_RESULT_BACKEND = \"amqp\"\n\n#CELERY_RETHINKDB_BACKEND_SETTINGS = {\n # 'host': '127.0.0.1',\n # 'port': 28015,\n # 'db': 'celery_test',\n # 'auth_k...
python
edit
1
0
bsd-3-clause
be6fb5a1ec264f2f3f5dd57c84b90a9c2c686fe3
bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,bnaul/mltsp,bnaul/mltsp,acrellin/mltsp,mltsp/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,bnaul/mltsp
mltsp/ext/celeryconfig.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom scraper import search_CL\nfrom scraper import read_search_results\n\n\ndef test_search_CL():\n test_body, test_encoding = search_CL(minAsk=100)\n assert \"<span class=\\\"desktop\\\">craigslist</span>\" in test_body\n assert t...
python
edit
2
2
mit
e5ef9ca9c089ce1da4ff363d0c5a5090785ae0c5
jefrailey/basic-scraper
test_scraper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest, re\n\nfrom kat.utils import ShellCommand\nfrom abstract_tests import AmbassadorTest, ServiceType, HTTP\n\naccess_log_entry_regex = re.compile('^ACCESS \\\\[.*?\\\\] \\\\\\\"GET \\\\/ambassador')\n\n\nclass EnvoyLogPathTest(Am...
python
edit
1
3
apache-2.0
2ad47f6ce00246cbf54639438d9279b8a7fa9b29
datawire/ambassador,datawire/ambassador,datawire/ambassador,datawire/ambassador,datawire/ambassador
python/tests/t_envoy_logs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport json\nimport requests\nimport telebot\n\nLOKLAK_API_URL = \"http://loklak.org/api/search.json?q={query}\"\n\nbot = telebot.TeleBot(\"162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo\")\n\n\ndef get_tweet_rating(tweet):\...
python
edit
null
null
mit
9cb8ff5ec62d943c193a32c842c3db92bd24d85d
sevazhidkov/tweets-search-bot
bot.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name = 'brunnhilde',\n version = '1.5.4',\n url = 'https://github.com/timothyryanwalsh/brunnhilde',\n author = 'Tim Walsh',\n author_email = '<EMAIL>',\n py_modules = ['brunnhilde']...
python
edit
1
0
mit
15299d7f15a1aa9523c491190880e1aad84cae07
timothyryanwalsh/brunnhilde
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Creates the station class\"\"\"\n\n\nclass Station:\n \"\"\"\n Each train station is an instance of the Station class.\n Methods:\n __init__: creates a new stations\n total_station_pop: calculates total station populati...
python
edit
1
1
mit
21835415f0224e08c7328151d4319ec73d67cbe1
ForestPride/rail-problem
station.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"pep257 docstrings convention needs error code and class parser for be\nincluded as module into flake8\n\"\"\"\nimport io\n\nimport pep8\nimport pep257\n\n__version__ = '0.2.2'\n\n\nclass pep257Checker(object):...
python
edit
1
3
mit
4e31496e1d9e0b2af2ce8aa4bb58baa86f352521
PyCQA/flake8-docstrings
flake8_docstrings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport anki.exporting\nimport anki.hooks\nimport anki.utils\nimport aqt.exporting\nimport aqt.utils\nfrom aqt import QFileDialog\nfrom aqt.exporting import ExportDialog\nfrom ...utils import constants\n\n\n# aqt part:\n\n\ndef ...
python
edit
1
3
mit
8f834aebfa2d0f3cf392a6c2530c00699a27dafa
Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki
crowd_anki/anki/overrides/exporting.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport config\nimport logging\nimport logging.handlers\n\n\n# ######### Set up logging ##########\n# log.basicConfig(format=\"%(asctime)s - %(levelname)s: %(message)s\", level=log.DEBUG)\nlogger = logging.getLogger(\"blockbuster\")\nlogger....
python
edit
1
0
mit
f4444f390ed2d16fab40e098d743870420da3bad
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/bb_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='cmsplugin-biography',\n version='0.0.1',\n packages='cmsplugin_biography',\n install_requires=[\n 'django-cms',\n 'djangocms-text-ckeditor==1.0.9',\n 'easy-th...
python
edit
1
0
mit
f9094d47d138ecd7ece6e921b9a10a7c79eed629
kfr2/cmsplugin-biography
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport logging\nimport os\nimport sys\nfrom hubbot.bothandler import BotHandler\nfrom newDB import createDB\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser(description=\"A derpy Twisted IRC bot.\")\n ...
python
edit
1
0
mit
4546054e84f5c352bb7b5e1fc4f9530e8ebfab78
HubbeKing/Hubbot_Twisted
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\n\ndef homepage(request):\n return render(request, \"index.html\", {})\n\n```\n\nApply this change: Add view for searching users and return json format" }, { "role": "assistant", "content...
python
edit
1
4
mit
a0fa76a7aeb3dba3b358abeab95fc03a90a0e8b6
Hackfmi/Diaphanum,Hackfmi/Diaphanum
members/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n\ndef get_sort_by_choices(filter):\n return [(choice[0], choice[1].lower()) for choice in\n filter.filters['sort_by'].field.choices[1::2]]\n\n\ndef get_now_sorted_by(filter, fields):\...
python
edit
1
2
bsd-3-clause
be7c5fc964ce3386df2bf246f12838e4ba2a2cb6
UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,maferelo/saleor,UITools/saleor
saleor/core/utils/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2\nimport LogUncaught, ConfigParser, logging, os\n\nsbConfig = ConfigParser.RawConfigParser()\nsbConfig.read('scripts.cfg')\n\n# Logger File Handler\nsbLFH = logging.FileHandler(sbConfig.get('ServerBackup', 'log_location'))...
python
edit
3
0
mit
5c442db8a6352c21325f372486409d44ad3f5b76
dwieeb/usr-local-bin
ServerBackup.py
accepted
null
true