messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nimport astropy.io.fits as fits\nimport numpy as np\nimport sys\n\nfrom .util import stack_fits_data\n\nMETHOD_MAP = {\"median\": lambda x: np.median(x, axis=0, overwrite_input=True),\n \"average\": lambda x: np.average(x, axis=...
python
edit
1
1
mit
6de9457215e5a41a40acaf428132f46ab94fed2c
vulpicastor/miniraf
miniraf/combine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# tests require pytest-cov and pytest-xdist\nimport os\nimport signal\nimport sys\nfrom bluesky.testing.noseclasses import KnownFailure\nimport pytest\n\ntry:\n from pcaspy import Driver, SimpleServer\n from m...
python
edit
3
4
bsd-3-clause
6b0774eab70c42fbdd28869b6bcdab9b81183b8e
ericdill/bluesky,ericdill/bluesky
run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Imports for IPython\"\"\"\n\n# pylint: disable=W0611\n\n# import this\n\nimport os\nimport re\nimport sys\nimport inspect\npyprint = print\n\nmores = []\n\ntry:\n from rich.console import Console\n console = Console(color_system...
python
edit
10
1
mit
c00a55b8337dbc354921c195dfa4becc7ee1346a
jalanb/jab,jalanb/dotjab,jalanb/dotjab,jalanb/jab
ipython/profile_default/startup/00-imports.py
rejected_lint
Too many lint violations: 10
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\ndef get_check_digit_from_checkable_int (number):\n ret...
python
edit
1
2
bsd-3-clause
80ca0bebce22f64d0d01377493126ed95d8a64cb
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
falcom/luhn.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nclass Config:\n SECRET_KEY = os.environ.get('SECRET_KEY')\n SQLALCHEMY_COMMIT_ON_TEARDOWN = True\n\n @staticmethod\n def init_app(app):\n pass\n\n\nclass DevelopmentConfig(Config):\n DEBUG = True\n SQ...
python
edit
1
1
mit
286dced2c23b90dba53848423d6f29873779d177
boltzj/movies-in-sf
config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom rest_framework.response import Response\n\nfrom sentry.api import client\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.group import GroupEndpoint\n\n\nclass GroupEventsLatestEn...
python
edit
1
3
bsd-3-clause
a6e46fc5429840fd3ff47c03d8b0d9f3b28c7811
imankulov/sentry,hongliang5623/sentry,fotinakis/sentry,BuildingLink/sentry,gencer/sentry,mitsuhiko/sentry,BuildingLink/sentry,beeftornado/sentry,mvaled/sentry,daevaorn/sentry,wong2/sentry,ifduyue/sentry,jean/sentry,ifduyue/sentry,Kryz/sentry,jean/sentry,kevinlondon/sentry,fotinakis/sentry,pauloschilling/sentry,korealer...
src/sentry/api/endpoints/group_events_latest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\nfrom feature_extraction.util import DefaultAttributeDict\n\nclass Measurement(object):\n\t\"\"\"\n\tA generic feature measurement.\n\n\tAttributes\n\t----------\n\tdefault_options\n\t\tCan be set by subc...
python
edit
5
3
apache-2.0
1b9aa9909b284489c9f8a5d38b1c5520d5916dc7
widoptimization-willett/feature-extraction
feature_extraction/measurements/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ncategories: Types,Exception\ndescription: Exception.__init__ raises TypeError if overridden and called by subclass\ncause: Unknown\nworkaround: Unknown\n\"\"\"\nclass A(Exception):\n def __init__(self):\n Exception.__init_...
python
edit
1
1
mit
e4e3f0d7270e93e6123dbf05e1f51993e38d970c
adafruit/micropython,pfalcon/micropython,adafruit/circuitpython,blazewicz/micropython,adafruit/circuitpython,blazewicz/micropython,ryannathans/micropython,ryannathans/micropython,henriknelson/micropython,MrSurly/micropython,trezor/micropython,adafruit/micropython,adafruit/micropython,dmazzella/micropython,pramasoul/mic...
tests/cpydiff/types_exception_subclassinit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2013 Jacek Mitręga\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\...
python
edit
1
1
apache-2.0
c43e120319248a804328893aad34fc774c4928d3
waawal/standup-desktop,waawal/standup-desktop
stdup/kde.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest2\nimport datetime\n\nfrom google.appengine.ext import testbed\n\nfrom datafeeds.datafeed_fms import DatafeedFms\n\n\nclass TestDatafeedFmsTeams(unittest2.TestCase):\n\n def setUp(self):\n self.testbed = testbed.Tes...
python
edit
3
3
mit
f0bca27d58fb4bc74b6627275486dbfd159954d6
tsteward/the-blue-alliance,verycumbersome/the-blue-alliance,1fish2/the-blue-alliance,fangeugene/the-blue-alliance,synth3tk/the-blue-alliance,synth3tk/the-blue-alliance,bvisness/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,1fish2/the-blue-alliance,verycumber...
tests/test_datafeed_fms_teams.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.5\n#\n# Copyright 2009 the Melange 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 Licen...
python
edit
1
1
apache-2.0
172768dacc224f3c14e85f8e732209efe9ce075a
SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange,SRabbelier/Melange
app/soc/models/project_survey.py
rejected_duplicate
Near-duplicate of sample 4106
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport base64\nfrom Crypto.Cipher import AES\nfrom Crypto import Random\n\ndef encrypt(raw, key):\n raw = pad(raw)\n iv = Random.new().read(AES.block_size)\n cipher = AES.new(key, AES.MODE_CBC, iv)\n return base64.b64encode(iv +...
python
edit
1
1
mit
1f7979edaa918a52702bea5de6f2bdd7a8e60796
regexpressyourself/passman
encryption.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Bio import SeqIO\n\ndef sequence_length(fasta):\n \"\"\"\n return a dict of the lengths of sequences in a fasta file\n \"\"\"\n file_handle = open(fasta)\n in_handle = SeqIO.parse(file_handle, \"fasta\")\n records = {...
python
edit
1
2
mit
68374c16d66cdeea9dbce620dc29d375e3009070
vladsaveliev/bcbio-nextgen,biocyberman/bcbio-nextgen,chapmanb/bcbio-nextgen,chapmanb/bcbio-nextgen,biocyberman/bcbio-nextgen,chapmanb/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,vladsaveliev/bcbio-nextgen,brainstorm/bcbio-nextgen,lbeltrame/bcbio-nextgen,biocyberman/bcbio-nextgen,a113n/bcbio-nextgen...
bcbio/bam/fasta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, boto, os\nfrom bucketeer import commit\n\nclass BuckeeterTest(unittest.TestCase):\n\n # Constants - TODO move to config file\n global existing_bucket, test_dir, test_file\n existing_bucket = 'bucket.exists'\n test_dir =...
python
edit
3
2
mit
9a5229fe7ae4a240d91bfae59b61c5e8dda1aa13
mgarbacz/bucketeer
bucketeer/test/test_commit.py
rejected_duplicate
Near-duplicate of sample 11705
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException\nimport pickle\n\n\nclass Person(StructuredNode):\n name = StringProperty(unique_index=True)\n\n\ndef test_cypher_exception_can_be_displayed():\n print...
python
edit
1
2
mit
c3a15b4753ecfe7436b08456da90efb7be545a50
robinedwards/neomodel,wcooley/neomodel,robinedwards/neomodel,pombredanne/neomodel,fpieper/neomodel
test/test_exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\n\nclass ProtractorTestCaseMixin(object):\n protractor_conf = 'protractor.conf.js'\n suite = None\n specs = None\n\n @classmethod\n def setUpClass(cls):\n super...
python
edit
1
4
mit
6fa5c20f4d3b6ea9716adbf4c5fd50739f2f987e
jpulec/django-protractor,penguin359/django-protractor
protractor/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (c) 2010 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"\nVerifies that .so files that are order only de...
python
edit
3
0
bsd-3-clause
c23acde7428d968016af760afe9624c138fc3074
csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp
test/library/gyptest-shared-obj-install-path.py
rejected_duplicate
Near-duplicate of sample 13788
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n#\n# Define containerized environment for running Diosix on Qemu\n#\n# On Google Cloud Run: Creates HTTP server on port 8080\n# or whatever was specified using the PORT system variable.\n# Outputs via the HTTP port. This...
python
edit
4
0
mit
9e41b1b8d19b27cd6bd1bb81fb34c9a3adf30ad5
diodesign/diosix
entrypoint.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.conf.urls.defaults import *\nfrom django.contrib.auth.decorators import user_passes_test\n\n\nfrom .forms import ProtocolForm, TopicFormSet\n\n\ndef can_add_protocols(user):\n return user....
python
edit
2
4
mit
14a4b836853909763b8961dfcdc58477607180fd
Hackfmi/Diaphanum,Hackfmi/Diaphanum
protocols/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Non-parameterized functions\nfrom accuracy import accuracy\nfrom basic_math import exp, log\nfrom concat import concat\nfrom copy import copy\nfrom dropout import dropout\nfrom identity import identity\nfrom leaky_relu im...
python
edit
27
0
mit
95fffa0fbe744b9087547a14a97fb7dd0e68ba76
kikusu/chainer,niboshi/chainer,ttakamura/chainer,wkentaro/chainer,okuta/chainer,cupy/cupy,ktnyt/chainer,nushio3/chainer,cupy/cupy,ytoyama/yans_chainer_hackathon,chainer/chainer,okuta/chainer,jnishi/chainer,keisuke-umezawa/chainer,kashif/chainer,cupy/cupy,cupy/cupy,muupan/chainer,chainer/chainer,masia02/chainer,jnishi/c...
chainer/functions/__init__.py
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"farnsworth.settings\")\nthis_dir = os.path.abspath(os.path.dirname(__file__))\nif this_dir not in sys.path:\n\tsys.path.insert(0, this_dir...
python
edit
1
1
bsd-2-clause
946220075802cc59f3b34d3557c0b749c526c4b1
knagra/farnsworth,knagra/farnsworth,knagra/farnsworth,knagra/farnsworth
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport sys\n\n# Force this to happen before loading django\ntry:\n os.environ[\"DJANGO_SETTINGS_MODULE\"] = \"testtinymce.settings\"\n test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\...
python
edit
1
1
mit
896f402c79dd3bbe7d5cbc6e59787398a96b3747
aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
1
1
mit
5e2697b55f1720c4c144840e680004fb28a3cfcc
TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport re\n\nfrom django.conf import settings\nfrom django.core.management import call_command, BaseCommand\n\n\nclass Command(BaseCommand):\n \"\"\"Load the Django project fixtures and all version fixtures\"\"\"\n\n def ha...
python
edit
1
2
bsd-2-clause
62f681803401d05fd0a5e554d4d6c7210dcc7c17
refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector
cbv/management/commands/load_all_django_versions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\n# My imports\nimport argparse\nimport gzip\n\n\ndef _parser():\n parser = argparse.ArgumentParser(description='Prepare the data downloaded '\n 'from VAL...
python
edit
4
6
mit
361af42be2c3044a15480572befb1405a603b4ab
DanielAndreasen/astro_scripts
VALDprepare.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport sys\nimport os\nimport time\nimport socket\nimport argparse\nimport subprocess\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--launch-adapter')\nparser.add_argument('--lldb')\npars...
python
edit
1
0
mit
369964986df0ca558c2e340bc8d15272296af67e
vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb
tools/debug_launcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#######################################################\n# Copyright (c) 2015, ArrayFire\n# All rights reserved.\n#\n# This file is distributed under 3-clause BSD license.\n# The complete license agreement can be obtained at:\n# http://arra...
python
edit
5
6
bsd-3-clause
4c3a2a61c6a8cb5e0ece14bced4ec8b33df45400
arrayfire/arrayfire_python,pavanky/arrayfire-python,arrayfire/arrayfire-python
tests/simple/_util.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Post\n\n\n@admin.register(Post)\nclass PostAdmin(admin.ModelAdmin):\n # list view\n date_hierarchy = 'pub_date'\n list_display = ('title', 'pub_date')\n list_filter = ('pub...
python
edit
1
0
bsd-2-clause
9fec06c6acf57b4d49b9c49b7e1d3b5c90e2c9c4
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
blog/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport argparse\nimport sys\n\nfrom . import eccodes\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('--selfcheck', default=False, action='store_true')\n args = parser.parse_args()\n if args.selfche...
python
edit
1
2
apache-2.0
d4aa2b1a0a72696ce34f5aa2f5e588fc3a72e622
ecmwf/cfgrib
cfgrib/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom subprocess import Popen, PIPE\n\n\ndef launch(cmd):\n \"\"\"\n Fork the specified command, returning a tuple of (stdout, stderr)\n \"\"\"\n return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).c...
python
edit
1
1
mit
7c49517c3c24d239c2bd44d82916b4f3d90ca1e2
IanLee1521/utilities
utilities/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# for local run, before pygraphc packaging\nimport sys\nsys.path.insert(0, '../pygraphc/misc')\nfrom LKE import *\nsys.path.insert(0, '../pygraphc/clustering')\nfrom ClusterUtility import *\nfrom ClusterEvaluation import *\n\nip_address = '...
python
edit
2
0
mit
0945e04edcb4739069f4263bbd022bff4320606e
studiawan/pygraphc
examples/LKE_example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom nodes import Node\n\nclass MultiVar(Node):\n char = \"'\"\n args = 0\n results = None\n contents = -1\n \n def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle):\n self.node_1 = node_1\n ...
python
edit
1
1
mit
4f05805c0ec31da0b978cdccc0d79336272859fe
muddyfish/PYKE,muddyfish/PYKE
node/multi_var.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Basic test of dynamic code generation\nimport unittest\n\nimport stdio\nfrom ctypes import POINTER, c_int\n\nclass DynModTest(unittest.TestCase):\n def test_fopen(self):\n self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio....
python
edit
3
3
mit
b0273cc12abaf9a3f9f2e6c534d82bd7581c240e
trolldbois/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib
ctypeslib/test/test_dynmodule.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL\nfrom django.contrib.admin.options import StackedInline, TabularInline\nfrom django.contrib.admin.sites import AdminSite, site\n\n\ndef autodiscover():\n \"\"\"\n ...
python
edit
9
4
bsd-3-clause
93f2ff45ff3d61487ed061ae3d1a65051c3d1799
svn2github/django,svn2github/django,svn2github/django
django/contrib/admin/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTornWAMP user-configurable structures.\n\"\"\"\nfrom tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc\nfrom tornwamp.messages import Code\n\nprocessors = {\n Code.HELLO: HelloProcessor,\n Code.GOODBYE: ...
python
edit
1
0
apache-2.0
b6416ba4c32aaeddb567be4486854d6415c3048e
ef-ctx/tornwamp
tornwamp/customize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import Measurement\nimport feature_extraction.util.cleanup as cleanup\n\nclass HaralickTexture(Measurement):\n\tdef compute(self, image):\n\t\treturn []\n\n```\n\nApply this change: Add cell-boundary preprocessing to HaralickTexture ...
python
edit
1
3
apache-2.0
3518e9088ecbbc273f922ba418d2962d6af2dda5
widoptimization-willett/feature-extraction
feature_extraction/measurements/texture_haralick.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/env python\n\nimport picamera\nimport redis\nimport time\nimport json\nimport os\n\ndef take_photo():\n print \"%s Capture photo\" % (time.strftime('%Y.%m.%d %H:%M:%S %Z'))\n camera = picamera.PiCamera()\n camera.vflip = Tru...
python
edit
3
4
mit
b08315337e71737a36e3e79da99ce167620711b9
Ajnasz/pippo,Ajnasz/pippo,Ajnasz/pippo
photodaemon.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Stop flake8 complaining about task importer" }, { "role": "assistant", "content": "from __future__ import absolute_import\nfrom usaidmmc.celery import app as celery_app # flake8: noqa\n" } ]
python
new_file
3
0
bsd-3-clause
6046de052e1f19d2b7cdd3d86f921ac3c16ce338
praekelt/django-usaid-mmc,praekelt/django-usaid-mmc
usaidmmc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys, unittest\nimport bmc_test\nimport power_test\nimport xmlrunner\n\ntests = []\ntests.extend(bmc_test.tests)\n#tests.extend(power_test.tests)\n\nif __name__ == '__main__':\n for test in tests:\n test.system = sys.argv[1]...
python
edit
3
0
bsd-3-clause
b2fbb48049abbfff7f1636059f8ad7eda07667c7
Cynerva/pyipmi,emaadmanzoor/pyipmi
test/single_system/all.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n# start of sentence token\nSOS = '<S>'\n# end of sentence token\nEOS = '</S>'\n\n```\n\nApply this change: Use separate characters for SOS and EOS" }, { "role": "assistant", "content": "\n# start of sentence token\nSOS = chr(2...
python
edit
1
0
mit
621ca7bebfcc53026d8f98b9f6cfefe6ff25961b
milankinen/c2w2c,milankinen/c2w2c
src/util/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport enum\nimport subprocess\n\nfrom blessings import Terminal\n\n\nTERM = Terminal()\n\n\nclass Color(enum.Enum):\n\n none = \"\"\n reset = TERM.normal\n black = TERM.black\n red = TERM.red\n green = TERM.green\n yellow...
python
edit
1
1
mit
94b55ead63523f7f5677989f1a4999994b205cdf
wylee/runcommands,wylee/runcommands
src/runcommands/util/enums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport unittest\n\nfrom geopy.geocoders import GeoNames\nfrom test.geocoders.util import GeocoderTestBase, env\n\n\n@unittest.skipUnless( # pylint: disable=R0904,C0111\n bool(env.get('GEONAMES_USERNAME')),\n \"No GEONAMES_USERNAME ...
python
edit
1
1
mit
e6bfc4eb1d8f5a4d0239232fa89aa9d3d756549c
RDXT/geopy,Vimos/geopy,mthh/geopy,memaldi/geopy,ahlusar1989/geopy,jmb/geopy,two9seven/geopy,magnushiie/geopy,ahlusar1989/geopy,mthh/geopy,Vimos/geopy,smileliaohua/geopy,SoftwareArtisan/geopy,magnushiie/geopy,cffk/geopy,cffk/geopy,geopy/geopy,memaldi/geopy,RDXT/geopy,sebastianneubauer/geopy,sebastianneubauer/geopy,smile...
test/geocoders/geonames.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import render_template\n\nfrom app import app\n\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\n\n@app.route('/report/<path:repository>')\ndef report():\n pass\n\n```\n\nApply this change: Create ...
python
edit
3
2
mit
f1c09bc9969cf9d66179baef80b5cbb3d28d5596
mingrammer/pyreportcard,mingrammer/pyreportcard
app/report/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\nimport re\n\n\ndef CheckChangeLogBug(input_api, output_api):\n if inpu...
python
edit
1
3
bsd-3-clause
3f180c4251a4217c31d954bae3fd5ffb5b49fbd7
catapult-project/catapult,scottmcmaster/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,danbeam/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult,0x90sled/catapult,SummerLW/Perf-Insight-Report,catapul...
build/presubmit_checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom purefap.core.models import FTPUser, FTPStaff, FTPClient\nimport shutil\nfrom datetime import datetime\nfrom optparse import make_option\n\nclass Command(BaseCommand):\n...
python
edit
5
7
bsd-2-clause
abd0f3af8967cb7f261082a4f1ee90d4b5f274ca
fim/purefap
purefap/core/management/commands/deleteusers.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A more or less complete user-defined wrapper around dictionary objects.\"\"\"\n\nimport riscos\n\nclass _Environ:\n def __init__(self, initial = None):\n pass\n def __repr__(self):\n return repr(riscos.getenvdict()...
python
edit
4
2
mit
dd6621267957bf621629f6ccb1930f089c7fd3eb
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/plat-riscos/riscosenviron.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. utils import TranspileTestCase, BuiltinFunctionTestCase\n\n\nclass SumTests(TranspileTestCase):\n def test_sum_list(self):\n self.assertCodeExecution(\"\"\"\n print(sum([1, 2, 3, 4, 5, 6, 7]))\n \"\"\")\n...
python
edit
1
1
bsd-3-clause
56e5e255b19c0b0d5998628706542d8f9666f58c
cflee/voc,freakboy3742/voc,cflee/voc,freakboy3742/voc
tests/builtins/test_sum.py
rejected_duplicate
Near-duplicate of sample 2303
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport chatbot_brain\nimport input_filters\n\n\ndef test_initialize_bot():\n bot = chatbot_brain.Chatbot()\n assert len(bot.tri_lexicon) == 0\n assert len(bot.bi_lexicon) == 0\n\n\ndef test_fill_lexicon():\n bot = chatbot_brain....
python
edit
1
2
mit
21b884876ad211851b0c8954a1cc3e4b42cae11e
corinnelhh/chatbot,corinnelhh/chatbot
test_chatbot_brain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport logging\nimport os\n\nfrom .client import GithubCachedClient\nfrom .search import get_dotfiles, SEARCH_QUERIES\n\n\ndef parse_args():\n parser = argparse.ArgumentParser(description='Search github for common lines ...
python
edit
4
3
mit
703fb96d207d71bc2061f796ceabb7ffaccca34e
allait/dotter
dotter/__main__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom django.db import transaction\n\n\n@transaction.atomic\ndef create_topics(apps, schema_editor):\n Topic = apps.get_model(\"cfp\", \...
python
edit
1
2
mit
3c02b3d104f3a43b019fec9b4168558562ad366c
kyleconroy/speakers,kyleconroy/speakers,kyleconroy/speakers
cfp/migrations/0029_auto_20150228_0428.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCopyright (c) 2015 Jesse Peterson\nLicensed under the MIT license. See the included LICENSE.txt file for details.\n'''\n\nfrom . import Payload\nimport plistlib # needed for Data() wrapper\n\nclass PEMCertificatePayload(Payload):\n ...
python
edit
1
2
mit
3fe40e91f70e8256d7c86c46f866e82e3ccf26e2
mosen/commandment,jessepeterson/commandment,mosen/commandment,mosen/commandment,mosen/commandment,jessepeterson/commandment,mosen/commandment
commandment/profiles/cert.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Scheduled tasks to be run by erpnext_ebay\"\"\"\n\nfrom frappe.utils.background_jobs import enqueue\n\n\ndef all():\n pass\n\n\ndef hourly():\n enqueue('erpnext_ebay.sync_orders.sync',\n que...
python
edit
1
1
mit
40b78b23072841cb7926d06a9d37f5a7cdd817ab
bglazier/erpnext_ebay,bglazier/erpnext_ebay
erpnext_ebay/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
python
edit
1
3
apache-2.0
e60649e08ce6b1b01d1480bc06433007c9c320ee
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
zun/tests/tempest/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nA simple module that helps unify the code between a python2 and python3 library.\n\"\"\"\nimport sys\n\ndef sorted(lst):\n newlst = list(lst)\n newlst.sort()\n return newlst\n\ndef reversed(lst):\n newlst = list(lst)\n ...
python
edit
3
1
bsd-3-clause
bc7b52e9f2095291f9277e3c9cbac9c191fa61a5
cherrypy/magicbus
cherrypy/py3util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n# See: https://forum.omz-software.com/topic/2358/appex-safari-content\n\nimport appex\n\ndef main():\n if appex.is_running_extension():\n for func in (appex.get_attachments, appex.get_file_path,\n app...
python
edit
1
4
apache-2.0
0eafac86c679689c77e371150c173c351d0aa926
cclauss/Ten-lines-or-less
appex_dump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\nfrom projects.models import ExperimentGroup\nfrom projects.tasks import start_group_experiments\nfrom experiments.models import Experiment\n\n\n@receive...
python
edit
1
3
apache-2.0
20370bf79b43dc566a6a7e85a903275d80e437a2
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
api/projects/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc...
python
edit
6
0
mit
42536943591ef77df3fc453e6e0b456e7a2bed89
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
cupy/array_api/_typing.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Django Tests\n# ..........................\n\nTEST = True\n\nCELERY_ALWAYS_EAGER = True\n\nTEST_EXCLUDE = ('django',)\n\nINSTALLED_APPS += (\n 'geotrek.diving',\n 'geotrek.sensitivity',\n 'geotrek.outdoor',\n)\n\nLOGGING['han...
python
edit
3
1
bsd-2-clause
79488513dfedb27a627a1eb516fb2fb2b6a2900c
makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/settings/env_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\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.apache.org/licen...
python
edit
1
0
apache-2.0
1a10f21566f59c9f4f8171bc088af1e2a18d9702
prestodb/presto-admin,prestodb/presto-admin
prestoadmin/_version.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import defaultdict\n\nfrom django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA\nfrom django.template.backends.base import BaseEngine\nfrom django.template.backends.utils import csrf_input_lazy, csrf_tok...
python
edit
3
3
mit
2f084990d919855a4b1e4bb909c607ef91810fba
funkybob/knights-templater,funkybob/knights-templater
knights/dj.py
rejected_duplicate
Near-duplicate of sample 14771
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom annotypes import Anno\n\nfrom malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName\nfrom ..util import set_tags\n\n\nwith Anno(\"The URL that gives some help documentation for this Block\"):\n AHelpUrl = str\n\n# P...
python
edit
3
1
apache-2.0
875f70c0c43b6fdc5825525e8ccfd137cecb2bfe
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/modules/builtin/parts/helppart.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2022 D-Wave Systems Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
2
apache-2.0
720537726b3f1eb88e67ec7454ddddbee1f123fa
dwavesystems/dimod,dwavesystems/dimod
benchmarks/variables.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .es_query import HQESQuery\nfrom . import filters\n\n\nclass CaseES(HQESQuery):\n index = 'cases'\n\n @property\n def builtin_filters(self):\n return [\n opened_range,\n closed_range,\n ...
python
edit
1
1
bsd-3-clause
0468c944464d55ba7ce0a821e1085ae530d49cf6
puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/es/cases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\nimport urlparse\n\nfrom celery_janitor import conf\nfrom celery_janitor.exceptions import BackendNotSupportedException\n\n\nBACKEND_MAPPING = {\n 'sqs': 'celery_janitor.backends.sqs.SQSBackend'\n}\n\n\ndef import_class(...
python
edit
1
2
mit
9de844864b3e6c732241a68d1871f701232d2733
comandrei/celery-janitor
celery_janitor/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2004-2008 rPath, Inc.\n#\n# This program is distributed under the terms of the Common Public License,\n# version 1.0. A copy of this license should have been distributed with this\n# source file in a file called LICENSE. ...
python
edit
1
0
apache-2.0
a42a7e237a72825080fa0afea263dbd5766417bb
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
conary/lib/digestlib.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport boto3\n\nclient = boto3.client('ses')\n\nclient.send_email(\n\tSource='<EMAIL>',\n\tMessage={\n\t\t'Subject': {\n\t\t\t'Data': 'Here!',\n\t\t},\n\t\t'Body': {\n\t\t\t'Text': {\n\t\t\t\t'Data': \"I'm not dead...
python
edit
4
1
mit
9a527d999075a92de3db174e0696e961c05041c4
davidski/imnotdeadyet,davidski/imnotdeadyet
dead_mailer.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n# See LICENSE.txt for licensing terms\r\n#$HeadURL$\r\n#$LastChangedDate$\r\n#$LastChangedRevision$\r\n\r\nimport shlex\r\n\r\nfrom reportlab.platypus import Spacer\r\n\r\nfrom flowables import *\r\n\r\n\r\ndef pa...
python
edit
5
6
mit
fcd2328549dcec2986e3b972f1a8bcfb0cf2e21b
pombreda/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf
rst2pdf/utils.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.\n#\n\nimport time\n\nfrom windows_process_mem_cpu import WindowsProcessMemCpuUsageData\n\nclass WindowsProcessInfoManager(object):\n def get_mem_cpu_usage_data(self, pid...
python
edit
1
4
apache-2.0
7fed0208770413399fde5e76ad2046b6bc440b16
eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-contro...
src/nodemgr/common/windows_process_manager.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\n\ndef test_fast_return():\n \"\"\"\"\"\"\n a = np.array([1, 2, 3], dtype='i')\n assert np.asarray(a) is a\n assert np.asarray(a, dtype='i') is a\n # This may produce a new view or a copy, but is never th...
python
edit
1
1
bsd-3-clause
5651445944bce163a2c3f746d6ac1acd9ae76032
charris/numpy,mhvk/numpy,mattip/numpy,mattip/numpy,mattip/numpy,numpy/numpy,mhvk/numpy,endolith/numpy,charris/numpy,numpy/numpy,endolith/numpy,charris/numpy,numpy/numpy,endolith/numpy,endolith/numpy,charris/numpy,mattip/numpy,numpy/numpy,mhvk/numpy,mhvk/numpy,mhvk/numpy
numpy/array_api/tests/test_asarray.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nUsed to manage the outputter system. This package is the modular system used\nfor managing outputters.\n'''\n\n# Import salt utils\nimport salt.loader\n\n\ndef display_output(data, out, opts=None):\n '''\n Print the passed data u...
python
edit
1
8
apache-2.0
0c60434dc573b5770b8061751771c773032a4f76
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/output/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom exceptions import AssertionError\n\nfrom django.core.exceptions import ValidationError\nfrom django.test import TestCase\nfrom django.test.client import Client\n\nfrom cyder.core.ctnr.models import Ctnr\n\n\nclass CyTestMixin(object):\...
python
edit
1
6
bsd-3-clause
ef11e9d0247fbd10e317d30ca8898f9a3c079e37
murrown/cyder,drkitty/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,akeym/cyder,zeeman/cyder,akeym/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,murrown/cyder,murrown/cyder,murrown/cyder
cyder/base/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest, os\n\nimport svn.core\n\nclass SubversionCoreTestCase(unittest.TestCase):\n \"\"\"Test cases for the basic SWIG Subversion core\"\"\"\n\n def test_SubversionException(self):\n self.assertEqual(svn.core.SubversionExcept...
python
edit
3
1
apache-2.0
869bafa9aadf45c2beb3e6f4e3d3751d2d6baf8f
wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion
subversion/bindings/swig/python/tests/core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wysteria.client import Client, TlsConfig\nfrom wysteria import errors\nfrom wysteria.constants import FACET_COLLECTION\nfrom wysteria.constants import FACET_ITEM_TYPE\nfrom wysteria.constants import FACET_ITEM_VARIANT\n\n\n__all__ = [\...
python
edit
1
0
bsd-3-clause
47a7770bd3c5552d61f69b7df62bf4c36de56dc8
voidshard/pywysteria,voidshard/pywysteria
wysteria/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom chai import Chai\n\nfrom arrow import util\n\n\nclass UtilTests(Chai):\n def test_is_timestamp(self):\n timestamp_float = 1563047716.958061\n timestamp_int = int(timestamp_float)\n\n sel...
python
edit
1
1
apache-2.0
4db714570a9ce58a08c72aa1477e9e7a48ed650c
crsmithdev/arrow
tests/util_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .api import process_ndex_neighborhood\nfrom .api import process_belrdf\nfrom .api import process_belscript\nfrom .api import process_pybel_graph\nfrom .api import process_json_file\nfrom .api import process_pybel_neighborhood\n\n```\n\...
python
edit
9
0
bsd-2-clause
bd0800d46126d963f1ae107924a632752bc94173
johnbachman/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra
indra/sources/bel/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Run tests under coverage's measurement system (Used in CI)\n\"\"\"\n\nimport os\nimport sys\nfrom os.path import join, realpath\n\n# Third Party modules\nimport nose\nimport coverage\n\ncov = coverage.coverage(branch=True)\n\ncov.star...
python
edit
1
0
bsd-3-clause
7a172a7fe98223fd20a4bb5d497aa17653b8a13b
pradyunsg/Py2C,pradyunsg/Py2C
dev_tools/coverage_runner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .node import Node\n\n\nclass ExecutionNode(Node):\n type = 'execution'\n\n def __init__(self, name, step, override=None):\n if override is None:\n override = {}\n self.name = name\n self.step = ste...
python
edit
1
2
mit
9c058304c9ad1ad8c9220bc9f098a9dcf80700b9
valohai/valohai-yaml
valohai_yaml/objs/pipelines/execution_node.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm,Textarea,TextInput\n\n\nfrom .models import Post\n\n\nclass PostForm(ModelForm):\n class Meta:\n model = Post\n fields = ('subject','body')\n widgets = {\n 'subject':...
python
edit
1
0
mit
47088dd1ed69207e6e74af98c1f6a4124493ed0c
Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters
forum/forms.py
rejected_duplicate
Near-duplicate of sample 4347
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport unittest\nfrom text import regex_utils\n\nclass RegexUtilsTest(unittest.TestCase):\n\n def test_check_line(self):\n pass\n \n def test_parse_line(self):\n pass\n \nif __name__ == '__mai...
python
edit
1
1
apache-2.0
30be8d71fee8f7429d6b4d48a8168133062e3315
PinaeOS/py-text,interhui/py-text
text_test/regex_utils_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport luigi\nimport sciluigi as sl\nimport time\n\nclass T1(sl.Task):\n\n # Parameter\n\n text = luigi.Parameter()\n\n # I/O\n\n def out_data1(self):\n return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course mak...
python
edit
3
3
mit
3b73440a59b22bcbbaa16a2f8c2ff49b1f985b7f
samuell/sciluigi,pharmbio/sciluigi,pharmbio/sciluigi
examples/example3_components.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\n\nclass TestDeterministicCache(unittest.TestCase):\n\n def test_init(self):\n pass\n\n def test_setitem(self):\n pass\n\n def test_save(self):\n pass\n\n def test_load(self):\n pass...
python
edit
1
1
mit
12c57e52d3f107ce9723f33e7f35ef752bb8f3bc
ranjinidas/Axelrod,marcharper/Axelrod,ranjinidas/Axelrod,marcharper/Axelrod
axelrod/tests/unit/test_deterministic_cache.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# A sample logging configuration. The only tangible logging\n# performed by this configuration is to send an email to\n# the site admins on every HTTP 500 error.\n# See http://docs.djangoproject.com/en/dev/topics/logging for\n# more details...
python
edit
1
0
bsd-2-clause
1bd74c601a7e198461095b44a268eb4ee50c913d
wheelcms/wheelcms_project
wheelcms_project/settings/base/settings_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n lilkv.columnfamily\n\n This module implements the client-facing aspect of the `lilkv` app. All\n requests are handled through this interface.\n\"\"\"\n\n\nclass ColumnFamily(object):\n \"\"\"C...
python
edit
1
2
mit
aa242ab8451887fe8a4ddfa223d0e11c8c3a472f
pgorla/lil-kv
lilkv/columnfamily.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils import timezone\n\nclass Post(models.Model):\n title = models.CharField(max_length=200)\n author = models.CharField(max_length=100)\n tags = models.CharField(max_length=200)\n pub_...
python
edit
3
1
mit
b52523b78b7ebc5358cb3dc9aa257cc5b3fbbb72
DLance96/django-blog,DLance96/django-blog,DLance96/django-blog
blog/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom apscheduler.schedulers.blocking import BlockingScheduler\n\nsched = BlockingScheduler()\n\n\n@sched.scheduled_job('cron', hour=\"*/3\", minute=0)\ndef updater():\n \"\"\"\n Run our update command every three hours.\n \"\"\"\n ...
python
edit
1
1
mit
44a4df24e65420a37638b895ddc59147bae2502e
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
clock.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\n\n\nclass PushoverNotification(object):\n def __init__(self, pushover_user, pushover_token):\n self.pushover_api = 'https://api.pushover.net/1/messages.json'\n self.pushover_user = pushover_use...
python
edit
4
3
mit
63fe76240a819a0211aab566c1cd36b31c49c5d9
bogdal/freepacktbook
freepacktbook/pushover.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fusesoc.build.quartus import Quartus\nfrom fusesoc.build.ise import Ise\n\ndef BackendFactory(system):\n if system.backend_name == 'quartus':\n return Quartus(system)\n elif system.backend_name == 'ise':\n return Is...
python
edit
2
3
bsd-2-clause
8404ced0a54df6ab4be3f6d10a4d1201d2105f09
olofk/fusesoc,lowRISC/fusesoc,olofk/fusesoc,lowRISC/fusesoc
fusesoc/build/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport openstack\n\n\ndef main():\n print(\"Hello Clouds!\")\n\n```\n\nApply this change: Make crude CLI commands work\n\nThis is mainly as an example to show what it can look like." }, { "role": "assistant", "content": "impo...
python
edit
1
2
apache-2.0
8f094e1c3d4a64942cadf5603ce5b23706381fac
omninubes/nubes
nubes/cmd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis is a setup.py script generated by py2applet\n\nUsage:\n python setup.py py2app\n\"\"\"\n\nfrom setuptools import setup\nfrom glob import glob\nimport syncplay\n\nAPP = ['syncplayClient.py']\nDATA_FILES = [\n ('resources',...
python
edit
1
0
apache-2.0
0e60863d43a5b230839191743f72818763eeee71
Syncplay/syncplay,NeverDecaf/syncplay,NeverDecaf/syncplay,alby128/syncplay,Syncplay/syncplay,alby128/syncplay
buildPy2app.py
rejected_duplicate
Near-duplicate of sample 972
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8\n\"\"\"\nI get a bunch of requests that are uninteresting for some reason -- maybe\nsomebody trying to find a PHP admin page, or crawling for vulnerable WordPress\ninstances. Any such request can immediately be reject...
python
edit
1
2
mit
15a9d8b9e361462532ed286abce4ee445b9ec74a
alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net
analytics/rejections.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\nScript to download the raw data from http://www.rsssf.com/\nThe data was processed mostly by interactive sessions in ipython. Almost every\nfile had it's own format, so there is no point in trying to automate it in ...
python
edit
4
0
mit
958a134bd5e68ac94e3f4f25d4587e357d9a7ba5
fisadev/afa_cup_learning
download_data.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Activity(models.Model):\n entry = models.ForeignKey('feeds.Entry', blank=True, null=True,\n unique=True)\n published_on = models.DateTimeField(auto_now_add=True)\n\n...
python
edit
1
1
bsd-3-clause
b03b62e7abe9a8db0cded78b80cb8d565a424a7e
mozilla/betafarm,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/mozilla-ignite
apps/activity/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# #############################################################################\n# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>\n# All rights reserved.\n#\n# This source code is licensed under both the ...
python
edit
3
2
isc
4fe675af1cc8eb65f843e06962763dab8c920ce5
unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso
contrib/meson/GetLz4LibraryVersion.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = 'facturapdf'\n__summary__ = 'Create PDF invoice according to Spanish regulations.'\n__version__ = '0.0.1'\n\n__license__ = 'BSD 3-Clause License'\n__uri__ = 'https://github.com/initios/factura-pdf'\n__author__ = 'Carlos Goce'\n_...
python
edit
1
0
bsd-3-clause
727e2283f60355b7c76e4ef0d72ee666eb269bd4
initios/factura-pdf
facturapdf/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport abc\nimport os\nfrom pkg_resources import DistributionNotFound, get_distribution\nfrom six.moves.configparser import SafeConfigParser\n\nfrom . import log_utils\n\n\ntry:\n __version__ = get_distribution(__name__).version\nexcept ...
python
edit
1
1
apache-2.0
4212b19910e627b48df2c50389b5c8e46250c568
girder/girder_worker,girder/girder_worker,girder/girder_worker
girder_worker/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom waterbutler.core.utils import async_retry\nfrom waterbutler.core.utils import make_provider\n\n__all__ = [\n 'async_retry',\n 'make_provider',\n]\n\n```\n\nApply this change: Remove __all__ as it was not used and causing circular...
python
edit
1
0
apache-2.0
7638f03dfe347866d62ede55d0163e7593f9e6c9
TomBaxter/waterbutler,Johnetordoff/waterbutler,RCOSDP/waterbutler,kwierman/waterbutler,CenterForOpenScience/waterbutler,rdhyee/waterbutler,Ghalko/waterbutler,felliott/waterbutler,rafaeldelucena/waterbutler,hmoco/waterbutler,cosenal/waterbutler,icereval/waterbutler,chrisseto/waterbutler
waterbutler/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template, jsonify\n\nfrom lanauth.api import load_api\n\n\nclass App(Flask):\n \"\"\"Web application.\n\n Routes:\n /\n /login Route to the main page\n \"\"\"\n\n def configure_view...
python
edit
3
3
mit
af27c17d3f2f13d66d188900bbac02975eb446b4
LSUCS/pyLanAuth,LSUCS/pyLanAuth,LSUCS/pyLanAuth,LSUCS/pyLanAuth
lanauth/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport fileinput\nimport os\nimport socket\nimport argparse\n\n\ndef local_addresses():\n ips = socket.gethostbyname_ex(socket.gethostname())[2]\n return set([ip for ip in ips if not ip.startswith(\"127.\")][:1])\n\n\ndef common_parse...
python
edit
1
3
mit
5f21b5f387e895a9af2ac8481bd495f2dacd6cdf
jssjr/carbonate,criteo-forks/carbonate,ross/carbonate,criteo-forks/carbonate,graphite-project/carbonate,unbrice/carbonate,criteo-forks/carbonate,deniszh/carbonate,graphite-project/carbonate,jssjr/carbonate,deniszh/carbonate,unbrice/carbonate,deniszh/carbonate,jssjr/carbonate,ross/carbonate,graphite-project/carbonate,un...
carbonate/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nDataFrame client for InfluxDB\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n__all__ = ['D...
python
edit
1
1
mit
355b1a91edf2dfcff66c2a02e034977f65d0690c
BenHewins/influxdb-python,omki2005/influxdb-python,omki2005/influxdb-python,Asimmetric/influxdb-python,tzonghao/influxdb-python,influxdata/influxdb-python,Asimmetric/influxdb-python,tzonghao/influxdb-python,BenHewins/influxdb-python,influxdb/influxdb-python,influxdata/influxdb-python,influxdb/influxdb-python
influxdb/dataframe_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom importer.utils import find_first\n\n\nclass FindFirstTestCase(TestCase):\n def test_first_in_haystack(self):\n self.assertEqual(\n find_first(\n ['one', 'two', 'three...
python
edit
1
1
mit
853bf035fcb9ea21e648cb0b1d1b13ee68f8e9cc
despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics
importer/tests/test_utils.py
accepted
null
true