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\"\"\"Create lr_uprn column with a GIN index\n\nRevision ID: 45a35ac9bfe\nRevises: 2bbd8de7dcb\nCreate Date: 2015-09-22 10:36:04.307515\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '45a35ac9bfe'\ndown_revision = '2bbd8d...
python
edit
1
1
mit
3ef3a5f4b0453af2d6853bc017fe4c44b9ee90ab
LandRegistry/digital-register-api,LandRegistry/digital-register-api
migrations/versions/45a35ac9bfe_create_lr_uprn_column_with_a_gin_index.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint\nfrom flask import render_template\nfrom flask import request\n\nspring_evals_bp = Blueprint('spring_evals_bp', __name__)\n\n@spring_evals_bp.route('/spring_evals/')\ndef display_spring_evals():\n # get user d...
python
edit
1
1
mit
c96000a231d5bbf60a310e091b9895bfb249c115
ComputerScienceHouse/conditional,RamZallan/conditional,RamZallan/conditional,ComputerScienceHouse/conditional,RamZallan/conditional,ComputerScienceHouse/conditional
conditional/blueprints/spring_evals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\n\nfrom dynd import nd, ndt\n\nfrom benchrun import Benchmark, clock\n\nclass ArithemticBenchmark(Benchmark):\n parameters = ('size',)\n size = [100000, 10000000]\n\n def run(self, size):\n a = nd.uniform(dst_tp = n...
python
edit
1
1
bsd-2-clause
049e21dd2d4e90120bfe297696cffa5000028854
michaelpacer/dynd-python,insertinterestingnamehere/dynd-python,pombredanne/dynd-python,pombredanne/dynd-python,cpcloud/dynd-python,ContinuumIO/dynd-python,michaelpacer/dynd-python,izaid/dynd-python,michaelpacer/dynd-python,insertinterestingnamehere/dynd-python,izaid/dynd-python,mwiebe/dynd-python,izaid/dynd-python,mwie...
dynd/benchmarks/benchmark_arithmetic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom util import full_stack\nfrom workflow.steps.util.base import BaseStep\nfrom workflow.exceptions.error_codes import DBAAS_0020\n\nLOG = logging.getLogger(__name__)\n\n\nclass DecreaseTTL(BaseStep...
python
edit
1
5
bsd-3-clause
cf7086620df23d8af15f7c9898edf39f64965549
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/util/region_migration/check_instances_status.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime\nimport sublime_plugin\nimport os\nimport subprocess\n\n\ndef syntax_name(view):\n syntax = os.path.basename(view.settings().get('syntax'))\n syntax = os.path.splitext(syntax)[0]\n return syntax\n\n\ndef docset_prefi...
python
edit
1
5
apache-2.0
c416c998d73e27713fd57ec97c70bacb2390f8c9
farcaller/DashDoc
DashDoc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Create your views here.\n\nfrom django.template import RequestContext\nfrom django.shortcuts import render_to_response\nfrom django.utils import simplejson\nfrom django.http import HttpResponse, Http404\nfrom .models import BenchmarkLogs,...
python
edit
7
1
bsd-2-clause
0ce491e39b4cb866b2b749692dbaed8cb1cf6dac
ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark
plots/views.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\n\n# See README.txt for information and build instructions.\n\nimport addressbook_pb2\nimport sys\n\n# Iterates though all people in the AddressBook and prints info about them.\ndef ListPeople(address_book):\n for person...
python
edit
9
7
bsd-3-clause
b5653ac28ac8358127943bd1f40c22dfd8a274f3
malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf
examples/list_people.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use ...
python
edit
1
0
mit
c8981212ea1d8c9e89c00135d164cde7fc53832d
numberly/mongo-thingy
docs/source/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport doctest\nimport unittest\n\n\nDOCTEST_FILES = []\n\nfor root, dirs, files in os.walk(\".\"):\n if \".hg%s\" % os.path.sep not in root:\n for f in files:\n if f.endswith(\".doctest\"):\n ...
python
edit
2
0
mit
732fb749247c94fe0dbf3b98ca691d139970bc48
xuru/substrate,xuru/substrate,xuru/substrate
tests/doctests/test_doctests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mangopaysdk.entities.entitybase import EntityBase\nfrom mangopaysdk.entities.user import User\nfrom mangopaysdk.tools.enums import PersonType\nfrom mangopaysdk.tools.enums import KYCLevel\n\n\nclass UserLegal (User):\n\n def __init_...
python
edit
4
1
mit
02f77babc6195426fdb5c495d44ede6af6fbec8f
chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk
mangopaysdk/entities/userlegal.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom .._serializable import Serializable, Serializer, Deserializer\n\n\nclass Model(Serializable):\n \"\"\" This is the superclass of all models.\n \"\"\"\n\n def __init__(self, model=None):\n \"\"\" Wrap...
python
edit
1
3
mit
8c5f317a090a23f10adcc837645bd25a8b5626f8
slundberg/shap,slundberg/shap,slundberg/shap,slundberg/shap
shap/models/_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom django.http import HttpResponse\nfrom django.utils import simplejson as json\nfrom myuw_mobile.views.rest_dispatch import RESTDispatch, data_not_found\nfrom myuw_mobile.dao.library import get_account_info_for_current_us...
python
edit
1
2
apache-2.0
1830c3ba2c124b0ef1d16a0ba2e092fd3281179b
uw-it-aca/myuw,uw-it-aca/myuw,fanglinfang/myuw,uw-it-aca/myuw,fanglinfang/myuw,fanglinfang/myuw,uw-it-aca/myuw
myuw_mobile/views/api/library.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Takes in toml, dumps it out as json\n# Run pip install toml to install the toml module\nimport json\nimport sys\nimport toml\n\nfh = open(sys.argv[1])\ntry:\n data = toml.load(fh)\nexcept toml.TomlDecodeError, e:...
python
edit
1
0
mit
1ab4e03a0925deb57a7eafab2043d55f480988f1
mivok/tools,mivok/tools,mivok/tools,mivok/tools
misc/toml_to_json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ctypes\n\nstringtools = ctypes.CDLL(\"../target/libstringtools-261cf0fc14ce408c.so\")\nprint(stringtools.count_substrings(\"banana\", \"na\"))\n\n```\n\nApply this change: Use byte strings for Python example." }, { "role": "a...
python
edit
1
0
mit
88ac847fd9a53e25253f72216ee2fad3fa8353a2
zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools,zsiciarz/rust-ffi-stringtools
python/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport ConfigParser\n\nfrom peewee import *\n\nconfig = ConfigParser.RawConfigParser()\nconfig.read('server.conf')\n\ndatabase = SqliteDatabase('gallery.db')\n\nfrom collection import CollectionModel\nfrom album import AlbumModel\nfrom user...
python
edit
3
0
unlicense
c32118b2157e6c2cfd435461ee23edfa79aa917e
karousel/karousel
api/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import connections\nfrom django.db.backends.dummy.base import DatabaseWrapper\nfrom django.db.migrations.executor import MigrationExecutor\nfrom prometheus_client import Gauge\n\nunapplied_migrations = Gauge(\n 'django_mig...
python
edit
1
4
apache-2.0
9dbaf58fd3dc9c3c976afcbf264fa6cfff09a7a0
obytes/django-prometheus,korfuri/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus
django_prometheus/migrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom . import families as _families\n\n\ndef get_record_names(subsystem=None):\n \"\"\"Return a dictionary of record names for given subsystem\n each entry is another dictionary of model families whose\n values are the indices in...
python
edit
3
1
mit
07c40f2c47c81843c8fd183f8fad7e489fb2d814
lnls-fac/sirius
sirius/LI_V00/record_names.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSupport for multiple environments based on python configuration files.\n\"\"\"\n\nfrom __future__ import print_function, absolute_import\n\nimport os\n\nfrom twisted.python.filepath import FilePath\n\nfrom fabric.api import env, tas...
python
edit
null
null
mit
8e2187d2519b4008a36f5c85910b7e7e2efc16f9
alex/braid,alex/braid
braid/config.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport os\nimport time\n\nfrom twython import Twython\nimport requests\n\n\nAPP_KEY = os.environ.get('APP_KEY')\nAPP_SECRET = os.environ.get('APP_SECRET')\nOAUTH_TOKEN = os.environ.get('OAUTH_TOKEN')\nOAUTH_TOKEN_SECRET = o...
python
edit
1
2
mit
746c06ba70cd2854a86ea8bc45fc8e3e6192f67c
erickgnavar/coinstats
app.py
rejected_duplicate
Near-duplicate of sample 11774
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Flask application default config:\n# http://flask.pocoo.org/docs/config/#configuring-from-files\n# https://github.com/mbr/flask-appconfig\n\n\nproject_name = u'Skeleton'\n\n\nclass Defaul...
python
edit
1
0
mit
c47769005ba2eccebbd8561fd4b245d6af820821
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
app/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urlparse import urlparse\nimport logging\nimport os\n\nfrom flask import Flask\nimport pymongo\n\napp = Flask(__name__)\n_logger = logging.getLogger(__name__)\ndb = None\n\ndef get_connection():\n global db\n if db:\n retu...
python
edit
1
3
apache-2.0
8c17e811dd9bf2a2b1c815fefb661260f624e83f
lnickers2004/mongo-web-shell,pilliq/mongo-web-shell,mongodb-labs/mongo-web-shell,pilliq/mongo-web-shell,lnickers2004/mongo-web-shell,10gen-labs/mongo-web-shell,ecbtln/mongo-web-shell,rcchan/mongo-web-shell,FuegoFro/mongo-web-shell,mcomella/mongo-web-shell,mcomella/mongo-web-shell,xl76/mongo-web-shell,10gen-labs/mongo-w...
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the ``utils`` module.\"\"\"\n\nfrom mock import patch, Mock as mock\nfrom nose.tools import *\n\nfrom facepy import *\n\npatch = patch('requests.session')\n\ndef mock():\n global mock_request\n\n mock_request = patch.s...
python
edit
10
1
mit
b2aba5cbdfbe59fee7bc595298a732c9aa1f9b51
merwok-forks/facepy,jwjohns/facepy,jgorset/facepy,Spockuto/facepy,liorshahverdi/facepy,jwjohns/facepy,buzzfeed/facepy
tests/test_utils.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom expert_tourist.utils import gmaps_url_to_coords\nfrom tests.tests import BaseTestConfig\n\nclass TestUtils(BaseTestConfig):\n def test_url_to_coords(self):\n url = 'http://maps.google.co.cr/maps?q=9.8757875656828,-84.03733452...
python
edit
1
1
mit
26c725d3e6b1d5737a0efcbcd2371ff066a13a86
richin13/expert-tourist
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Main Module of PDF Splitter\"\"\"\nimport argparse\n\nfrom PyPDF2 import PdfFileWriter\n\nfrom Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages\n\nparser = \\\n argparse.ArgumentParser(\n descript...
python
edit
1
1
mit
34e2cf61bf686542f21bc8d840f17b13ca137fe3
shunghsiyu/pdf-processor
Main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom exceptions import UrlNotMatched\n\nclass EmbedableResource(object):\n resource_providers = []\n\n @classmethod\n def register(cls, provider_cls):\n cls.resource_providers.append(provider_cls)\n\n @classmet...
python
edit
1
3
mit
c1dfbc8e8b3ae29436c584d906636ea541dfb6a8
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
apps/storybase_asset/embedable_resource/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom config import *\n\nclass QFBV:\n\tdef preamble(self):\n\t\tprint \"(set-logic QF_BV)\"\n\n\t\tprint \"\"\n\n\t\t# Enumerate all the variables, for each match round.\n\t\tfor i in range(NUMROUNDS):\n\t\t\tfor j in range(NUMMATCHES):\n\t...
python
edit
4
4
bsd-2-clause
8f7623c4b09d85c09327c37030fa2328e77853b1
jmorse/numbness
qfbv.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom sklearn.cross_validation import train_test_split\n\nfrom spam.common import DATASET_META\nfrom spam.common.utils import get_file_path_list\nfrom spam.preprocess import Preprocess\n\n\nf...
python
edit
1
0
mit
626c74d727140646d6123e2d86a828401d87abe0
benigls/spam,benigls/spam
spam.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\n\nfrom loggable import Loggable\nfrom malcolm.core.attributemeta import AttributeMeta\n\n\nclass MapMeta(Loggable):\n \"\"\"A meta object to store a set of attribute metas\"\"\"\n\n def __init__(se...
python
edit
3
1
apache-2.0
d7343ac93dbfb62b3f425711b8df9929a1d6f1ad
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
malcolm/core/mapmeta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom onirim.card._base import ColorCard\nfrom onirim.card._location import LocationKind\n\n\ndef _openable(door_card, card):\n \"\"\"Check if the door can be opened by another card.\"\"\"\n return card.kind == LocationKind.key and doo...
python
edit
2
5
mit
987eb13b24fcb6b89b9bbe08a9bc73f40b85538c
cwahbong/onirim-py
onirim/card/_door.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport json\nfrom optparse import make_option\n\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom watchman.utils import get_checks\n\n\nclass Command(BaseCommand):\n help...
python
edit
1
8
bsd-3-clause
6ac0598982f90b23d772d6b3cba802ad5fad5459
JBKahn/django-watchman,blag/django-watchman,mwarkentin/django-watchman,blag/django-watchman,JBKahn/django-watchman,ulope/django-watchman,mwarkentin/django-watchman,gerlachry/django-watchman,gerlachry/django-watchman,ulope/django-watchman
watchman/management/commands/watchman.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Common services code\"\"\"\n\nAVAILABLE_SERVICES = ['habit_list', 'idonethis', 'nikeplus']\n\n\ndef get_service_module(service_name):\n \"\"\"Import given service from dayonetools.services package\"\"\"\n\n import importlib\n ...
python
edit
1
1
mit
7eb83427b8134d5fa51357371e95b398d95a5b96
durden/dayonetools
dayonetools/services/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Jonathan Anderson\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain t...
python
edit
1
0
bsd-2-clause
05cf5f3729ffbceeb2436322b2aac5285d7228de
trombonehero/nerf-herder,trombonehero/nerf-herder,trombonehero/nerf-herder
wsgi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#FLM: Import .ufo File into FontLab\n\nfrom robofab.world import NewFont\nfrom robofab.interface.all.dialogs import GetFolder\n\npath = GetFolder(\"Please select a .ufo\")\nif path is not None:\n\tfont = NewFont()\n\tfont.readUFO(path, doPr...
python
edit
2
0
bsd-3-clause
1025121c19af4d1ea224abc8f37120cb9f24210d
jamesgk/robofab,daltonmaag/robofab,bitforks/robofab,schriftgestalt/robofab,moyogo/robofab,schriftgestalt/robofab,miguelsousa/robofab,anthrotype/robofab,daltonmaag/robofab,anthrotype/robofab,jamesgk/robofab,miguelsousa/robofab,moyogo/robofab
Scripts/RoboFabUFO/ImportFontFromUFO.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# include github, bitbucket, google here for backward-compatibility\n# don't add new oauthenticators here.\nfrom .oauth2 import *\nfrom .github import *\nfrom .bitbucket import *\nfrom .google import *\n\nfrom ._version import __version__, ...
python
edit
9
0
bsd-3-clause
5d5bbcd380300c5fd786fac59bf360a287b99c3b
santi81/oauthenticator,santi81/oauthenticator
oauthenticator/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nif hasattr(os, 'add_dll_directory'):\n os.add_dll_directory(\"$<TARGET_FILE_DIR:sch-core::sch-core>\")\n\nfrom . sch import *\n\n```\n\nApply this change: Add the Boost DLL directory to the search path as well" }, { "r...
python
edit
2
0
bsd-2-clause
fb5bc5d789986df53844d8f0620db95f349e4096
jrl-umi3218/sch-core-python,jrl-umi3218/sch-core-python
sch/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2007 Christopher Lenz\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution.\n\nimport unittest\n...
python
edit
1
1
bsd-3-clause
1d3bd1fe50806180c8fb6889b1bed28f602608d6
djc/couchdb-python,djc/couchdb-python
couchdb/tests/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom datetime import date\n\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\n\n\nclass CorrelationManager(models.Manager):\n def update_or_create(self, instance, timestam...
python
edit
1
2
apache-2.0
beb06f3377a5e3e52f5756a1ecbf4197c7a3e99e
hello-base/web,hello-base/web,hello-base/web,hello-base/web
base/components/correlations/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nConvenience functions for in memory deduplication\n\"\"\"\n\nimport collections\nimport dedupe.core\n\n \n\ndef dataSample(data, sample_size):\n '''Randomly sample pairs of records...
python
edit
5
4
mit
ddcb5b11a2f050e1eb8ae185888dde2ef1c66d72
dedupeio/dedupe-examples,dedupeio/dedupe,neozhangthe1/dedupe,tfmorris/dedupe,datamade/dedupe,pombredanne/dedupe,datamade/dedupe,nmiranda/dedupe,pombredanne/dedupe,neozhangthe1/dedupe,dedupeio/dedupe,davidkunio/dedupe,01-/dedupe,01-/dedupe,nmiranda/dedupe,tfmorris/dedupe,davidkunio/dedupe
dedupe/convenience.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nGitHubTarballPackage ('mono', 'llvm', '2.10', '943edbc1a93df204d687d82d34d2b2bdf9978f4e',\n\tconfigure = 'CFLAGS=\"-m32\" CPPFLAGS=\"-m32\" CXXFLAGS=\"-m32\" LDFLAGS=\"-m32\" ./configure --prefix=\"%{prefix}\" --enable-optimized --enable-ta...
python
edit
2
0
mit
e4275c4f1a408dd9f8095bef4ed650ccc54401e9
BansheeMediaPlayer/bockbuild,mono/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/mono-llvm-2-10.py
rejected_duplicate
Near-duplicate of sample 5563
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCLE is an extensible binary loader. Its main goal is to take an executable program and any libraries it depends on and\nproduce an address space where that program is loaded and ready to run.\n\nThe primary interface to CLE is the L...
python
edit
11
0
bsd-2-clause
1343ca5b426132c0a9c916abd516a69ddd5f3aa4
angr/cle
cle/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Test that sos kernel is installed\n\nimport jupyter_client\n\ntry:\n jupyter_client.kernelspec.get_kernel_spec('sos')\nexcept jupyter_client.kernelspec.NoSuchKernel:\n print('sos kernel was not installed')\n print('The following ...
python
edit
1
1
bsd-3-clause
e7cbed6df650851b2d44bf48f2b94291822f0b91
kwilcox/staged-recipes,scopatz/staged-recipes,patricksnape/staged-recipes,asmeurer/staged-recipes,mcs07/staged-recipes,patricksnape/staged-recipes,birdsarah/staged-recipes,mcs07/staged-recipes,hadim/staged-recipes,basnijholt/staged-recipes,goanpeca/staged-recipes,synapticarbors/staged-recipes,kwilcox/staged-recipes,asm...
recipes/sos-notebook/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ConfigReader():\n\tdef __init__(self):\n\t\tself.keys={}\n\t\t\n\t#Read Keys from file\n\tdef readKeys(self):\n\t\tkeysFile=open(\"config.txt\",\"r\")\n\t\tfileLines=keysFile.readlines()\n\t\tkeysFile.close()\n\t\tself.keys.clear()\n\...
python
edit
1
6
mit
bf18c698596be9de094d94cdc52d95186fc37e6a
ollien/PyConfigReader
configReader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom aldryn_apphooks_config.admin import BaseAppHookConfig\nfrom cms.admin.placeholderadmin import PlaceholderAdmin, FrontendEditableAdmin\nfrom parler.admin import TranslatableAdmin\n\nfrom .models impor...
python
edit
1
2
bsd-3-clause
2769f038a70e1003c23908b1e917abd08058512b
czpython/aldryn-newsblog,mkoistinen/aldryn-newsblog,czpython/aldryn-newsblog,mkoistinen/aldryn-newsblog,czpython/aldryn-newsblog,mkoistinen/aldryn-newsblog,czpython/aldryn-newsblog
aldryn_newsblog/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# inspired from:\n# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/\n# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py\n\n__title__ = 'spacy'\n__version__ = '2.0.2.dev1'\n__summary__...
python
edit
1
0
mit
49fd5a646f329be1147b43b8c2c611f1424abe22
honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spa...
spacy/about.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom panoptes_client.panoptes import LinkResolver, PanoptesObject\n\nclass Classification(PanoptesObject):\n _api_slug = 'classifications'\n _link_slug = 'classification'\n _edit_attributes = ( )\n\nLinkResolver.register(Classifica...
python
edit
1
2
apache-2.0
23fc2bbd22aa8d45301207b0608634df4414707f
zooniverse/panoptes-python-client
panoptes_client/classification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
0
apache-2.0
fb8921f17d1cecfc1c61612092709c526b70e0ab
DataBiosphere/dsub,DataBiosphere/dsub
dsub/_dsub_version.py
rejected_duplicate
Near-duplicate of sample 2591
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport warnings\n\nfrom SCons.Util import \\\n WhereIs\nfrom SCons.Tool.ifort import \\\n generate as old_generate\n\ndef generate_linux(env):\n ifort = WhereIs('ifort')\n if not ifort:\n warnings.warn...
python
edit
1
3
bsd-3-clause
b9882cc9d12aef06091727c76263039b30f0c4ce
cournape/numscons,cournape/numscons,cournape/numscons
numscons/tools/ifort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\nimport importlib\nimport os\nimport logging\nfrom website import settings\n\n\nlogger = logging.getLogger(__name__)\n\nDEFAULT_REGION_NAME = 'N. Virginia'\nDEFAULT_REGION_ID = 'us-east-1'\n\nWATERBUTLER_CREDENTIALS = {\n ...
python
edit
1
0
apache-2.0
fffbf30ab4f64cbfad939529dde416280a68b125
pattisdr/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,Johnetordoff/osf.io,adlius/osf.io,aaxelb/osf.io,saradbowman/osf.io,mfraezz/osf.io,HalcyonChimera/osf.io,felliott/osf.io,saradbowman/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,erinspace/osf.io,adlius/osf.io,baylee-d/...
addons/osfstorage/settings/defaults.py
rejected_duplicate
Near-duplicate of sample 11510
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.static import static\n\n\nclass FakeTenant(object):\n is_main = lambda self: False\n is_configured = lambda self: True\n ...
python
edit
1
2
bsd-3-clause
2aa81349f2fae2f782c5174720ea7d2ab406c946
Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto
ditto/multitenancy/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport string\n\n\ndef sanitise_string(messy_str):\n \"\"\"Whitelist characters in a string\"\"\"\n valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)\n return u''.join(char for char in mes...
python
edit
2
6
mit
8fd451b266f3441184220061cb25227530c0d256
alphagov/backdrop-transactions-explorer-collector,alphagov/backdrop-transactions-explorer-collector
collector/classes/service.py
rejected_duplicate
Near-duplicate of sample 1262
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"Plot to demonstrate the qualitative2 colormap.\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom typhon.plots import (figsize, mpl_colors)\n\n\nfig, ax = plt.subplots(figsize=figsize(10)...
python
edit
1
0
mit
721c4d0cd4e99b4c45eeee813375e7d0050ef970
atmtools/typhon,atmtools/typhon
doc/pyplots/plot_qualitative2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport matplotlib.cm as cm\nimport matplotlib.colors as clr\nimport matplotlib.pyplot as plt\n\nfrom ..palettes import SEABORN\n\n\ndef create_discrete_cmap(n):\n \"\"\"Create an n-bin discrete colormap.\"\"\"\n if n <= len(SEABORN):\...
python
edit
1
3
mit
197aa546b2043602a622340bdec220bdc67e13dd
MaxHalford/Prince
prince/plot/mpl/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\"Test adapter specific config options.\"\"\"\nfrom pprint import pprint\n\nfrom test.integration.base import DBTIntegrationTest, use_profile\nimport textwrap\nimport yaml\n\n\nclass TestBigqueryAdapterSpecific(DBTIntegrationTest):\n\...
python
edit
3
1
apache-2.0
944db8255306a666f290775fec01f5ab33de2eb0
analyst-collective/dbt,analyst-collective/dbt
test/integration/022_bigquery_test/test_bigquery_adapter_specific.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Vigenère Cipher Dictionary Hacker\n# https://www.nostarch.com/crackingcodes/ (BSD Licensed)\n\nimport detectEnglish, vigenereCipher, pyperclip\n\ndef main():\n ciphertext = \"\"\"Tzx isnz eccjxkg nfq lol mys bbqq I lxcz.\"\"\"\n hac...
python
edit
4
4
mit
fac512af9a65cb07e7f43ad167d32fe9934c1c78
JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials
books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mido\n\n\ndef open_output():\n return open_steinberg_output()\n\n\ndef get_steinberg_device_name():\n output_names = [n for n in mido.get_output_names() if 'steinberg' in n.lower()]\n if len(output_names) != 1:\n rais...
python
edit
1
4
mit
6ccc85832aeff2ca9800cd9e2af8461515ff680d
tingled/synthetic-cartography,tingled/synthetic-cartography
cartography/midi_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom django.core import exceptions\nfrom django.contrib.auth import password_validation\n\nfrom user.models import User\n\n\nclass CaptchaSerializer(serializers.Serializer):\n OPERATION_CHOICES = (...
python
edit
1
3
mit
5288a47a3a68e216b9c59a46f70b4a2de79bba37
olegpshenichniy/truechat,olegpshenichniy/truechat,olegpshenichniy/truechat
server/api/registration/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n flask-rst.modules.staticfiles\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n :copyright: (c) 2011 by Christoph Heer.\n :license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport os\n\nfrom flask import...
python
edit
1
2
bsd-3-clause
0eabc95105fecfd4b960b1c135f589f0eea9de2a
jarus/flask-rst
flaskrst/modules/staticpages/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\nfrom six import iteritems\n\n_all_builtins = {}\n\n\nclass _Binder(object):\n def __init__(self, args, fn):\n self._args = args\n self._fn = fn\n\n\nclass _FunctionBinder(_Binder):\n def bind(self, **kw...
python
edit
1
3
bsd-3-clause
c4b7532987958573dafe01621cdd254db63bf8ea
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
bfg9000/builtins/hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport simplejson\n\njson_encode = lambda data: simplejson.dumps(data, separators=(',', ':'))\njson_decode = lambda data: simplejson.loads(data)\nJSONDecodeError = ValueError\n\n# Protocol handlers\nCONNECT = 'o'\nDISCONNECT = 'c'\nMESSAGE ...
python
edit
1
1
mit
46328b5baaf25b04703ca04fd376f3f79a26a00f
flaviogrossi/sockjs-cyclone
sockjs/cyclone/proto.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport flask\nfrom . import track\n\napp = flask.Flask(__name__)\n\n@app.route(\"/\")\ndef root():\n\treturn \"{} by {} - {}\"\n\n```\n\nApply this change: Add song display to root page" }, { "role": "assistant", "content": "imp...
python
edit
1
1
mit
b3b281c9bf789c44a9a2b2d750e4dd8cf789dd1a
ollien/playserver,ollien/playserver,ollien/playserver
playserver/webserver.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User\nfrom rest_framework import status\nfrom rest_framework.test import APIClient, APIRequestFactory, \\\n force_authenticate\nfrom billjobs.views import UserA...
python
edit
1
1
mit
196b5aabe2bcee8677c34481f19099f65699a44e
ioO/billjobs
billjobs/tests/tests_user_admin_api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport subprocess\nimport sys\n\nfrom rbtools.utils.process import die, execute\n\n\nGNU_DIFF_WIN32_URL = 'http://gnuwin32.sourceforge.net/packages/diffutils.htm'\n\n\ndef check_install(command):\n \"\"\"\n Try executing an...
python
edit
1
4
mit
a42d238fcc33a18cd90267864f0d308e27319ec5
davidt/rbtools,datjwu/rbtools,halvorlu/rbtools,datjwu/rbtools,davidt/rbtools,bcelary/rbtools,clach04/rbtools,halvorlu/rbtools,datjwu/rbtools,reviewboard/rbtools,reviewboard/rbtools,haosdent/rbtools,beol/rbtools,1tush/rbtools,beol/rbtools,Khan/rbtools,haosdent/rbtools,reviewboard/rbtools,beol/rbtools,haosdent/rbtools,ha...
rbtools/utils/checks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Python 2 and 3\nfrom __future__ import unicode_literals\n\nfrom gapipy.resources.base import Resource\nfrom gapipy.resources.booking_company import BookingCompany\n\n\nclass AgencyChain(Resource):\n _resource_name = 'agency_chains'\n\n...
python
edit
1
0
mit
f34afd52aa1b89163d90a21feac7bd9e3425639d
gadventures/gapipy
gapipy/resources/booking/agency_chain.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom TextFileReader import *\n\ndef main():\n # get the base directory\n base_directory = os.getcwd()\n\n # counter for percentage print\n stage_counter = 0\n total_stage = len(os.listdir(base_directory + \"/Annota...
python
edit
10
3
mit
b5240580e1786185bc6a889b0106d404cddc78e0
Jamjomjara/snu-artoon,Jamjomjara/snu-artoon
AnnotationToXMLConverter/AnnotationToXMLConverter.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.db import models\nfrom django.dispatch import receiver\n\nfrom boardinghouse.schema import activate_schema\n\n\nclass BoardingHouseTemplateConfig(AppConfig):\n name = 'boardinghouse.contrib....
python
edit
3
2
bsd-3-clause
493314bb1d8778c10033f7011cd865526c34b6ce
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/contrib/template/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass Constellation(object):\n \"\"\"Manage and analyze data from multiple pysat Instruments.\n\n FIXME document this.\n \"\"\"\n def __init__(self, instruments = None, name = None):\n if instruments and name:\n ...
python
edit
1
8
bsd-3-clause
5ce17bba417d6d9edff970c1bc775797f29b7ec4
jklenzing/pysat,rstoneback/pysat
pysat/_constellation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom gntp.config import GrowlNotifier\n\n\nclass GNTPTestCase(unittest.TestCase):\n\tdef setUp(self):\n\t\tself.growl = GrowlNotifier('GNTP unittest', ['Testing'])\n\t\tself.growl.register()\n\n\t\tself.notification = {\n\t...
python
edit
1
3
mit
408ccc648d48725271db36a83c71aed1f03ff8c7
kfdm/gntp
gntp/test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Prioritize(object):\n '''\n Class which convert dependency relationship to priority level\n '''\n def __init__(self):\n self._priorityLevel = {}\n\n def getPrioritizeLevel(self, item):\n if item in self._p...
python
edit
1
6
mit
e8acef69e01e7a38b6497c03db3c993b67fd1e45
scott-zhou/algorithms
dependency_to_prioritize/prioritize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tests import string\n\n\ndef test_get(test):\n\n def handle_connect(handler):\n info = handler.api.get_info()\n assert isinstance(info['api_version'], string)\n assert isinstance(info['server_timestamp'], string...
python
edit
1
2
apache-2.0
43a7f6a2130f57bd1e94aa418c4b7d6e085c09ea
devicehive/devicehive-python
tests/test_api_info.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom django.contrib.contenttypes.models import ContentType\n\n\nclass MediaAssociationManager(models.Manager):\n \n def for_model(self, model, content_type=None):\n content_type = content_type or...
python
edit
1
3
bsd-3-clause
6cfebbf4548db9d52ba0c94997e81196705b4cc8
eldarion/mimesis,eldarion/mimesis
mimesis_project/apps/mimesis/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom os.path import abspath, basename, dirname, join, normpath\nfrom sys import path\n\nfrom .settings import *\n\nDEBUG = True \n\nPROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))\n\nSTATIC_ROOT = os.path.join(PROJECT_R...
python
edit
10
0
bsd-3-clause
30f47656f7e288153b452ec355bb17a0c3cda85f
shearichard/django-channels-demo,shearichard/django-channels-demo,shearichard/django-channels-demo
chnnlsdmo/chnnlsdmo/settings_heroku.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom config.base.settings import *\n\nDEBUG = False\nTEMPLATE_DEBUG = DEBUG\nROOT_URLCONF = 'config.prod.urls'\nWSGI_APPLICATION = \"config.prod.wsgi.application\"\n\n\nALLOWED_HOSTS = [\n '.censusreporter.org',\n '.compute-1.amazonaw...
python
edit
2
0
mit
9e0633207c5fc881821e9be1b8db34bc609d582d
censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter
censusreporter/config/prod/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom . import io_validator\nfrom . import index_column_validator\n\n\n```\n\nApply this change: Clean up validator package imports" }, { "role": "assistant", "content": "from __future__ ...
python
edit
1
0
mit
8e623faa44ad767baf4c92596a2501f98dfd2bbb
njvack/masterfile
src/masterfile/validators/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_migrate import Migrate\nfrom flask_mail import Mail\nfrom flask_login import LoginManager\nfrom rauth import OAuth2Service\n\napp = Flask(__name__)\nB...
python
edit
3
1
bsd-3-clause
d760c42b1abb37087e9d5cf97d1bd1f2c0d76279
Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber
application/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\nimport time\nimport multiprocessing\n\nfrom examples import minimal\n\n\ndef test_minimal():\n port = minimal.app.get_port()\n p = multiprocessing.Process(\n target=minimal.app.start_server)\n p.start()\n ...
python
edit
1
1
mit
703c0f20215e63cb92436875a1798c1becf4b89f
factornado/factornado
tests/test_examples.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights...
python
edit
5
2
mit
8895cd5090bd1014d3fe16976c56d6c24bad0ded
facebookresearch/ParlAI,calee88/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI,calee88/ParlAI,facebookresearch/ParlAI,calee88/ParlAI,facebookresearch/ParlAI
parlai/agents/local_human/local_human.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom django.conf.urls import url\nfrom . import views\n\nOBSCURE_URL = r'^{}$'.format(os.environ.get('OBSCURE_URL', 'this_should_be_in_env_var'))\n\nurlpatterns = [\n url(r'^$', views.index, name='index'),\n url(OBSCURE_URL...
python
edit
1
0
mit
94e13e5d00dc5e2782cf4a1346f098e3c2ad2fc0
aapris/IoT-Web-Experiments
iotendpoints/endpoints/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest mujoco viewer.\n\"\"\"\nimport unittest\n\nfrom mujoco_py import mjviewer, mjcore\n\n\nclass MjLibTest(unittest.TestCase):\n xml_path = 'tests/models/cartpole.xml'\n\n def setUp(self):\n self.width = 100\n s...
python
edit
1
1
mit
4078743923befac99672b67ea53fd1fe11af2e8c
pulkitag/mujoco140-py,pulkitag/mujoco140-py,pulkitag/mujoco140-py
tests/test_mjviewer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Entry point for the dartium buildbots.\n...
python
edit
1
2
bsd-3-clause
8cac0c660eee774c32b87d2511e4d2eeddf0ffe8
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/slave/chromium/dart_buildbot_run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom os.path import join, dirname, abspath\nfrom dotenv import load_dotenv\n\n\nclass Config:\n loaded = False\n\n @staticmethod\n def load(file_name='../config/.env'):\n load_dotenv(join(dirname(__file__), file_n...
python
edit
1
6
mit
a5b7dabcb4450cadd931421738c0ee6f6b63ea4a
Holovin/D_GrabDemo
helpers/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\"\"\"\nExample script that shows how to use PyOTA to send a transfer to an address.\n\"\"\"\nfrom iota import *\n\n\n# Create the API instance.\napi =\\\n Iota(\n # URI of a locally running node.\n 'http://localhost:...
python
edit
7
0
mit
1ae097291a42022013969287ecb91bafa60ae625
iotaledger/iota.lib.py
examples/send_transfer.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\nimport textwrap\nfrom plugins import BasePlugin\n\n__author__ = 'peter'\n\n\nclass BasicInfoPlugin(BasePlugin):\n name = 'BasicInfoPlugin'\n short_description = 'Basic info:'\n default = True\n description = textw...
python
edit
1
6
mit
a029c6f4fce36693a9dee53ff8bc797890cfe71e
Sakartu/stringinfo
plugins/basic_info_plugin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport select\n\nimport paramiko\n\n\nclass GerritEvents(object):\n\n def __init__(self, userid, host, key=None):\n self.userid = userid\n self.host = host\n self.port = 29418...
python
edit
1
6
apache-2.0
1ff53eade7c02a92f5f09c371b766e7b176a90a1
locke105/streaming-python-testdrive
speyer/ingest/gerrit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mako.template import Template\n\nclass OraccObject(object):\n \n template = Template(r\"\"\"@${objecttype} \n% for child in children:\n${child.serialize()}\n% endfor\"\"\", output_encoding='utf-8')\n \n def __init__(self, o...
python
edit
1
1
mit
df0b04ec5142631a0fb1e2051b622f8c2568fec6
UCL/pyoracc
pyoracc/model/oraccobject.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mock\n\nBookingCreateProcessor = mock.MagicMock()\nBookingDeleteProcessor = mock.MagicMock()\n\n```\n\nApply this change: Fix using mock in production [WAL-2530]" }, { "role": "assistant", "content": "from waldur_mastermi...
python
edit
1
1
mit
e36caab07168d3884b55970e5fa6ee5146df1b1c
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/booking/processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_cookiecutter_invocation\n----------------------------\n\nTests to make sure that cookiecutter can be called from the cli without\nusing the entry point set up for the package.\n\"\"\"\n\nimport pytest...
python
edit
1
2
bsd-3-clause
e1a1a19408c052c93ccc1684b2e1408ba229addc
michaeljoseph/cookiecutter,luzfcb/cookiecutter,benthomasson/cookiecutter,atlassian/cookiecutter,kkujawinski/cookiecutter,christabor/cookiecutter,audreyr/cookiecutter,Springerle/cookiecutter,takeflight/cookiecutter,cguardia/cookiecutter,moi65/cookiecutter,christabor/cookiecutter,pjbull/cookiecutter,michaeljoseph/cookiec...
tests/test_cookiecutter_invocation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Interactive Labeler\n\nThis module includes an InteractiveLabeler.\n\"\"\"\nimport matplotlib.pyplot as plt\n\nfrom libact.base.interfaces import Labeler\nfrom libact.utils import inherit_docstring_from\n\n\nclass InteractiveLabeler(L...
python
edit
1
5
bsd-2-clause
48f15196bdbdf6c86491ff4ab966f4ae82932b80
ntucllab/libact,ntucllab/libact,ntucllab/libact
libact/labelers/interactive_labeler.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom os.path import exists, splitext\nfrom random import randint\n\n\n_depth = lambda x, y, z=1: z\n\n_invert_dict = lambda d: dict((v, k) for k, v in list(d.items()))\n\n_PREFERRED_RGB = {\n 'R': 0,\n 'G': 1,...
python
edit
1
4
isc
5eaca14a3ddf7515f5b855aee4b58d21048ca9a9
eliteraspberries/avena
avena/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file is part of Indico.\n# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License as\n...
python
edit
1
0
mit
5954196d3c81083f7f94eca147fe1a76a6dfb301
ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,indico/indico-plugins,indico/indico-plugins
vc_vidyo/indico_vc_vidyo/blueprint.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport virtool.subtraction\nimport virtool.virus_index\nimport virtool.sample_create\nimport virtool.job_analysis\nimport virtool.job_dummy\n\n\n#: A dict containing :class:`~.job.Job` subclasses keyed by their task names.\nTASK_CLASSES = {...
python
edit
1
0
mit
8614f782196a86507c1b659f0b1d9ee293ddc309
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
virtool/job_classes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf8\nfrom __future__ import unicode_literals\n\nimport gc\n\nfrom ...lang.en import English\n\n\ndef test_issue1506():\n nlp = English()\n\n def string_generator():\n for _ in range(10001):\n yield \"It's ...
python
edit
1
6
mit
4e378dc4a44781e59bc63abb64c0fffb114a5adc
explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,explosion/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spa...
spacy/tests/regression/test_issue1506.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix test data for PyArgumentListInspectionTest.testDictFromKeys." }, { "role": "assistant", "content": "print(dict.fromkeys(<warning descr=\"Parameter(s) unfilledPossible callees:dict.fromkeys(seq: Sequence[TypeVar('_T')])dict.fr...
python
new_file
null
null
apache-2.0
47970281f9cdf10f8429cfb88c7fffc3c9c27f2a
signed/intellij-community,ThiagoGarciaAlves/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,mglukhikh/intellij-community,ibinti/intellij-community,da1z/intellij-community,allotria/intellij-community,apixandru/intellij-community,ThiagoGarciaAlves/intellij-community,suncycheng/intellij-communi...
python/testData/inspections/PyArgumentListInspection/dictFromKeys.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n if socket.gethostname() == 'blog':\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"settings.production\")\n else:\n os.environ.setdefau...
python
edit
2
0
bsd-3-clause
c26ebf61079fc783d23000ee4e023e1111d8a75e
giovannicode/giovanniblog,giovannicode/giovanniblog
blog/manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom dateutil.relativedelta import relativedelta\n\nfrom legalaid.models import Case\nfrom cla_butler.tasks import DeleteOldData\n\n\nclass FindAndDeleteCasesUsingCreationTime(DeleteOldDa...
python
edit
1
1
mit
40f9f82289d0b15c1bc42415460325ce2a447eaf
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# =====================================================================\n# Package: petclaw\n# File: __init__.py\n# Authors: Amal Alghamdi\n# David Ketcheson\n# Aron Ahmadia\n# ===============...
python
edit
16
0
bsd-3-clause
1237e75486ac0ae5c9665ec10d6701c530d601e8
unterweg/peanoclaw,unterweg/peanoclaw,unterweg/peanoclaw,unterweg/peanoclaw,unterweg/peanoclaw,unterweg/peanoclaw
src/petclaw/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wavebender import *\nimport sys\n\nstart = 10\nfinal = 200\n\nend_time= 10\n\ndef val(i):\n time = float(i) / 44100\n k = (final - start) / end_time\n return math.sin(2.0 * math.pi * (start * time + ((k * time * time) / 2)))\n...
python
edit
7
2
isc
432bbebbfa6376779bc605a45857ccdf5fef4b59
simplyianm/resonance-finder
soundgen.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\"\"\"\nCyril Robin -- LAAS-CNRS -- 2014\n\nTODO Descriptif\n\"\"\"\n\nfrom mission import *\nfrom constant import *\n\nfrom sys import argv, exit\nfrom timer import Timer\n\n\nif __name__ == \"__main__\":\n\n with Tim...
python
edit
3
0
bsd-3-clause
270b1a1d970d866b5de7e3b742166e2e0d13c513
cyrobin/patrolling,cyrobin/patrolling
patrol_mission.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.forms.utils import ErrorList\nfrom django_summernote.widgets import SummernoteWidget\n\nfrom .models import Post\n\nEMPTY_TITLE_ERROR = \"제목을 입력하세요\"\nEMPTY_CONTENT_ERROR = \"내용을 입력하세요\"\n\n\nclass DivE...
python
edit
1
3
mit
a87d927acc42ba2fe4a82004ce919882024039a9
hyesun03/k-board,cjh5414/kboard,guswnsxodlf/k-board,hyesun03/k-board,darjeeling/k-board,cjh5414/kboard,kboard/kboard,kboard/kboard,kboard/kboard,guswnsxodlf/k-board,hyesun03/k-board,cjh5414/kboard,guswnsxodlf/k-board
kboard/board/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pytest import fixture, mark\n\nfrom ..openshift import OpenShiftOAuthenticator\n\nfrom .mocks import setup_oauth_mock\n\n\ndef user_model(username):\n \"\"\"Return a user model\"\"\"\n return {\n 'metadata': {\n ...
python
edit
3
1
bsd-3-clause
ee649468df406877ccc51a1042e5657f11caa57d
minrk/oauthenticator,NickolausDS/oauthenticator,jupyter/oauthenticator,jupyter/oauthenticator,maltevogl/oauthenticator,jupyterhub/oauthenticator
oauthenticator/tests/test_openshift.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
python
edit
1
1
apache-2.0
eba0a56f4334d95e37da3946a6a0b053dbe2e19f
tensorflow/tfx,tensorflow/tfx
tfx/orchestration/test_pipelines/custom_exit_handler.py
accepted
null
true