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\"\"\"\nTests for the RAW sql functions.\n\"\"\"\n\nfrom django.conf import settings\nfrom django.test import TestCase\nfrom django.db.models import connection\n\nfrom boardinghouse.models import Schema\n\nclass TestRejectSchemaColumnChange...
python
edit
3
1
bsd-3-clause
2a7eecbf55f5cc00bed76a70990946309baa2baa
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/tests/test_sql.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The tower of Hanoi.\"\"\"\nfrom __future__ import print_function\n\n\ndef move_towers(height, from_pole, to_pole, with_pole):\n if height == 1:\n print('Moving disk from {0} to {1}'.format(from_pole, to_pole))\n else:\n ...
python
edit
1
2
bsd-2-clause
5bf2f25cb309f38bc7a48d76c2018768117a456a
bowen0701/algorithms_data_structures
alg_tower_of_hanoi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nimport os\n\nimport pytest\n\nfrom pymt import models\n\n\n@pytest.mark.parametrize(\"cls\", models.__all__)\ndef test_model_setup(cls):\n model = models.__dict__[cls]()\n args = model.setup()\n assert os.pa...
python
edit
1
1
mit
40edd2d679bcaebcbdb55b08fdd38b4c1af68672
csdms/coupling,csdms/pymt,csdms/coupling
tests/test_models.py
rejected_duplicate
Near-duplicate of sample 9360
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef selection_sort(a_list):\n \"\"\"Selection Sort algortihm.\n\n Procedure: \n - Find out the max item's origina...
python
edit
1
4
bsd-2-clause
32efe6c239a62c2f011179c4431adf6e028442f0
bowen0701/algorithms_data_structures
alg_selection_sort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport json\nimport os.path\n\nfrom completor import Completor\nfrom completor.compat import to_unicode\n\ndirname = os.path.dirname(__file__)\n\n\nclass Tern(Completor):\n filetype = 'javascript'\n daemon =...
python
edit
1
4
mit
5987cfc1485b6dc4cccef2b1e538078b90a9acd1
maralla/completor.vim,maralla/completor.vim
pythonx/completers/javascript/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# License under the MIT License - see LICENSE\n\nimport boto.ec2\nimport os\nimport time\n\n\ndef launch(key_name=None, region='us-west-2', image_id='ami-5189a661',\n instance_type='t2.micro', security_groups='launch-wizard-1',\n ...
python
edit
3
6
mit
f828523180e8996e17ecb36e4a39c67656a372a3
Astroua/aws_controller,Astroua/aws_controller
launch_instance.py
rejected_duplicate
Near-duplicate of sample 3934
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.14.1\"\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
d115f039a474e93585096a22f5870c60a221bae9
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
dthm4kaiako/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" \nAlternative WSGI entry-point that uses requirements/vendor for\ndependencies.\n\n\"\"\"\nimport os, sys\n\nbase_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.insert(0, base_dir)\n\nfrom cc.deploy.paths...
python
edit
1
0
bsd-2-clause
f4a067acd58aa083680a556bb7d79e9d05403eba
mozilla/moztrap,mozilla/moztrap,mozilla/moztrap,mccarrmb/moztrap,mccarrmb/moztrap,bobsilverberg/moztrap,shinglyu/moztrap,mccarrmb/moztrap,shinglyu/moztrap,mccarrmb/moztrap,mozilla/moztrap,bobsilverberg/moztrap,shinglyu/moztrap,mozilla/moztrap,shinglyu/moztrap,bobsilverberg/moztrap,shinglyu/moztrap,bobsilverberg/moztrap...
cc/deploy/vendor_wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\nimport time\nfrom datetime import datetime\n\nimport zmq\nfrom django.conf import settings\nfrom django.core.management.base import NoArgsCommand\n\nfrom job_runner.apps.job_runner.models import Run\n\n\nlogger ...
python
edit
1
2
bsd-3-clause
a84ce4c8215cced7a64253453a3530911b8518f8
spilgames/job-runner,spilgames/job-runner
job_runner/apps/job_runner/management/commands/broadcast_queue.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nLoader settings:\nwe use the GMQL scala class CombineTextFileWithPathInputFormat in order to load the region and metadata files with the\nsame id_sample based on the hash of the file name\n\"\"\"\n\ninputFormatClass = 'it.polimi.gen...
python
edit
1
2
apache-2.0
7183edee23f715d225b7dc506746e3b7a96d7d6b
DEIB-GECO/PyGMQL,DEIB-GECO/PyGMQL
gmql/dataset/loaders/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom yeast_harness import *\n\n\nclass TestLargeSourceTree(unittest.TestCase):\n\n def test_large_source_tree(self):\n\n make_filename = lambda ext='': ''.join(\n random.choice(string.ascii_lowercas...
python
edit
9
4
mit
a117b191c402ce051b6e8aec2fced315c119b9eb
sjanhunen/moss,sjanhunen/yeast,sjanhunen/moss,sjanhunen/gnumake-molds
test/test_large_source_tree.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom yacs.settings.base import *\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nCACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n 'VERSION': CACHE_VERSION,\n }\n}\n\nDATABASES = {\n '...
python
edit
3
0
mit
3e06403b71e8ee826d38f58198342cc22af398bd
JGrippo/YACS,jeffh/YACS,jeffh/YACS,jeffh/YACS,JGrippo/YACS,JGrippo/YACS,jeffh/YACS,JGrippo/YACS
yacs/settings/development.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom thinglang.lexer.definitions.tags import LexicalPrivateTag\nfrom thinglang.lexer.definitions.thing_definition import LexicalDeclarationMember\nfrom thinglang.lexer.values.identifier import Identifier\nfrom thinglang.parser.nodes import ...
python
edit
1
1
mit
88752efa9ac2c0f251733e335763cb880da34741
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
thinglang/parser/definitions/member_definition.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport os\nimport shutil\n\nclass testMirror(unittest.TestCase):\n\n def setUp(self):\n os.mkdir('test_source')\n os.mkdir('test_dest')\n source_dirs = ['dir1', 'dir2', 'dir3']\n filenames = [...
python
edit
1
2
mit
318c98ab5a9710dfdeedc0ee893e87993ac49727
rbn920/robosync
robosync/test/test_robosync.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Read resources contained within a package.\"\"\"\n\nimport sys\n\n\n__all__ = [\n 'Package',\n 'Resource',\n 'ResourceReader',\n 'contents',\n 'is_resource',\n 'open_binary',\n 'open_text',\n 'path',\n 'read...
python
edit
1
0
apache-2.0
68c7db19c0ac8c159bc12ff9714dea068a7835e4
python/importlib_resources
importlib_resources/__init__.py
rejected_duplicate
Near-duplicate of sample 5463
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mangopaysdk.types.payinexecutiondetails import PayInExecutionDetails\n\n\nclass PayInExecutionDetailsDirect(PayInExecutionDetails):\n \n def __init__(self):\n # direct card\n self.CardId = None\n self.Sec...
python
edit
1
1
mit
3ef02d93f9c7e60341ea2d8e407a62d2cadd95f6
chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk
mangopaysdk/types/payinexecutiondetailsdirect.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom indra.literature.dart_client import _jsonify_query_data\n\n\ndef test_timestamp():\n # Should ignore \"after\"\n assert _jsonify_query_data(timestamp={'on': '2020-01-01',\n 'a...
python
edit
1
1
bsd-2-clause
59db2a96034955fe678242e63d826610a009a103
sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/belpy
indra/tests/test_dart_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTwo User Approval\n\nOverrides CloudBolt's standard Order Approval workflow. This Orchestration\nAction requires two users to approve an order before it becomes Active.\n\nRequires CloudBolt 8.8\n\"\"\"\n\n\ndef run(order, *args, **...
python
edit
1
2
apache-2.0
6d16a7d137b723fe93260eb2729aca1d8f98e37f
CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge
actions/cloudbolt_plugins/multi_user_approval/two_user_approval.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.management.base import NoArgsCommand\nfrom django.conf import settings\nfrom django_dropbox.storage import DropboxStorage\nfrom dropbox.rest import ErrorResponse\n\nfro...
python
edit
3
5
bsd-2-clause
7fc0c026508472726d2a47b5ab027b3bcc43f101
bogdal/calibre-books,bogdal/calibre-books
calibre_books/core/management/commands/synchronize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, String, ForeignKey\nfrom sqlalchemy.orm import relationship, backref\n\nfrom neutron.db.model_base import BASEV2\nfrom neutron.db.models_v2 import HasId\n\n\nclass DatacomTenant(BASEV2, HasId):\n \"\"\"Data...
python
edit
1
0
apache-2.0
941392d41317943f4c0603d7d28a31858a2648bc
asgard-lab/neutron,asgard-lab/neutron
neutron/plugins/ml2/drivers/datacom/db/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess32 as subprocess\nimport threading\nimport signal\n\ndef external_process(process_args, input_data='', timeout=None):\n '''\n Pipes input_data via stdin to the process specified by process_args and returns the results\n...
python
edit
4
2
apache-2.0
491ce4e51d666fc068e4bed14ab410b90e5b1ea8
SeerLabs/extractor-framework,Tiger66639/extractor-framework
extraction/utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport argparse\nimport re\n\nformat = list('''\n -- --\n-----------\n-----------\n----------\n--------\n-------\n-- --\n-----------\n'''[1:-1])\n\ndef setFormatString(index, value):\n\tposition = -1\n\tfor i in ran...
python
edit
1
3
mit
0e6f62ec8230f85cfb891917be5d7ed144b44979
altayhunter/Pentomino-Puzzle-Solver,altayhunter/Pentomino-Puzzle-Solver
src/pretty_print.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom frasco.ext import *\nfrom redis import StrictRedis\nfrom werkzeug.local import LocalProxy\nfrom .templating import CacheFragmentExtension\n\n\nclass FrascoRedis(Extension):\n name = \"frasco_redis\"\n defaults = {\"url\": \"redis...
python
edit
4
1
mit
e6611885dcb1200dec13603b68c5ad03fcae97e4
frascoweb/frasco,frascoweb/frasco
frasco/redis/ext.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nfile: gromacs_gromit.py\n\nPrepaire gromit command line input\n\"\"\"\n\nGROMIT_ARG_DICT = {\n 'forcefield': '-ff',\n 'charge': '-charge',\n 'gromacs_lie': '-lie',\n 'periodic_distance': '-d',\...
python
edit
1
5
apache-2.0
92420d319865f2f0dcf0e53a4b4a3fecc30b6aad
MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio
components/lie_md/lie_md/gromacs_gromit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom debexpo.tests import TestController, url\nfrom debexpo.model import meta\nfrom debexpo.model.users import User\n\nclass TestRegisterController(TestController):\n\n def test_maintainer_signup(self):\n count = meta.session.quer...
python
edit
1
2
mit
3245d884845748ef641ae1b39a14a040cf9a97a9
jonnylamb/debexpo,swvist/Debexpo,jonnylamb/debexpo,swvist/Debexpo,jonnylamb/debexpo,swvist/Debexpo,jadonk/debexpo,jadonk/debexpo,jadonk/debexpo
debexpo/tests/functional/test_register.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport emission.core.wrapper.motionactivity as ecwa\nimport emission.net.usercache.formatters.common as fc\nimport attrdict as ad\n\ndef format(entry):\n formatted_entry = ad.AttrDict()\n formatted_entry[\"_id\"] = e...
python
edit
3
8
bsd-3-clause
903274d3bf87e642430e5b603c924601baa3955a
shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server
emission/net/usercache/formatters/android/motion_activity.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom random import betavariate, uniform\n\n\ndef weighted_choice(weights):\n choices = range(len(weights))\n total = sum(weights)\n r = uniform(0, total)\n upto = 0\n for c, w in zip(choices, weight...
python
edit
1
3
mit
772cff48318cd745fd2fcadd4c6bdc52629b176d
fivejjs/dirichletprocess,tdhopper/dirichletprocess,fivejjs/dirichletprocess,tdhopper/dirichletprocess
dp/dirichlet.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nUpdate to the latest CAL-ACCESS snapshot and bake static website pages.\n\"\"\"\nimport logging\nfrom django.core.management import call_command\nfrom calaccess_raw.management.commands...
python
edit
1
2
mit
0ca662090e4b10b5fbc10b3d00fb87b861943272
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
calaccess_website/management/commands/updatedownloadswebsite.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom HARK.validators import non_empty\n\nclass ValidatorsTests(unittest.TestCase):\n '''\n Tests for validator decorators which validate function arguments\n '''\n\n def test_non_empty(self):\n @non_emp...
python
edit
2
3
apache-2.0
6860d8a1fabdf7a8b18ad7cd6c687128443f85b5
econ-ark/HARK,econ-ark/HARK
HARK/tests/test_validators.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 models, migrations\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n migrations.swappable...
python
edit
1
0
isc
35fe55e41a6b1d22cb0ca93651771152cba831ad
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/users/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\nfrom .datasets import Dataset\nfrom mclearn.experiment import ActiveExperiment\n\nclass TestExperiment:\n @classmethod\n def setup_class(cls):\n cls.data = Dataset('wine')\n cls.policies = ['pas...
python
edit
1
2
bsd-3-clause
e139cb8fc8887f98724eb8670de930230280976f
chengsoonong/mclass-sky,chengsoonong/mclass-sky,alasdairtran/mclearn,alasdairtran/mclearn,chengsoonong/mclass-sky,chengsoonong/mclass-sky,alasdairtran/mclearn,alasdairtran/mclearn
mclearn/tests/test_experiment.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom stacker.blueprints.rds import base\n\n\nclass PostgresMixin(object):\n def engine(self):\n return \"postgres\"\n\n def get_engine_versions(self):\n return ['9.3.1', '9.3.2', '9.3.3', '9.3.5', '9.3.6', '9.4.1']\n\n ...
python
edit
1
1
bsd-2-clause
f80b080f62b450531007f58849019fd18c75c25f
mhahn/stacker,remind101/stacker,mhahn/stacker,remind101/stacker
stacker/blueprints/rds/postgres.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='validation',\n url='https://github.com/JOIVY/validation',\n version='0.1.0',\n author='Ben Mather',\n author_email='<EMAIL>',\n maintainer='',\n license='B...
python
edit
1
0
apache-2.0
4ff7f008552cb2696c5e6b933a8e9df9e2cf9db9
JOIVY/validation
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom setuptools import setup\nfrom oauth2 import VERSION\n\nif sys.version_info < (3, 0, 0):\n memcache_require = \"python-memcached\"\nelse:\n memcache_require = \"python3-memcached\"\n\nsetup(name=\"python-o...
python
edit
1
0
mit
b138a3428f91cd9917b7c0943e6b63c7787084d3
wndhydrnt/python-oauth2,wndhydrnt/python-oauth2,wndhydrnt/python-oauth2
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nfrom vertica_python.vertica.messages.message import BackendMessage\n\n\nclass EmptyQueryResponse(BackendMessage):\n pass\n\n\nEmptyQueryResponse._message_id(b'I')\n\n```\n\nApply this change: Add init for empty query response" }, ...
python
edit
1
1
apache-2.0
59057c28746220cd0c9d9c78d4fe18b6480e8dda
uber/vertica-python
vertica_python/vertica/messages/backend_messages/empty_query_response.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#------------------------------------------------------------------------------\n#\n# Copyright (c) 2008, Enthought, Inc.\n# All rights reserved.\n# \n# This software is provided without warranty under the terms of the BSD\n# license i...
python
edit
5
0
bsd-3-clause
3a1eaebe08243839c5e593245a2c4a6eaa716048
burnpanck/traits,burnpanck/traits
enthought/traits/ui/editors/date_editor.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport base64\n\nimport sha3\nimport os\n\nfrom collections import namedtuple\n\n\nclass KeyPair:\n def __init__(self, pub, pri):\n self.private_key = pri\n self.public_key = pub\n\n\nfrom iroha_cli.crypto_ed25519 import ge...
python
edit
5
1
apache-2.0
666b011ef95ef6e82e59cc134b52fb29443ff9d8
MizukiSonoko/iroha-cli,MizukiSonoko/iroha-cli
iroha_cli/crypto.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\n__version__ = '0.1.6'\ndefault_app_config = 'diffs.apps.DiffLogConfig'\n\nklasses_to_connect = []\n\n\ndef register(cls):\n \"\"\"\n Decorator function that registers a class...
python
edit
1
4
mit
b11399713d004a95da035ffceed9a1db8b837d11
linuxlewis/django-diffs
diffs/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create working constant volume reactor test" }, { "role": "assistant", "content": "#! /usr/bin/python3\nimport cantera as ct\ngas = ct.Solution('mech.cti')\ngas.TPX = 1000,101325,'H2:2,O2:1,N2:3.76'\nreac = ct.Reactor(gas)\nnetw ...
python
new_file
1
0
mit
260beeaae9daeadb3319b895edc5328504e779b2
kyleniemeyer/CanSen,bryanwweber/CanSen
cansen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, AppCommand\nfrom django.db import connection, transaction\nimport os\n\nclass Command(BaseCommand):\n help = \"Installs a cleangeometry function in postgres required for processing inc...
python
edit
4
1
bsd-3-clause
105111b0ed02a7c698ba79f88a54636ec3d5b2a8
Ecotrust/madrona_addons,Ecotrust/madrona_addons
madrona/common/management/commands/install_cleangeometry.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on 03.02.2016.\n\n@author: Lazar\n'''\nfrom textx.metamodel import metamodel_from_file\n\nfrom concepts.layout import Layout\nfrom concepts.object import Object\nfrom concepts.property import Property\nfrom concepts.selector_ob...
python
edit
1
0
mit
24ab943904339b5479912b8b70a7a2a0433c60da
theshammy/GenAn,theshammy/GenAn,theshammy/GenAn
src/interpreter/interpreter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport chryso.connection\nimport flask\n\nimport dominus.tables\nimport dominus.views\n\n\ndef run():\n logging.basicConfig()\n logging.getLogger().setLevel(logging.DEBUG)\n\n app = flask.Flask('dominus')\n app...
python
edit
1
2
mit
e9b5930e7b1865ff1835680c14de58fc9a88d043
EliRibble/dominus,EliRibble/dominus,EliRibble/dominus,EliRibble/dominus
dominus/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n Task entry points\n\"\"\"\nfrom sqlalchemy.exc import SQLAlchemyError\nfrom action import scanner\nfrom helpers import make_config, make_session, make_redis\n\n\nconfig = make_config()\nsess = make_sessi...
python
edit
3
3
apache-2.0
17345dd298860ddfe61f58234d2a38e0a7187d2c
notapresent/rbm2m,notapresent/rbm2m
rbm2m/worker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='fapistrano',\n version='0.5.1',\n license='MIT',\n description='Capistrano style deployment with fabric',\n zip_safe=False,\n include_package_data=True,\n platforms='any'...
python
edit
null
null
mit
e5a5dfd8a8c50d3df2070dc52ad09c440507a869
liwushuo/fapistrano
setup.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys\n\nreqs = [\n \"decorator>=3.3.2\",\n \"Pillow>=2.5.0\"\n]\nif sys.version_info[0] == 2:\n # simplejson is not python3 compatible\n reqs.append(\"simplejson>=2.0.9\")\n\nif...
python
edit
1
0
bsd-3-clause
deef4ac0d34409727d36f273cc63420deae982f7
DataDog/dogapi,DataDog/dogapi
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: UTF-8 -*\nfrom setuptools import setup\n\nwith open('README.md') as fp:\n README = fp.read()\n\nsetup(\n name='steeve',\n version='0.1',\n author='Sviatoslav Abakumov',\n author_email='<EMAIL>',\n descripti...
python
edit
1
0
bsd-3-clause
f84d6c2361e78f4ac8a615d28f64a0fd6386c661
Perlence/steeve,Perlence/steeve
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\r\n\r\nimport winsys\r\n\r\nif __name__ == '__main__':\r\n setup (\r\n name='WinSys',\r\n version=winsys.__version__,\r\n url='http://svn.timgolden.me.uk/winsys',\r\n download_url='http:...
python
edit
1
0
mit
3ac9c317e266d79e96c20121996a4af4d82776dd
one2pret/winsys,one2pret/winsys
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom setuptools import setup\nfrom ipyrmd import __version__\n\nsetup(name=\"ipyrmd\",\n version=__version__,\n description=\"Convert between IPython/Jupyter notebooks and RMarkdown\",\n author=\"Gor...
python
edit
1
0
mit
abce8024f998dd62a3f0bfac57391c3aebe647fa
chronitis/ipyrmd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding: utf-8\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"django-flexible-images\",\n version=\"1.0.0\",\n url=\"https://github.com/lewiscollard/django-flexible-images\",\n author=\"L...
python
edit
1
0
cc0-1.0
e0fb70d632553e11f6dd08b31bb81872c3b7bc65
lewiscollard/django-flexible-images,lewiscollard/django-flexible-images,lewiscollard/django-flexible-images
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Distutils import build_ext\n\next_modules = [\n Extension(\"nerven.epoc._parse\", [\"src/nerven/epoc/_parse.pyx\"])\n]\n\nsetup(name='ne...
python
edit
3
0
mit
a3770920919f02f9609fe0a48789b70ec548cd3d
olorin/nerven,fractalcat/nerven,fractalcat/nerven,olorin/nerven
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom scheduler.spawners.templates.env_vars import get_from_app_secret\n\n\ndef get_service_env_vars():\n return [\n get_from_app_secret('POLYAXON_SECRET_KEY', 'polyaxon-secret'),\n get_fr...
python
edit
1
1
apache-2.0
f943aa57d6ee462146ff0ab2a091c406d009acce
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/scheduler/spawners/templates/services/default_env_vars.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(name='programmabletuple',\n version='0.1',\n description='Python metaclass for making named tuples with programmability',\n long_description=open('README.rst').re...
python
edit
1
0
mit
a87866811cbdecfc32126a314073a6203ae87b63
tschijnmo/programmabletuple
setup.py
rejected_duplicate
Near-duplicate of sample 15886
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='realex-client',\n version='0.8.0',\n packages=['realexpayments'],\n url='https://github.com/viniciuschiele/realex-client',\n license='MIT',\n author='Vinicius Chiele',\n au...
python
edit
1
0
mit
00ebbcb50ada0369dde02b114efc573d9aceea67
viniciuschiele/realex-sdk,viniciuschiele/realex-client
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='cmsplugin-simple-markdown',\n version=\".\".join(map(str, __import__('cmsplugin_simple_markdown').__version__)),\n packages=['cmsplugin_simple_markdown', 'cmsplugin_simple_markdown...
python
edit
1
0
bsd-3-clause
a349fceba7d4c22be8b44323dc759aa5bc605e73
Alir3z4/cmsplugin-simple-markdown,Alir3z4/cmsplugin-simple-markdown
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFlask-Celery\n------------\n\nCelery integration for Flask\n\n\"\"\"\nfrom setuptools import setup\n\nsetup(\n name='Flask-Celery',\n version='2.4.1',\n url='http://github.com/ask/flask-celery/',\n license='BSD',\n au...
python
edit
1
0
bsd-3-clause
96bc1cbf4d67d16753b3dbf9b5b32d6e2d1c521b
ask/flask-celery
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\n\nVERSION = __import__(\"django_shop_payer_backend\").VERSION\n\nCLASSIFIERS = [\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: M...
python
edit
4
0
mit
47dff0e6847889f386cbf0faf5db567a56bf5eef
dessibelle/django-shop-payer-backend
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .filters import ResourceTypeFilter\nfrom .mixins import LogEntryAdminMixin\nfrom .models import LogEntry\n\n\nclass LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):\n list_display = [\"created...
python
edit
1
0
mit
6131430ff7d1e9e8cd95f8d2793e82cc72679d81
jjkester/django-auditlog
auditlog/admin.py
rejected_duplicate
Near-duplicate of sample 12851
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n__version_info__ = ('0', '2', '0')\n__version__ = '.'.join(__version_info__)\n\nsetup(\n name=\"staticjinja\",\n version=__version__,\n description=\"jinja based static site generator\",\n author=...
python
edit
1
0
mit
fd1e904e1f2b6297801a1c8cd6626bdf1d73a3ec
Ceasar/staticjinja,Ceasar/staticjinja,jerivas/staticjinja,jerivas/staticjinja
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA setuptools based setup module.\nSee:\nhttps://packaging.python.org/en/latest/distributing.html\nhttps://github.com/pypa/sampleproject\n\"\"\"\n\nfrom setuptools import setup\n# To use a consistent encoding\nfrom codecs import open...
python
edit
1
0
apache-2.0
785cbf2f296b425bf0079cba99ee7bae662fc6d1
aquatix/paragoo,aquatix/paragoo
setup.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#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.\n#The license can also be read onli...
python
edit
1
2
cc0-1.0
649dc183ecce5586483155a9bc3699e73b6c4601
Ghostkeeper/Luna
plugins/configuration/preferences/preferences.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom .. import serializers\n\n\nclass TestAPNSDeviceSerializer(TestCase):\n def test_fields(self):\n expected = {'url', 'name', 'device_id', 'registration_id', 'active'}\n fields = serial...
python
edit
1
1
bsd-2-clause
fa862fdd6be62eb4e79d0dfcef60471aecd46981
incuna/rest-framework-push-notifications
rest_framework_push_notifications/tests/test_serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.decorators import api_view\nfrom rest_framework.response import Response\n\nfrom .utils import absolute_reverse\nfrom api.users.serializers import UserSerializer\n\n@api_view(('GET',))\ndef root(request, format=None):\n ...
python
edit
1
3
apache-2.0
70931f5d0d1b90ce2f7853ffcab94838cab0dab5
brianjgeiger/osf.io,rdhyee/osf.io,billyhunt/osf.io,alexschiller/osf.io,samchrisinger/osf.io,acshi/osf.io,sbt9uc/osf.io,brandonPurvis/osf.io,amyshi188/osf.io,chrisseto/osf.io,baylee-d/osf.io,cosenal/osf.io,samchrisinger/osf.io,jnayak1/osf.io,petermalcolm/osf.io,monikagrabowska/osf.io,mfraezz/osf.io,mluo613/osf.io,Merlin...
api/base/views.py
rejected_duplicate
Near-duplicate of sample 4185
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .meta import GObjectMeta\nfrom . import signals\nfrom . import meta\n\n@meta.apply\nclass GObject(metaclass=GObjectMeta):\n # Attributes of the object\n __attributes__ = ()\n\n def __init__(self, **kwargs):\n for key in...
python
edit
1
3
bsd-3-clause
4f1c4f75a3576c4bfb3517e6e9168fc8433a5c4b
entwanne/NAGM
engine/gobject.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport pickle\n\nfrom sentry.interfaces import Interface\n\nfrom sentry.testutils import TestCase\n\n\nclass InterfaceTests(TestCase):\n\n def test_init_sets_attrs(self...
python
edit
3
1
bsd-3-clause
583a32cd1e9e77d7648978d20a5b7631a4fe2334
songyi199111/sentry,JTCunning/sentry,JackDanger/sentry,fotinakis/sentry,JamesMura/sentry,kevinlondon/sentry,mitsuhiko/sentry,felixbuenemann/sentry,fotinakis/sentry,jean/sentry,drcapulet/sentry,ifduyue/sentry,alexm92/sentry,pauloschilling/sentry,fuziontech/sentry,jokey2k/sentry,fotinakis/sentry,argonemyth/sentry,zenefit...
tests/sentry/interfaces/tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom invoke import task\nimport jschema\n\n\n@task\ndef pip(ctx):\n ctx.run(\"rm -rf dist jschema.egg-info\")\n ctx.run(\"./setup.py sdist\")\n ctx.run(\"twine upload dist/jschema-{}.tar.gz\".format(jschema.__version__))\n\n@task\n...
python
edit
1
1
mit
0c2305db6c6792f624cf09a9134aaa090c82d5c1
stepan-perlov/jschema,stepan-perlov/jschema
tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom api.streams.models import StreamConfiguration\nfrom django.http import JsonResponse\nfrom django.http.request import HttpRequest\nimport requests\n\ndef get_stream_status(request: HttpRequest, stream_slug: str):\n stream = StreamCon...
python
edit
1
3
mit
cdee18e9a937f3dd7e788b92927f35652320e743
urfonline/api,urfonline/api,urfonline/api
api/streams/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_collection.morph_importer import BaseMorphApiImporter\n\nclass Command(BaseMorphApiImporter):\n\n srid = 4326\n districts_srid = 4326\n council_id = 'E07000112'\n elections = ['parl.2017-06-08']\n scraper_name = 'w...
python
edit
1
3
bsd-3-clause
ac02378dcc611fb2c3b8a98e7480e02f64ee716d
chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_shepway.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkgutil, os, sys\n\ndef getmodules():\n\t\"\"\"Returns all modules that are found in the current package.\n\tExcludes modules starting with '__'\"\"\"\n\treturn [ name for _,name, _ in pkgutil.iter_modules( [ os.path.dirname( __file_...
python
edit
2
3
mit
abbe40d2f65c8a4f8d9bae1322b1ec76466a27fb
jawsper/modularirc
modules/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# ===--- compiler_stage.py -----------------------------------------------===#\n#\n# This source file is part of the Swift.org open source project\n#\n# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors\n# Licensed under Ap...
python
edit
1
2
apache-2.0
a0c636714530dac69edd02d821e7868a4a560541
benlangmuir/swift,xwu/swift,xwu/swift,rudkx/swift,atrick/swift,apple/swift,gregomni/swift,benlangmuir/swift,roambotics/swift,xwu/swift,JGiola/swift,JGiola/swift,apple/swift,apple/swift,glessard/swift,benlangmuir/swift,JGiola/swift,gregomni/swift,roambotics/swift,benlangmuir/swift,atrick/swift,xwu/swift,rudkx/swift,greg...
utils/swift_build_support/swift_build_support/compiler_stage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# USAGE: check-modified.py FILE_OR_DIR1 FILE_OR_DIR2 ...\n#\n# prints out the URL associated with each item\n#\n\nimport sys\nimport os\nimport os.path\nimport svn.util\nimport svn.client\nimport svn.wc\n\ndef usage():...
python
edit
5
5
apache-2.0
ed2580c14c9e1a0c00fc2df17abb85ab26f86f9f
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
tools/examples/check-modified.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fractions import Fraction\n\n\nclass Ordering:\n _start = object()\n _end = object()\n\n def __init__(self):\n self._labels = {\n self._start: Fraction(0),\n self._end: Fraction(1)\n }\n ...
python
edit
1
1
mit
0aa1fb5d7f4eca6423a7d4b5cdd166bf29f48423
madman-bob/python-order-maintenance
ordering/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2015, Sebastian Linke\n\n# Released under the Simplified BSD license\n# (see LICENSE file for details).\n\n\"\"\"\nConstants that are used by `shcol` in many places. This is meant to modified (i...
python
edit
1
0
bsd-2-clause
3ad9029b6bfddb5cef1afed7e0093e8e26fe2884
seblin/shcol
shcol/config.py
rejected_duplicate
Near-duplicate of sample 1450
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import abort, current_app, request\nfrom functools import wraps\nfrom twilio.util import RequestValidator\nfrom config import *\n\ndef validate_twilio_request(f):\n @wraps(f)\n def decorated_function(*args, **kwargs):\n ...
python
edit
3
3
mit
b0e3585251445776683ba18441adae6ed3f0e210
PeterTheOne/ueberwachungspaket.at,PeterTheOne/ueberwachungspaket.at,PeterTheOne/ueberwachungspaket.at
ueberwachungspaket/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport os, sys\n\nfrom .base import Gor\n\nfrom tornado import gen, ioloop, queues\n\n\nclass TornadoGor(Gor):\n\n def __init__(self, *args, **kwargs):\n super(TornadoGor, self).__init__(*args, **kwargs)\n ...
python
edit
1
4
mit
93acb34d999f89d23d2b613f12c1c767304c2ad6
amyangfei/GorMW
gor/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport ceph_medic.main\n\n\nclass TestMain(object):\n def test_main(self):\n assert ceph_medic.main\n\n def test_invalid_ssh_config(self, capsys):\n argv = [\"ceph-medic\", \"--ssh-config\", \"/does/not/ex...
python
edit
1
3
mit
4d29aa24b39285c491182edd69ecb7c22a9d643d
alfredodeza/ceph-doctor
ceph_medic/tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport textwrap\n\nimport html2text\n\ntext_maker = html2text.HTML2Text()\ntext_maker.body_width = 0\n\n\ndef strip_html_tags(text):\n text = re.sub(r'<a.*?</a>', '', text)\n return re.sub('<[^<]+?>', '', text)\n\n\ndef htm...
python
edit
1
4
mit
918e1c59aa2d0e790eb993e091fd7a327fd12cc4
avinassh/Laozi,avinassh/Laozi
utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:\n\n\n\nimport argparse\nimport os\nimport zipfile\n\n\nparser = argparse.ArgumentParser(description = \"Extract zip file includes cp932 encoding file name\...
python
edit
1
0
mit
3b61b9dfeda38e0a7afd5ec90b32f8abab18ef4f
fujimakishouten/unzip-cp932
unzip.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom photofolder import Photofolder\nfrom folder import RealFolder\nfrom gphotocamera import Gphoto\nfrom main import Photobox\nfrom rcswitch import RCSwitch\n\n##########\n# config #\n##########\nphotodirectory = '/var/www/html/'\ncheesepi...
python
edit
1
0
mit
7b0bd58c359f5ea21af907cb90234171a6cfca5c
MarkusAmshove/Photobox
photobox/photobox.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport sys\nimport os\nimport inspect\n\ndef __LINE__ ():\n caller = inspect.stack()[1]\n return int (caller[2])\n \ndef __FUNC__ ():\n caller = inspect.stack()[1]\n return caller[3]\n\ndef __BOTH__():\n caller = inspec...
python
edit
4
6
apache-2.0
6ffa10ad56acefe3d3178ff140ebe048bb1a1df9
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Code/Python/Kamaelia/Kamaelia/Apps/SocialBookmarks/Print.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContains the python code folding mode\n\"\"\"\nfrom pyqode.core.api import IndentFoldDetector, TextBlockHelper, TextHelper\n\n\nclass PythonFoldDetector(IndentFoldDetector):\n def detect_fold_level(self, prev_block, block):\n ...
python
edit
1
10
mit
6cb6b3d0f9bc3bf8f1662129cd4bd55eec42e6ff
zwadar/pyqode.python,pyQode/pyqode.python,pyQode/pyqode.python,mmolero/pyqode.python
pyqode/python/folding.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\npython -m aspen\n===============\n\nAspen ships with a server (wsgiref.simple_server) that is\nsuitable for development and testing. It can be invoked via:\n\n python -m aspen\n\nthough even for development you'll likely want to...
python
edit
1
0
mit
0a7b88df526016672e18608339524cdb527e5928
gratipay/aspen.py,gratipay/aspen.py
aspen/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nclass MutableTree:\n\n value = None\n\n def full_le...
python
edit
1
1
bsd-3-clause
aaaab0d93723e880119afb52840718634b184054
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/logtree.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"add latest green build table\n\nRevision ID: 19b8969073ab\nRevises: 2b7153fe25af\nCreate Date: 2014-07-10 10:53:34.415990\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '19b8969073ab'\ndown_revision = '2b7153fe25af'...
python
edit
1
1
apache-2.0
b7dffc28ebef45293a70561348512d513eaf857c
wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,dropbox/changes
migrations/versions/19b8969073ab_add_latest_green_build_table.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n import ujson as json\nexcept:\n import json\n\ndef my_print(o):\n if isinstance(o, dict):\n print('sorted dict', sorted(o.items()))\n else:\n print(o)\n\nmy_print(json.loads('null'))\nmy_print(json.loads('fa...
python
edit
1
3
mit
c3ab90da466e2c4479c9c1865f4302c9c8bdb8e9
dinau/micropython,selste/micropython,danicampora/micropython,turbinenreiter/micropython,tobbad/micropython,SungEun-Steve-Kim/test-mp,SungEun-Steve-Kim/test-mp,turbinenreiter/micropython,matthewelse/micropython,dxxb/micropython,ahotam/micropython,torwag/micropython,swegener/micropython,jmarcelino/pycom-micropython,marti...
tests/extmod/ujson_loads.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
cee76d5c2216f6f42a54b28a753fe288accc40d7
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/accounting/migrations/0026_auto_20180508_1956.py
rejected_duplicate
Near-duplicate of sample 4373
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# compatibility with both python 2 and 3\nfrom __future__ import print_function\nfrom . plotting_REDUNDENT import *\nfrom . plotting import *\nfrom . variables import *\nfrom . AC_time import *\nfrom . planeflight import *\nfrom . generic i...
python
edit
14
0
mit
cf9b1805b55c567c5f5365d3f2f51f119304e6ba
tsherwen/AC_tools,tsherwen/AC_tools
AC_tools/__init__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmajor = 0\nminor = 3\nmicro = 3\n#release_level = 'alpha'\nrelease_level=''\n\nfrom __cvs_version__ import cvs_version\ncvs_minor = cvs_version[-3]\ncvs_serial = cvs_version[-1]\n\nif release_level:\n scipy_version = '%(major)d.%(minor)d...
python
edit
3
0
bsd-3-clause
99cbd692ae6b7dab65aae9d77fd2d8333fe075e4
gef756/scipy,aman-iitj/scipy,jakevdp/scipy,efiring/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,zerothi/scipy,argriffing/scipy,futurulus/scipy,juliantaylor/scipy,tylerjereddy/scipy,fernand/scipy,ndchorley/scipy,fredrikw/scipy,niknow/scipy,nmayorov/scipy,nmayorov/scipy,Gillu13/scipy,WarrenWeckesser/scipy,mdhaber/scipy,wi...
Lib/scipy_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom rpihelper.celery import current_app, celery\nfrom rpihelper.dropboxclient.logic import Client as DropBoxClient\nfrom rpihelper.transmission.logic import (\n transmissionrpc_client, transmissionrpc_add_torr...
python
edit
1
4
mit
8e4e12b3c9d64a8c6771b9deb7613c3653f47656
Gr1N/rpihelper,Gr1N/rpihelper
rpihelper/transmission/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom cla_public.apps.base import base\n\n@base.app_template_filter()\ndef matches(value, pattern):\n return bool(re.search(pattern, value))\n\n```\n\nApply this change: Revert \"BE: Update custom template filter\"\n\nThis reve...
python
edit
1
1
mit
a895661f7ce1a814f308dbe8b5836a4cdb472c8c
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/apps/base/filters.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.shop.order.actions.revoke_ticket_bundles\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2014-2022 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nfrom...
python
edit
1
1
bsd-3-clause
419131bba11cab27c36ef2b21199cdc3540cde16
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/services/shop/order/actions/revoke_ticket_bundles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport boards\n\ndef main():\n playerDead = False\n enemyDead = False\n \n enemyBoard = boards.makeEnemyBoard()\n enemyLocations = boards.setupEnemyBoard()\n playerBoard = boards.makePlayerBoard()\n \n print(\"----BA...
python
edit
1
13
apache-2.0
f672d140987614c5e4e80114cf28f2f6350be233
awhittle3/pyBattleship
pyBattleship.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import func\n\nfrom catwatch.blueprints.user.models import db, User\nfrom catwatch.blueprints.issue.models import Issue\n\n\nclass Dashboard(object):\n @classmethod\n def group_and_count_users(cls):\n \"\"\"\n ...
python
edit
1
1
mit
12d04493f1bb9b79f2f4adf639fdb07619539305
nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask
catwatch/blueprints/admin/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mock import patch\n\nfrom django.test import TestCase\nfrom rest_framework.reverse import reverse\n\nfrom .. import serializers\nfrom . import factories\nfrom pages.utils import build_url\n\n\nclass PageSerializerTest(TestCase):\n d...
python
edit
1
1
bsd-2-clause
f646fb88e793897cf827fd7d9484386a4bb08594
incuna/feincms-pages-api
pages/tests/test_serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Garmin\r\n\r\nfrom ... import nmea\r\n\r\nclass GRM(nmea.ProprietarySentence):\r\n sentence_types = {}\r\n def __new__(_cls, manufacturer, data):\r\n name = manufacturer + data[0]\r\n cls = _cls.sentence_types.get(name...
python
edit
1
1
mit
a365d9a9021b9500475d4f54b7c29cede0064017
silentquasar/pynmea2,Knio/pynmea2
pynmea2/types/proprietary/grm.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add TODO to capture the fact that design discussion is pending." }, { "role": "assistant", "content": "from st2common.transport import actionexecution, publishers\n\n# TODO(manas) : Exchanges, Queues and RoutingKey design discuss...
python
new_file
1
0
apache-2.0
f7c7cf55b6536fd5646272b700ce42cc02936fbb
pixelrebel/st2,StackStorm/st2,pinterb/st2,jtopjian/st2,tonybaloney/st2,pinterb/st2,Itxaka/st2,emedvedev/st2,jtopjian/st2,lakshmi-kannan/st2,pixelrebel/st2,Plexxi/st2,alfasin/st2,nzlosh/st2,punalpatel/st2,StackStorm/st2,dennybaa/st2,Itxaka/st2,emedvedev/st2,dennybaa/st2,punalpatel/st2,armab/st2,StackStorm/st2,Plexxi/st2...
st2common/st2common/transport/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n from django.db.models.constants import LOOKUP_SEP\nexcept ImportError: # Django < 1.5 fallback\n from django.db.models.sql.constants import LOOKUP_SEP\nfrom django.db.models.related import RelatedObject\nimport six\n\ndef pytho...
python
edit
1
3
mit
76ca06c26d74aaad1f0773321fdd382b12addcdc
ionelmc/django-easyfilters,ionelmc/django-easyfilters
src/django_easyfilters/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding:utf-8 -*-\n#\n# Copyright 2014 Hewlett-Packard Development Company, L.P.\n#\n#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n#    not use this file except in compliance with the License. You may ...
python
edit
3
8
apache-2.0
83d45c0fa64da347eec6b96f46c5eb1fbfe516d4
chair6/bandit,stackforge/bandit,austin987/bandit,pombredanne/bandit,stackforge/bandit,pombredanne/bandit
plugins/call_bad_permissions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport itertools\nimport string\n\nclass ControllerConfig(object):\n _port_gen = itertools.count(8888)\n\n def __init__(self, cmdline=\"\", address=\"127.0.0.1\", port=None, nom_port=None):\n '''\n Store metadata for the controller....
python
edit
8
4
apache-2.0
b04fcc4a11eec2df0e9b2f8057aff2d073684122
ucb-sts/sts,jmiserez/sts,ucb-sts/sts,jmiserez/sts
config/experiment_config_lib.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\nfrom aws_helper.connection import ConnectionManager\n\nfrom stacker.util import create_route53_zone\n\n\ndef create_domain(region, namespace, mappings, parameters, **kwargs):\n ...
python
edit
1
2
bsd-2-clause
6c86f7ef2ba5acdb387d154a618dd0f6bb65af6c
mhahn/stacker,mhahn/stacker,federicobaldo/stacker,EnTeQuAk/stacker,remind101/stacker,remind101/stacker
stacker/hooks/route53.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PyDAQmx.DAQmxFunctions import *\n\ndef getDeviceName():\n\tbuffer = create_string_buffer(1024)\n\t# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to\n\tb = c_ulong(1024)\n\tDAQmxGetSysDevNames...
python
edit
9
1
mit
a01be482c81641624d77f0bfe32ad6f884996aed
MarcoForte/PyDAQmx_Helper
pydaqmx_helper/getDeviceName.py
rejected_lint
Too many lint violations: 9
true