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\nfrom setuptools import setup, find_packages\nfrom annotator import __version__, __license__, __author__\n\nsetup(\n name = 'annotator',\n version = __version__,\n packages = find_packages(),\n\n install_requires = [\n 'Fl... | python | edit | 1 | 0 | mit | a4d2d4c4520dfffc1c5501db671805760933b126 | nobita-isc/annotator-store,nobita-isc/annotator-store,ningyifan/annotator-store,openannotation/annotator-store,nobita-isc/annotator-store,happybelly/annotator-store,nobita-isc/annotator-store | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport dj_database_url\n\nDEBUG = True\nTEMPLATE_DEBUG = True\n\nSECRET_KEY = 'this is my secret key' # NOQA\n\nTEST_RUNNER = 'django.test.runner.DiscoverRunner'\n\nDATABASES = {\n 'default': dj_database_url.config(default='postgres:///... | python | edit | 1 | 0 | mit | f20966d6d29371f7bb947317ee1d93a470accd6e | SectorLabs/django-localized-fields,SectorLabs/django-localized-fields,SectorLabs/django-localized-fields | settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncpg\n\n\nclass Database:\n def __init__(self, host: str, port: int, user: str, password: str, database: str):\n self.host = host\n self.port = port\n self.user = user\n self.password = password\n ... | python | edit | 1 | 2 | apache-2.0 | 2f4483440a98f34b650ea09a75f6dc941548f8b2 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | zeus/vcs/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n# Copyright 2014-2018 PUNCH Cyber Analytics Group\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 obtai... | python | edit | 3 | 1 | apache-2.0 | d2fe3bbf4f97ef5ece4c6c69e531e261eeed75b1 | PUNCH-Cyber/stoq | stoq/plugins/archiver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Proselint applies advice from great writers to your writing.\"\"\"\nfrom . import tools\n\n__all__ = ['tools']\n\n```\n\nApply this change: Make __all__ immutable to stop pep257 from complaining."
},
{
"role": "assistant",
... | python | edit | 3 | 0 | bsd-3-clause | a30fa66345ab54b62af98fb428ce0cd4515525f6 | amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint | proselint/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nFEEDBACK_TYPES = (\n ('bug', 'Bug'),\n ('feature', 'Feature'),\n ('support', 'Support request'),\n)\n\nclass Feedback(mo... | python | edit | 1 | 1 | bsd-3-clause | 848a6b0fbca65679205ae47d130c7ff53c155f98 | gabrielhurley/django-user-feedback | feedback/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThe main beast.\n\"\"\"\n\nfrom lib.Mock_DotStar import Adafruit_DotStar\nimport time\n\nstrip = Adafruit_DotStar(88)\nstrip.begin()\nstrip.show()\n\ntry:\n while True:\n time.sleep(1)\n\nexcept KeyboardInterrupt:\n ## ... | python | edit | 1 | 0 | mit | 4516b3b47d77badccaa5da020a7ec34f2fe2a88e | dodgyrabbit/midi-light-py | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# weatherBot keys\n# Copyright 2015 Brian Mitchell under the MIT license\n# See the GitHub repository: https://github.com/bman4789/weatherBot\n\nimport os\n\nkeys = dict(\n consumer_key='... | python | edit | 7 | 5 | mit | c76be093ca2fe226d43e2f6ef908dfc7dbf1faf1 | bman4789/weatherBot,bman4789/weatherBot,BrianMitchL/weatherBot | keys.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file defines the types for type annotations.\n\nThese names aren't part of the module namespace, but they are used in the\nannotations in the function signatures. The functions in the module are only\nvalid for inputs that matc... | python | edit | 1 | 0 | mit | 8671a368cff459d5a00c5b43d330d084e2f6ed3d | numpy/numpy,mattip/numpy,charris/numpy,simongibbons/numpy,seberg/numpy,charris/numpy,anntzer/numpy,simongibbons/numpy,jakirkham/numpy,numpy/numpy,jakirkham/numpy,endolith/numpy,simongibbons/numpy,jakirkham/numpy,pdebuyl/numpy,rgommers/numpy,seberg/numpy,anntzer/numpy,endolith/numpy,mattip/numpy,numpy/numpy,seberg/numpy... | numpy/_array_api/_types.py | rejected_duplicate | Near-duplicate of sample 20342 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nExperiment(description='Deeper with two types of per and 5 full_iters for good measure',\n data_dir='../data/tsdlr/',\n max_depth=12, \n random_order=False,\n k=1,\n debug=False, \n ... | python | edit | 2 | 0 | mit | 419bf4377e2b26434e576ff07e540a818bb2c330 | jamesrobertlloyd/gpss-research,codeaudit/gpss-research,ekamioka/gpss-research,ElbaKramer/gpss-research,ElbaKramer/gpss-research,jamesrobertlloyd/gpss-research,jamesrobertlloyd/gpss-research,codeaudit/gpss-research,jamesrobertlloyd/gpss-research,ekamioka/gpss-research,ElbaKramer/gpss-research,ekamioka/gpss-research,code... | experiments/2013-09-08.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom s3v3 import *\nimport csv\n\ndef write_to_file(filename, data_sample):\n\texample = csv.writer(open(filename, 'w', encoding='utf-8'), dialect='excel') # example is the variable of the new file that is open and which we can write to (us... | python | edit | 3 | 1 | mit | 263ffc507d693854aec3fe826964b3c9031cdad8 | alexmilesyounger/ds_basics | s4v1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom django.core.management import setup_environ\n\nimport settings\nsetup_environ(settings)\n\nfrom django.db.utils import DatabaseError\n\nfrom django.db.transaction import rollback_unless_managed\nfrom django.db import mode... | python | edit | 4 | 4 | bsd-3-clause | c2aaf1f325ba44406acacd3935a4897c833dc16c | shearichard/django-row-tracker | django-row-tracker.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom locust import HttpUser, TaskSet, task, between\nfrom locust import events\n\n\n@events.init_command_line_parser.add_listener\ndef _(parser):\n parser.add_argument(\n '--custom-argument',\n help=\"It's working\"\n )\... | python | edit | 3 | 1 | mit | 9efd7f63f12affffb58b7e243777432a331e91f2 | mbeacom/locust,mbeacom/locust,locustio/locust,locustio/locust,mbeacom/locust,locustio/locust,locustio/locust,mbeacom/locust | examples/add_command_line_argument.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include\nfrom django.contrib import admin\n\nurlpatterns = patterns(\n '',\n (r'^admin/', include(admin.site.urls)),\n)\n\n```\n\nApply this change: Use url method instead of patterns in test URL... | python | edit | 1 | 0 | apache-2.0 | 2ce4e16979e095f1885f35cd767b0625dcd424c6 | kencochrane/django-defender,kencochrane/django-defender | defender/test_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.services.party.settings_service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom typing import Optional\n\nfrom ...typing ... | python | edit | 1 | 2 | bsd-3-clause | 0148b417a9ce8531383f2fb4e5500d9b32794f2c | homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | byceps/services/party/settings_service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nConvenience functions for in memory deduplication\n\"\"\"\n\nimport collections\nimport dedupe.core\n\n \n\ndef dataSample(data, sample_size):\n '''Randomly sample pairs of records... | python | edit | 5 | 4 | mit | 4bd9a94243ddc01d86ded2d592c339e464ec42fc | 01-/dedupe,tfmorris/dedupe,01-/dedupe,nmiranda/dedupe,datamade/dedupe,neozhangthe1/dedupe,pombredanne/dedupe,tfmorris/dedupe,datamade/dedupe,dedupeio/dedupe,nmiranda/dedupe,pombredanne/dedupe,davidkunio/dedupe,dedupeio/dedupe-examples,davidkunio/dedupe,neozhangthe1/dedupe,dedupeio/dedupe | dedupe/convenience.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport json\nimport requests\nfrom string import Template\n\nimport dateutil.parser\n\ndef posts_at_url(url):\n \n current_page = 1\n max_page = sys.maxint\n\n while current_page <= max_page:\n\n resp = reques... | python | edit | 3 | 4 | cc0-1.0 | 910c21778751e2814e649adf6f4db99378891ab1 | kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh | _lib/wordpress_post_processor.py | rejected_duplicate | Near-duplicate of sample 30 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Fetch CT Transit (Connecticut) feeds.\"\"\"\nimport logging\n\nfrom FeedSource import FeedSource\n\nLOG = logging.getLogger(__name__)\n\nBASE_URL = 'http://www.cttransit.com/uploads_GTFS/'\nSHORELINE_EAST_URL = 'http://www.shorelineea... | python | edit | 1 | 1 | mit | 2a37edaef3be06ab97bb1561b51d7977909e4abe | azavea/gtfs-feed-fetcher | feed_sources/CTTransit.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic import TemplateView\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\n\nfrom admin.base.settings import KEEN_CREDENTIALS\n\n\nfrom admin.base.utils import OSFAdmin\n\n\nclass MetricsView(OSFAdmin, Te... | python | edit | 1 | 1 | apache-2.0 | 5cf0e2e9d68d2e0fca3780608f33d5d8cdaef8a9 | erinspace/osf.io,adlius/osf.io,hmoco/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,cslzchen/osf.io,saradbowman/osf.io,icereval/osf.io,icereval/osf.io,leb2dg/osf.io,icereval/osf.io,sloria/osf.io,caseyrollins/osf.io,sloria/osf.io,Nesiehr/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,felliott/osf.io,monikagrabowska/osf.io,brian... | admin/metrics/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"Provide the standard Python string.Template engine.\"\"\"\n\nfrom __future__ import print_function\n\n\nfrom string import Template\n\nfrom . import Engine\n\n\nclass StringTemplate(Engine):\n\n \"\"\"String.... | python | edit | 1 | 5 | mit | d1917d20f3aa26380e1e617f50b380142905d745 | blubberdiblub/eztemplate | engines/string_template_engine.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nu\"\"\"\n🐴\n✔\n✘\n▏\n\"\"\"\nfrom django.shortcuts import render\nfrom django.shortcuts import get_object_or_404\nfrom django.views.generic.base import RedirectView\nfrom urllib.parse import quote\nfrom . import models\n\n\nclass BadgeView... | python | edit | null | null | mit | 72dcc89d96935ba4336ebafed5252628ecf92ed4 | django-stables/django-stables,django-stables/django-stables | stables/views.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom dal import autocomplete\n\nfrom .models import Course, Options\n\nclass OptionsForm(forms.ModelForm):\n \"\"\"\n A form solely used for autocomp... | python | edit | 1 | 1 | mit | 8b2f95dd8399d5c354769c860e2b955c3fe212b0 | afriestad/WikiLinks,afriestad/WikiLinks,afriestad/WikiLinks | semesterpage/forms.py | rejected_duplicate | Near-duplicate of sample 19555 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) Ivan Kravets <<EMAIL>>\n# See LICENSE for details.\n\nfrom sys import exit as sys_exit\n\nfrom click import echo, group, version_option\n\nfrom platformio_api import __version__\nfrom platformio_api.crawler import (process_p... | python | edit | 1 | 1 | apache-2.0 | 5455e9c0fa81eef47f57cab046a162e56a8b822c | platformio/platformio-api,orgkhnargh/platformio-api | platformio_api/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom reversion.admin import VersionAdmin\n\nfrom armstrong.core.arm_content.admin import fieldsets\nfrom .models import Article\n\n\nclass ArticleAdmin(VersionAdmin):\n fieldsets = (\n (None, {\n ... | python | edit | 1 | 0 | apache-2.0 | 0be6ab488b74d628229c54a42117f5e69497737b | armstrong/armstrong.apps.articles,armstrong/armstrong.apps.articles | armstrong/apps/articles/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# STANDARD LIB\nimport json\n\n#LIBRARIES\nfrom django.db import models\nfrom django.utils.html import escape\nfrom django.utils.safestring import mark_safe\n\n\nclass CSPReport(models.Model):\n\n class Meta(object):\n ordering = ... | python | edit | 1 | 1 | mit | b1bc34e9a83cb3af5dd11baa1236f2b65ab823f9 | adamalton/django-csp-reports | cspreports/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import reverse\n\nfrom rest_framework import serializers\n\nfrom .models import Tafseer, TafseerText\n\n\nclass TafseerSerializer(serializers.ModelSerializer):\n\n class Meta:\n model = Tafseer\n fields = [... | python | edit | 1 | 1 | mit | 5183ad354943e81787010e3f108b1e819b9f703d | EmadMokhtar/tafseer_api | quran_tafseer/serializers.py | rejected_duplicate | Near-duplicate of sample 726 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFilter submodule for libhxl.\nDavid Megginson\nStarted February 2015\n\nLicense: Public Domain\nDocumentation: https://github.com/HXLStandard/libhxl-python/wiki\n\"\"\"\n\nimport sys\nfrom hxl import HXLException\nfrom hxl.model imp... | python | edit | 6 | 3 | unlicense | a5d99bdff21c4819891d09d8b29800508929dcf4 | HXLStandard/libhxl-python,HXLStandard/libhxl-python | hxl/filters/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass RegistrationFields:\n repository = 'repository'\n job = 'job'\n labels = 'labels'\n requested_params = 'requested_params'\n branch_restrictions = 'branch_restrictions'\n change_restrictions = 'change_restrictions'\n ... | python | edit | 1 | 0 | mit | 7d5fa6a8eda793ff4cc2183992949a095d65c1b0 | futuresimple/triggear | app/enums/registration_fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals, division, absolute_import, print_function\n\nimport sys\nimport os\nimport subprocess\n\n\ndef launch_executable(executable, args, cwd, env=None):\n \"\"\"\n Launches an execut... | python | edit | 1 | 9 | mit | 7c4442099eb3d00f0c14381d1091e45daf8e9179 | codexns/newterm | all/newterm/_posix.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom wtforms import fields, widgets\n\n# Define wtforms widget and field\nclass CKTextAreaWidget(widgets.TextArea):\n\tdef __call__(self, field, **kwargs):\n\t\tkwargs.setdefault('class_', 'ckeditor')\n\t\thtml_st... | python | edit | 1 | 2 | mit | 319bdba73d0ccecb229454272bb9bb12c226335a | ptitoliv/cineapp,ptitoliv/cineapp,ptitoliv/cineapp | cineapp/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport django.forms\nfrom django.conf import settings\nfrom django.apps import apps\nfrom django.contrib.auth.forms import AuthenticationForm\nfrom django.contrib.admin.forms import AdminAuthentica... | python | edit | 1 | 2 | mit | a6e7f053c151fc343f0dd86010b159e21c0948b5 | foundertherapy/django-users-plus,foundertherapy/django-users-plus | accountsplus/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import views\nfrom rest_framework.response import Response\n\nfrom django import http\nfrom django.conf import settings\nfrom django.shortcuts import get_object_or_404\nfrom django.views.decorators.http import require_GE... | python | edit | 1 | 3 | apache-2.0 | 27c3b70967e36a6f419f089ba22e8394d39981e1 | aaxelb/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE | api/views/share.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bitHopper.Website import app, flask\nimport btcnet_info\nimport bitHopper.Configuration.Workers\n \n@app.route(\"/worker\", methods=['POST', 'GET'])\ndef worker():\n\n #Check if this is a form submission\n handle_worker_post(f... | python | edit | 1 | 5 | mit | df95ed08135b74eb29e2e20b11a2f3cbdc76e967 | c00w/bitHopper,c00w/bitHopper | bitHopper/Website/Worker_Page.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\nConstants used across the app.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\n# Some backends give more infos than others. Here is the precedence we want to\n# use. First is mos... | python | edit | 1 | 0 | mit | 376b327379caeb0845007c3a0e7c33e1f15869f0 | Phyks/Flatisfy,Phyks/Flatisfy,Phyks/Flatisfy,Phyks/Flatisfy | flatisfy/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# _*_coding:utf-8 _*_\n\"\"\"Test heap.\"\"\"\n\ndata = [1, 2, 3, 4]\n\n\ndef heap_init():\n \"\"\"Test heap init.\"\"\"\n from heap import Heap\n assert isinstance(Heap() == Heap)\n\n\ndef test_push():\n \"\"\"Test push method... | python | edit | 1 | 1 | mit | 84e2e931ea83c25154fbcf749c797faae19ba8af | regenalgrant/datastructures | src/test_heap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom optparse import make_option\nimport sys\nfrom django.core.management.base import BaseCommand\nfrom concept.models import Concept\n\nclass Command(BaseCommand):\n args = \"\"\n help = \"Update concept total_question counts (post d... | python | edit | 4 | 2 | bsd-3-clause | fe36e76dd7fcdc6249ccf36bfadcdbb909078536 | mfitzp/smrtr,mfitzp/smrtr | apps/concept/management/commands/update_concept_totals.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nfrom django.shortcuts import render\n# API v1\nfrom rest_framework import mixins, viewsets\nfrom rest_framework.permissions import AllowAny\n\nfrom apps.offline.models import Issue\nfrom apps.offline.serializers... | python | edit | 1 | 2 | mit | 4b65c5ac47ecbaec8e1578074d9650c342b294e5 | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | apps/offline/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.functional import cached_property\n\nfrom memoized import memoized\n\nfrom custom.inddex.food import FoodData\nfrom custom.inddex.ucr_data import FoodCaseData\nfrom custom.inddex.utils import BaseGapsSummaryReport\n\n\ncla... | python | edit | 1 | 4 | bsd-3-clause | 5ac83deb88c8ae34a361c9a5b60dcb16fea77b35 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | custom/inddex/reports/master_data_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom rest_framework import viewsets, mixins, routers\nfrom rest_framework.filters import SearchFilter, OrderingFilter\nfrom rest_framework.viewsets import GenericViewSet\n\nfrom... | python | edit | 1 | 1 | bsd-2-clause | d9b5a78b36729bdb3ce11c8626d00b57555fb356 | pinry/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry | core/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom feder.users import models\nimport factory\n\n\nclass UserFactory(factory.django.DjangoModelFactory):\n username = factory.Sequence(lambda n: 'user-{0}'.format(n))\n email = factory.Sequence(lambda n: 'user-{0}@example.com'.format... | python | edit | 1 | 0 | bsd-3-clause | c86d5c928cdefd09aca102b2a5c37f662e1426a6 | andresgz/cookiecutter-django,gappsexperts/cookiecutter-django,asyncee/cookiecutter-django,gappsexperts/cookiecutter-django,calculuscowboy/cookiecutter-django,aleprovencio/cookiecutter-django,ddiazpinto/cookiecutter-django,asyncee/cookiecutter-django,drxos/cookiecutter-django-dokku,thisjustin/cookiecutter-django,aleprov... | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/tests/factories.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\ndef save_logs(groomer, test_description):\n divider = ('=' * 10 + '{}' + '=' * 10 + '\\n')\n test_log_path = 'tests/test_logs/{}.log'.format(test_description)\n with open(test_log_path, 'w+') as test_log:\n te... | python | edit | 1 | 3 | bsd-3-clause | 67c90087bad42d54b44044c3d1afae02538c456f | CIRCL/PyCIRCLean,Rafiot/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean | tests/logging.py | rejected_duplicate | Near-duplicate of sample 12255 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\n\ndef command(triggers):\n def wrap(f):\n @functools.wraps(f)\n def inner(*args, **kwargs):\n return f(*args, **kwargs)\n\n inner.commands = triggers\n return inner\n\n return w... | python | edit | 2 | 2 | mit | b0e614ea7ac59b6b869155b9ac8ea370cb56f83d | BiohZn/Cardinal,JohnMaguire/Cardinal | cardinal/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os, sys\n\nfrom django.conf import settings\n\n\ndef runtests(*test_args):\n if not test_args:\n test_args = ['lockdown']\n parent = os.path.dirname(os.path.abspath(__file__))\n sys.path.inser... | python | edit | 1 | 2 | bsd-3-clause | 9d1a21e046bac48719e6f396a55489bffe631cf7 | Dunedan/django-lockdown,Dunedan/django-lockdown | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nimport sys\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"farnsworth.settings\")\nthis_dir = os.path.abspath(os.path.dirname(__file__))\nif this_dir not in sys.path:\n\tsys.path.insert(0, this_dir... | python | edit | 1 | 2 | bsd-2-clause | 98f638e5a42765a284a4fd006190507efee5363a | knagra/farnsworth,knagra/farnsworth,knagra/farnsworth,knagra/farnsworth | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version_info__ = ('1', '13', '3')\n__version__ = '.'.join(__version_info__)\n\nfrom .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper,\n BoundFunctionWrapper, WeakFunctionProxy, PartialCallableObjectProxy,\n ... | python | edit | 25 | 0 | bsd-2-clause | 147257537f1233759dd89a291d6e40b95450ed5e | GrahamDumpleton/wrapt,GrahamDumpleton/wrapt | src/wrapt/__init__.py | rejected_lint | Too many lint violations: 25 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pygame, sys\n\n\"\"\"\nA simple four in a row game.\n\nAuthor: Isaac Arvestad\n\"\"\"\nclass Game:\n def __init__(self):\n\n\n def update(self):\n \"Handle input.\"\n for event in pygame.event.get():\n ... | python | edit | 1 | 5 | mit | 2aac8cafc0675d38cabcc137d063de0119b3ff3d | isaacarvestad/four-in-a-row | game.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport requests\n\n\ndef input_file(filename):\n \"\"\"\n Read a file and return list of usernames.\n\n Assumes one username per line and ignores blank lines.\n \"\"\"\n with open(filename, 'r') as f:\n ... | python | edit | 1 | 4 | mit | 8858cf1f0b87026ce913a19c4e5df415409cfd79 | supermitch/streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,supermitch/streak-podium,jollyra/hubot-streak-podium | streak-podium/read.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom gevent import monkey\nmonkey.patch_all()\n\nimport uuid\n\nfrom kombu.mixins import ConsumerMixin\n\nfrom pubsub.backend.base import BaseSubscriber, BasePublisher\nfrom pubsub.helpers import get_config\nfrom pubsub.backend.handlers imp... | python | edit | 1 | 2 | mit | 00208e088ea62eb3c405e22f54a96e6e46869844 | WeLikeAlpacas/Qpaca,WeLikeAlpacas/python-pubsub,csarcom/python-pubsub | pubsub/backend/rabbitmq.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic import ListView, DetailView\n\nfrom .models import Planet, SolarSystem\n\n\nclass SystemMixin(object):\n model = SolarSystem\n def get_queryset(self):\n return super(SystemMixin, self).get_queryset().f... | python | edit | 1 | 1 | mit | 1acb0e5db755b0d4cc389ed32f740d7e65218a5e | Floppy/kepler-explorer,Floppy/kepler-explorer,Floppy/kepler-explorer | celestial/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by NotSqrt\n# Copyright (c) 2013 NotSqrt\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Cppcheck plugin class.\"\"\"\n\nfrom Sub... | python | edit | 1 | 0 | mit | dcd3e4f5ded298b79b40d16a9f0274752ed96ad1 | SublimeLinter/SublimeLinter-cppcheck,ftoulemon/SublimeLinter-cppcheck | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subprocess import call\nfrom os import makedirs\nfrom shutil import copy\n\n\ndef do_step(context):\n\n makedirs(\"bosh/manifests\")\n\n # Generate the private key and certificate\n call(\"sh create_cert.sh\", shell=True)\n ... | python | edit | 1 | 3 | apache-2.0 | b9f8012084a0f7faae4b1a820b25ceb93b29e04c | cf-platform-eng/bosh-azure-template,cf-platform-eng/bosh-azure-template | install_steps/create_bosh_cert.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef input_file(filename):\n \"\"\"\n Return username list, assuming on username per line.\n \"\"\"\n with open(filename, 'r') as f:\n return list(strip(x) for x in f)\n\ndef org_members(org_name):\n \"\"\"\n Return ... | python | edit | 1 | 3 | mit | ade031dc91d75de8ce290fa4b6652c2f46a3171e | supermitch/streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-commit-streak,jollyra/hubot-streak-podium,jollyra/hubot-streak-podium,supermitch/streak-podium | streak-podium/read.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom tools import check_cmd\n\ndef run_cyclus(cyclus, cwd, sim_files):\n \"\"\"Runs cyclus with various inputs and creates output databases\n \"\"\"\n\n for sim_input, sim_output in sim_files:\n ... | python | edit | 1 | 4 | bsd-3-clause | a2fef3f2090f0df5425cf21a70d24c77224eae17 | rwcarlsen/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,jlittell/cycamore,gonuke/cycamore,jlittell/cycamore,Baaaaam/cyCLASS,rwcarlsen/cycamore,Baaaaam/cyBaM,cyclus/cycaless,jlittell/cycamore,Baaaaam/cyBaM,rwcarlsen/cycamore,Baaaaam/cycamore,gonuke/cycamore,Baaaaam/cyBaM,gonuke/cycamore,cyclus/cycaless,rwcarlsen/cycamore,B... | tests/cyclus_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# http://www.openstreetmap.org/way/219071307\nassert_has_feature(\n 16, 10478, 25338, 'roads',\n { 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })\n\n# http://www.openstreetmap.org/way/258020271\nassert_has_featur... | python | edit | 5 | 0 | mit | 301a70469dba6fdfe8d72d3d70fa75e4146756c6 | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | integration-test/843-normalize-underscore.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport scipy.ndimage as ndim\nfrom skimage.filters import gaussian\nfrom skimage.morphology import convex_hull_image\n\ndef patch_up_roi(roi, sigma=0.5, truncate=2):\n \"\"\"\n After being non-linearly transformed, ROIs tend to have h... | python | edit | 1 | 1 | bsd-2-clause | f3668e36e93d990213c4c8ab1db6dea26328b4eb | yeatmanlab/pyAFQ,arokem/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ | AFQ/utils/volume.py | rejected_duplicate | Near-duplicate of sample 15142 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport os\n\nfrom tools import check_cmd\n\ndef run_cyclus(cyclus, cwd, sim_files):\n \"\"\"Runs cyclus with various inputs and creates output databases\n \"\"\"\n\n for sim_input, sim_output in sim_fil... | python | edit | 1 | 4 | bsd-3-clause | 7bf477f2ce728ed4af4163a0a96f9ec1b3b76d8d | Baaaaam/cyBaM,Baaaaam/cyBaM,Baaaaam/cyBaM,rwcarlsen/cycamore,rwcarlsen/cycamore,gonuke/cycamore,Baaaaam/cycamore,Baaaaam/cyBaM,jlittell/cycamore,rwcarlsen/cycamore,jlittell/cycamore,cyclus/cycaless,gonuke/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,gonuke/cycamore,jlittell/cycamore,Baaaaam/cycamore,gonuke/cycamore,cyclu... | tests/cyclus_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Util addons functions.\"\"\"\nimport hashlib\nimport pathlib\nimport re\nimport unicodedata\n\nRE_SLUGIFY = re.compile(r'[^a-z0-9_]+')\n\n\ndef slugify(text):\n \"\"\"Slugify a given text.\"\"\"\n text = unicodedata.normalize('N... | python | edit | 1 | 4 | bsd-3-clause | 9109e3803b139c349d17b9b413b0ff9d5b965b55 | pvizeli/hassio,pvizeli/hassio | hassio/addons/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport multiprocessing\nimport subprocess\nimport glob\nimport os\n\n\nif __name__ == \"__main__\":\n os.environ[\"MLTSP_TEST_DB\"] = \"1\"\n from mltsp.Flask import flask_app\n flask_app.db_init(force=True... | python | edit | 1 | 0 | bsd-3-clause | d0a02a8190d040eea3065a1141dbd41679c5eee3 | mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,acrellin/mltsp,bnaul/mltsp,mltsp/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,bnaul/mltsp,acrellin/mltsp,acrellin/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp | tools/casper_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport filecmp\nimport os\nimport tempfile\nimport unittest\n\nimport isomedia\n\nTESTDATA = os.path.join(os.path.dirname(__file__), 'testdata')\n\nclass TestSanity(unittest.TestCase):\n def test_sanity(self):\n mp4filename = os.p... | python | edit | 1 | 3 | mit | ad31b6f0226ecd642289f54ec649964aeb9b5799 | flxf/isomedia | tests/sanity_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport json\nfrom os import path\n\nimport pinder\n\nfrom twisted.words import service\n\nrooms = {}\nirc_users = {}\n\nif path.exists(path.expanduser('~') + '/.luckystrike/config.json'):\n with open(path.expanduser('~')... | python | edit | 1 | 0 | mit | 405c5cc9f88f3ea69f101ae36f3b3bf05b54a9eb | mmichie/luckystrike | luckystrike/config.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\nimport unittest\n\n\nclass ToHTMLTest(unittest.TestCase):\n SAMPLE = \"Проверяем *CommonMark*.\\n\\nВставляем `код`.\\nИ другие штуки.\"\n\n def setUp(self):\n ... | python | edit | 1 | 1 | bsd-3-clause | 4a32fe3b3735df9ec56a4ca1769268740ef5d8f4 | PavloKapyshin/paka.cmark,PavloKapyshin/paka.cmark,PavloKapyshin/paka.cmark | tests/test_to_html.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom cupy import cuda\nfrom cupy.testing import attr\n\n\n@unittest.skipUnless(cuda.nccl_enabled, 'nccl is not installed')\nclass TestNCCL(unittest.TestCase):\n\n @attr.gpu\n def test_single_proc_ring(self):\n ... | python | edit | 1 | 1 | mit | 005e7175f5fcd7e74637790e66e5cf46825195f6 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | tests/cupy_tests/cuda_tests/test_nccl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n# Targeted tests for decimal type.\n#\nimport logging\nimport pytest\nfrom copy import copy\nfrom tests.common.test_vector import *\nfrom tests.common.impala_t... | python | edit | 8 | 2 | apache-2.0 | a0c23b5c27c4209cc22e138c72173842664fa98a | AtScaleInc/Impala,placrosse/ImpalaToGo,ImpalaToGo/ImpalaToGo,gistic/PublicSpatialImpala,ImpalaToGo/ImpalaToGo,gistic/PublicSpatialImpala,rampage644/impala-cut,placrosse/ImpalaToGo,rampage644/impala-cut,ImpalaToGo/ImpalaToGo,gistic/PublicSpatialImpala,ImpalaToGo/ImpalaToGo,ImpalaToGo/ImpalaToGo,gistic/PublicSpatialImpal... | tests/query_test/test_decimal_queries.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"EJDB driver for Magpy.\nCurrently does not do much except support certain command line scripts.\n\"\"\"\nimport os\nimport pyejdb\n\n\nclass Database(object):\n \"\"\"Simple database connection for use in serverside scripts etc.\"\... | python | edit | 1 | 2 | bsd-3-clause | 0ac5a45c27b574c73d2660e96543220e274e1c64 | zeth/magpy,catsmith/magpy,zeth/magpy,catsmith/magpy | magpy/server/_ejdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyutrack import Connection\nfrom pyutrack import Credentials\nfrom pyutrack.errors import LoginError\nfrom tests.integration import IntegrationTest\n\n\nclass AuthenticationTests(IntegrationTest):\n def test_successful_authenticatio... | python | edit | 1 | 1 | mit | 620d59b82e8a5c98fd4568217c74b485f802ac94 | alisaifee/pyutrack,alisaifee/pyutrack | tests/integration/test_authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\nimport os.path\n\n\nDATABASES = {\n 'default': \n {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': os.path.join(SITE_ROOT, 'dev.db'),\n }\n... | python | edit | 4 | 0 | mit | 0a884d3c38cb1449a6fa5c650ed06cde647de4a8 | singingwolfboy/readthedocs.org,laplaceliu/readthedocs.org,kenwang76/readthedocs.org,hach-que/readthedocs.org,fujita-shintaro/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,raven47git/readthedocs.org,mhils/readthedocs.org,royalwang/readthedocs.org,johncosta/private-readthedocs.org,asampat3090/readthedocs.org,... | settings/sqlite.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom django.conf import settings\nfrom django.utils.timezone import utc\nfrom datetime import datetime\nfrom twitter import Twitter, OAuth\nfrom latest_tweets.models import Tweet\nfrom dj... | python | edit | 1 | 2 | bsd-3-clause | 2ef97402219107fc632196bb0a7e3d6de38e5888 | blancltd/django-latest-tweets | latest_tweets/management/commands/latest_tweets_update.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 os\nimport errno\nimport zipfile\nimport sys\nimport hashlib\n\ndef main():\n \n from urllib2 import Request, urlopen, HTTPError\n url_base = 'http://ethicssearch.dls.virgini... | python | edit | 6 | 5 | mit | 8a0f17eea757f2001ec9d9579a413ab852549d39 | openva/tavenner | tavenner.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom argparse import ArgumentParser\nimport logging\nfrom . import run_server\nfrom .handlers import SQLiteHandler\n\n\nparser = ArgumentParser(\n description=\"Run a standalone log server using a SQLite database.\")\nparser.add_argument... | python | edit | 1 | 0 | mit | 245a6b190c1ad3c5e380c5957d6b98593fdb4006 | mivade/logserver | logserver/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# flowtools_wrapper.py\n# Copyright 2014 Bo Bayles (<EMAIL>)\n# See http://github.com/bbayles/py3flowtools for documentation and license\n\nfrom __future__ import division, print_function, unicode_literals\n\nimport io\nimport os\nimport sy... | python | edit | 1 | 3 | mit | 14d170eece4e8bb105f5316fb0c6e672a3253b08 | bbayles/py3flowtools | py3flowtools/flowtools_wrapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime\n\ndef plugin_loaded():\n # Native package causes some conflicts.\n # Thanks https://github.com/SublimeText-Markdown/MarkdownEditing\n disable_native_php_package()\n\ndef disable_native_php_package():\n settings =... | python | edit | 1 | 2 | bsd-3-clause | 5b6bd6cacc7032bc6a830707374b1448861e5d08 | gerardroche/sublime-php-grammar,gerardroche/sublime-php-grammar | plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (C) 2011 by Florian Mounier, Kozea\n# This file is part of pystil, licensed under a 3-clause BSD license.\n\n\"\"\"Treat line data\"\"\"\n\n\nfrom pystil.data.utils import make_tim... | python | edit | 1 | 3 | bsd-3-clause | 76e766998984da126de4cb6121c07690fbdeeba1 | Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil | pystil/data/graph/line.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n#\n# Copyright 2013 david reid <<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 ... | python | edit | 3 | 3 | unlicense | 268467c5eb12e92a031d22e3e0515e9d6fc264b7 | zathras777/pywind,zathras777/pywind | ofgem_certificates.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom .utils import *\n\n\nVERSION = (0, 5,)\n\n```\n\nApply this change: Fix setup.py for installs without Django"
},
{
"role": "assistant",
"content": "from __future__ import absolute_i... | python | edit | 2 | 0 | bsd-2-clause | 695b3f628b56cd1dbe050f07692559ff3685290c | TyMaszWeb/django-template-finder | templatefinder/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom thecure.levels.base import *\nfrom thecure.levels.cliff import Cliff\nfrom thecure.levels.overworld import Overworld\n\n\ndef get_levels():\n return [Cliff]\n #return [Overworld, Cliff]\n\n```\n\nApply this change: Set the overwo... | python | edit | 2 | 1 | mit | a764e58549284b8af1b3978676b8ee121fd918e3 | chipx86/the-cure | thecure/levels/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport nbrmd\nimport pytest\n\n@pytest.mark.parametrize('nb_file', ['ioslides.Rmd', 'chunk_options.Rmd'])\ndef test_identity_write_read(nb_file):\n \"\"\"\n Test that writing the notebook with ipynb, and read again, yields identify\n ... | python | edit | 1 | 1 | mit | 8d604d20562c8e90a938986976715e165aa98a53 | mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext,mwouts/jupytext | tests/test_rmd_to_ipynb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport os\nimport subprocess\n\n\nPUBLIC_URL = \"https://frida.re\"\nBUCKET_URI = \"s3://frida.re\"\nMAX_PURGES_PER_REQUEST = 30\n\n\ndef main():\n repo_path = os.path.dirname(os.path.dirname(os.path.realpath(__fi... | python | edit | 1 | 3 | mit | 9b239f3484f3ec3e03ad1fda2a76d35852f662e6 | frida/frida-website,frida/frida-website,frida/frida-website | _releng/deploy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf8\n\nfrom uuid import uuid4 as uuid\n\nimport pytest\npymongo = pytest.importorskip('pymongo')\n\nfrom simplekv.db.mongo import MongoStore\nfrom basic_store import BasicStore\n\n\nclass TestMongoDB(BasicSt... | python | edit | 1 | 1 | mit | fa42219c1e6763f3adfc1f6ede4080f769e476a6 | fmarczin/simplekv,karteek/simplekv,mbr/simplekv,mbr/simplekv,fmarczin/simplekv,karteek/simplekv | tests/test_mongo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sys import argv\n\nfrom axiom.store import Store\nfrom entropy.store import ImmutableObject\nfrom entropy.util import getAppStore\n\n\ndef moveObjects(appStore, start, limit=1000):\n obj = None\n for obj in appStore.query(\n ... | python | edit | 3 | 4 | mit | e3545cf444aea043fa892caeaff5a66ce893a0bb | fusionapp/entropy | misc/move-objects.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2.5\n#\n# Copyright 2008 the Melange authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licen... | python | edit | 1 | 1 | apache-2.0 | b19568c85458ac04b902dc03010e2d50177477e1 | MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging | tests/test_utils.py | rejected_duplicate | Near-duplicate of sample 12547 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport requests\nimport json\nimport sys\nimport argparse\n\nparser = argparse.ArgumentParser('Queries Monorail to get the services and deployNotes where a list of Pull requests will be deployed')\nparser.add_argume... | python | edit | 10 | 0 | mit | bff9e9c8c72be580bca4d82abf2d7931379f8ebf | AudienseCo/monorail,AudienseCo/monorail | scripts/get_services_to_deploy.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nscope = \"AuditImplied\"\ndes... | python | edit | 1 | 0 | apache-2.0 | b1382e380016c9034826b090540275ce2bbe3a95 | jmakov/ggrc-core,plamut/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,josthk... | src/ggrc_basic_permissions/roles/ProgramAuditReader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport sys\nfrom collections import namedtuple\n\nfrom .connection import connect, Connection\nfrom .cursor import Cursor\nfrom .pool import create_pool, Pool\n\n\n__all__ = ('connect', 'create_pool', 'Connection', 'Cursor', 'Poo... | python | edit | 1 | 3 | bsd-2-clause | 8773f652a1cf78299e3dd5ba9296ca2a50143caa | eirnym/aiopg,graingert/aiopg,hyzhak/aiopg,aio-libs/aiopg,luhn/aiopg,nerandell/aiopg | aiopg/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nExceptions\n~~~~~~~~~~\n\n\"\"\"\nfrom .constants import HTTPStatus\nfrom .resources import Error\n\n\nclass ImmediateHttpResponse(Exception):\n \"\"\"\n A response that should be returned immediately.... | python | edit | 1 | 1 | bsd-3-clause | 44191360586beeec04a4abc8a4aa262bc5ec052d | python-odin/odinweb,python-odin/odinweb | odinweb/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom timeit import timeit\ndef sum_even_fibonacci_numbers_1():\n f1, f2, s, = 0, 1, 0,\n while f2 < 4000000:\n f2, f1 = f1, f1 + f2\n if f2 % 2 == 0:\n s += f2\n return s\ndef sum_even_fibonacci_numbers_2()... | python | edit | 3 | 3 | mit | c09465f6f5d70789ca01470015985cbbdb465db9 | mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler | problem_2/solution.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bokeh.charts import HeatMap, output_file, show\nfrom bokeh.sampledata.unemployment1948 import data\n\n# pandas magic\ndf = data[data.columns[:-2]]\ndf2 = df.set_index(df[df.columns[0]].astype(str))\ndf2.drop(df.columns[0], axis=1, inpl... | python | edit | 1 | 0 | bsd-3-clause | d0e7d3578fe79432ad2b2cc62be2203d4ff36014 | abele/bokeh,laurent-george/bokeh,azjps/bokeh,josherick/bokeh,rs2/bokeh,timsnyder/bokeh,draperjames/bokeh,matbra/bokeh,ptitjano/bokeh,DuCorey/bokeh,awanke/bokeh,akloster/bokeh,xguse/bokeh,stonebig/bokeh,KasperPRasmussen/bokeh,phobson/bokeh,stonebig/bokeh,CrazyGuo/bokeh,ericmjl/bokeh,rhiever/bokeh,caseyclements/bokeh,rox... | examples/charts/file/cat_heatmap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Solver:\n def solve(self, start_number):\n recipient = 1\n remaining = start_number\n power = 1\n while remaining > 1:\n new_remaining = remaining // 2\n remaining_was_odd = remaini... | python | edit | 1 | 4 | mit | a612a245937781e86391e5c3ec8a740f36b405ce | tmct/adventOfCode2016 | problems/19/Solver.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom dialogos.models import Comment\n\nclass CommentAdmin(admin.ModelAdmin): \n list_display = ['author', 'content_type', 'public']\n list_filter = ['public', 'content_type']\n\nadmin.site.register(C... | python | edit | 1 | 0 | mit | a7c5c9d27d29e14ebb2d314890b40eab318501ac | pinax/pinax-comments,rizumu/dialogos,GeoNode/geonode-dialogos,eldarion/dialogos,georgedorn/dialogos,pinax/pinax-comments | dialogos/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Views for events application.\"\"\"\n\nfrom django.views import generic\nfrom django.utils.timezone import now\nfrom events.models import (\n Event,\n Location,\n)\n\n\nclass HomeView(generic.TemplateView):\n \"\"\"View for e... | python | edit | 1 | 1 | mit | 7ae151e277d2cb03037d40e1598b190ba4736433 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/events/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ..constants import FORMAT_CHECKS\nfrom ..post import HEADER_OPTIONAL_FIELD_TYPES, HEADER_REQUIRED_FIELD_TYPES\nfrom ..postprocessor import KnowledgePostProcessor\n\n\nclass FormatChecks(KnowledgePostProcessor):\n _registry_keys = [F... | python | edit | 1 | 4 | apache-2.0 | 834349fc6cc2f6d281f03f339dab116b897615fc | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | knowledge_repo/postprocessors/format_checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask.ext.wtf import Form\nfrom wtforms import SelectField, BooleanField, IntegerField, TextField, \\\n validators\n\n\nclass TeamForm(Form):\n number = IntegerField(\"Number\", [validators.Required(),\n ... | python | edit | 1 | 3 | mit | 33f47fc9aff361d0cea9557e6470d505a352e5f0 | rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy | forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nfrom api.citations import views\n\nurlpatterns = [\n url(r'^$', views.CitationList.as_view(), name=views.CitationList.view_name),\n url(r'^(?P<citation_id>\\w+)/$', views.CitationDetail.as_view(), n... | python | edit | 1 | 0 | apache-2.0 | 5ab34396d4f494f884ddf98fb993bcf1b928216e | mattclark/osf.io,chennan47/osf.io,rdhyee/osf.io,alexschiller/osf.io,mluo613/osf.io,HalcyonChimera/osf.io,TomBaxter/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,mfraezz/osf.io,caneruguz/osf.io,crcresearch/osf.io,sloria/osf.io,adlius/osf.io,caseyrollins/osf.io,monikagrabowska/osf.io,caseyrollins/osf.io,brianjgeiger/osf.io,i... | api/citations/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# Code Fights Knapsack Problem\n\n\ndef knapsackLight(value1, weight1, value2, weight2, maxW):\n if weight1 + weight2 <= maxW:\n return value1 + value2\n else:\n return max([v for v, w in zip((va... | python | edit | 1 | 4 | mit | 10655be79d9ab65f86939d0bd085197e0e35b39d | HKuz/Test_Code | CodeFights/knapsackLight.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDebug Blueprints.\n\"\"\"\nfrom flask import Blueprint, current_app, redirect, jsonify, url_for\n\ndebug_pages = Blueprint('debug', __name__)\n\n\n@debug_pages.route(\"/clear_all\")\ndef clear_all():\n mongo = current_app.mongo\n... | python | edit | 1 | 2 | mit | d1afc8b673595accb854639b311bbdd49be56022 | ShinNoNoir/likelines-player,ShinNoNoir/likelines-player,ShinNoNoir/likelines-player | server/LikeLines/debug.py | rejected_duplicate | Near-duplicate of sample 17459 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport os, sys\nimport pwd\n\nif os.geteuid():\n print >> sys.stderr, \"Script must be run as root to manipulate permissions\"\n sys.exit(1)\n\nfrom conary import dbstore\nfrom mint import config\n\napacheGid = pw... | python | edit | 4 | 0 | apache-2.0 | 5d2110059731069a6a29a31d2b9f02bb2743e90b | sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint | scripts/cleanup-images.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import redirect\n\n\nclass RegisterMiddleware(object):\n \"\"\"Middleware to enforce users to comp... | python | edit | 1 | 6 | bsd-3-clause | eabc02aed1cd5a109554f48bfb82f185e392c404 | flamingspaz/remo,akatsoulas/remo,mozilla/remo,Mte90/remo,flamingspaz/remo,akatsoulas/remo,Mte90/remo,Mte90/remo,flamingspaz/remo,mozilla/remo,akatsoulas/remo,tsmrachel/remo,tsmrachel/remo,akatsoulas/remo,tsmrachel/remo,tsmrachel/remo,mozilla/remo,flamingspaz/remo,Mte90/remo,mozilla/remo | remo/base/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools.command.egg_info import egg_info\nimport subprocess\nimport time\n\nclass EggInfoFromGit(egg_info):\n \"\"\"Tag the build with git commit timestamp.\n\n If a build tag has already been set (e.g., \"egg_info -b\", build... | python | edit | 1 | 2 | apache-2.0 | 08a7389e5be0d3f7a9e6c4e12b13f82da50480b1 | chapmanb/cwltool,brainstorm/common-workflow-language,curoverse/common-workflow-language,chapmanb/cwltool,hmenager/common-workflow-language,common-workflow-language/cwltool,foreveremain/common-workflow-language,StarvingMarvin/common-workflow-language,jeremiahsavage/cwltool,foreveremain/common-workflow-language,satra/com... | reference/gittaggers.py | rejected_duplicate | Near-duplicate of sample 14750 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\n\nimport logging\n\nfrom api.settings import CeleryTasks, Intervals\nfrom api.celery_api import app as celery_app\nfrom experiments.tasks import buil... | python | edit | 1 | 5 | apache-2.0 | 3059f6448e0fc2dd49ad38306f8efedc734b3aab | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | api/projects/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/pyton\n\n# Copyright 2011 Lockheed Martin\n\n'''\nCreated on Mar 17, 2011\n\nBase model class for learning registry data model\n\n@author: jpoyau\n'''\n\n\nfrom base_model import createBaseModel, ModelParser, defaultCouchServe... | python | edit | 6 | 1 | apache-2.0 | 82796dfb24c3e65b669d4336948e76e2a64cf73f | jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningR... | LR/lr/model/node_service.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport getopt\n\nfrom ctl import HavenCtl\n\ndef print_version():\n import pkg_resources # part of setuptools\n version = pkg_resources.require(\"havenctl\")[0].version\n print(version)\n\ndef print_usage():\n print... | python | edit | 4 | 7 | apache-2.0 | dcd97762b65df37b5f7c4724892ab76bb631762f | fintler/tomatodb,fintler/tomatodb,fintler/tomatodb | src/havenctl/havenctl/launcher.py | rejected_lint | Too many lint violations: 4 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.