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# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE... | python | edit | 1 | 0 | apache-2.0 | 56471d264671b652b4b40619f709dc6b8e02eac1 | openstack/dragonflow,openstack/dragonflow,openstack/dragonflow | dragonflow/db/models/host_route.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Contains a lot of one-offs that aren't easy to deal with.\nimport logging\nimport Hand\ndef reset():\n global overload, resources, combo, turn, turnOffset, us, them, numMinions\n overload = 0\n resources = '0' # Relevant for Wild... | python | edit | 1 | 4 | apache-2.0 | b323d60597038d4a7ac5698f704907ef5bd87489 | jbzdarkid/HearthstonePro | Utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cryptol import cryptoltypes\nfrom cryptol.bitvector import BV\nimport saw\nfrom saw.proofscript import *\n\nimport unittest\nfrom pathlib import Path\n\n\ndef cry(exp):\n return cryptoltypes.CryptolLiteral(exp)\n\nclass ProverTest(u... | python | edit | 14 | 2 | bsd-3-clause | 14414263ef7578ec0c710e99de0f62c49319c6be | GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script | saw-remote-api/python/tests/saw/test_provers.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\ntests for host state\n'''\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing libs\nfrom tests.support.case import ModuleCase\n\n\nclass HandleErrorTest(ModuleCase):\n ''... | python | edit | 1 | 4 | apache-2.0 | dbe7c01ed649abb1cbd8efe07a6633951cb1943e | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/states/test_handle_error.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Many built-in types have built-in names\nassert(type(5) == int)\nassert(type(True) == bool)\nassert(type(5.7) == float)\nassert(type(9 + 5j) == complex)\nassert(type((8, 'dog', False)) == tuple)\nassert(type('hello') == str)\nassert(type(... | python | edit | 1 | 1 | mit | 2e1f4ffa667bcff2c10caf64be345f3e8619232f | rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal... | python/simple_types.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nfrom functools import wraps\nfrom django_statsd.clients import statsd\n\nlogger = logging.getLogger(__name__)\n\n\ndef task_timer(fn):\n @wraps(fn)\n d... | python | edit | 1 | 2 | apache-2.0 | 5d21ad5ae63addac0892242fe774250a2934fc87 | snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx | awx/lib/metrics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom lib.test_config import AUTH_CREDS as AUTH_CREDS_orig\n\nallargs = (('SHA-512-256', 'SHA-256', 'MD5', 'MD5-sess'), \\\n ('SHA-512-256', 'SHA-256', 'SHA-256-sess', 'MD5'), \\\n ('SHA-512-256', 'SHA-512-256-sess', 'SHA-256', 'MD5')) \\\... | python | edit | 1 | 1 | bsd-2-clause | 61b9a0e69b2db362e526bd3312e0e47609a42fad | sippy/voiptests,sippy/voiptests | scenarios/UAC/bob_cfg.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport threading\nimport time\n\nclass SensorThread(object):\n\n def __init__(self, notify, delay=0):\n self.notify = notify\n self.delay = delay\n self.interval = 1\n self.distance = -1\n\n def start(self,... | python | edit | 2 | 3 | bsd-2-clause | 50c877733f052ce7235ee193d5c8ba88a266df60 | legorovers/legoflask,legorovers/legoflask,legorovers/legoflask | app/sense.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fileupload.models import Picture\nfrom django.views.generic import CreateView, DeleteView\n\nfrom django.http import HttpResponse\nfrom django.utils import simplejson\nfrom django.core.urlresolvers import reverse\n\nfrom django.conf im... | python | edit | 1 | 1 | mit | 643c60364266c9015b919a39ff8f0807e6138efc | Imaginashion/cloud-vision,extremoburo/django-jquery-file-upload,minhlongdo/django-jquery-file-upload,extremoburo/django-jquery-file-upload,Imaginashion/cloud-vision,Imaginashion/cloud-vision,extremoburo/django-jquery-file-upload,vaniakov/django-jquery-file-upload,vaniakov/django-jquery-file-upload,madteckhead/django-jq... | fileupload/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport configparser\nimport optparse\nfrom blo import Blo\n\nif __name__ == '__main__':\n parser = optparse.OptionParser(\"usage: %prog [option] markdown_file.md\")\n parser.add_option(\"-c\", \"--config\", de... | python | edit | 1 | 0 | mit | 5b215758adab39923399db98b5975fc76d389472 | 10nin/blo,10nin/blo | __init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\nfrom datetime import datetime\n\nfrom dateutil.relativedelta import relativedelta\nimport requests\n\nlogin_url = 'http://bukkesprangetnatur.barnehage.no/LogOn'\nics_url = ('http://bukke... | python | edit | 1 | 2 | mit | 432323eaf442db41d6486841168c159732d8dfe0 | asmundg/bhgcal | bhgcal/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cPickle\nfrom os.path import dirname\nfrom os.path import join\n\nimport numpy as np\n\n\ndef load_letters():\n \"\"\"Load the OCR letters dataset.\n\n This is a chain classification task.\n Each example consists of a word, ... | python | edit | 1 | 3 | bsd-2-clause | c3bb6f173478419662aa96b2378fa459c0a4ed6a | massmutual/pystruct,massmutual/pystruct,amueller/pystruct,wattlebird/pystruct,pystruct/pystruct,d-mittal/pystruct,pystruct/pystruct,amueller/pystruct,wattlebird/pystruct,d-mittal/pystruct | pystruct/datasets/dataset_loaders.py | rejected_duplicate | Near-duplicate of sample 79 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass DirTreeFilter(object):\n def __init__(self, show_hidden=False, show_files=True, show_dirs=True):\n self.show_hidden = show_hidden\n self.show_files = show_files\n self.show_dirs = show_dirs\n self.hidden... | python | edit | 1 | 9 | mit | 6672a0634265e09366a9274d3c2a04afca49cf02 | shaurz/devo | dirtree_filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"\nUnit tests for essential functions in postgresql backup.\n\"\"\"\nfrom unittest.mock import MagicMock, mock_open, patch\nimport pytest\nimport smdba.postgresqlgate\n\n\nclass TestPgBackup:\n \"\"\"\n Test suit... | python | edit | 3 | 1 | mit | eb1568e9baf3d60a8d1e3ea59c49d54dc7b34437 | SUSE/smdba,SUSE/smdba | tests/test_pgbackup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import TextAreaField, StringField, SelectField, BooleanField\nfrom wtforms.validators import InputRequired, Optional, Length\n\nclass PostForm(Form):\n title = StringField('제목', validators=[InputR... | python | edit | 1 | 0 | mit | 357fc83908fe09da2c69be78afdae9f1cf5c4b0d | heejongahn/hjlog,heejongahn/hjlog,heejongahn/hjlog,heejongahn/hjlog | hjlog/forms/post.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.apps import AppConfig\n\nfrom django.utils.module_loading import autodiscover_modules\n\n\nclass NapConfig(AppConfig):\n '''App Config that performs auto-discover on ready.'''\n\n def ready(self):\n super(NapConfi... | python | edit | 1 | 1 | bsd-3-clause | 550106fbff26c16cdf2269dc0778814c05ed1e3b | MarkusH/django-nap,limbera/django-nap | nap/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom __future__ import absolute_import\nfrom copy import deepcopy\n\nfrom django.db import models\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom django_filters import filterset\nfrom .filters im... | python | edit | 1 | 2 | bsd-3-clause | b3839c72a831589dd707b38ae2088fd4b304faa1 | alex/django-filter,alex/django-filter | django_filters/rest_framework/filterset.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\npipeline_functions = {}\n\n\ndef register_pipeline(function):\n if function.__name__ in pipeline_functions:\n raise ExistingFunctionError(\n '%s is already registered with %s.%s' % (\n function.__name__, ... | python | edit | 1 | 2 | bsd-2-clause | b1196e347129e79bd616cc572714982be6739d3c | johnbachman/belpy,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra | indra/pipeline/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom pylons import request, response, session, tmpl_context as c, url\nfrom pylons.controllers.util import abort, redirect\n\nimport porick.lib.helpers as h\nfrom porick.lib.auth import authorize\nfrom porick.lib.base impo... | python | edit | 8 | 5 | apache-2.0 | 14398ec42c0d31d577278d8748b0617650f91775 | kopf/porick,kopf/porick,kopf/porick | porick/controllers/create.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom PIL import Image, ImageDraw\nimport face_recognition\n\n# Load the jpg file into a numpy array\nimage = face_recognition.load_image_file(\"biden.jpg\")\n\n# Find all facial features in all the faces in the image\nface_landmarks_list = ... | python | edit | 1 | 0 | mit | 99bd91cac200f9e83ee710ac8758fd20ac1febfa | ageitgey/face_recognition | examples/find_facial_features_in_picture.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport sys\nimport json\n\n# Count average speeds for links\n\ndef main(locationdata_dictionary_file):\n\n locationdata = {}\n with open(locationdata_dictionary_file, \"r\") as dictionary_file:\n locationdata... | python | edit | 3 | 6 | mit | b69bf4dd6e9c1d8b9133c2a8f2b18ac8d41f3145 | gofore/aws-emr,gofore/aws-emr,gofore/aws-emr,gofore/aws-emr | src/streaming-programs/car-average-speeds.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport gate\n\n\nclass EventAttributionUnit:\n \"\"\"event, attribution must be gate.Annotation objects\n \"\"\"\n def __init__(self, event, attribution):\n self._event = event\n self._attribution = attribution\n ... | python | edit | 1 | 3 | mit | 5293a24bc2ab6a3aa1c9fc98d857c79548509356 | nickwbarber/HILT-annotations | explanatory_style.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext as _\n\n\n@python_2_unic... | python | edit | 3 | 1 | bsd-2-clause | 6ee4cd2ace969365a4898e3f89944e8ddbdca1c8 | synasius/wolme | wolme/wallet/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#%%\nfrom pathlib import Path, PurePath\nfrom string import digits\n\ndirectory = Path(\"./docs/tutorial/src\")\ndirs = sorted([Path(f) for f in directory.iterdir()])\nd: PurePath\nsufix = \"__out__\"\nfor d in dirs:\n if d.name.endswith... | python | edit | 3 | 0 | mit | e9f2a3c29185466f1c92121e9f4e4b727fb20fd0 | tiangolo/fastapi,tiangolo/fastapi,tiangolo/fastapi | scripts/rename_tutorial_src_files.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# python3\n# Copyright 2020 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License... | python | edit | 1 | 1 | apache-2.0 | 0998953838a36cec14ab356d13e84732fb02167a | GoogleCloudPlatform/ml-pipeline-generator-python,GoogleCloudPlatform/ml-pipeline-generator-python | examples/tf/demo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import path\nfrom .views import LTILaunchView, LTIToolConfigView, logout_view, logged_out_view\n\nurlpatterns = [\n path('', LTILaunchView.as_view(), name='index'),\n path('launch', LTILaunchView.as_view(), name='laun... | python | edit | 1 | 0 | bsd-3-clause | f22fa6d0c1b7e3bde95554f87af7254c2c381c41 | Harvard-ATG/django-app-lti | django_app_lti/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\nfrom simpleflow import (\n activity,\n Workflow,\n futures,\n)\n\n\n@activity.with_attributes(task_list='quickstart', version='example')\ndef increment(x):\n return x + 1\n\n\n@activity.with_attributes(task_list='... | python | edit | 2 | 1 | mit | 4563ad431102bd578582dfd6af41fe68ac7c6c26 | botify-labs/simpleflow,botify-labs/simpleflow | examples/basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport markdown\nimport os\nfrom flask import render_template, url_for, redirect, Markup\nfrom app.main import main\nfrom flask_login import login_required\n\nfrom flask.ext.login import current_user\nfrom mdx_gfm import GithubFlavoredMarkd... | python | edit | 1 | 3 | mit | bd0a572faf851ee01177c44fc2fe64770ab4f38a | alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin | app/main/views/index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.views.decorators.csrf import csrf_exempt\n\n\ndef get_work(request):\n return HttpResponse('Not implemented')\n\n\n@csrf_exempt\ndef work_completed(request):\n return HttpResponse('Not... | python | edit | 1 | 1 | mit | aa10d2c0d49fd28afcda2b67f969fdb4a1d3072b | dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,dimk... | backend/breach/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nPACKAGES = [\n {\n 'name' : 'core-elements',\n 'package_dependenci... | python | edit | 1 | 0 | bsd-3-clause | 6908fb4f5796e0b2f44ce93f54227f3873bb9a9b | eunchong/build,eunchong/build,eunchong/build,eunchong/build | masters/master.client.dart.packages/packages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Schedule(models.Model):\n minute = models.CharField(_('minute'), max_length=64, default='*')\n hour = models.CharField(_('hour'), max_len... | python | edit | 1 | 3 | bsd-3-clause | 804edb8d7423ee882e483bec8ffe551a168602b4 | praekelt/django-messaging-contentstore,praekelt/django-messaging-contentstore | contentstore/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os, sys\nfrom operator import itemgetter\n\ndef errorExit(msg):\n sys.stderr.write(msg)\n sys.exit(1)\n\ndef main():\n # Verify arguments\n if len(sys.argv) != 2: \n errorExit(\"Usage: {} FILE\\n\".format(os.path.b... | python | edit | 1 | 5 | apache-2.0 | b235ae762adb76fe9835d98f7e2a4fc3d92db251 | jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules | src/util/sortLargeFIs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.template.base import TemplateSyntaxError\nimport hashlib\nfrom django_hash_filter.templatetags import get_available_hashes\n\nregister = templ... | python | edit | 2 | 3 | mit | 924bee7b0a8b11aa0f1506584966533924d29478 | andrewjsledge/django-hash-filter | django_hash_filter/templatetags/hash_filter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Enthought library imports.\nfrom enthought.traits.api import Dict, HasStrictTraits, Instance, List, Str, \\\n Tuple\n\n# Local imports.\nfrom task_layout import TaskLayout\n\n\nclass TaskWindowLayout(HasStrictTraits):\n \"\"\" A pi... | python | edit | 1 | 3 | bsd-3-clause | 3075a10c56fb38611134aa15c06b6da8cc777868 | brett-patterson/pyface,pankajp/pyface,geggo/pyface,geggo/pyface,enthought/traitsgui | enthought/pyface/tasks/task_window_layout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport asyncio\nimport functools\nimport typing\nfrom typing import Any, AsyncGenerator, Iterator\n\ntry:\n import contextvars # Python 3.7+ only.\nexcept ImportError: # pragma: no cover\n contextvars = None # type: ignore\n\n\nasy... | python | edit | 1 | 3 | bsd-3-clause | 0f7853c3568791f0e93ece57d2fc750dbc93b963 | encode/starlette,encode/starlette | starlette/concurrency.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix bug '__init__' showing in list of cities"
},
{
"role": "assistant",
"content": "def file_is_allowed(file):\n return file.endswith(\".py\") and \"__Init__\" not in file.title() and \"Sample_City\" not in file.title()\n"
}... | python | new_file | 1 | 3 | mit | c430aa52d22cb2aa97fa11b225047f5b52fa5326 | offenesdresden/ParkAPI,Mic92/ParkAPI,offenesdresden/ParkAPI,Mic92/ParkAPI | security.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nExtension attribute table type. Supports ordered (struct) fields, or\nunordered (hash-based) fields.\n\"\"\"\n\nfrom numba.typesystem import *\nfrom numba.typesystem.exttypes import ordering\n\n#----------... | python | edit | 1 | 3 | bsd-2-clause | 52c7efbe7f9a24f568768fb926f487a276a47f51 | gmarkall/numba,sklam/numba,GaZ3ll3/numba,stonebig/numba,IntelLabs/numba,IntelLabs/numba,GaZ3ll3/numba,cpcloud/numba,GaZ3ll3/numba,seibert/numba,GaZ3ll3/numba,gdementen/numba,gdementen/numba,sklam/numba,cpcloud/numba,stuartarchibald/numba,stuartarchibald/numba,shiquanwang/numba,stefanseefeld/numba,shiquanwang/numba,Inte... | numba/typesystem/exttypes/attributestype.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Load base config and export package constants.\"\"\"\nimport logging\nfrom configparser import ConfigParser\nfrom os.path import expanduser\n\nLOG = logging.getLogger(__name__)\n\n\ndef find_config():\n \"\"\"Look for config in con... | python | edit | 1 | 2 | apache-2.0 | c7ed2e94f10b680eef9942f2bda1d246f11595c5 | gogoair/foremast,gogoair/foremast | src/foremast/consts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Check files for incorrect newlines\n\nimport fnmatch, os\n\ndef check_file(fname):\n for n, line in enumerate(open(fname, \"rb\")):\n if \"\\r\" in line:\n print \"%s@%d: CR found\" % (fname, n)\n return\n\... | python | edit | 2 | 6 | apache-2.0 | 663f44e94c22f8ac889a1d7608e6ab0e3cbf9ad3 | larsbutler/coveragepy,jayhetee/coveragepy,nedbat/coveragepy,blueyed/coveragepy,hugovk/coveragepy,7WebPages/coveragepy,nedbat/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,larsbutler/coveragepy,hugovk/coveragepy,nedbat/coveragepy,jayhetee/coveragepy,hug... | checkeol.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | python | edit | 1 | 1 | apache-2.0 | bcc3a4e4c8b3117deea4c7621653f65b588537f9 | mahak/keystone,openstack/keystone,openstack/keystone,mahak/keystone,openstack/keystone,mahak/keystone | keystone/common/policies/token_revocation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nrequests Kerberos/GSSAPI authentication library\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRequests is an HTTP library, written in Python, for human beings. This library\nadds optional Kerberos/GSSAPI authentication support... | python | edit | 6 | 0 | isc | 251e13b96ed10e48b69ccf5d625d673a5507f222 | requests/requests-kerberos,AbsoluteMSTR/requests-kerberos,rbcarson/requests-kerberos,requests/requests-kerberos,danc86/requests-kerberos | requests_kerberos/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cli_helpers.packages import tabulate\nfrom .preprocessors import bytes_to_string, align_decimals\n\ntabulate.PRESERVE_WHITESPACE = True\n\nsupported_markup_formats = ('mediawiki', 'html', 'latex', 'latex_booktabs',\n ... | python | edit | 1 | 2 | bsd-3-clause | 1e6fcb134f55cb70ddd394a051a86c45aa50c944 | dbcli/cli_helpers,dbcli/cli_helpers | cli_helpers/tabular_output/tabulate_adapter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nURL path mapping for our Django app.\n\"\"\"\nfrom django.conf.urls import url\n\nfrom . import views\nfrom .settings import URL_MAX_WORDS\n\nurlpatterns = [\n url(r'^/*$', views.index, name='squeezer-index'),\n]\n\n# match every... | python | edit | 1 | 0 | mit | a0d79fac86d77de6c7ce9f76b269c18dc0972482 | bittner/django-domain-squeezer,bittner/django-domain-squeezer | domain_squeezer/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest.mock import Mock, patch\nfrom django.test import TestCase\nfrom data_refinery_common import microarray\n\nCEL_FILE_HUMAN = \"test-files/C30057.CEL\"\nCEL_FILE_RAT = \"test-files/SG2_u34a.CEL\"\nCEL_FILE_MOUSE = \"test-files/97... | python | edit | 4 | 1 | bsd-3-clause | 9ba9e26888578e66469a63e412f46cf151fbcfd7 | data-refinery/data_refinery,data-refinery/data_refinery,data-refinery/data_refinery | common/data_refinery_common/test_microarray.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright [2009-2014] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License ... | python | edit | 1 | 0 | apache-2.0 | d330925b8e1f559bb16f75cca25ce583ccaa7f90 | RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode | rnacentral/rnacentral/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, include, url\n\nfrom boundaryservice.views import *\n\nurlpatterns = patterns('',\n url(r'^boundary-set/$', BoundarySetListView.as_view(), name='boundaryservice_set_list'),\n url(r'^boun... | python | edit | 12 | 0 | mit | 42518bb29357194257b45989f9c64028f27ac804 | opencorato/represent-boundaries,opencorato/represent-boundaries,datamade/represent-boundaries,opencorato/represent-boundaries,datamade/represent-boundaries,datamade/represent-boundaries | boundaryservice/urls.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom mopidy import config, ext\n\n__version__ = \"1.2.1\"\n\n\nclass Extension(ext.Extension):\n\n dist_name = \"Mopidy-Scrobbler\"\n ext_name = \"scrobbler\"\n version = __version__\n\n def get_default_config(self)... | python | edit | 1 | 1 | apache-2.0 | 95cfb8176432fcf289571026ebfb88626ad8b3fb | mopidy/mopidy-scrobbler | mopidy_scrobbler/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nGet the best JSON encoder/decoder available on this system.\n\"\"\"\n\n__version__ = \"0.1\"\n__author__ = \"Rune Halvorsen <<EMAIL>>\"\n__homepage__ = \"http://bitbucket.org/runeh/anyjson/\"\n__docformat__ = \"restructuredtext\"\n\... | python | edit | 1 | 0 | bsd-3-clause | 8c00c71de736c54c22fedfae86101eb99846ba4f | newvem/anyjson,kennethreitz-archive/anyjson | anyjson.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n# Copyright (c) 2012 Rackspace\n# flake8: noqa\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 t... | python | edit | 1 | 0 | apache-2.0 | b4d97079b6a74e9a2001b50c66b9eee6bc57ba66 | krnflake/python-hubicclient,varunarya10/python-swiftclient,jeseem/python-swiftclient,JioCloud/python-swiftclient,sohonetlabs/python-swiftclient,pratikmallya/python-swiftclient,iostackproject/IO-Bandwidth-Differentiation-Client,JioCloud/python-swiftclient,openstack/python-swiftclient,pratikmallya/python-swiftclient,varu... | swiftclient/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom IPython.config.loader import Config\nfrom IPython.config.application import catch_config_error\nfrom IPython.utils.traitlets import Unicode\nfrom nbgrader.apps.customnbconvertapp import CustomNbConvertApp\n\nclass SolutionApp(CustomNbC... | python | edit | 3 | 1 | bsd-3-clause | 4706d6feaff7057d04def0544e291900a754558e | ellisonbg/nbgrader,jupyter/nbgrader,modulexcite/nbgrader,ellisonbg/nbgrader,modulexcite/nbgrader,jupyter/nbgrader,ellisonbg/nbgrader,dementrock/nbgrader,jdfreder/nbgrader,jupyter/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,MatKallada/nbgrader,dementrock/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,alope107/nbgrader,a... | nbgrader/apps/solutionapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\r\n\r\nfrom SALib.analyze import delta\r\nfrom SALib.util import read_param_file\r\nimport numpy as np\r\n\r\n\r\nsys.path.append('../..')\r\n\r\n\r\n# Read the parameter range file and generate samples\r\n# Since this is \"given... | python | edit | 1 | 0 | mit | 4aab1eb2d2d3a0c9b9c4ab6df23b043e6822ff84 | jdherman/SALib,SALib/SALib,jdherman/SALib | examples/delta/delta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.db import models\n\nfrom .widgets import MarkdownTextarea\n\n\nclass MarkdownFormField(forms.fields.CharField):\n def __init__(self, *args, **kwargs):\n kwargs['widget'] = MarkdownTextarea\n ... | python | edit | 1 | 1 | mit | 23a9aaae78cc4d9228f8d0705647fbcadcaf7975 | moccu/django-markymark,moccu/django-markymark,moccu/django-markymark | markymark/fields.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#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.\n#The license can also be read onli... | python | edit | 1 | 1 | cc0-1.0 | 20733c6b3d3bc249098297a73341f56e781aabbe | Ghostkeeper/Luna | plugins/storage/storagetype/test/test_integration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mysolr import Solr\n\nfrom magpie.settings import settings\n\n\n_solr = None\n\n\ndef open_solr_connection(core_name):\n global _solr\n if not _solr:\n url = '{}/{}'.format(settings.SOLR_URL, core_name)\n _solr = So... | python | edit | 1 | 2 | apache-2.0 | eff924e07999bd0aaaa36373c658efb1ffefe5c7 | nimiq/moogle-project | magpie/utils/solr.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pickle\n\n\nclass PersonDb(object):\n def __init__(self, dbName, autoload = True):\n self.dbName = dbName\n self.db = None\n if autoload:\n self.setup()\n\n def setup(self):\n self.db = Pe... | python | edit | 1 | 3 | mit | 8d831e4834b61c04b3f5f2d8a812095eea8c022f | matejd11/birthdayNotify | personDb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\n\nclass Application(object):\n def __init__(self, startup_args={}):\n self._state = None\n self._states = {}\n self._mspf = None # ms per frame\n\n @property\n def state(self):\n return se... | python | edit | 1 | 4 | mit | 1771e1d37f48c62dc20c3a83e480b98cb7c4500c | pkulev/xoinvader,pankshok/xoinvader | xoinvader/application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8\n\nimport pytest\n\nfrom reindex_shard_config import create_reindex_shard\n\n\n@pytest.mark.parametrize(\n 'source_name, source_id, expected_reindex_shard', [\n ('sierra', 'b0000001', 'sierra/2441'),\n ('miro'... | python | edit | 1 | 1 | mit | 2e299c5c2a35d3cd42be43c90af41c28e5d27c15 | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | reindexer/reindex_shard_generator/src/test_reindex_shard_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Utility functions for dealing with repository and geo data.\"\"\"\n\nfrom incf.countryutils import transformations\nimport babel\n\n# Hacky dictionary of official country/languages names\n# we want to substitute for friendlier version... | python | edit | 7 | 10 | mit | 77bfe0b92e9bc8ffa23f91a4a9b18093ae8f5f8a | mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections | ehriportal/portal/utils.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This tests long ints for 32-bit machine\n\na = 0x1ffffffff\nb = 0x100000000\nprint(a)\nprint(b)\nprint(a + b)\nprint(a - b)\nprint(b - a)\n# overflows long long implementation\n#print(a * b)\nprint(a // b)\nprint(a % b)\nprint(a & b)\npri... | python | edit | 1 | 0 | mit | 42901554db49cd1204054ea695cea6ee4e368b1e | jmarcelino/pycom-micropython,cwyark/micropython,puuu/micropython,rubencabrera/micropython,lbattraw/micropython,warner83/micropython,skybird6672/micropython,methoxid/micropystat,blmorris/micropython,alex-march/micropython,rubencabrera/micropython,dxxb/micropython,firstval/micropython,ahotam/micropython,TDAbboud/micropyt... | tests/basics/int-long.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pylint: disable=C1001\nclass Config():\n CELERY_BROKER_URL = ''\n SQLALCHEMY_ECHO = False\n SECRET_KEY = ''\n TESTING = False\n DEBUG = False\n\n\nclass ConfigDevelopment(Config):\n SQLALCHEMY_ECHO = True\n DEBUG = Tr... | python | edit | 1 | 0 | mit | 98ba566742bb6c4be1783287843183242d48bd41 | kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com | gitmostwanted/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport os\n\nimport sys\n\ndef main(trn_file, phn_dir):\n phone_map = {v[0]: v[1].strip() for v in (l.split(None, 1) for l in open('data/phone_map', encoding='utf-8'))}\n\n for line in open(trn_file):\n ... | python | edit | 1 | 12 | bsd-3-clause | ea46030784640d86a70c382ece7913eeb0996ba9 | phsmit/iwclul2016-scripts,phsmit/iwclul2016-scripts,phsmit/iwclul2016-scripts | 01_dataprep/trn_to_phn.py | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\nfrom __future__ import unicode_literals\n\nfrom common import FieldExam\nfrom marrow.mongo.field import Date\n\n\nclass TestDateField(FieldExam):\n\t__field__ = Date\n\n```\n\nApply this change: Add test for extraction ... | python | edit | 1 | 1 | mit | 03ad5a9e31127828ce7f14de61af80af20362624 | marrow/mongo | test/field/test_date.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport os.path\n\nfrom scripttest import TestFileEnvironment\n\n\ndef test_persists_data():\n env = TestFileEnvironment()\n # FIXME path to fridge script should be determined in some other way\n env.run('../../bin/fridge... | python | edit | 1 | 1 | mit | aaf776b94416b63a0da6dfeca6ea04f6fe32d201 | jgosmann/fridge,jgosmann/fridge | systemtests/test_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom vod_metadata.md5_checksum import *\nfrom vod_metadata.media_info import *\nfrom vod_metadata.parse_config import *\nfrom vod_metadata.VodPackage import *\n\n(extensions,\n MediaInfo_path,\n product,\n provider_id,\n prefix,\n title_cat... | python | edit | 6 | 0 | mit | b21f540ca7b53aeb569f7034de41da0dc4dd7b03 | bbayles/vod_metadata | __init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\nclass Die(object):\n def __init__(self, sides = 6):\n self.sides = sides\n self.held = False\n self.die_face = 1\n def change_held(self, held):\n self.held = held\n def roll_die(self):\n ... | python | edit | 1 | 2 | mit | d676065cb9f137c5feb18b125d0d30dfae4e0b65 | achyutreddy24/DiceGame | Dice.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom __future__ import absolute_import\nimport six\n\nfrom py_trace_event... | python | edit | 1 | 1 | bsd-3-clause | f691b8d997327a09824881810cf1edaeb53d7579 | catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult | telemetry/telemetry/internal/backends/app_backend.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom scenario import run_scenario\n\ndef main(args=None):\n\n if args is None:\n args = sys.argv[1:]\n \n assert len(args) == 2, 'Usage: python -m foo <executable> <scenario>'\n\n executable_path = args[0]\n... | python | edit | 1 | 2 | mit | 1fe88c1a619211a93297e1081133017ff2ef0370 | shlomihod/scenario,shlomihod/scenario,shlomihod/scenario | scenario/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport ast\nfrom functions import quit\nfrom encryption import encrypt, decrypt\n\nglobal name\nglobal key\ndef setOfflineUsername(_name, _key):\n global name\n global key\n name = _name\n key = _key\n\n\... | python | edit | 4 | 4 | mit | 342f2a948ba88d6c67c003457923b135234088a0 | regexpressyourself/passman | JSON.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport mock\n\nfrom mopidy_spotify import Extension, backend as backend_lib\n\n\nclass ExtensionTest(unittest.TestCase):\n\n def test_get_default_config(self):\n ext = Extension()\n\n config = ext.get_def... | python | edit | 1 | 1 | apache-2.0 | 33394f4081880c2718f1c017fb90588628c2bfcc | jodal/mopidy-spotify,kingosticks/mopidy-spotify,mopidy/mopidy-spotify | tests/test_extension.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\nclass ModifiableModel(models.Model):\n created_at = models.DateTimeField(verb... | python | edit | 2 | 4 | mit | 326ae45949c2ee4f53e9c377582313155d9d0b70 | vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi | kk/models/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nfrom random import uniform\nfrom typing import Callable, Optional\n\n\nclass Retry:\n def __init__(self, total: int = 3, backoff_factor: float = 0.2, jitter: float = 0.2) -> None:\n self.total = total\n self.__... | python | edit | 1 | 4 | mit | 69d2620ee64d367331edcf0260c73034384aae8e | thombashi/subprocrunner,thombashi/subprocrunner | subprocrunner/retry.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\nimport six\nimport django\nfrom django.db import models\n\ntry:\n from django.urls import reverse\nexcept ImportError:\n from django.core.urlresolvers import reverse\n\nif django.VERSION >= (1, 10):\n from django.ut... | python | edit | 3 | 3 | bsd-3-clause | 8ea896e3290d441e6025822cc4e67b2fd86c3a8c | python-social-auth/social-app-django,python-social-auth/social-app-django,python-social-auth/social-app-django | social_django/compat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Download handlers for different schemes\"\"\"\n\nfrom twisted.internet import defer\nfrom scrapy.exceptions import NotSupported, NotConfigured\nfrom scrapy.utils.httpobj import urlparse_cached\nfrom scrapy.utils.misc import load_objec... | python | edit | 1 | 4 | bsd-3-clause | 65734594816b158bdf08b93244795b5dcc8626ba | heamon7/scrapy,redapple/scrapy,Partoo/scrapy,ArturGaspar/scrapy,fpy171/scrapy,AaronTao1990/scrapy,fafaman/scrapy,agreen/scrapy,aivarsk/scrapy,Bourneer/scrapy,w495/scrapy,1yvT0s/scrapy,curita/scrapy,dhenyjarasandy/scrapy,rdowinton/scrapy,Allianzcortex/scrapy,zackslash/scrapy,ashishnerkar1/scrapy,AaronTao1990/scrapy,kmik... | scrapy/core/downloader/handlers/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAcquisitionRecord: database interface class.\n\nThese classes provide an interface between the database and the top-level\ningest algorithm (AbstractIngester and its subclasses). They also provide\nthe implementation of the database... | python | edit | 1 | 1 | apache-2.0 | c85631d77cd25de520688666a3d0e72537e482eb | ama-jharrison/agdc,GeoscienceAustralia/agdc,jeremyh/agdc,sixy6e/agdc,jeremyh/agdc,smr547/agdc,smr547/agdc,alex-ip/agdc,sixy6e/agdc,GeoscienceAustralia/agdc,alex-ip/agdc,ama-jharrison/agdc | acquisition_record.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nCreated on Fri Mar 14 15:25:36 2014\n\n@author: ibackus\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport datetime\nimport sys\n\nif len(sys.argv) < 2:\n \n print 'USAGE: walltim... | python | edit | 9 | 0 | mit | a6ae05c13666b83a1f1a8707fe21972bd1f758d9 | ibackus/custom_python_packages,trquinn/custom_python_packages | walltime.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_ehrcorral\n----------------------------------\n\nTests for `ehrcorral` module.\n\"\"\"\n\nimport unittest\n\nfrom ehrcorral import ehrcorral\n\n\nclass TestEhrcorral(unittest.Te... | python | edit | 4 | 2 | isc | 2dbd2d385e821cee9a8bc8414bfba71c8b4dbc06 | nsh87/ehrcorral | tests/test_ehrcorral.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom pyIEM import iemdb\nimport re\ni = iemdb.iemdb()\nmydb = i[\"mesosite\"]\n\nrs = mydb.query(\"select s.id, c.name from stations s, counties c WHERE \\\n s.geom && c.the_geom and s.county IS NULL\").dictresult()\n\nfor i in range(len... | python | edit | 2 | 0 | mit | 692a6d4480e917ff2648bac7ac4975f981e4c571 | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | scripts/util/assignCounty.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Box:\n def __init__(self, length, width, height):\n self.length = length\n self.width = width\n self.height = height\n self.plist = list()\n\n\ndef main():\n N = input()\n box = list()\n for i i... | python | edit | 1 | 3 | mit | 4783f7047500865da06202a7d6d777801cf49c71 | hane1818/Algorithm_HW4_box_problem | Box.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom api import views\n\nurlpatterns = [\n url(r'^services/$', views.services, name='api-services'),\n url(r'^collect/$', views.collect_response, name='api-collect'),\n url(r'^search/text/... | python | edit | 1 | 0 | apache-2.0 | ea4949dab887a14a0ca8f5ffbcd3c578c61c005e | AudioCommons/ac-mediator,AudioCommons/ac-mediator,AudioCommons/ac-mediator | api/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\n\nimport requests\n\n\nclass APIWrapper(object):\n\n def __init__(self, base_url=None, auth_token=None):\n\n if base_url:\n self.base_url = base_url\n else:\n self.base_url = \"... | python | edit | 1 | 3 | mit | ea15b51ad444eeca3fdbc9eeb30fb8434ec3bfbd | conormag94/pyscores | pyscores/api_wrapper.py | rejected_duplicate | Near-duplicate of sample 8612 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''Search all our doc comments for \"Example\" blocks and try executing them.'''\nimport re\nimport sourcer\n\n\ndef run_examples(package):\n pattern = re.compile(r'''\n (\\s*) # initial indent\n Example # magic key... | python | edit | 3 | 6 | mit | c4db09cd2d4dac37afcf75d5cf4d8c8f881aac2d | jvs/sourcer | tests/test_examples.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tornado.httpserver\nimport tornado.ioloop\nimport tornado.web\n\nfrom tornado.options import define, options\n\nfrom settings import *\n\n\nclass MainHandler(tornado.web.RequestHandler):\n def get(self):\n self.write(\"Hell... | python | edit | 4 | 1 | mit | 2c4e93844c1b704e3435816737a6cfda624ff7b7 | pistonsky/pistonskybot | bot.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom random import randint\n\nfrom flask import Flask, request, render_template, url_for, redirect\nfrom pyhipku import encode\n\n\napp = Flask(__name__)\n\n\n@app.route('/<current_ip>')\nde... | python | edit | 1 | 4 | mit | 69a294d2a7aeab592dfa08e42423d8741aeb3828 | lord63/pyhipku_web,lord63/pyhipku_web | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nimport subprocess\nfrom config import repos\n\napp = Flask(__name__)\n\n@app.route(\"/\", methods=['GET'])\ndef hello():\n current_repo = repos.get('key')\n remote_name = current_repo('remote_name')\n remot... | python | edit | 1 | 1 | mit | 3d48732d577514d888ba5769a27d811d55fd9979 | Heads-and-Hands/pullover | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom mock import Mock\nfrom nose.tools import eq_\n\nfrom cg.context import Context, ContextFactory\n\nclass TestContextFactory(o... | python | edit | 1 | 1 | mit | 98a6b04b83843861003862d835b3a2f6f2364506 | jstasiak/python-cg,jstasiak/python-cg | tests/context_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nfrom nose.tools import istest, assert_equal\n\nfrom whack.sources import PackageSourceFetcher\nfrom whack.tempdir import create_temporary_dir\nfrom whack.files import read_file, write_file\n\n\n@istest\ndef c... | python | edit | 1 | 1 | bsd-2-clause | 377beee13a8cd0ca23f8f2e37dd2816571721921 | mwilliamson/whack | tests/sources_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#pylint: disable=W0104,W0108\nimport pytest\nimport pyop\n\nimport numpy as np\n\n\n#######################################################################\n# Tests #\n##########... | python | edit | 1 | 1 | bsd-3-clause | 21193559b063e85f26971d5ae6181a0bd097cda3 | ryanorendorff/pyop | tests/utilities_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\nimport sys\n\n# This bit of evil should inject third_party into the path for relative imports.\nsys.path.append(os.path.dirname(__file__))\n\n```\n\nApply this change: Insert third_party into the second slot of sys.path rath... | python | edit | 1 | 0 | apache-2.0 | bcc0fbf9d8dd75b776c6a2137975912bcd0831d5 | nishad/namebench,jimb0616/namebench,cah0211/namebench,iamang/namebench,tcffisher/namebench,HerlonNascimento/namebench,RomanHargrave/namebench,tectronics/namebench,llaera/namebench,renatogames2/namebench,bluemask2001/namebench,Bandito43/namebench,ran0101/namebench,cloudcache/namebench,deepak5/namebench,thanhuwng/nameben... | third_party/__init__.py | rejected_duplicate | Near-duplicate of sample 4239 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Tests for the Hamiltonian method.\"\"\"\n\nimport pytest\nfrom numpy.testing import assert_allclose\n\nfrom parameters import KPT, T_VALUES\n\n\n@pytest.mark.parametrize(\"kpt\", KPT)\n@... | python | edit | 1 | 2 | apache-2.0 | aaae301f62b4e0b3cdd5d1756a03b619a8f18222 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | tests/test_hamilton.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nimport os\nimport tempfile\nimport unittest\n\nfrom matplotlib.pyplot import Artist, savefig\nfrom shapely.geometry import Polygon, LineString, Point\n\nfrom geopandas import GeoSeries\n\n\n@contextman... | python | edit | 5 | 2 | bsd-3-clause | 08730308134d0a15be996e8e7bb1a19bc1930f12 | jorisvandenbossche/geopandas,jorisvandenbossche/geopandas,jdmcbr/geopandas,koldunovn/geopandas,ozak/geopandas,maxalbert/geopandas,IamJeffG/geopandas,ozak/geopandas,geopandas/geopandas,fonnesbeck/geopandas,kwinkunks/geopandas,geopandas/geopandas,geopandas/geopandas,jorisvandenbossche/geopandas,urschrei/geopandas,snario/... | tests/test_plotting.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport winbrew\n\nclass Openssl(winbrew.Formula):\n url = 'http://www.openssl.org/source/openssl-1.0.1f.tar.gz'\n homepage = 'http://www.openssl.org'\n sha1 = ''\n build_deps = ()\n deps = ()\n\n def install(self):\n ... | python | edit | 1 | 1 | mit | 331060f37841dccbd8974f01c063dc1b5c112121 | mfichman/winbrew | formula/openssl.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom time import gmtime, strftime\nfrom foaas import foaas\nfrom diaspy_client import Client\n\nimport re\nimport urllib2\n\nclient = Client()\nnotify = client.notifications()\nfor n in notify:\n if not n.unread: ... | python | edit | 4 | 0 | mit | 552ea94c9fe2a42a8041d986e929b7defcdc4a4e | Zauberstuhl/foaasBot | bot.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This file is part of python-markups test suite\n# License: BSD\n# Copyright: (C) Dmitry Shachnev, 2012-2015\n\nimport markups\nimport unittest\n\nclass APITest(unittest.TestCase):\n\tdef test_api(self):\n\t\tall_markups = markups.get_all_... | python | edit | 1 | 1 | bsd-3-clause | a6a4c2920abd099a97839584b96af10dcd25afe2 | mitya57/pymarkups,retext-project/pymarkups | tests/test_public_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python \n\n# Display authors which appear as contributors in both (two) repositories.\n\n\nimport os,sys\n\ndef usage():\n\tprint 'Show authors which appear in two git repositories.'\n\tprint 'python2 git-author-comm.py [path... | python | edit | 6 | 1 | mit | 69ec55e0a6b4d314eb1381afc09236a5aa01d3d8 | baykovr/toolbox,baykovr/toolbox,baykovr/toolbox,baykovr/toolbox,baykovr/toolbox | util/git-author-comm.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom ..download import download, get_compatibility, get_version, check_error_depr\nimport pytest\n\n\ndef test_download_fetch_compatibility():\n compatibility = get_compatibilit... | python | edit | 1 | 1 | mit | 0e533ad0cc42431a57758b577cf96783ee4b7484 | oroszgy/spaCy.hu,oroszgy/spaCy.hu,aikramer2/spaCy,spacy-io/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,oroszgy/spaCy.hu,raphael0202/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,raphael0202/spaCy,... | spacy/tests/test_download.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .generic import Generic\n\n\nclass Powershell(Generic):\n def app_alias(self, fuck):\n return 'function ' + fuck + ' { \\n' \\\n ' $fuck = $(thefuck (Get-History -Count 1).CommandLine);\\n' \\\n ... | python | edit | 1 | 2 | mit | 4669a033ee4fbde5e3c2447778657a20a73d5df8 | Clpsplug/thefuck,scorphus/thefuck,nvbn/thefuck,nvbn/thefuck,scorphus/thefuck,mlk/thefuck,Clpsplug/thefuck,mlk/thefuck,SimenB/thefuck,SimenB/thefuck | thefuck/shells/powershell.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n# Copyright (c) 2002-2016 \"Neo Technology,\"\n# Network Engine for Objects in Lund AB [http://neotechnology.com]\n#\n# This file is part of Neo4j.\n#\n# Licensed under the Apache License,... | python | edit | 7 | 0 | apache-2.0 | 2e88154eb9ea86bcf686e3cf4c92d5b696ec6efc | neo4j/neo4j-python-driver,neo4j/neo4j-python-driver | neo4j/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#Cards Against Humanity game engine\n\nclass CAHGame:\n def __init__(self):\n \n self.status = \"Loaded CAHGame.\"\n \n #flag to keep track of whether or not game is running... | python | edit | 3 | 1 | mit | cee291799e9aa19e23593b3618a45f7cee16d0ed | tcoppi/scrappy,tcoppi/scrappy,johnmiked15/scrappy,johnmiked15/scrappy | modules/cah/CAHGame.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"GCloud API access in idiomatic Python.\"\"\"\n\n\n__version__ = '0.02.2'\n\n```\n\nApply this change: Read module version from setup.py"
},
{
"role": "assistant",
"content": "\"\"\"GCloud API access in idiomatic Python.\"\... | python | edit | 1 | 0 | apache-2.0 | 82f2fb3c3956e4ad4c65b03b3918ea409593d4ef | googleapis/google-cloud-python,blowmage/gcloud-python,thesandlord/gcloud-python,calpeyser/google-cloud-python,CyrusBiotechnology/gcloud-python,waprin/gcloud-python,VitalLabs/gcloud-python,waprin/google-cloud-python,jonparrott/google-cloud-python,Fkawala/gcloud-python,tswast/google-cloud-python,waprin/gcloud-python,dher... | gcloud/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\n\ndef random_line(afile, max_chars = 123, min_chars = 5):\n line = next(afile)\n for num, aline in enumerate(afile):\n aline = aline.strip()\n if (len(aline) < min_chars or aline[0].islower() or len(aline)... | python | edit | 1 | 6 | mit | 7654d9dcebb0ad1e862e376b5b694234173289ed | kuzeko/Twitter-Importer,kuzeko/Twitter-Importer | twitter_helper/util.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.