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 fudge\nimport inspect\n\n\nclass MethodNotAvailableInMockedObjectException(Exception):\n pass\n\n\ndef getMock(class_to_mock):\n return FudgeWrapper(class_to_mock)\n\n\nclass FudgeWrapper(fudge.Fake):\n def __init__(self, cl...
python
edit
3
2
mit
7011a38826fcde520e4bf07f7089d9d1b75ee8f9
openpassword/blimey,openpassword/blimey
spec/openpassword/fudge_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2008-2011 Nokia Networks\n# Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors\n# Copyright 2016- Robot Framework Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use...
python
edit
1
3
apache-2.0
e979aab8ffdd5a2e86be7dd8fcacb5f10953a994
robotframework/SeleniumLibrary,emanlove/robotframework-selenium2library,emanlove/robotframework-selenium2library,rtomac/robotframework-selenium2library,emanlove/robotframework-selenium2library,robotframework/SeleniumLibrary,robotframework/SeleniumLibrary,rtomac/robotframework-selenium2library,rtomac/robotframework-sele...
src/SeleniumLibrary/utils/types.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Node:\n\n def __init__(self):\n self.name = ''\n self.weight = 0\n self.code = ''\n\n def initSet(self, name, weight):\n self.name = name\n self.weight = weight\n\n```\n\nApply this change: Add...
python
edit
1
1
mit
4e243ade9b96c5ea6e68c27593fb578c52c85f1a
hane1818/Algorithm_HW3_huffman_code
huffman.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pork.cli import CLI\n\nfrom mock import Mock\n\nclass TestCLI:\n def it_has_a_data_attribute(self):\n assert CLI().data is not None\n\n```\n\nApply this change: Add test coverage for pork.cli." }, { "role": "assistant...
python
edit
3
1
mit
d72e13f22eab7bf61b56b1d5fa33b006c5f13299
jimmycuadra/pork,jimmycuadra/pork
tests/cli_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 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\"\"\"ActiveMaster definition.\"\"\"\n\nfrom config_bootstrap import Mast...
python
edit
1
0
bsd-3-clause
6a5936a3d69c8af1b5878b824dec17c94fd1da95
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.tryserver.chromium.gpu/master_site_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture\ndef credentials():\n \"\"\"Fake set of MWS credentials\"\"\"\n return {\n \"access_key\": \"AAAAAAAAAAAAAAAAAAAA\",\n \"secret_key\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\n ...
python
edit
1
1
unlicense
09931cfbba746daf5127b6113187042341e3be3d
GriceTurrble/python-amazon-mws,Bobspadger/python-amazon-mws
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make sure the local version of the craft ai module is used in tests" }, { "role": "assistant", "content": "import sys\nimport os\n\nCRAFTAI_MODULE_SRC_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))\nsys.path...
python
new_file
1
0
bsd-3-clause
c984183b7ea92dcd7106151bed43065504358dd0
craft-ai/craft-ai-client-python,craft-ai/craft-ai-client-python
tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\nfrom textx.metamodel import metamodel_from_file, metamodel_from_str\nfrom textx.model import get_children_of_type, get_parent_of_type, \\\n get_model, get_metamodel, get_children, get_location, textx_isinstance\nfrom text...
python
edit
1
0
mit
17f6d104810f53a3ceac4943f3b80def3917b356
igordejanovic/textX,igordejanovic/textX,igordejanovic/textX
textx/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nlogger = logging.getLogger(__file__)\n\n\nclass ProlificServiceException(Exception):\n \"\"\"Some error from Prolific\"\"\"\n\n pass\n\n\nclass ProlificService:\n \"\"\"Wrapper for Prolific REST API\"\"\"\n\n d...
python
edit
1
1
mit
b03b71505469f8234dc18fdc653311cd63be252c
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
dallinger/prolific.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Default payzen settings.\n\nAll settings should be set in the django settings file and not\ndirectly in this file.\nWe deliberately do not set up default values here in order to\nforce user to setup explicitely the default behaviour....
python
edit
1
0
mit
8157ee43f31bd106d00c86ac4a7bc35a79c29e41
zehome/django-payzen,bsvetchine/django-payzen,zehome/django-payzen,bsvetchine/django-payzen
django_payzen/app_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\nfrom ..models import Message\n\n\nregister = template.Library()\n\n\n@register.assignment_tag(takes_context=True)\ndef get_messages_for_page(context, url):\n if url == context.template.engine.string_if_inva...
python
edit
1
2
bsd-3-clause
9d7b7d70402894e07a00356ea8921c098b41ee24
ubernostrum/django-soapbox,ubernostrum/django-soapbox
soapbox/templatetags/soapbox.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport requests\nimport json\n\nURL = 'https://coveralls.io/api/v1/jobs'\n\n\ndef post_report(coverage):\n \"\"\"Post coverage report to coveralls.io.\"\"\"...
python
edit
1
3
apache-2.0
80d1126418af0890a36a4bac9ddf53a2ab40e851
eddyxu/cpp-coveralls,eddyxu/cpp-coveralls
cpp_coveralls/report.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom stagecraft.apps.datasets.models import DataGroup, DataSet, DataType\n\n\nclass DataSetMassUpdate():\n @classmethod\n def update_bearer_token_for_data_type_or_group_name(cls, query, new_token):\n model_filter = DataSet.obje...
python
edit
1
3
mit
03dc4f221aa9909c8a3074cbef9fd1816e0cc86c
alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft
stagecraft/libs/mass_update/data_set_mass_update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport matplotlib\nimport numpy as np\nimport pymc as pm\nfrom matplotlib import pyplot as plt\n\n\ndef main():\n matplotlibrc_path = '/home/noel/repo/playground/matplotlibrc.json'\n matplotlib.rcParams.update(json.load(o...
python
edit
3
2
mit
c8ef9e7271796239de2878bbf40a2c2d388427e4
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
bayesian_methods_for_hackers/simulate_messages_ch02.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport humbug\n\nimport glob\nimport os\nfrom distutils.core import setup\n\nsetup(name='humbug',\n version=humbug.__version__,\n description='Bindings for the Humbug message API',...
python
edit
3
4
apache-2.0
360ded396e5febbb4871797dd6d676884e24299a
jeffcao/zulip,vabs22/zulip,verma-varsha/zulip,jphilipsen05/zulip,KJin99/zulip,DazWorrall/zulip,johnny9/zulip,so0k/zulip,suxinde2009/zulip,proliming/zulip,mdavid/zulip,susansls/zulip,zofuthan/zulip,pradiptad/zulip,vikas-parashar/zulip,joshisa/zulip,amallia/zulip,voidException/zulip,esander91/zulip,bssrdf/zulip,calvinlee...
api/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\n\nimport lib\n\n\n@click.group()\ndef cli():\n \"\"\"\n Install From Source\n\n When the version in the package manager has gone stale, get a fresh,\n production-ready version from a source tarball or precompiled a...
python
edit
1
3
isc
f78e20b05a5d7ede84f80a9be16a6a40a1a7abf8
cbednarski/ifs-python,cbednarski/ifs-python
ifs/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.29 on 2020-07-21 13:42\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('h...
python
edit
1
0
bsd-3-clause
b22e96cc1e5daded4841b39d31ebefd1df86f26a
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/hqadmin/migrations/0017_hqdeploy_commit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .__main__ import main\n\n__version__ = '1.0.0'\n\n__title__ = 'address_extractor'\n__description__ = ''\n__url__ = ''\n\n__author__ = 'Scott Colby'\n__email__ = ''\n\n__license__ = 'MIT License'\n__copyright__ = 'Copyright (c) 2015 Sco...
python
edit
1
0
mit
7f7e606cc15e24190880d7388d07623be783a384
scolby33/address_extractor
src/address_extractor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pyrc\nimport pyrc.utils.hooks as hooks\n\nclass GangstaBot(pyrc.Bot):\n @hooks.command()\n def bling(self, channel, sender):\n \"will print yo\"\n self.message(channel, \"%s: yo\" % sender)\n\n @hooks.command(\"^repeat\\s+(?...
python
edit
1
1
mit
50c6e4a44a2451970c8e6286e1acb74dad78365c
sarenji/pyrc
example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom os import scandir\nfrom sys import argv\nfrom platform import uname\nfrom pathlib import Path\n\n\nfilename_template = \"\"\"\n# -------------------------------------------------------------------------------\...
python
edit
1
4
mit
88776309a601e67c34747bd2eae49452006be017
skk/dotfiles,skk/dotfiles
zsh/zsh_concat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2017 Janos Czentye, Balazs Nemeth, Balazs Sonkoly\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 Licens...
python
edit
2
0
apache-2.0
6abd349fa0392cd5518d3f01942289ae0527d8f4
hsnlab/nffg,5GExchange/nffg
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.utils.timezone\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [...
python
edit
1
0
bsd-2-clause
f1da9bc9aae253779121f2b844e684c4ea4dd15f
imsweb/django-seeker,imsweb/django-seeker
seeker/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\r\nimport os, sys\r\n\r\nPROJECT_DIR = os.path.abspath(os.path.dirname( __file__ ))\r\nSRC_DIR = os.path.join(PROJECT_DIR, \"src\")\r\nTEST_DIR = os.path.join(PROJECT_DIR, \"test\")\r\n\r\ndef runtestdir(subdir):\r\n entries = os.listdi...
python
edit
3
5
mit
b0df06a29d4a235de86e51f4c6ff860fe5495d12
divtxt/binder
run-tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.apps import AppConfig\n\n\nclass BuildConfig(AppConfig):\n name = 'mrbelvedereci.build'\n\n```\n\nApply this change: Include handlers in build app" }, { "role": "assistant", ...
python
edit
3
1
bsd-3-clause
e98b9e1da819c571e165c55e222a3aa5a20e709b
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
mrbelvedereci/build/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .docker import *\n\n\nINSTALLED_APPS.append('raven.contrib.django.raven_compat')\n\nADMINS = (\n ('[STAGING] HMCTS Reform Sustaining Support', '<EMAIL>'),\n)\n\nRAVEN_CONFIG = {\n 'dsn': os.environ[\"SENTRY_DSN\"],\n 'release'...
python
edit
5
0
mit
0ed4b5e2831c649bfb7c31a3fe0716bb02e4a02a
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
api/settings/staging.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.http import HttpResponse\nfrom django.utils import simplejson as json\nfrom taggit.models import Tag\n\n\nMAX_SUGGESTIONS = getattr(settings, 'TAGGIT_AUTOSUGGEST_MAX_SUGGESTIONS', 20)\n\n\ndef l...
python
edit
1
3
mit
09c3c511687de8888180577fa66f4ca51f4bc237
iris-edu/django-taggit-autosuggest-select2,iris-edu-int/django-taggit-autosuggest-select2,adam-iris/django-taggit-autosuggest-select2,adam-iris/django-taggit-autosuggest-select2,iris-edu/django-taggit-autosuggest-select2,iris-edu-int/django-taggit-autosuggest-select2,iris-edu-int/django-taggit-autosuggest-select2,iris-...
taggit_autosuggest_select2/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import *\n\nenv.runtime = 'production'\nenv.hosts = ['chimera.ericholscher.com']\nenv.user = 'docs'\nenv.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'\nenv.virtualenv = '/home/docs/sites/readthedocs...
python
edit
24
2
mit
d3b526c5079dc61d3bb8a80363c9448de07da331
cgourlay/readthedocs.org,sunnyzwh/readthedocs.org,attakei/readthedocs-oauth,davidfischer/readthedocs.org,nikolas/readthedocs.org,fujita-shintaro/readthedocs.org,Tazer/readthedocs.org,techtonik/readthedocs.org,laplaceliu/readthedocs.org,jerel/readthedocs.org,johncosta/private-readthedocs.org,stevepiercy/readthedocs.org,...
fabfile.py
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sklearn\n\n\ndef make_train_pair(filename):\n h5 = open_h5_file_read(filename)\n title = get_title(h5)\n pitches = get_segments_pitches(h5)[:11] # limit: only look at beginning\n pitch_diffs = [pitches[i] - pitches[i - 1]...
python
edit
14
2
mit
b824e4c4a106d73c842a38758addde52d94e976a
ajnam12/MusicNLP
ngrams_feature_extractor.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\n# Register your models here.\nfrom .models import Feedback\n\n\nclass FeedbackAdmin(admin.ModelAdmin):\n list_display = ('name', 'email', 'note', 'archive', 'public')\n list_filter = ['created']\n ...
python
edit
1
1
mit
a4264c610f33640ac773ca0b12912f3ad972d966
n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb,n2o/dpb
feedback/admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Initialize inbound and outbound Nodes of a Node" }, { "role": "assistant", "content": "class Node(object):\n def __init__(self):\n # Node(s) from which this Node receives values\n self.inbound_nodes = inbound_nodes\n # ...
python
new_file
2
2
mit
444d97288c0fd80adf4077477336c98bfea140cc
YabinHu/miniflow
node.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import local\n\nvim_bundles = [\n {\n 'git': 'git://github.com/fatih/vim-go.git',\n 'path': '~/.vim/bundle/vim-go'\n }\n]\n\ndef apt_get():\n local('sudo apt-get update')\n local('sudo apt-get upgra...
python
edit
1
2
unlicense
bed66179633a86751a938c13b98f5b56c3c1cfc7
spanners/dotfiles
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = \"0.13\"\n\n# Void cython.* directives (for case insensitive operating systems). \nfrom Cython.Shadow import *\n\n```\n\nApply this change: Change version number for dev branch." }, { "role": "assistant", "content"...
python
edit
2
0
apache-2.0
16055821b0f43047db4f32f3a16335732b63aa85
scoder/cython,slonik-az/cython,rguillebert/CythonCTypesBackend,encukou/cython,encukou/cython,hickford/cython,roxyboy/cython,fabianrost84/cython,mrGeen/cython,madjar/cython,rguillebert/CythonCTypesBackend,madjar/cython,encukou/cython,rguillebert/CythonCTypesBackend,encukou/cython,madjar/cython,c-blake/cython,JelleZijlst...
Cython/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python -u \n\nimport cPickle\nimport sys\nimport urllib\nimport base64\n\n#\n# Output the maximum number of instances of this 'callable' to spawn\n# The absolute maximum is set in the configuration file via 'warpscript.call.m...
python
edit
4
0
apache-2.0
6558af15ae2f694b3ea08174e238d3d4de811c95
hbs/warp10-platform,cityzendata/warp10-platform,cityzendata/warp10-platform,StevenLeRoux/warp10-platform,hbs/warp10-platform,StevenLeRoux/warp10-platform,cityzendata/warp10-platform,hbs/warp10-platform,hbs/warp10-platform,StevenLeRoux/warp10-platform,StevenLeRoux/warp10-platform,cityzendata/warp10-platform
warp10/src/main/python/callable.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom puzzle.heuristics.acrostics import _acrostic_iter\n\n\nclass Acrostic(_acrostic_iter.AcrosticIter):\n \"\"\"Best available Acrostic solver.\"\"\"\n pass\n\n```\n\nApply this change: Use AccrosticSearch (~BFS) instead of AcrosticIter ...
python
edit
1
0
mit
cc06a15f734a6ed46561a99d1040a08582833a09
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
src/puzzle/heuristics/acrostic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nimport salt.config\nfrom tests.support.helpers import PRE_PYTEST_SKIP\n\n# Using the PRE_PYTEST_SKIP decorator since this test still fails on some platforms.\n# Will investigate later.\n\n\n@PRE_PYTEST_SKIP\ndef test_jid_i...
python
edit
1
2
apache-2.0
932d4c19810c26f94b5a1729130f5d459db6831e
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/integration/_logging/test_jid_logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nfrom solar.system_log import data\nfrom dictdiffer import patch\n\n\ndef set_error(task_uuid, *args, **kwargs):\n sl = data.SL()\n item = sl.get(task_uuid)\n if item:\n item.state = data.STATES.error\n sl.update(t...
python
edit
1
2
apache-2.0
debb03975e8b647f27980081371bd9fdad7b292f
loles/solar,openstack/solar,loles/solar,pigmej/solar,pigmej/solar,torgartor21/solar,torgartor21/solar,loles/solar,dshulyak/solar,zen/solar,zen/solar,dshulyak/solar,zen/solar,Mirantis/solar,Mirantis/solar,Mirantis/solar,pigmej/solar,Mirantis/solar,CGenie/solar,CGenie/solar,openstack/solar,zen/solar,loles/solar,openstack...
solar/solar/system_log/operations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nfrom syft.frameworks.torch.tensors import PointerTensor\n\n\nclass TorchTensor:\n \"\"\"\n This tensor is simply a more convenient way to add custom functions to\n all Torch tensor types.\n \"\"\"\n\n def __i...
python
edit
1
7
apache-2.0
773064a61fcd4213196e44d347e304d746b28325
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
syft/frameworks/torch/tensors/native.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Forms for dealing with jobs/posts.\"\"\"\n\nfrom django import forms\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Submit\nfrom taggit.models import Tag\n\n\nclass PostFilterForm(forms.Form):\n \"\"...
python
edit
1
1
bsd-3-clause
968c73805e5beff502955ad3dbb8aa86ee8bc0b7
ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder,ScorpionResponse/freelancefinder
freelancefinder/jobs/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\n\n\nregister = template.Library()\n\n\n@register.filter\ndef get_style(tags, priority):\n max_priority = max(tags, key=lambda tag: tag[\"priority\"])[\"priority\"]\n size = (max_priority / 10.) * priority\...
python
edit
1
1
mit
e7e6274ee5fa16cb07e32bebe53532a6a16b7965
daGrevis/daGrevis.lv,daGrevis/daGrevis.lv,daGrevis/daGrevis.lv
dagrevis_lv/blog/templatetags/tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = (0, 9, 0, 'beta', 1)\n\n\ndef get_version():\n from django.utils.version import get_version as django_get_version\n return django_get_version(VERSION) # pragma: no cover\n\n```\n\nApply this change: Fix version number report...
python
edit
1
4
bsd-3-clause
99b96d2c0b82e186b9eaa13d2efe8b617c9cf3aa
dinie/django-registration,dinie/django-registration,FundedByMe/django-registration,FundedByMe/django-registration,Avenza/django-registration
registration/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\nimport json\nimport threading\nimport time\nimport logging\n\nfrom frigg.worker import config\nfrom frigg.worker.jobs import Build\n\nlogger = logging.getLogger(__name__)\n\n\ndef fetcher():\n redis = config.redis...
python
edit
1
3
mit
829cccc630c26f2e9d89007c669308c6b1bb63cf
frigg/frigg-worker
frigg/worker/fetcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import jsonify, current_app\n\nfrom . import status\nfrom . import utils\nfrom ..main.services.search_service import status_for_all_indexes\n\n\n@status.route('/_status')\ndef status():\n\n db_status = status_for_all_indexes()...
python
edit
1
2
mit
7d88c98fcf6984b07a8b085f8272868b1c23b29e
alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api
app/status/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd.module_interface import Command, ICommand, IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass LinksCommand(ModuleData, Command):\n...
python
edit
1
4
bsd-3-clause
cce8c4b40038a8b8ddccc76f7d13c7f5d0e5e566
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/rfc/cmd_links.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom flask import render_template\nfrom . import main\nfrom dmapiclient import APIError\n\n\n@main.app_errorhandler(APIError)\ndef api_error_handler(e):\n return _render_error_page(e.status_code)\n\n\n@main.app_errorhan...
python
edit
1
2
mit
60c62cea5d0775ce443280c0973ce323d26eaa28
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend
app/main/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jan 10 10:56:16 2017\n\n@author: kangwang\n\"\"\"\n\nimport os\nimport sys\nfrom permamodel.components import bmi_Ku_component\nfrom permamodel.tests import examples_di...
python
edit
2
0
mit
0b2cf0a651d27af90a229d85f77ac9ebd2502905
permamodel/permamodel,permamodel/permamodel
run_test_BMI_ku_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import jsonify, current_app\n\nfrom . import status\nfrom . import utils\nfrom .. import api_client\n\n\n@status.route('/_status')\ndef status():\n\n api_response = utils.return_response_from_api_status_call(\n api_clie...
python
edit
1
4
mit
155476e8feb584fb802b2aed4266aec32d617f2a
alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,mtekel/digitalmarketplace-supplier-frontend,alphag...
app/status/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nfrom scipy.interpolate import PchipInterpolator\n\n\nclass UcPoly(object):\n def __init__(self, coef):\n self.p = np.poly1d(coef)\n\n def machine_to_physics(self, machine_value):\n return self.p(machi...
python
edit
1
4
apache-2.0
31986c4c7d5781f0924289308d99754c81d29710
willrogers/pml,willrogers/pml
pml/units.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport RPi.GPIO as GPIO\nimport time\n\nfrom socketIO_client import SocketIO, LoggingNamespace\nsocketIO = SocketIO('localhost:3000')\n\ndef onCommand(*args):\n print(\"hello\")\n\nwhile (True):\n socketIO.on(\"commands\", onCommand)\...
python
edit
5
1
mit
92d7058347da755ff90621c56b36959521dfc99a
willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel
scripts/commandsocket.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n__author__ = 'xilei'\n\nimport os\nfrom os.path import join\nimport stat\n\n\ndef chmod(targetdir):\n \"\"\"\n remove *.pyc files\n \"\"\"\n for root, dirs, files in os.walk(targ...
python
edit
3
4
apache-2.0
95d2036aab2e3d154f4f292ef8624d6d02d48ac0
xiilei/pytools,xiilei/pytools
cleanpyc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport pandas as pd\nimport numpy as np\nimport gtabview\n\nc_arr = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],\n ['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]\ncolumns = pd.MultiIn...
python
edit
1
0
mit
7f4876b1b220b8c3c26ce1490a76adf9721da4da
wavexx/gtabview
sample/pandas-example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport plata\n\ndef plata_context(request):\n \"\"\"\n Adds a few variables from Plata to the context if they are available:\n\n * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance\n * ``plata.order``: The curr...
python
edit
1
2
bsd-3-clause
987c54559cb52370fc459a30cdbdfd0e38c5ef62
armicron/plata,armicron/plata,stefanklug/plata,armicron/plata
plata/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\r\n\"\"\"\r\n:Author Patrik Valkovic\r\n:Created 23.06.2017 16:39\r\n:Licence GNUv3\r\nPart of grammpy\r\n\r\n\"\"\"\r\n\r\nfrom unittest import TestCase, main\r\nfrom grammpy import EPS\r\nfrom grammpy import EPSILON\...
python
edit
1
1
mit
ae4b4fe5fb5c5774720dd3a14549aa88bde91043
PatrikValkovic/grammpy
tests/Epsilon_tests/ImportTest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\n\nfrom flask import current_app\nfrom notifications_utils.statsd_decorators import statsd\n\nfrom app import notify_celery\nfrom app.dao.fact_billing_dao import (\n fetch_billing_data_for_day,\n ...
python
edit
2
4
mit
99d1357c379b2df5219891da7f64e4584060f069
alphagov/notifications-api,alphagov/notifications-api
app/celery/reporting_tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom flask import Flask\nfrom flask_cache import Cache\nfrom flask_login import LoginManager\n\n# Set up logging\nlog = logging.getLogger('slot')\nlog.setLevel(logging.DEBUG)\nch = logging.StreamHandler()\nch.setLevel(logg...
python
edit
6
1
mit
86692e6fbbbc6a8db9e4c323eb0688865b81f717
nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT
slot/main.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport version\nversion.append ('$Revision: 83265 $')\ndel version\n\nimport os, pkg_resources\n\n# Enumerate all the available attributes and functions within this\n# module, for the benefit of those that insist upon doing\n# 'from module ...
python
edit
3
0
bsd-3-clause
fc608d8ab5d463c72d5e2e267c14e0c304e39acd
alexrudy/Cauldron
Cauldron/bundled/GUI/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom buchner.helpers import truthiness\n\ndef abspath(path):\n return os.path.abspath(os.path.relpath(path, os.path.dirname(__file__)))\n\nDEBUG = truthiness(os.environ.get('DEBUG', False))\n\nDATABASE_URL = os.environ.get('...
python
edit
3
1
bsd-3-clause
6f8ef313bcf90b7e96d05186eb606ff53d0cea90
rehandalal/buchner
buchner/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBenchmarks for ``@vectorize`` ufuncs.\n\"\"\"\n\nimport numpy as np\n\nfrom numba import vectorize\n\n\n@vectorize([\"float32(float32, float32)\",\n \"float64(float64, float64)\",\n \"complex64(complex64, compl...
python
edit
1
2
bsd-2-clause
e87490ea157f4882f644329e4b447f51c0a2acb3
gmarkall/numba-benchmark,numba/numba-benchmark
benchmarks/bench_vectorize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .find_contours import find_contours\nfrom ._regionprops import regionprops, perimeter\nfrom ._structural_similarity import structural_similarity\nfrom ._polygon import approximate_polygon, subdivide_polygon\n\n__all__ = ['find_contours...
python
edit
1
0
bsd-3-clause
d45fb029dc4bf0119062a07b962dbc7fff1f300a
ajaybhat/scikit-image,vighneshbirodkar/scikit-image,almarklein/scikit-image,GaZ3ll3/scikit-image,keflavich/scikit-image,ofgulban/scikit-image,paalge/scikit-image,keflavich/scikit-image,chintak/scikit-image,chintak/scikit-image,chintak/scikit-image,Britefury/scikit-image,youprofit/scikit-image,dpshelio/scikit-image,Hiyo...
skimage/measure/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\nimport lazydict\n\nclass TestLazyDictionary(TestCase):\n\n def test_circular_reference_error(self):\n d = lazydict.LazyDictionary()\n d['foo'] = lambda s: s['foo']\n self.assertRaises(l...
python
edit
3
1
mit
f94c946d135aed30f4d9068844b563fa94e39ff1
janrain/lazydict
test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .helpers import BaseApplicationTest\n\n\nclass TestApplication(BaseApplicationTest):\n def test_index(self):\n response = self.client.get('/')\n assert 200 == response.status_code\n\n```\n\nApply this change: Add test ...
python
edit
1
1
mit
0cda764617dcbf52c36d4a63e240b6f849b06640
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,mtekel/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace...
tests/app/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\n\nimport pytest\n\n\n# You didn't see that.\n#\n# I hope you don't understand this code.\n\n\n_config = None\n\n\nEXAMINATORS = [\n 'CI',\n 'CONTINUOUS_INTEGRATION',\n 'BUILD_ID',\n 'BUILD_N...
python
edit
1
4
mit
2c9d5a8b167f77a69995d55e2b2ef52c90807124
The-Compiler/pytest-vw
pytest_vw.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport os\nimport getpass\nimport time\nfrom twisted.internet import task\nfrom twisted.internet import reactor\n\n\n# Configuration \n\ntimeout = 3600*24*3 # Period\nrestic_command = \"/home/me...
python
edit
1
1
mit
3a6d76201104b928c1b9053317c9e61804814ff5
Mebus/pyresticd,Mebus/pyresticd
pyresticd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport web\nimport yaml\nfrom . import default_settings\n\n\ndef load_default_config():\n # take all vars defined in default_config\n config = dict((k, v) for k, v in default_settings.__dict__.items()\n ...
python
edit
1
3
bsd-3-clause
726370913332fd5e27bb04446b75ef59fb711a9c
fsmk/fsmkschool,anandology/broadgauge
broadgauge/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef display_usage():\n return 'Usage: python rgrep [options] pattern files\\nThe options are the '\\\n 'same as grep\\n'\n\n\ndef rgrep(pattern='', text='', case='', count=False, version=False):\n if pattern == '' or text ==...
python
edit
1
3
bsd-2-clause
4a32838db7cbfa1962f3cd61f46caa308e4ea645
ambidextrousTx/RGrep-Python
src/rgrep.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport multiprocessing\nimport threading\n\nclass Sponsor(object):\n\n def __init__(self):\n print('Sponsor pid: {}'.format(os.getpid()))\n\n def create(self, behavior):\n return Actor(behavior, self)\n\nclass...
python
edit
1
3
mit
bd8c5628a6af96a68f1ed6022a983af7a5495529
waltermoreira/tartpy
tartpy/rt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n breakers\n ~~~~~\n Breakers is a simple python package that implements the circuit breaker\n pattern.\n :copyright: (c) 2015 by Marcus Martins.\n :license: Apache License, Version 2.0, see...
python
edit
1
0
apache-2.0
9f600d66f76d023926d1c1a6c974bd1abba40cfb
marcusmartins/breakers
breakers/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport django\n\nDEBUG = False\nUSE_TZ = True\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.sqlite3\",\n }\n}\nINSTALLED_APPS = [\n \"easy_pjax\",\n \"tests\"\n]\n\nMIDDLEWA...
python
edit
1
0
bsd-3-clause
926a7e3f8bc3808160bcab439e62b5848345d6f5
nigma/django-easy-pjax,nigma/django-easy-pjax,nigma/django-easy-pjax
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Collection of Models used in blogsite.\"\"\"\nfrom . import db\n\n\nclass Post(db.Model):\n \"\"\"Model representing a blog post.\n\n Attributes\n ----------\n id : db.Column\n Autogenerated primary key\n title :...
python
edit
1
1
mit
1469da25fec3e3e966d5a0b5fab11dd279bbe05a
paulaylingdev/blogsite,paulaylingdev/blogsite
blogsite/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Page(models.Model):\n\tdef __str__(self):\n\t\treturn self.name\n\n\tname = models.CharField(max_length=64, blank=False)\n\tname.help_text='Internal name of page'\n\n\ttitle = models.CharField(max_lengt...
python
edit
1
1
isc
2201aaeffb93713adcdf20f5868b5a90b562efda
ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite
pages/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Create your models here.\nfrom models_obj_rel import *\nfrom models_ufs_obj import *\n\n\n\ntry:\n # apps.py\n from django.apps import AppConfig\n try:\n import tagging\n\n tagging.register(UfsObj)\n except Impor...
python
edit
4
0
bsd-3-clause
510063159145cd3fdc7bdd0c8b93dc46d98a88c8
weijia/obj_sys,weijia/obj_sys
obj_sys/models.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\nfrom nose.plugins.attrib import attr\nfrom nose.plugins.skip import SkipTest\n\n__all__ = ['wip']\n\ndef fail(message):\n raise AssertionError(message)\n\ndef wip(f):\n @wraps(f)\n def run_test(*args, *...
python
edit
1
2
bsd-3-clause
306cf5987c90d54d72037c19dd02f07be37cbb6f
mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org
make_mozilla/base/tests/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nconfig = {\n \"CREATE_RETRIES\": 5,\n \"CHUNK_LOCK_TIMEOUT_SECONDS\": 10,\n \"WORKER_TIMEOUT_SECONDS\": 15\n}\n\n```\n\nApply this change: Add controls for storage size" }, { "role": "assistant", "content": "config = {\...
python
edit
1
0
mit
42918ef774625643220c182ca0eb5601841db595
numberoverzero/dvox
dvox/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module contains the logic which returns the set of\nschedulers to use for the build master.\n\"\"\"\n\ndef get_schedulers():\n return []\n\n```\n\nApply this change: Buildbot: Add a scheduler for the master branch to run" ...
python
edit
1
1
mit
aeae640c34b7f68870304fb2a6a163d852440b7a
mkuzmin/vagrant,zsjohny/vagrant,ferventcoder/vagrant,sni/vagrant,patrys/vagrant,ArloL/vagrant,tomfanning/vagrant,channui/vagrant,wangfakang/vagrant,muhanadra/vagrant,jkburges/vagrant,rivy/vagrant,muhanadra/vagrant,krig/vagrant,Ninir/vagrant,tbarrongh/vagrant,johntron/vagrant,petems/vagrant,signed8bit/vagrant,carlosefr/...
test/buildbot/buildbot_config/master/schedulers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPlaces of interest generation\n=============================\n\n\"\"\"\n\n```\n\nApply this change: Implement place class and homes generation\n\nThe Place class for places of interest has been implemented, as well as\nthe generatio...
python
edit
1
5
mit
33a9bd5cf465a56c2eb156dcbc0d4e61a0f590a4
tschijnmo/osmABTS
osmABTS/places.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# For the license of this file, please consult the LICENSE file in the\n# root directory of this distribution.\n#\n\n# All tests in the test suite.\n__all__ = ( \"bitfield_tests\", \"zscii_tests\" )\n\n```\n\nApply this change: Make run_...
python
edit
5
0
bsd-3-clause
a17aade30c5925ba40eacfa2ab2a067a9141aa84
BGCX262/zvm-hg-to-git,BGCX262/zvm-hg-to-git
tests/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery import Celery\nfrom cesium import _patch_celery\n\ncelery_config = {\n 'CELERY_ACCEPT_CONTENT': ['pickle'],\n 'CELERY_IMPORTS': ['cesium', 'cesium._patch_celery', 'cesium.celery_tasks'],\n 'CELERY_RESULT_BACKEND': 'amqp...
python
edit
3
0
bsd-3-clause
5f63a4cddc1157e1b0cb085562ee16e55f1c88b5
mltsp/mltsp,acrellin/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp,bnaul/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp
cesium/celery_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom nap import models, fields, api, serialiser, publisher\n\nfrom .models import Choice, Poll\n\n\nclass ChoiceSerialiser(models.ModelSerialiser):\n\n class Meta:\n model = Choice\n exclude = ('poll,')\n\n\nclass PollSer...
python
edit
1
1
bsd-3-clause
5ee94e9a74bc4128ed8e7e10a2106ea422f22757
MarkusH/django-nap,limbera/django-nap
sandbox/sandbox/polls/serialiser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ndistutilazy\n-----------\n\nExtra distutils command classes.\n\n:license: MIT, see LICENSE for more details.\n\"\"\"\n\n__version__ = \"0.4.0\"\n__all__ = (\"clean\", \"pyinstaller\", \"command\")\n\n```\n\nApply this change: Add te...
python
edit
5
0
mit
359cab09d0cf7de375b43f82f9a9507f3c84cd34
farzadghanei/distutilazy
distutilazy/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom django.core import mail\n\nfrom .tasks import task_email_user\n\nlogger = logging.getLogger(__name__)\n\n\ndef send_email(user, template, context, attachments=None, delete_attachments_after_send=False,\n ...
python
edit
1
3
mit
36b10d57a812b393c73fe3b4117cc133d0f9d110
tuomasjaanu/django-templatemailer
templatemailer/mailer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom jinja2 import Environment, PackageLoader\nfrom qanta import qlogging\n\n\nlog = qlogging.get(__name__)\n\n\nclass ReportGenerator:\n def __init__(self, template):\n self.template = template\n\n def create(self, variables, ...
python
edit
1
3
mit
84af834a348097f493b1e63034c8d0487354d737
miyyer/qb,miyyer/qb,Pinafore/qb,miyyer/qb,miyyer/qb,Pinafore/qb
qanta/reporting/report_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n }\n}\n\nINSTALLED_APPS = [\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'dja...
python
edit
1
0
bsd-3-clause
a3c49c490ffe103f759b935bae31c37c05d26e81
gchp/django-formtools,thenewguy/django-formtools,lastfm/django-formtools,barseghyanartur/django-formtools,thenewguy/django-formtools,barseghyanartur/django-formtools,gchp/django-formtools,lastfm/django-formtools
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.mail import EmailMultiAlternatives\nfrom django.template.loader import get_template\nfrom django.template import Context\nfrom django.contrib.sites.models import Site\n\ndef send_group_emai...
python
edit
1
2
bsd-3-clause
dc47a724525186fe99d79e62447efc3dbc9d95b0
nikdoof/test-auth
app/groups/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.http import StreamingHttpResponse\nfrom django.utils.encoding import force_text\n\nfrom .models import modelserialiser_factory\nfrom .simplecsv import CSV\n\n\nclass ExportCsv(object):\n def __init__(self, serialiser=None, ...
python
edit
1
3
bsd-3-clause
3d439d81766f354de9ab257d5ed690efd4aeb508
limbera/django-nap,MarkusH/django-nap
nap/extras/actions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Eve Demo\n ~~~~~~~~\n\n A demostration of a simple API powered by Eve REST API.\n\n The live demo is available at eve-demo.herokuapp.com. Please keep in mind\n that the it is running on Her...
python
edit
1
2
bsd-3-clause
698ab729f60bdb1a4b280bf6f93e9faa0e1b63f9
nicolaiarocci/eve-demo
run-hooks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nfrom periphery import GPIO\nfrom piot.sensor.base import BaseAnalogSensor\n\nclass SumpPump(BaseAnalogSensor):\n def __init__(self):\n self.min_normal=30\n self.max_normal=200\n self.unit='cm'\n s...
python
edit
1
3
mit
8d56fe74b373efe2dd3bbaffbde9eddd6fae6da7
tnewman/PIoT,tnewman/PIoT,tnewman/PIoT
piot/sensor/sumppump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests of neo.io.axonaio\n\"\"\"\n\nimport unittest\n\nfrom neo.io.axonaio import AxonaIO\nfrom neo.test.iotest.common_io_test import BaseTestIO\nfrom neo.io.proxyobjects import (AnalogSignalProxy,\n SpikeTrainProxy, E...
python
edit
10
0
bsd-3-clause
cfcce6d4002657f72afdd780af06b3bfa4d9e10d
apdavison/python-neo,NeuralEnsemble/python-neo,JuliaSprenger/python-neo,samuelgarcia/python-neo,INM-6/python-neo
neo/test/iotest/test_axonaio.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\nimport csv\nfrom datetime import datetime\n\n\ncurrent_date = datetime.now().strftime('%Y-%m-%d')\n\ndestination_file = 'srvy' + current_date + '.csv'\nsqlite_file = 'srvy.db'\ntable_name = 'responses'\ndate_column = 'date'\...
python
edit
1
0
mit
474f213cf2cc4851f9cfcd17652a29ad74ab1f0d
andrewlrogers/srvy
write_csv.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import timedelta\nfrom sqlalchemy.sql import func\n\nfrom zeus.config import db\nfrom zeus.constants import Result, Status\nfrom zeus.models import Repository, TestCase, Job\nfrom zeus.utils import timezone\n\nfrom .base_repos...
python
edit
1
1
apache-2.0
2438efb99b85fbc76cd285792c1511e7e2813a05
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
zeus/api/resources/repository_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mwparserfromhell as mwp\nfrom . import IndentTree\nfrom . import WikiComments as wc\n\nclass Page:\n def __init__(self):\n self.indent = -2\n\n def __str__(self):\n return \"Talk_Page\"\n\nclass Section:\n def ...
python
edit
1
5
mit
08c2e38f9c87926476e7ad346001bf2a8271ab47
kjschiroo/WikiChatter
wikichatter/TalkPageParser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport transaction\nfrom taskq import models\nfrom daemon import runner\n\n\nclass TaskRunner():\n\n def __init__(self):\n self.stdin_path = '/dev/null'\n self.stdout_path = '/dev/tty'\n self.stderr_path...
python
edit
1
3
mit
f35c6f989129d6298eb2f419ccb6fe8d4c734fd6
LeResKP/sqla-taskq
taskq/run.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom tools import generate_api_config\n\n\nclass TestAPIGen(unittest.TestCase):\n\n @classmethod\n def setUpClass(cls):\n from falafel.mappers import * # noqa\n pass\n\n def setUp(self):\n sel...
python
edit
1
3
apache-2.0
91d6503ebf3188a6e27058efcb10c0855df3542a
RedHatInsights/insights-core,RedHatInsights/insights-core
falafel/tests/test_api_generator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport os\nimport numpy as np\n\nfrom skcycling.utils import load_power_from_fit\nfrom skcycling.power_profile import Rpp\n\n# The first input argument corresponding to the data path\ndata_path = sys.argv[1]\n\n# The second inpu...
python
edit
2
0
mit
757f984f37d6b3f989c7d9109a09834c2834197f
clemaitre58/power-profile,clemaitre58/power-profile,glemaitre/power-profile,glemaitre/power-profile
pipeline/compute_rpp/compute_rpp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Change trans app label core models to CMS name" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\ntrans_app_label = _('Opps')\n" } ]
python
new_file
1
0
mit
2080c35b6708718a4014fcbb23e1de3c82d42245
opps/opps,opps/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps
opps/core/__init__.py
rejected_duplicate
Near-duplicate of sample 29
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom findaconf import app, db\nfrom findaconf.tests.config import set_app, unset_app\nfrom unittest import TestCase\n\n\nclass TestSiteRoutes(TestCase):\n\n def setUp(self):\n self.app = set_app(app, db)\n\n ...
python
edit
1
2
mit
76abc1d6043a509418027c618d16c5a38502f2f2
cuducos/findaconf,cuducos/findaconf,koorukuroo/findaconf,koorukuroo/findaconf,koorukuroo/findaconf,cuducos/findaconf
findaconf/tests/test_site_routes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n__author__ = 'To\\xc3\\xb1o G. Quintela (<EMAIL>)'\n__version__ = '0.0.0'\n\n#from pyCausality.TimeSeries.TS import *\n\n\n#from pyCausality.TimeSeries.automatic_thresholding import *\n#from pyCausality.TimeSeries.distances import *\n#fro...
python
edit
9
1
mit
5ed0474407669ebbca1e2a3f5a74ea3260bd3f2b
tgquintela/TimeSeriesTools,tgquintela/TimeSeriesTools
TimeSeriesTools/__init__.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module uses unittest TestLoader to run tests\"\"\"\nimport sys\nimport unittest\n\nif __name__ == '__main__':\n sys.dont_write_bytecode = True\n SUITE = unittest.TestLoader().discover(\".\")\n unittest.TextTestRunner(ver...
python
edit
1
0
mit
0663793adc99b83d76578f5266e07e2ecbb4bd71
blairck/chess_notation
test/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"This module provides views for application.\"\"\"\nfrom tof_server import app, versioning, mysql\nfrom flask import jsonify, make_response\nimport string, random\n\n@app.route('/')\ndef index():\n \"\"\"Server information\"\"\"\n ...
python
edit
3
2
mit
3e2746de9aae541880fe4cf643520a2577a3a0d5
P1X-in/Tanks-of-Freedom-Server
tof_server/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._abstract import AbstractScraper\n\n\"\"\"\n Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com\n\"\"\"\n\n\nclass Innit(AbstractScraper):\n @classmethod\n def host(self, domai...
python
edit
1
1
mit
aa359661c31df53885e19f5acb2e0171b6f87398
hhursev/recipe-scraper
recipe_scrapers/innit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport json\nfrom bson import json_util\n\nfrom flask.wrappers import Request, cached_property\n\ndef getBoolean(string):\n if string is None:\n return False\n return {\n '1': True, 'yes': True, 'true': True, 'on': Tru...
python
edit
1
5
apache-2.0
d6536696f322beba321384ec58c1576b56d3eec2
geodelic/clio,geodelic/clio
clio/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport scipy.io.wavfile as wav\nimport numpy\nimport warnings\n\ndef wavread(filename):\n\twith warnings.catch_warnings():\n\t\twarnings.simplefilter(\"ignore\")\n\t\tfs,x = wav.read(filename)\n\tmaxv = numpy.iinfo(x.dtype).max\n\tx = x.ast...
python
edit
1
1
mit
af42088008ec2592885005e1a6e2b0ae52fd15a8
antiface/dspy,nils-werner/dspy
File.py
accepted
null
true