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# Django\nfrom django.core.management.base import BaseCommand\n\n\nfrom api.factories import (\n InternationalFactory,\n)\n\n\nclass Command(BaseCommand):\n help = \"Command to seed database.\"\n\n def handle(self, *args, **options...
python
edit
1
1
bsd-2-clause
3747158af790a38ccfce217426ee5261877e9f0e
barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,dbinetti/barberscore-django,dbinetti/barberscore
project/api/management/commands/seed_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom nose.tools import *\nfrom analyse_idynomics import *\n\nclass TestAnalyseiDynomics:\n def setUp(self):\n self.directory = 'test_data'\n self.analysis = AnalyseiDynomics(self.directory)\n\n def test_init(self):\n ...
python
edit
7
1
mit
13f78350b42e48bc8195d6ec05c8b4342866d8e3
fophillips/pyDynoMiCS
unit_tests/test_analyse_idynomics.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2019 shmilee\n\n'''\nContains Npz pickled file loader class.\n'''\n\nimport numpy\nimport zipfile\n\nfrom ..glogger import getGLogger\nfrom .base import BasePckLoader\n\n__all__ = ['NpzPckLoader']\...
python
edit
1
2
mit
a53df8062680b017d7cd0cf61cfef0e53b2364b1
shmilee/gdpy3,shmilee/gdpy3,shmilee/gdpy3,shmilee/gdpy3
src/loaders/npzpck.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\nimport vane\n\nclass TestFetch(unittest.TestCase):\n def test_owm_good_fetch(self):\n loc = 'New York, NY'\n w = vane.fetch_weather(loc)\n self.assertTrue('temperature' in w['current'])\n ...
python
edit
4
1
bsd-3-clause
3fb41919ebfd73fe1199e95f7ee9b8fa7557ea18
trevorparker/vane
tests/test_vane.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/bin/env python\n\nimport blank_template\nimport json\nimport os\nimport subprocess\nimport sys\nimport tarfile\n\nif __name__ == '__main__':\n\n # Load template\n fname = sys.argv[1]\n template = blank_template.load_template(fna...
python
edit
3
0
bsd-2-clause
78e6cd5fc57c338ac9c61b6e50a5ac4355a5d8b7
xenserver/guest-templates,xenserver/guest-templates
json-templates/create-template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.mongoengine import MongoEngine\n\nimport logging\n\n# Start a flask application context.\napp = Flask(__name__)\n\n# Load configuration from file.\napp.config.from_object('config')\n\n# Setup Db objec...
python
edit
1
0
mit
ea43ab87dbb66e0f3da3b9c5345a134b7c001d50
Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom clusto.drivers.devices.appliance.basicappliance import BasicAppliance\nimport boto.ec2.elb\n\nclass AmazonELB(BasicAppliance):\n _driver_name = 'amazonelb'\n\n def __init__(self, name, elbname, **kwargs):\n BasicAppliance....
python
edit
1
2
bsd-2-clause
aea5b07357ba06811e085d79d1ea4a62726ce8e4
simplegeo/clusto-sgext
sgext/drivers/devices/loadbalancers/amazonelb.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom kafka.tools.assigner.exceptions import ProgrammingException\n\n\ndef split_partitions_into_batches(partitions, batch_size=10, use_class=None):\n # Currently, this is a very simplistic implementation that just breaks the list of part...
python
edit
1
3
apache-2.0
6cdcb7f089c0440ad551ec44b3667a1a5cd380d1
toddpalino/kafka-tools
kafka/tools/assigner/batcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"id(pirmary key) for torsion_init_mol\n\nRevision ID: 1604623c481a\nRevises: fb5bd88ae2f3\nCreate Date: 2020-07-02 18:42:17.267792\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\n# revision identifiers, used by Alembic....
python
edit
3
1
bsd-3-clause
842b128dd4fb3b93492578008de0969e85e3039a
psi4/mongo_qcdb,psi4/mongo_qcdb,psi4/DatenQM,psi4/DatenQM
qcfractal/alembic/versions/1604623c481a_id_pirmary_key_for_torsion_init_mol.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests for `kolibri` module.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport logging\nimport os\nimport shutil\nimport tempfile\n\nfrom kolibri.utils.cli import main\n\nfrom .base import Ko...
python
edit
1
1
mit
3048fa2883d79a706599ccc6828cb1512acea35d
lyw07/kolibri,rtibbles/kolibri,DXCanas/kolibri,mrpau/kolibri,christianmemije/kolibri,learningequality/kolibri,DXCanas/kolibri,christianmemije/kolibri,christianmemije/kolibri,DXCanas/kolibri,MingDai/kolibri,lyw07/kolibri,MingDai/kolibri,MingDai/kolibri,rtibbles/kolibri,benjaoming/kolibri,benjaoming/kolibri,mrpau/kolibri...
kolibri/utils/tests/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom tukio import Workflow\nfrom tukio.task import register\nfrom tukio.task.holder import TaskHolder\n\nfrom nyuki.utils.evaluate import ConditionBlock\nfrom nyuki.workflow.tasks.utils import generate_schema\n\n\nlog = logg...
python
edit
1
4
apache-2.0
91ffbe22e56387491775a569e237c4e46495c6a9
optiflows/nyuki,gdraynz/nyuki,optiflows/nyuki,gdraynz/nyuki
nyuki/workflow/tasks/task_selector.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012-2021, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 25.0.0\n\n\nfrom troposphere import ...
python
edit
1
0
bsd-2-clause
ea0c9a977cdf7611138599c54e28ccc4848f2eb5
cloudtools/troposphere,cloudtools/troposphere
troposphere/ivs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\nimport markovify\nimport sys, os\n\nHERE = os.path.dirname(os.path.realpath(__file__))\nwith open(os.path.join(HERE, \"texts/sherlock.txt\")) as f:\n sherlock = f.read()\n\ndef test_text_too_small():\n text = u\"Example...
python
edit
5
1
mit
417ffca6a10edc87fc36b1c7c47e7dea36cecd2e
jsvine/markovify,orf/markovify
test/test_basic.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Compress string using counts of repeated characters\n\ndef compress_str(str):\n\toutput = \"\"\n\tcurr_char = \"\"\n\tchar_count = \"\"\n\n\tfor i in str:\n\n\t\tif curr_char != str[i]:\n\t\t\toutput = output + curr_char + char_count # ad...
python
edit
1
3
mit
61b38528b60203003b9595f7ba2204c287dc6970
derekmpham/interview-prep,derekmpham/interview-prep
string/compress.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nfrom mock import Mock\n\nfrom saleor.core.utils import (\n Country, get_country_by_ip, get_currency_for_country)\n\n\n@pytest.mark.parametrize('ip_data, expected_country', [\n ({'country': {'iso_code': 'PL'}}, Country('...
python
edit
1
1
bsd-3-clause
97b07af6c6bcdd1a3b6c751a1462d88667c9e529
UITools/saleor,HyperManTT/ECommerceSaleor,jreigel/saleor,tfroehlich82/saleor,UITools/saleor,UITools/saleor,tfroehlich82/saleor,itbabu/saleor,jreigel/saleor,KenMutemi/saleor,car3oon/saleor,mociepka/saleor,jreigel/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,itbabu/sal...
tests/test_core.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom logging import Handler\nfrom datetime import datetime \n\nclass DBLogHandler(Handler, object):\n def __init__(self):\n super(DBLogHandler, self).__init__()\n \n def emit(self, record):\n ...
python
edit
3
4
mit
db13b52924a96bdfe8e38c20df07b62b6c455aa8
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/dblog/handlers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom django.contrib.staticfiles.storage import StaticFilesStorage\nfrom django_tenants.files.storages import TenantStorageMixin\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\n\n\nclass...
python
edit
3
2
mit
91b3891078b889db98d3832f0c06e465a86e52ef
tomturner/django-tenants,tomturner/django-tenants,tomturner/django-tenants
django_tenants/staticfiles/storage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom wagtail.wagtailimages.models import Filter, Image\n\n\ndef get_full_image_url(request, image_id):\n image = Image.objects.get(id=image_id)\n if image:\n filter, _ = Filter.objects.get_...
python
edit
1
2
bsd-3-clause
fccc7b59e742bc887580c91c2c2dbeae2c85caee
takeflight/wagtailannotatedimage,takeflight/wagtailannotatedimage,takeflight/wagtailannotatedimage
wagtailannotatedimage/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom discord.ext.commands.errors import CommandError\n\nclass NotServerOwner(CommandError):\n\t'''Not Server Owner'''\n\tpass\n\nclass VoiceNotConnected(CommandError):\n\t'''Voice Not Connected'''\n\tpass\n\nclass PermittedVoiceNotConnect...
python
edit
1
0
mit
58f5d541da1e9e234258985b3362967a9c0d7b67
Harmon758/Harmonbot,Harmon758/Harmonbot
Discord/utilities/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom semantic_release.pypi import upload_to_pypi\n\nfrom . import mock\n\n\nclass PypiTests(TestCase):\n @mock.patch('semantic_release.pypi.run')\n def test_upload_without_arguments(self, mock_run):\n ...
python
edit
1
1
mit
202fba50c287d3df99b22a4f30a96a3d8d9c8141
relekang/python-semantic-release,relekang/python-semantic-release
tests/test_pypi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport argparse\n\nif __name__ == '__main__':\n # Argument parsing\n parser = argparse.ArgumentParser()\n parser.add_argument(\"metric\", help=\"the desired metric\",\n choices=[\"ais\"...
python
edit
1
1
bsd-3-clause
2423958016d552a6f696b7124454c7b362c84a5f
pkainz/pylearn2,KennethPierce/pylearnk,abergeron/pylearn2,alexjc/pylearn2,pombredanne/pylearn2,cosmoharrigan/pylearn2,bartvm/pylearn2,mclaughlin6464/pylearn2,ashhher3/pylearn2,se4u/pylearn2,abergeron/pylearn2,skearnes/pylearn2,lisa-lab/pylearn2,lamblin/pylearn2,fulmicoton/pylearn2,alexjc/pylearn2,matrogers/pylearn2,jam...
pylearn2/scripts/dbm/dbm_metrics.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 0xc0170\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/...
python
edit
6
1
apache-2.0
fd2bd48ca9da96e894031f7979798672e1cebdea
ohagendorf/project_generator,project-generator/project_generator,sarahmarshy/project_generator,0xc0170/project_generator
tests/test_util.py
rejected_lint
Too many lint violations: 6
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\nALLOWED_HOSTS = [\n '174.129.183.221',\n '54.173.179.176',\n '.c...
python
edit
2
0
mit
6c0212b004aef96c305406352810bd40f3d5500e
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\n#!/usr/bin/env python \n\nimport argparse\n\n\ndef parsed_command_line():\n \"\"\"Returns an object that results from parsing the command-line for this program argparse.ArgumentParser(...).parse_ags() \n \"\"\"\n parser = argparse....
python
edit
2
2
cc0-1.0
9c381721f4b4febef64276a2eb83c5a9169f7b8c
NCBI-Hackathons/Network_SNPs,NCBI-Hackathons/Network_SNPs,NCBI-Hackathons/Network_SNPs,NCBI-Hackathons/Network_SNPs,NCBI-Hackathons/Network_SNPs
meta-analyze.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Analysis module for Databench.\"\"\"\n\nfrom flask import Blueprint, render_template\n\nimport databench.signals\n\n\nLIST_ALL = []\n\nclass Analysis(object):\n \"\"\"Databench's analysis class.\n\n An optional :class:`databench...
python
edit
1
3
mit
9a988056944700d6188f6e7164e68dcd35c342d8
svenkreiss/databench,svenkreiss/databench,svenkreiss/databench,svenkreiss/databench
databench/analysis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis import admin\nfrom models import Place\n\nadmin.site.register(Place, admin.OSMGeoAdmin)\n\n```\n\nApply this change: Make it possible to run dev server on my desktop.\n\nWhile I'm accessing a suitable database remote...
python
edit
1
0
bsd-3-clause
667294dcc3b8ab34618ad674c2b6ac8efeec0620
MAPC/masshealth,MAPC/masshealth
places/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Gallery templatetags\"\"\"\nfrom django.template import Library\nfrom django.core.exceptions import ObjectDoesNotExist\n\nregister = Library()\n\n\n@register.filter(name='divide')\ndef divide(dividend, divisor):\n return dividend /...
python
edit
1
3
mit
d1fd045791ad4d7c3544352faf68361637213f57
emencia/emencia-product-onepage,emencia/emencia-product-onepage
product_onepage/templatetags/onepage_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nclass NetworkInterfaceNotFoundError(Exception):\n \"\"\"\n Exception raised when network interface not fou...
python
edit
1
4
mit
e8b44733ff44162f4a01de76b66046af23a9c946
thombashi/tcconfig,thombashi/tcconfig
tcconfig/_error.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef insertion_sort(a_list):\n \"\"\"Insertion Sort algortihm.\"\"\"\n for index in range(1, len(a_list)):\n cur...
python
edit
1
4
bsd-2-clause
1dd8e7ddfccd657fde2697fc1e39da7fb9c3548f
bowen0701/algorithms_data_structures
alg_insertion_sort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom libpals.util import (\n xor_find_singlechar_key,\n hamming_distance,\n fixed_xor\n)\n\ndef test_xor_find_singlechar_key():\n input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393...
python
edit
1
1
bsd-2-clause
b5785cbd9586a767b37da2e0c71bcb1fcfed0604
cpach/cryptopals-python3
tests/main_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\n\nclass BugReportForm(forms.Form):\n\n bug = forms.CharField(label=\"Bug (required)\", required=True)\n description = forms.CharField(\n label=\"Description (required)\",\n widget=forms.Textar...
python
edit
1
2
bsd-3-clause
90375db8488bc50b57bce9b10a2274ec3dc81787
murrown/cyder,akeym/cyder,murrown/cyder,OSU-Net/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,drkitty/cyder,zeeman/cyder,drkitty/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,akeym/cyder,OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,zeeman/cyder,murrown/cyder,zeeman/cyder
cyder/base/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim:fileencoding=utf-8:noet\n\nfrom powerline import Powerline\nfrom powerline.lib.monotonic import monotonic\n\nimport sys\nimport time\nimport i3\nfrom threading import Lock\n\nname = 'wm'\nif len( sys.argv ) > 1:...
python
edit
5
1
mit
21319fc8d22469911c1cbcc41ec7320b1d6141e9
DoctorJellyface/powerline,bartvm/powerline,areteix/powerline,russellb/powerline,seanfisk/powerline,s0undt3ch/powerline,IvanAli/powerline,cyrixhero/powerline,blindFS/powerline,keelerm84/powerline,kenrachynski/powerline,IvanAli/powerline,darac/powerline,xfumihiro/powerline,Liangjianghao/powerline,darac/powerline,QuLogic/...
powerline/bindings/i3/powerline-i3.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom django_pgjson.fields import JsonField\n\n\nclass Document(models.Model):\n source = models.CharField(max_length=100)\n docID = models.CharField(max_length=100)\n\n providerUpdatedDateTime = mode...
python
edit
1
1
apache-2.0
1cbab715a647689aeda4679d7dcf4e60ff9ab5b1
felliott/scrapi,fabianvf/scrapi,erinspace/scrapi,mehanig/scrapi,felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,fabianvf/scrapi
api/webview/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.forms.fields import CharField\nfrom django.core.exceptions import ValidationError\nfrom phonenumber_f...
python
edit
1
3
mit
2cc1f3dc699258fa7a571cde96a434b450bc0cf8
hovel/django-phonenumber-field,hovel/django-phonenumber-field,stefanfoulis/django-phonenumber-field
phonenumber_field/formfields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: FIX: Use a NullHandler for all 'traits' loggers per best practice for logging." }, { "role": "assistant", "content": "from __future__ import absolute_import\n\n__version__ = '4.3.0'\n\n\n# Add a NullHandler so 'traits' loggers do...
python
new_file
1
1
bsd-3-clause
c23787680c40cc7f871f23e920486d07452d2cf3
burnpanck/traits,burnpanck/traits
traits/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom .. import run_nbgrader, run_command\nfrom .base import BaseTestApp\n\n\nclass TestNbGrader(BaseTestApp):\n\n def test_help(self):\n \"\"\"Does the help display without error?\"\"\"\n run_nbgrad...
python
edit
1
1
bsd-3-clause
5a39d00cf39e80a4e9f1ca8bbf0eac767d39f61d
jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader
nbgrader/tests/apps/test_nbgrader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFile that initializes a Collector object designed for GitHub style markdown\nfiles.\n\"\"\"\n\nfrom anchorhub.collector import Collector\nfrom anchorhub.builtin.github.cstrategies import MarkdownATXCollectorStrategy\nimport anchorhu...
python
edit
1
1
apache-2.0
409c69dd967f18ef99658ed63d54dc9723f84250
samjabrahams/anchorhub
anchorhub/builtin/github/collector.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom django.views.generic import View\nfrom django.utils.decorators import method_decorator\nfrom django.template import RequestContext, loader\nfrom django.core.exceptions import ...
python
edit
8
1
mit
5212d6eabf199ed9ddd34bd6fd2b159f7b2e6a02
DeWaster/Tviserrys,DeWaster/Tviserrys
tviserrys/views.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\n\nimport dill\n\nfrom metal.mmtl.glue.glue_datasets import get_glue_dataset\n\n\ndef make_datasets(task, bert_version):\n datasets = {}\n for split in [\"train\", \"dev\", \"test\"]:\n datasets[split...
python
edit
1
2
apache-2.0
a87010c4c7ba6c9f1f295c8da688946d149c7fbd
HazyResearch/metal,HazyResearch/metal
metal/mmtl/glue/make_glue_datasets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013 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\"\"\" Install all executables, and any runtim...
python
edit
1
1
bsd-3-clause
e9f25dd0c9028613ef7317ad3a8287dc60b9a217
google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbo...
slave/skia_slave_scripts/chromeos_install.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sqlalchemy import Column, BIGINT, String, Integer\n\nfrom meetup_facebook_bot.models.base import Base\n\n\nclass Speaker(Base):\n __tablename__ = 'speakers'\n id = Column(Integer, primary_key=True, autoincrement=True)\n page_s...
python
edit
1
1
mit
5bc0226fe1ad03495e97dc2933fa17d18cd38bb9
Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot
meetup_facebook_bot/models/speaker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport MySQLdb as mysql\nfrom faker import Factory\n\n# Open database connection\ndb = mysql.connect('localhost', 'root', 'rojak', 'rojak_database')\n\n# Create new db cursor\ncursor = db.cursor()\n\nsql = '''\nINSERT INTO `media`(`name`, `...
python
edit
2
0
bsd-3-clause
182f070c69e59907eeda3c261d833a492af46967
CodeRiderz/rojak,bobbypriambodo/rojak,reinarduswindy/rojak,CodeRiderz/rojak,bobbypriambodo/rojak,reinarduswindy/rojak,bobbypriambodo/rojak,reinarduswindy/rojak,CodeRiderz/rojak,pyk/rojak,pyk/rojak,bobbypriambodo/rojak,pyk/rojak,bobbypriambodo/rojak,rawgni/rojak,bobbypriambodo/rojak,CodeRiderz/rojak,pyk/rojak,pyk/rojak,...
rojak-database/generate_media_data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom geelweb.django.editos import settings\n\nclass Edito(models.Model):\n title = models.CharField(max_length=100)\n link = models.URLField()\n button_label = models.CharField(max_length=20, default=\...
python
edit
1
1
mit
e5bda294e291a2d96b4f703a89128de9ee53a495
geelweb/django-editos,geelweb/django-editos
src/geelweb/django/editos/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Crypto.PublicKey import RSA\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\n\nclass Command(BaseCommand):\n help = 'Randomly generate a new RSA key for the OpenID server'\n\n def handle...
python
edit
1
2
mit
b89115165c55e51e76a533ba4eb9637897319e0a
torreco/django-oidc-provider,ByteInternet/django-oidc-provider,wojtek-fliposports/django-oidc-provider,wayward710/django-oidc-provider,bunnyinc/django-oidc-provider,juanifioren/django-oidc-provider,wojtek-fliposports/django-oidc-provider,ByteInternet/django-oidc-provider,torreco/django-oidc-provider,bunnyinc/django-oid...
oidc_provider/management/commands/creatersakey.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom organizer.models import Startup, Tag\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Post(models.Model):\n title = models.CharField(max_length=63)\n...
python
edit
1
1
bsd-2-clause
e2e1ea416d38565a419fff75f6ad4b776b74bc8e
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
blog/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\n\nfrom flask import current_app\n\nimport cea.config\nimport cea.inputlocator\n\n\ndef deconstruct_parameters(p):\n params = {'name': p.name, 'type': p.typename,\n 'value': p.get(), 'help': p.help}\n if isinstance(p, ...
python
edit
1
6
mit
4de72b4bd349ebf16c0046c4ed9034914c03ffb5
architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst
cea/interfaces/dashboard/api/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Unit tests for the pymt.framwork.bmi_ugrid module.\"\"\"\nimport xarray as xr\n\nfrom pymt.framework.bmi_ugrid import Scalar, Vector\nfrom pymt.framework.bmi_bridge import _BmiCap\n\n\ngrid_id = 0\n\n\nclass TestScalar:\n\n def get...
python
edit
1
1
mit
8aa6b13ca491d65a0519e429727073f082993aac
csdms/pymt
tests/framework/test_bmi_ugrid.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.utils import timezone\nfrom rest_framework.renderers import JSONRenderer\nfrom rest_framework.utils import encoders\nimport datetime\nimport warnings\n\n\nclass TastyPieJSONEncoder(encoders.JSONEncoder):\n\n def default(self,...
python
edit
1
3
mit
47c74590587e1e2ff5c79fd33c0019724ca96818
erikcw/tasty_rest_framework
tasty_rest_framework/renderers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.db import models\nfrom django.utils.safestring import mark_safe\n\n\nregister = template.Library()\n\n\n@register.filter\ndef model_row(instance, fields):\n for name in fields.split(','):\n ...
python
edit
3
7
bsd-3-clause
a390f3b711df89b2552bf059c89b1fd4f7ab1fa7
matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel
towel/templatetags/modelview_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom funcy.seqs import partition\n\nfrom eche.eche_types import Symbol, List\n\n\ndef def_exclamation_mark(ast):\n from eche.eval import eval_ast\n\n _, key, val = ast\n l = List()\n l.append(key)\n l.append(val)\n l.env =...
python
edit
1
2
mit
266105d371193ccf0f02a3975ebdca04980b675b
skk/eche
eche/special_forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n #'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n 'ENGINE': 'django.contrib.s...
python
edit
2
0
mit
18a0be3abb34c84c16c7cbd86ac25c984c1ab15e
hellsgate1001/thatforum_django,hellsgate1001/thatforum_django,hellsgate1001/thatforum_django
thatforum/settings/home_server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom downstream_node.config import config\nfrom downstream_node.models import Challenges, Files\n\nfrom heartbeat import Heartbeat\nfrom downstream_node.startup import db\n\n__all__ = ['crea...
python
edit
1
2
mit
c668bf1179e91be66f12857fc7b31ef66d287a42
Storj/downstream-node,Storj/downstream-node
downstream_node/lib/node.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis package implements a wxPython shell, based on PyShell,\nwhich controls a seperate Python process, creating with the\n`multiprocessing` package.\n\nHere is the canonical way to use it:\n\n1. Subclass multiprocessing.Process:\n\n...
python
edit
1
2
mit
b913963f58f2e3a6842518b1cf0344ca262ecdde
bittner/PythonTurtle,cool-RR/PythonTurtle
src/shelltoprocess/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\ntry:\n from faker import Factory as FakerFactory\nexcept ImportError, error:\n message = '{0}. Try running `pip install fake-factory`.'.format(error)...
python
edit
1
0
apache-2.0
65dd9b35b75dd4ccc6dbc34d53071716a377d532
thecut/thecut-authorship
thecut/authorship/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models import Q\nfrom django.shortcuts import render\nfrom rest_framework.filters import OrderingFilter, SearchFilter\nfrom rest_framework.generics import ListAPIView\nfrom rest_framework_json_api.renderers import JSONRendere...
python
edit
4
0
mit
810961f65c37d27c5e2d99cf102064d0b4e300f3
hnakamur/django-bootstrap-table-example,hnakamur/django-bootstrap-table-example,hnakamur/django-bootstrap-table-example
project/apiv2/views.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\n#\n# Copyright © 2012-2013 by its contributors. See AUTHORS for details.\n#\n# Distributed under the MIT/X11 software license, see the accompanying\n# file LICENSE or http://www.opensource.o...
python
edit
1
5
mit
ad87d1d9860ea394af261c3298403016d78dc1e1
monetizeio/python-bitcoin
bitcoin/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.http import HttpResponse\nfrom django.template import loader, Context\n\nfrom sentry.web.frontend.base import BaseView, OrganizationView\n\n\nclass ReactMixin(object):\n def handle_re...
python
edit
1
1
bsd-3-clause
3dfe299893a5c4259b2f6abd3f9e2e458a32ef44
mitsuhiko/sentry,zenefits/sentry,gencer/sentry,daevaorn/sentry,daevaorn/sentry,alexm92/sentry,fotinakis/sentry,looker/sentry,JamesMura/sentry,gencer/sentry,mvaled/sentry,JackDanger/sentry,ifduyue/sentry,nicholasserra/sentry,jean/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,JackDanger/sentry,JamesMura/sentry,i...
src/sentry/web/frontend/react_page.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport requests\n\ndef logged_in():\n \"\"\"Check whether the device has logged in.\n Return a dictionary containing:\n username\n byte\n duration (in seconds)\n Return False if no logged in\...
python
edit
1
4
mit
b5bb360a78eb3493a52a4f085bb7ae2ef1355cdd
ThomasLee969/scavenger
scavenger/net_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Provide a class to load and parse the help file and \nProvide a simple interface for retrieving help entries\"\"\"\n\nimport json\nimport os\n\n\nclass HelpManager(object):\n _help_dict = {}\n _last_modified = 0\n\n @staticme...
python
edit
1
4
bsd-2-clause
643634e96554b00214ca4f0d45343e61b0df8e5a
6180/foxybot
foxybot/bot_help.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# pylint: disable=wildcard-import,unused-wildcard-import,missing-docstring\n\nfrom __future__ import absolute_import\n\nfrom unittest import TestCase\n\nfrom nose.tools import *\nfrom mock import *\n\nfrom dear_astrid.rtm.importer import Im...
python
edit
12
2
mit
c434cf202de60d052f61f8608e48b5d7645be1c0
rwstauner/dear_astrid,rwstauner/dear_astrid
dear_astrid/test/test_rtm_importer.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"The asyncio package, tracking PEP 3156.\"\"\"\n\nimport sys\n\n# This relies on each of the submodules having an __all__ variable.\nfrom .futures import *\nfrom .events import *\nfrom .locks import *\nfrom .transports import *\nfrom ....
python
edit
19
0
apache-2.0
3328a58e7c81fb86af2424b851de05e7b409ec00
jashandeep-sohi/asyncio,gsb-eng/asyncio,ajdavis/asyncio,vxgmichel/asyncio,gvanrossum/asyncio,manipopopo/asyncio,gsb-eng/asyncio,fallen/asyncio,1st1/asyncio,Martiusweb/asyncio,vxgmichel/asyncio,ajdavis/asyncio,haypo/trollius,ajdavis/asyncio,fallen/asyncio,manipopopo/asyncio,1st1/asyncio,fallen/asyncio,Martiusweb/asyncio...
asyncio/__init__.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright 2008 Andi Albrecht <<EMAIL>>\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# htt...
python
edit
1
2
apache-2.0
9be9ddd64d192240d45dea5b0c3dfbe3a2d3e261
bubenkoff/bubenkoff-gae2django,andialbrecht/django-gae2django,andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django
gae2django/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass BasePlugin(object):\n\n ext = None\n\n def load(self, content):\n \"\"\"\n Return plugin data for content string\n \"\"\"\n return content\n\n def save(self, data):\n \"\"\"\n Persist...
python
edit
1
1
bsd-3-clause
8be856ed565d9e961a4d24da74a13240e25f4ded
5monkeys/content-io
cio/plugins/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Wrappers around the logging module\"\"\"\n\nfrom __future__ import absolute_import\n\nimport functools\nimport logging\n\nfrom colorlog.colorlog import ColoredFormatter\n\nBASIC_FORMAT = \"%(log_color)s%(levelname)s%(reset)s:%(name)s:...
python
edit
1
2
mit
793ad28cf8bae098d12d08d971f19fd9cc29f3dd
borntyping/python-colorlog
colorlog/logging.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nWrappers around Python requests\n\nThis allows us to handle all the custom headers in a single place\n'''\nfrom __future__ import absolute_import\n\nimport requests\nfrom functools import wraps\n\nfrom hatarake import USER_AGENT\n\n\nd...
python
edit
1
3
mit
5d5cb362410896927b6216deeb9421adfc3331c4
kfdm/hatarake
hatarake/net.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nHOST = \"irc.twitch.tv\"\nPORT = 6667\n\nPASS = \"oauth:##############################\" # Your bot's oauth (https://twitchapps.com/tmi/)\nIDENTITY = \"my_bot\" # Y...
python
edit
1
0
apache-2.0
f97e1d88f0508521fb2841ef9e8c98ec77424daa
K00sKlust/K00sTwitchBot
SettingsTemplate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom collections import OrderedDict\n\nfrom dependencies import this\nfrom django.views.generic import View\n\n\ndef view(injector):\n \"\"\"Create Django class-based view from injector class.\"\...
python
edit
1
3
bsd-2-clause
b2d06e068fbc7bad9ed0c8f22e751b6bb46d353d
proofit404/dependencies,proofit404/dependencies,proofit404/dependencies,proofit404/dependencies
dependencies/contrib/_django.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\n\nclass AsyncioTransportTestCase(TestCase):\n pass\n\n```\n\nApply this change: Add an initial ghetto asyncio test." }, { "role": "assistant", "content": "from asyncio import get_event_loop\nf...
python
edit
1
1
bsd-3-clause
e4696a04cbc003737d7ba28d58b14775e9fc2682
skimpax/python-rfxcom,kalfa/python-rfxcom,AndyA13/python-rfxcom,d0ugal-archive/python-rfxcom,kalfa/python-rfxcom,d0ugal-archive/python-rfxcom,AndyA13/python-rfxcom,skimpax/python-rfxcom
tests/transport/test_asyncio.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django import forms\n\nfrom account.models import UserProfile\n\n\nattributes = {\"class\": \"required\"}\n\n\nclass RegistrationForm(forms.Form):\n username = forms.RegexField(regex=r'^[...
python
edit
1
2
mit
6d6d1af248ce555cca56521bba5e7c356817c74e
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
account/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom api.v330.common.serializers import *\n\n\nclass SpacecraftFlightSerializerForDockingEvent(serializers.HyperlinkedModelSerializer):\n spacecraft = SpacecraftSerializer(read_only=True, many=False)\n\n class Meta:\n model = S...
python
edit
13
0
apache-2.0
e27f04e9c8d5d74afdd9cd7d6990cad5ff6f6cb5
ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server
api/v330/docking_event/serializers.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nclass DataModelAdapter(object) :\n\n def __init__(self, data) :\n self._data = data\n self._children = set()\n pass\n\n def numChildren(self) :\n return len(self._children)\n\n def hasData(self) :\n ...
python
edit
1
1
apache-2.0
8c174388aefa3907aeb8733bb3d4c77c770eefe7
mattdeckard/wherewithal
DataModelAdapter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nCMS-related contrib package. https://home.cern/about/experiments/cms\n\"\"\"\n\n\n__all__ = [\"CMSJobDashboard\", \"BundleCMSSW\"]\n\n\n# provisioning imports\nfrom law.contrib.cms.job import CMSJobDashboard\nfrom...
python
edit
1
0
bsd-3-clause
dbba6f10c867e64031ae07adb3d21becfe4a4e5a
riga/law,riga/law
law/contrib/cms/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Markup\n\n\nclass SearchResults(object):\n \"\"\"Provides access to the search results information\"\"\"\n\n def __init__(self, response, lots_by_slug):\n self.search_results = response['services']\n se...
python
edit
1
4
mit
e0becdd677c06c29834ecea73c28635553e18337
alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend
app/main/presenters/search_results.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nChatterBot is a machine learning, conversational dialog engine.\n\"\"\"\nfrom .chatterbot import ChatBot\n\n__version__ = '1.0.0a1'\n__author__ = 'Gunther Cox'\n__email__ = '<EMAIL>'\n__url__ = 'https://github.com/gunthercox/Chatter...
python
edit
1
0
bsd-3-clause
372a1cab73dad91daab5640f472eda4552be0adb
gunthercox/ChatterBot,vkosuri/ChatterBot
chatterbot/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n# Filename: cmd.py\n\"\"\"\nKM3Pipe command line utility.\n\nUsage:\n km3pipe test\n km3pipe tohdf5 [-s] -i FILE -o FILE\n km3pipe (-h | --help)\n km3pipe --version\n\nOptions:\n -h --help Show this screen.\n...
python
edit
2
2
mit
409ad4af8a4ad933667d91709822a04dbbda77ac
tamasgal/km3pipe,tamasgal/km3pipe
km3pipe/cmd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom ..utils import ignoring\nfrom .core import (Array, stack, concatenate, tensordot, transpose, from_array,\n choose, coarsen, constant, fromfunction, compute, uni...
python
edit
80
0
bsd-3-clause
5a27329e32942523e73d2d01b43ba75ecd281622
vikhyat/dask,minrk/dask,esc/dask,gameduell/dask,ssanderson/dask,vikhyat/dask,jayhetee/dask,mrocklin/dask,wiso/dask,dask/dask,ContinuumIO/dask,mrocklin/dask,jcrist/dask,jayhetee/dask,blaze/dask,marianotepper/dask,ContinuumIO/dask,jakirkham/dask,pombredanne/dask,chrisbarber/dask,wiso/dask,PhE/dask,freeman-lab/dask,jcrist...
dask/array/__init__.py
rejected_lint
Too many lint violations: 80
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\nfrom django.conf.urls import patterns, url\n\nfrom .views import OppsDetail, OppsList, Search\n\n\nurlpatterns = patterns(\n '',\n url(r'^$', OppsList.as_view(), name='home'),\n ur...
python
edit
1
0
mit
e6f19cc58f32b855fc1f71086dac0ad56b697ed3
opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,williamroot/opps
opps/articles/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014 matrix.org\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#...
python
edit
1
1
apache-2.0
eef03e6c4eb6d80dd04ccbbea6b530d5679a8142
matrix-org/sydent,matrix-org/sydent,matrix-org/sydent
sydent/http/servlets/pubkeyservlets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport functools\nimport tensorflow as tf\n\nfrom . import cnn_dailymail_rc\nfrom ..flags import FLAGS\n\n\n\nREADERS = { \"cnn_dailymail_rc\": cnn_dailymail_rc.read_files }\n\n\ndef read_files(file_pattern, file_format):\n return READERS[...
python
edit
3
3
unlicense
4c484a29480ec9d85a87ac7c2aaf09ced7d15457
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/file/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport random\n\nattempts = 1\nnumber = str(random.randint(1, 100))\nwhile True:\n print number\n if raw_input(\"Guess (1 - 100): \") == number:\n print \"Correct!\"\n print \"It Only Took You\", attempts, \"Attempts!\" ...
python
edit
7
0
mit
c0c59a9c5d3aa2d7ed50e8e895f1a3e02a4ae380
RascalTwo/Basic-Number-Guessing-Game-Challenge
Basic-Number-Guessing-Game-Challenge.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom core.models import Tag\n\nfrom api.permissions import CloudAdminRequired\nfrom api.v2.serializers.summaries import TagSummarySerializer\nfrom api.v2.views.base import AuthReadOnlyViewSet\n\n\nclass TagViewSet(AuthReadOnlyViewSet):\n ...
python
edit
5
3
apache-2.0
16f531cb7e9d067725a4c25a4321773aada9616d
CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend
api/v2/views/tag.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pupa.scrape import Jurisdiction\n\nfrom .people import PersonScraper\n\n\nclass Example(Jurisdiction):\n jurisdiction_id = 'ocd-jurisdiction/country:us/state:ex/place:example'\n\n def get_metadata(self):\n return {\n ...
python
edit
1
2
bsd-3-clause
fbc4247fc7b7d36286c3f25e6ae71dfb7ebb2d39
rshorey/pupa,rshorey/pupa,mileswwatkins/pupa,opencivicdata/pupa,datamade/pupa,mileswwatkins/pupa,influence-usa/pupa,influence-usa/pupa,datamade/pupa,opencivicdata/pupa
example/__init__.py
rejected_duplicate
Near-duplicate of sample 2127
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport json\nfrom u2flib_server.u2f import (begin_registration,\n begin_authentication,\n complete_registration,\n ...
python
edit
1
2
mit
07da63a9ac95a054332297638df17fcf00ac4291
chiaki64/Windless,chiaki64/Windless
core/components/security/factor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom argparse import SUPPRESS\n\nfrom loguru import logger\nfrom rich.syntax import Syntax\n\nfrom flexget import options, plugin\nfrom flexget.event import event\nfrom flexget.terminal import console\n\nlogger = logger.bind(name='dump_conf...
python
edit
1
3
mit
fb019fa4c277cf988d479333c6cba08a637f948a
crawln45/Flexget,Flexget/Flexget,Flexget/Flexget,Flexget/Flexget,Flexget/Flexget,crawln45/Flexget,crawln45/Flexget,crawln45/Flexget
flexget/plugins/output/dump_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.core.checks import Tags, Warning, register\nfrom django.db import connection\nfrom django.utils.translation import gettext_lazy as _\n\nfrom wagtail.search.signal_handlers import register_signa...
python
edit
1
4
bsd-3-clause
21e3eac740f54194954d01d517aca0eb841ca1b3
torchbox/wagtail,torchbox/wagtail,torchbox/wagtail,torchbox/wagtail
wagtail/search/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport Pyro4\nPyro4.config.SERIALIZERS_ACCEPTED.add('pickle')\nPyro4.config.SERIALIZER = 'pickle'\nPyro4.config.THREADPOOL_SIZE = 16\nPyro4.config.SERVERTYPE = 'multiplex'\n# TODO: should we set COMMTIMEOUT as well?\nPyro4.config.DETAILED_T...
python
edit
13
0
apache-2.0
7473a70893a0f31ba717e26a3f508d0adc5026f9
opensistemas-hub/osbrain
osbrain/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or...
python
edit
1
0
apache-2.0
cdfeac780643ddd2502c17f4cd7d949018de8b06
mattrobenolt/warehouse,robhudson/warehouse,techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse,techtonik/warehouse,mattrobenolt/warehouse
warehouse/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import run\n\nfrom cbagent.collectors.libstats.remotestats import (\n RemoteStats, multi_node_task)\n\n\nclass PSStats(RemoteStats):\n\n METRICS = (\n (\"rss\", 1024), # kB -> B\n (\"vsize\", 1024),\n ...
python
edit
1
4
apache-2.0
7e046e4999959e0cfa3527780ca04e581698b328
mikewied/cbagent,couchbase/cbagent
cbagent/collectors/libstats/psstats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\ndef copy_files(src, target_node, parent=None, name=None):\n \"\"\"Copy the files from src to the target node\n :param Folder src: The source to copy children from\n :param Node target_node: The node to copy files to\n :param F...
python
edit
1
9
apache-2.0
e12de19ae37a6f3fa0335ecfd0db00b18badf730
aaxelb/osf.io,felliott/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,mattclark/osf.io,saradbowman/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,cslzchen/osf.io,mfraezz/osf.io,HalcyonChimera/osf.io,adlius/osf.io,felliott/osf.io,Johnetordoff/osf.io,caseyrollins/os...
website/files/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.template import Library, Node\nfrom django.test.client import RequestFactory\n\n\nregister = Library()\nfactory = RequestFactory()\n\n\nclass FakeRequestNode(Node):\n def render(self, context):\n req = factory.get('/')...
python
edit
1
1
mit
5be3d07995803d81e6238a561c772e856b81a367
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/templatetags/search_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass AuthType(object):\n \"\"\"\n An auth type defines what write privileges an authenticated agent has.\n \"\"\"\n MATCH_VIDEO = 0\n EVENT_TEAMS = 1\n EVENT_MATCHES = 2\n EVENT_RANKINGS = 3\n EVENT_ALLIANCES = 4\n ...
python
edit
1
0
mit
2538ca440620de8ed08510e0ae902c82184a9daa
phil-lopreiato/the-blue-alliance,fangeugene/the-blue-alliance,bdaroz/the-blue-alliance,bvisness/the-blue-alliance,tsteward/the-blue-alliance,josephbisch/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-bl...
consts/auth_type.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set xml catalog to the right prefix." }, { "role": "assistant", "content": "GnomePackage ('gtk-doc', version_major = '1', version_minor = '17', configure_flags = ['--with-xml-catalog=\"%{prefix}/etc/xml/catalog\"'], sources = [\n...
python
new_file
2
0
mit
bf7626df74d78f2811f20173fb21c36a96cc9500
BansheeMediaPlayer/bockbuild,mono/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild
packages/gtk-doc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass AccountConfig(AppConfig):\n name = 'froide.account'\n verbose_name = _(\"Account\")\n\n def ready(self):\n from froide.bou...
python
edit
1
3
mit
94b6b97dc1e706a6560092aa29cbe4e21f052924
fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide
froide/account/apps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bpy\n\ndef find_seqs(scene, select_marker):\n sequences = {}\n sequence_flags = {}\n\n for marker in scene.timeline_markers:\n if \":\" not in marker.name or (select_marker and not marker.select):\n continu...
python
edit
1
12
mit
cbb0ed5ed66571feba22413472a5fe1a20824dbd
qoh/io_scene_dts,portify/io_scene_dts
shared_export.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTest the top-level Kafka Streams class\n\"\"\"\n\n\nimport pytest\n\nfrom winton_kafka_streams import kafka_config\nfrom winton_kafka_streams.errors.kafka_streams_error import KafkaStreamsError\nfrom winton_kafka_streams.kafka_strea...
python
edit
1
1
apache-2.0
7ceba1f2b83628a2b89ffbdd30e435970e8c5e91
wintoncode/winton-kafka-streams
tests/test_kafka_streams.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nraven.utils.compat\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\ntry:\n from urllib.error import HTTPError\nexc...
python
edit
10
0
bsd-3-clause
e0990fcdb7e5e1c90762a71ced7492e28f24c903
getsentry/raven-python,lepture/raven-python,recht/raven-python,nikolas/raven-python,nikolas/raven-python,inspirehep/raven-python,dbravender/raven-python,smarkets/raven-python,percipient/raven-python,Photonomie/raven-python,ronaldevers/raven-python,danriti/raven-python,someonehan/raven-python,smarkets/raven-python,Photo...
raven/utils/compat.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport asyncio\nfrom enum import Enum\n\nimport aiormq\n\n\nclass TransactionStates(Enum):\n created = \"created\"\n commited = \"commited\"\n rolled_back = \"rolled back\"\n started = \"started\"\n\n\nclass Transaction:\n de...
python
edit
1
3
apache-2.0
e7df1e7f3e9d8afd5cf1892df2f136751b276136
mosquito/aio-pika
aio_pika/transaction.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import cd, sudo, env\nimport os\n\nexpected_vars = [\n 'PROJECT',\n]\n\nfor var in expected_vars:\n if var not in os.environ:\n raise Exception('Please specify %s environment variable' % (\n var,))\n\...
python
edit
1
2
bsd-3-clause
3e23d60857461b7806f3616cf41b2cd9c812fa7b
praekelt/go-rts-zambia
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add import for older versions of Django" }, { "role": "assistant", "content": "from test_outgoing import * # noqa\nfrom test_utils import * # noqa\nfrom test_views import * # noqa\n" } ]
python
new_file
1
0
bsd-3-clause
3fb1800548ad421520bf3f2845aad4f51f6f5839
caktus/rapidsms-multimodem
rapidsms_multimodem/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import cd, sudo, env\nimport os\n\nexpected_vars = [\n 'PROJECT',\n]\n\nfor var in expected_vars:\n if var not in os.environ:\n raise Exception('Please specify %s environment variable' % (\n var,))\n\...
python
edit
1
2
bsd-3-clause
e660d8e05e54adbd0ea199a02cc188dc7007089a
praekelt/go-rts-zambia
fabfile.py
accepted
null
true