messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport logging\nfrom datetime import datetime\nfrom dateutil.parser import parse\n\nfrom website.settings import ADDONS_AVAILABLE\nfrom website.app import init_app\nfrom website.settings import KEEN as keen_settings\nfrom keen.c... | python | edit | 1 | 4 | apache-2.0 | 4068605116cb04b999c66d29056c88cf2c4ab46c | pattisdr/osf.io,saradbowman/osf.io,binoculars/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,mattclark/osf.io,cslzchen/osf.io,chrisseto/osf.io,acshi/osf.io,mfraezz/osf.io,acshi/osf.io,CenterForOpenScience/osf.io,monikagrabowska/osf.io,sloria/osf.io,aaxelb/osf.io,caseyrollins/osf.io,monikagrabowska/osf.io,Johnetordoff/os... | scripts/analytics/addon_count.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n\n name='sgevents',\n version='0.1-dev',\n description='A simplifying Shotgun event daemon',\n url='http://github.com/westernx/sgevents',\n \n packages=find_packages(e... | python | edit | 1 | 0 | bsd-3-clause | 3faffe4188c33147199a7c189407d10ce3af8ab5 | westernx/sgevents,westernx/sgevents | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='mailosaur',\n version='3.0.2',\n description='Python client library for Mailosaur',\n url='https://mailosaur.com',\n author='Mailosaur Ltd',\n author_email='<EMAIL>',\n ... | python | edit | 1 | 0 | mit | cced850df75679de3fbdf92856baf060202d9449 | mailosaurapp/mailosaur-python,mailosaur/mailosaur-python,mailosaur/mailosaur-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport sys, os\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.rst')).read()\nexcept IOError:\n README = ''\n\nversion = \"0.0.1a2\"\n\... | python | edit | 3 | 0 | mit | 6bb1c15243d04acf8980a21720f6577d73e2f4b0 | TurboGears/backlash,TurboGears/backlash | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom aldryn_search.base import AldrynIndexBase\nfrom aldryn_search.utils import strip_tags\nfrom django.template import RequestContext\nfrom haystack import indexes\n\nfrom .models import Question\n\n\nclass QuestionIndex(AldrynIndexBase, i... | python | edit | 1 | 3 | bsd-3-clause | 9995a3bb8b95caddc6319e68f405c70fd2a15d09 | czpython/aldryn-faq,czpython/aldryn-faq,mkoistinen/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq | aldryn_faq/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport re\n\nfrom setuptools import find_packages, setup\n\n\nwith open('py_mstr/__init__.py', 'rb') as f:\n version = str(re.search('__version__ = \"(.+?)\"', f.read().decode('utf-8')).group(1))\n\n\nsetup(\n ... | python | edit | 1 | 0 | mit | df095a5d08a9ffa7b54be946b19f356cc3201819 | infoscout/py-mstr | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport platform\nfrom SCons.Script import AddOption, GetOption\n\nSYSTEMS = dict(Linux = \"linux\",\n\t Darwin = \"osx\",\n\t Windows = \"windows\")\n\n\nsystem = str(platform.system())\nif not system in SYSTEMS:\n\ts... | python | edit | 1 | 2 | apache-2.0 | b999c9a9bbd8052771ade80bad14f8aef2bef58b | StatisKit/StatisKit,StatisKit/StatisKit | conda/python-scons/system.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\n\n\ndef coroutine(fn):\n def wrapper(*args, **kwargs):\n generator = fn(*args, **kwargs)\n next(generator)\n return generator\n\n return wrapper\n\n\nclass CollectionPipelineProcessor:\n sink ... | python | edit | 3 | 3 | mit | 082bcfefddb4ba566e35e827d9e726aacdfb80d6 | povilasb/pycollection-pipelines | collection_pipelines/core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\ntry:\n from account.decorators import login_required\nexcept ImportError:\n from django.contrib.auth.decorators import login_required\n\nfrom .views import (\n CancelView,\n ChangeCa... | python | edit | 1 | 0 | mit | 1975aeb06a85d8983a3815ffd89076af66d61561 | pinax/django-stripe-payments | payments/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport olrcdb\nimport os\n\n# Globals\nCOUNT = 0\n\n\nclass FileParser(object):\n '''Object used to parse through a directory for all it's files. Collects\n the paths of all the files and stores a record of these in a new ... | python | edit | 1 | 3 | bsd-3-clause | 32508dea4ef00fb54919c0260b7ba2902835faf5 | OLRC/SwiftBulkUploader,cudevmaxwell/SwiftBulkUploader | prepareupload.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sqlalchemy_mptt import __version__\nfrom setuptools import setup\n\nsetup(\n name='sqlalchemy_mptt',\n version=__version__,\n url='http://github.com/ITCase/sqlalchemy_mptt/',\n author='Svintsov Dmitry',\n author_email='<... | python | edit | 1 | 0 | mit | 6f47a8a0dfa0fa3ad1659848cce1a764b239406a | uralbash/sqlalchemy_mptt,uralbash/sqlalchemy_mptt,ITCase/sqlalchemy_mptt,ITCase/sqlalchemy_mptt | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, request, jsonify, send_from_directory\nimport os\nimport uuid\napp = Flask(__name__)\nUPLOAD_FOLDER = \"uploads/\"\n\n@app.route(\"/\")\ndef index():\n return send_from_directory('', 'index.html')\n\n@app.route(\... | python | edit | 1 | 3 | mit | e5a392c5c0e5a3c1e71764a422cbea16d81ba3a6 | spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api,spb201/turbulent-octo-rutabaga-api | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import print_function\n\nfrom numpy import testing as npt\n\nfrom ... import units as u\n\n\n\"\"\"\nThis includes tests for distances... | python | edit | 4 | 1 | bsd-3-clause | 95d1bf068ebf2f57eaf44accbe15aa30d236d8ea | pllim/astropy,astropy/astropy,dhomeier/astropy,dhomeier/astropy,bsipocz/astropy,pllim/astropy,astropy/astropy,pllim/astropy,tbabej/astropy,aleksandr-bakanov/astropy,larrybradley/astropy,larrybradley/astropy,joergdietrich/astropy,aleksandr-bakanov/astropy,tbabej/astropy,StuartLittlefair/astropy,kelle/astropy,MSeifert04/... | astropy/coordinates/tests/test_distance.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nbyceps.blueprints.user.current.forms\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom wtforms import DateField, StringField\nfrom w... | python | edit | 1 | 0 | bsd-3-clause | 4303a5cb38f2252dfe09a0ca21320d4bd67bd966 | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | byceps/blueprints/user/current/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom datetime import datetime\n\nTAG_WIDTH = 'EXIF ExifImageWidth'\nTAG_HEIGHT = 'EXIF ExifImageLength'\nTAG_DATETIME = 'Image DateTime'\nTAG_ORIENTATION = 'Image Orientation'\n\n# XXX: this is a terrible way to r... | python | edit | 1 | 2 | mit | 66b20aa7fbd322a051ab7ae26ecd8c46f7605763 | vperron/picasa-toolbox | ptoolbox/tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse, common, sys, tests\nfrom features import check_features, get_features\n\n\ndef arguments(argv=sys.argv[1:]):\n parser = argparse.ArgumentParser()\n\n parser.add_argument(\n 'tests', nargs='*', help='The list of... | python | edit | 1 | 9 | mit | fe8221e398bb9a1ddabf08002441acb37dfef515 | ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel | scripts/release_test/arguments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date, timedelta\n\nclass DateWithCalendar(object):\n def __init__(self, calendar_class, date):\n self.calendar = calendar_class\n self.date = date\n\n def convert_to(self, calendar):\n return ... | python | edit | 1 | 2 | apache-2.0 | ad3a495e38e22f3759a724a23ce0492cd42e0bc4 | jwg4/calexicon,jwg4/qual | qual/calendar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport ipaddress\n\n\ndef site_code(ipv4):\n # Verify IP address\n _ = ipaddress.ip_address(ipv4)\n\n segments = ipv4.split(\".\")\n\n return int(segments[1])\n\n\nclass FilterModule(object):\n def filter... | python | edit | 1 | 4 | mit | 71c9235a7e48882fc8c1393e9527fea4531c536c | kradalby/plays,kradalby/plays | filter_plugins/fap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom skyfield.api import load\nfrom skyfield.magnitudelib import planetary_magnitude\n\ndef test_magnitudes():\n ts = load.timescale()\n #t = ts.utc(1995, 5, 22) # Rings edge-on from Earth.\n t = ts.utc(2021, 10, 4)\n eph = loa... | python | edit | 1 | 4 | mit | 333aa4499e0118eebaa6ce72e97aef5f9e701865 | skyfielders/python-skyfield,skyfielders/python-skyfield | skyfield/tests/test_magnitudes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport interleaving as il\nimport numpy as np\nimport pytest\nnp.random.seed(0)\nfrom .test_methods import TestMethods\n\nclass TestProbabilisticInterleaveSpeed(TestMethods):\n\n def test_interleave(self):\n r1 = list(range(100))\... | python | edit | 3 | 2 | mit | c7ba0ecbbe263fbf7378edbc45fcbbefb150a8fb | mpkato/interleaving | tests/test_probabilistic_interleave_speed.py | rejected_duplicate | Near-duplicate of sample 2019 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib.parse import urlparse, urlunparse\nfrom functools import wraps\nfrom flask import abort, current_app, request\nfrom twilio.twiml import Response\nfrom twilio.util import RequestValidator\nfrom config import *\n\ndef twilio_reque... | python | edit | 3 | 3 | mit | 478bdba2edf9654fc90e1a50bad60cd5b89791f9 | AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at | ueberwachungspaket/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Automatically generate phylogenies from a settings file\n# specifying input fasta and genomes\nimport sys\nimport dendrogenous as dg\nimport dendrogenous.settings\nimport dendrogenous.utils\nimport dendrogenous.core... | python | edit | 4 | 2 | bsd-3-clause | 7cde5e713ace2b0a1d9cdef01ac912f3a53814cd | fmaguire/dendrogenous | run_scripts/build_phylogenies.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom rest_framework.status import HTTP_400_BAD_REQUEST\n\nfrom ..exceptions import InvalidExpiredToken\n\n\nclass InvalidExpiredTokenTest(TestCase):\n \"\"\"Assert `InvalidExpiredToken` behaves as expect... | python | edit | 1 | 1 | bsd-2-clause | b8839af335757f58fa71916ff3394f5a6806165d | incuna/django-user-management,incuna/django-user-management | user_management/api/tests/test_exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# http://www.openstreetmap.org/way/313466665\nassert_has_feature(\n 15, 5467, 12531, 'roads',\n { 'kind': 'piste',\n 'piste_type': 'downhill',\n 'piste_difficulty': 'easy',\n 'id': 313466665 })\n\n# http://www.openstree... | python | edit | 4 | 0 | mit | 287dc6f7a7f0321fec8e35d1dc08f07a3b12f63b | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/342-winter-sports-pistes.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport six\n\nif six.PY2:\n import commands\n get_command_output = commands.getoutput\n get_command_status_output = commands.getstatusoutput\n\n cmp_ = cmp\nelse:\n def get_command_status_output(command):\n try:\n ... | python | edit | 2 | 2 | apache-2.0 | da843b10a92cd4f2f95f18f78f9ea03dcd9a67d5 | apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb | packages/Python/lldbsuite/support/seven.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'docs',\n 'USER': 'postgres', # Not used with sqlite3.\n 'PASSWORD': '',... | python | edit | 3 | 0 | mit | 0850a64ac3758b935a99730733a31710e5178ee7 | wijerasa/readthedocs.org,GovReady/readthedocs.org,kenwang76/readthedocs.org,jerel/readthedocs.org,sid-kap/readthedocs.org,ojii/readthedocs.org,asampat3090/readthedocs.org,gjtorikian/readthedocs.org,attakei/readthedocs-oauth,tddv/readthedocs.org,espdev/readthedocs.org,attakei/readthedocs-oauth,techtonik/readthedocs.org,... | readthedocs/settings/postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 - Nokia\n#\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... | python | edit | 1 | 1 | apache-2.0 | 2627a89fb56e8fc6ae0a4704333e9ed0012048bd | openstack/vitrage,openstack/vitrage,openstack/vitrage | vitrage/tests/functional/datasources/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# scheduler.core: Data structures for managing K3 jobs.\n\nclass Job:\n def __init__(self, roles):\n self.roles = roles\n self.tasks = None\n self.status = None\n\nclass Role:\n def __init__(self, peers = 0, variables {}, inputs ... | python | edit | null | null | apache-2.0 | 4e6ec9cc5b052341094723433f58a21020fa82f0 | DaMSL/K3,DaMSL/K3,yliu120/K3 | tools/scheduler/scheduler/core.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nHTML parsing library based on the WHATWG \"HTML5\"\nspecification. The parser is designed to be compatible with existing\nHTML found in the wild and implements well-defined error recovery that\nis largely compatible with modern desk... | python | edit | 1 | 0 | mit | 224d9f4e243f6645e88b32ad7342a55128f19eeb | html5lib/html5lib-python,html5lib/html5lib-python,html5lib/html5lib-python | html5lib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom graphene.commands.command import Command\n\nclass ExitCommand(Command):\n def __init__(self):\n pass\n\n```\n\nApply this change: Fix EXIT command to have execute method for abstract class"
},
{
"role": "assistant",
... | python | edit | 1 | 1 | apache-2.0 | dce404d65f1f2b8f297cfa066210b885621d38d0 | PHB-CS123/graphene,PHB-CS123/graphene,PHB-CS123/graphene | graphene/commands/exit_command.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015-2016 NEC Corporation. All rights reserved.\n#\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 th... | python | edit | 1 | 2 | apache-2.0 | 3eb796eca4d3dbfd5db9af52166f96cb34654dc8 | openstack/networking-nec,openstack/networking-nec,stackforge/networking-nec,stackforge/networking-nec | networking_nec/plugins/necnwa/l3/db_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis linter reports missing primary / unique index\n\"\"\"\nfrom collections import OrderedDict\n\nfrom indexdigest.utils import LinterEntry\n\n\ndef check_missing_primary_index(database):\n \"\"\"\n :type database indexdiges... | python | edit | 1 | 6 | mit | a05403c2cfe99926b650024e8de08942eda837c6 | macbre/index-digest,macbre/index-digest | indexdigest/linters/linter_0034_missing_primary_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import Base\n\n\nCompleteOutputs = \"g:LanguageClient_omniCompleteResults\"\n\n\nclass Source(Base):\n def __init__(self, vim):\n super().__init__(vim)\n\n self.name = \"LanguageClient\"\n self.mark = \"[L... | python | edit | 1 | 3 | mit | baea090319eafa6c6cfac397c6b0be4d7ca34342 | autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L... | rplugin/python3/deoplete/sources/LanguageClientSource.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFuzzing setup for OSS-Fuzz.\n\nSee https://github.com/google/oss-fuzz/tree/master/projects/jsonschema for the\nother half of the setup here.\n\"\"\"\nimport sys\n\nfrom hypothesis import given, strategies\n\nimport jsonschema\n\nPRI... | python | edit | 1 | 3 | mit | a11c839988b71e9f769cb5ba856474205b7aeefb | python-jsonschema/jsonschema | jsonschema/tests/fuzz_validate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Author: Qiming Sun <<EMAIL>>\n#\n\n'''\nThe default XC functional library (libxc) supports the energy and nuclear\ngradients for range separated functionals. Nuclear Hessian and TDDFT gradients\nneed xcfun libra... | python | edit | 1 | 0 | apache-2.0 | 644896c856b1e6ad20a3790234439b8ac8403917 | sunqm/pyscf,sunqm/pyscf,sunqm/pyscf,sunqm/pyscf | examples/dft/12-camb3lyp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom flask import json\nfrom api import create_app, db\n\n\nclass AuthenticationTestCase(unittest.TestCase):\n def setUp(self):\n self.app = create_app(config_name='TestingEnv')\n self.client = self.app.tes... | python | edit | 3 | 1 | mit | f748facb9edd35ca6c61be336cad3109cafbbc89 | patlub/BucketListAPI,patlub/BucketListAPI | tests/test_authentication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.files.storage import get_storage_class\nfrom storages.backends.s3boto import S3BotoStorage\nfrom PIL import Image\n\n\ndef convert_png_to_jpg(img):\n \"\"\"\n Converts a png to a jpg.\n :param img: Absolute path to... | python | edit | 3 | 3 | mit | bf007267246bd317dc3ccad9f5cf8a9f452b3e0b | FireCARES/firecares,FireCARES/firecares,meilinger/firecares,meilinger/firecares,FireCARES/firecares,meilinger/firecares,HunterConnelly/firecares,HunterConnelly/firecares,FireCARES/firecares,HunterConnelly/firecares,FireCARES/firecares,meilinger/firecares,HunterConnelly/firecares | firecares/utils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\nimport sys\n\nimport git\n\nr = git.Repo( sys.argv[1] )\n\ndef printTree( tree, indent=0 ):\n prefix = ' '*indent\n print( prefix, '-' * 16 )\n print( prefix, 'Tree path %s' % (tree.path,) )\n for blob in tre... | python | edit | 1 | 3 | apache-2.0 | 49f5802a02a550cc8cee3be417426a83c31de5c9 | barry-scott/scm-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench | Source/Git/Experiments/git_log.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nassert_has_feature(\n 15, 5467, 12531, 'landuse',\n { 'kind': 'winter_sports',\n 'sort_key': 33 })\n\n```\n\nApply this change: Fix other failure - assuming that the change in sort key value for winter sports was intentional."
... | python | edit | 2 | 0 | mit | 0c266606ec10a8814ce749925a727ea57dd32aeb | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/343-winter-sports-resorts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef create_homepage(apps, schema_editor):\n # Get models\n ContentType = apps.get_model('contenttypes.ContentType')\n Page = ... | python | edit | 1 | 1 | mit | ccb7446b02b394af308f4fba0500d402240f117e | OpenCanada/lindinitiative,OpenCanada/lindinitiative | home/migrations/0002_create_homepage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pymoku import Moku\nfrom pymoku.instruments import *\nimport time, logging\n\nlogging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')\nlogging.getLogger('pymoku').setLevel(logging.DEBUG)\n\n# Use Moku.get_by_seria... | python | edit | 4 | 0 | mit | 1bc9bf9b3bab521c4a144e00d24477afae0eb0df | liquidinstruments/pymoku,benizl/pymoku | examples/basic_datalogger.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import unlink\nfrom jnius import autoclass, cast\nfrom plyer.facades import Camera\nfrom plyer.platforms.android import activity\n\nIntent = autoclass('android.content.Intent')\nPythonActivity = autoclass('org.renpy.android.PythonAc... | python | edit | 1 | 3 | mit | 4037036de79f6503921bbd426bb5352f2f86f12b | johnbolia/plyer,johnbolia/plyer,kived/plyer,kivy/plyer,cleett/plyer,kived/plyer,kivy/plyer,kivy/plyer,KeyWeeUsr/plyer,KeyWeeUsr/plyer,cleett/plyer,kostyll/plyer,KeyWeeUsr/plyer,kostyll/plyer | plyer/platforms/android/camera.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport requests\n\n\nclass LumidatumClient(object):\n\n def __init__(self, authentication_token, model_id=None, host_address='https://www.lumidatum.com'):\n self.authentication_token = authentication_token\n se... | python | edit | 2 | 3 | mit | 5c29b4322d1a24c4f389076f2a9b8acbeabd89e2 | Lumidatum/lumidatumclients,Lumidatum/lumidatumclients,daws/lumidatumclients,Lumidatum/lumidatumclients | python/lumidatumclient/classes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport factory\nfrom django.contrib.auth.hashers import make_password\n\nfrom keybar.models.user import User\n\n\nclass UserFactory(factory.DjangoModelFactory):\n email = factory.Sequence(lambda i: '{0}@none.none'.format(i))\n is_acti... | python | edit | 1 | 2 | bsd-3-clause | 7a5b86bcb8c0a2e8c699c7602cef50bed2acef1b | keybar/keybar | src/keybar/tests/factories/user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nA script to return a bcrypt hash of a password.\n\nIt's intended use is for creating known passwords to replace user passwords in cleaned up databases.\n\nCost-factor is the log2 number of rounds of hashing to... | python | edit | 1 | 1 | mit | 40d204c996e41a030dac240c99c66a25f8f8586e | alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws | scripts/generate-bcrypt-hashed-password.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom goetia.pythonizors.utils import is_template_inst\n\ndef pythonize_goetia_parsing(klass, name):\n is_fastx, _ = is_template_inst(name, 'FastxParser')\n if is_fastx:\n def __iter__(self):\n while not self.is_compl... | python | edit | 1 | 6 | mit | 7b2dac39cdcbc8d5f05d4979df06bf1ab1ae065f | camillescott/boink,camillescott/boink,camillescott/boink,camillescott/boink | goetia/pythonizors/pythonize_parsing.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\nimport mock\nimport unittest2\n\nfrom thanatos import utils\n\n\nclass UtilsTestCase(unittest2.TestCase):\n\n def setUp(self):\n pass\n\n @mock.patch('thanatos.questions.Question.__subclasses__')\n def test_required_tabl... | python | edit | 1 | 1 | mit | 63276c6de1b61fb9e9a5b7b4a4eac5813e433f80 | evetrivia/thanatos | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import models\n\n\nclass FeedbackItem(models.Model):\n timestamp = models.DateTimeField(auto_now_add=True)\n user = models.ForeignKey(settings.AUTH_USER_MODEL)\n resolved = models.Bo... | python | edit | 1 | 1 | bsd-3-clause | ab7856950c058d00aac99874669839e09bc116c6 | littleweaver/django-talkback,littleweaver/django-talkback,littleweaver/django-talkback | models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom uni_form.helper import FormHelper\nfrom uni_form.layout import Submit, Layout, Fieldset, ButtonHolder\n\nclass LoginForm(forms.Form):\n username = forms.CharField(label=u\"Käyttäj... | python | edit | 1 | 1 | mit | 1179163881fe1dedab81a02a940c711479a334ab | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | Instanssi/admin_auth/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport raven\n\nfrom decouple import config\n\nRAVEN_CONFIG = {\n 'dsn': config('OW4_RAVEN_DSN', default='https://user:<EMAIL>/project'),\n 'environment': config('OW4_ENVIRONMENT', default='DEVELOP'),\n # Use git to dete... | python | edit | 1 | 0 | mit | a3cce9e4840cc687f6dcdd0b88577d2f13f3258e | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | onlineweb4/settings/raven.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom context import slot_users_controller as uc\n\n\nclass TestUsers:\n\n def test_validate_credentials_returns_true_for_valid_credentials(self):\n result = uc.return_user_if_valid_credentials('slot', 'test')\n assert resul... | python | edit | 1 | 1 | mit | cdaffa187b41f3a84cb5a6b44f2e781a9b249f2b | nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT | tests/test_users.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom sqlalchemy.orm import joinedload\n\nfrom changes.api.base import APIView\nfrom changes.api.auth import get_current_user\nfrom changes.models import Author, Build\n\n... | python | edit | 1 | 4 | apache-2.0 | e2cc9c822abb675a196468ee89b063e0162c16d5 | wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,dropbox/changes | changes/api/author_build_index.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)\nimport math\n\n\ndef nernst_potential(ion_conc_out, ion_conc_in, charge, T,\n constants=None, units=None, backend=math):\n \... | python | edit | 1 | 3 | bsd-2-clause | 5d9ec3c24972772814921fb8500845ca3d8fa8b3 | bjodah/aqchem,bjodah/aqchem,bjodah/chempy,bjodah/aqchem,bjodah/chempy | chempy/electrochemistry/nernst.py | rejected_duplicate | Near-duplicate of sample 2814 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\nfrom blaze.blir import compile, execute\n\nsource = \"\"\"\ndef main(x: array[int], n : int) -> void {\n var int i;\n var int j;\n for i in range(n) {\n for j in range(n) {\n x[i,j] = i+j;\n ... | python | edit | 2 | 0 | bsd-2-clause | b8a7dd2dfc9322498dc7500f840bedd20d807ae1 | seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core | samples/numpy_blir.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\nimport random\nfrom EmeraldAI.Entities.BaseObject import BaseObject\n\n\nclass PipelineArgs(BaseObject):\n\n def __init__(self, input):\n # Original Input\n self.Input = input\n ... | python | edit | 1 | 9 | apache-2.0 | 3335c3fed0718bac401e0dc305edc73830ea8c6b | MaxMorgenstern/EmeraldAI,MaxMorgenstern/EmeraldAI,MaxMorgenstern/EmeraldAI,MaxMorgenstern/EmeraldAI,MaxMorgenstern/EmeraldAI | EmeraldAI/Entities/PipelineArgs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#import ibmcnx.test.loadFunction\nimport sys\nfrom java.lang import String\nfrom java.util import HashSet\nfrom java.util import HashMap\nimport java\nimport lotusConnectionsCommonAdmin\n\nglobdict = globals()\n\ndef loadFilesService():\n ... | python | edit | 2 | 1 | apache-2.0 | 8ae82e08fc42d89402550f5f545dbaa258196c8c | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ibmcnx/test/test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom boomslang.LineStyle import LineStyle\n\nclass Grid(object):\n def __init__(self, color=\"#dddddd\", style=\"-\", visible=True):\n self.color = color\n self._lineStyle = LineStyle()\n self._lineStyle.style = styl... | python | edit | 1 | 2 | bsd-3-clause | eb496468d61ff3245adbdec4108a04bc40a357fc | alexras/boomslang | Grid.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Created by JHJ on 2016. 10. 5.\n\nfrom django.conf.urls import url\n\nfrom . import views\n\napp_name = 'board'\nurlpatterns = [\n url(r'^$', views.board_list, name='board_list'),\n url(r'^(?P<board_slug>[-\\w]+)/$', views.post_list... | python | edit | 1 | 0 | mit | 1690c1981614e20183d33de4d117af0aa62ae9c5 | kboard/kboard,guswnsxodlf/k-board,kboard/kboard,cjh5414/kboard,hyesun03/k-board,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,kboard/kboard,hyesun03/k-board,darjeeling/k-board,cjh5414/kboard,guswnsxodlf/k-board | kboard/board/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to fetch data from AWS"
},
{
"role": "assistant",
"content": "\"\"\"\nAutomated processing of associated exposures\n\"\"\"\n\ndef fetch_from_AWS_bucket(root='j022644-044142', id=1161, product='.beams.fits', bucket_name... | python | new_file | 3 | 7 | mit | a859890c9f17b2303061b2d68e5c58ad27e07b35 | gbrammer/grizli | grizli/pipeline/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] 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 ob... | python | edit | 1 | 1 | apache-2.0 | da54fa6d681ab7f2e3146b55d562e5a4d68623cc | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | luigi/tasks/export/ftp/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\n__title__ = 'python-gssapi'\n__author__ = 'Hugh Cole-Baker and contributors'\n__version__ = '0.6.2'\n\n__license__ = 'The MIT License (MIT)'\n__copyright__ = 'Copyright 2014 {0}'.format(__author__)... | python | edit | 1 | 0 | mit | 52f0b4569429da6b331e150496fe2b7ebef17597 | sigmaris/python-gssapi,sigmaris/python-gssapi,sigmaris/python-gssapi,sigmaris/python-gssapi | gssapi/__about__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom rest_framework.validators import UniqueTogetherValidator, UniqueForDateValidator\n\nfrom .models import UserDefinedCategory\nfrom .models import EntryInstance\n\n\nclass UserDefinedCategorySerial... | python | edit | 1 | 0 | mit | 3aa2f858f93ed3945bf1960d5c5d1d90df34422c | swpease/MoodJournal,swpease/MoodJournal,swpease/MoodJournal | MoodJournal/entries/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python\nimport platform\nimport subprocess\nimport sys\n\ndef _execute(*args, **kwargs):\n result = subprocess.call(*args, **kwargs)\n if result != 0:\n sys.exit(result)\n\nif __name__ == '__main__':\n python_ver... | python | edit | 1 | 2 | bsd-3-clause | e394c1889eccb5806a480033dca467da51d515e5 | omergertel/logbook,pombredanne/logbook,Rafiot/logbook,alonho/logbook,Rafiot/logbook,alonho/logbook,omergertel/logbook,Rafiot/logbook,FintanH/logbook,DasIch/logbook,DasIch/logbook,RazerM/logbook,mitsuhiko/logbook,omergertel/logbook,DasIch/logbook,dommert/logbook,alonho/logbook | scripts/test_setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom .command import Command\nfrom matador import utils\nimport subprocess\nimport os\n\n\nclass DeployTicket(Command):\n\n def _add_arguments(self, parser):\n parser.prog = 'matador deploy-ticket'\n ... | python | edit | 1 | 2 | mit | efd44be24e84a35db353ac79dae7cc7392a18b0c | Empiria/matador | matador/commands/deploy_ticket.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom invoke import ctask as task, Collection\n\n\ndocs_dir = 'docs'\nbuild_dir = os.path.join(docs_dir, '_build')\n\n\n@task(aliases=['c'])\ndef _clean(ctx):\n ctx.run(\"rm -rf %s\" % build_dir)\n\n\n@task(aliases=['b'])\nde... | python | edit | 1 | 3 | bsd-2-clause | 1859a5c4ae4f13b1eb8c586578909a943d15f673 | alex/invocations,singingwolfboy/invocations,pyinvoke/invocations,mrjmad/invocations | invocations/docs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSpamhaus XBL list handler.\n\nMaintainer: Sauli Pahlman <<EMAIL>>\n\"\"\"\n\nimport idiokit\nfrom abusehelper.core import cymruwhois, bot, events\n\n\nclass SpamhausXblBot(bot.PollingBot):\n xbl_filepath = bot.Param(\"Filename of... | python | edit | 6 | 5 | mit | ff34a0b9ffc3fed7be9d30d65f9e8f0c24a3cf83 | abusesa/abusehelper | abusehelper/contrib/spamhaus/xbl.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jirafs import __version__ as version\n\n# Metadata filenames\nTICKET_DETAILS = 'fields.jira'\nTICKET_COMMENTS = 'comments.read_only.jira'\nTICKET_NEW_COMMENT = 'new_comment.jira'\nTICKET_LINKS = 'links.jira'\nTICKET_FILE_FIELD_TEMPLATE... | python | edit | 1 | 0 | mit | f46059285851d47a9bee2174e32e9e084efe1182 | coddingtonbear/jirafs,coddingtonbear/jirafs | jirafs/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom som.primitives.primitives import Primitives\nfrom som.vmobjects.primitive import Primitive\n\n\ndef _asString(ivkbl, frame, interpreter):\n rcvr = frame.pop()\n frame.push(interpreter.get_universe().new_string(rcvr.get_embedded... | python | edit | 1 | 2 | mit | 14482126c8d26e4d822a55d525ff276953adbaff | smarr/PySOM,SOM-st/PySOM,SOM-st/RPySOM,SOM-st/PySOM,SOM-st/RPySOM,smarr/PySOM | src/som/primitives/symbol_primitives.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests for passing invalid endpoints which require a target ID to be given.\n\"\"\"\n\nimport pytest\nimport requests\nfrom requests import codes\n\nfrom mock_vws._constants import ResultCodes\nfrom tests.mock_vws.utils import (\n ... | python | edit | 1 | 2 | mit | 6795e02c14fa99da2c0812fe6694bbd503f89ad1 | adamtheturtle/vws-python,adamtheturtle/vws-python | tests/mock_vws/test_invalid_given_id.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\n\nfrom django.core.management.base import BaseCommand\n\n\nclass Command(BaseCommand):\n help = 'Ensure that all installed packages are in requirements.txt'\n\n def _get_file_contents(self, name):\n req_file ... | python | edit | 2 | 3 | mit | ea3a72443f2fa841ea0bc73ec461968c447f39c1 | jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server | egg_timer/apps/utils/management/commands/check_requirements.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.blueprints.board.views\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2014 Jochen Kupperschmidt\n\"\"\"\n\nfrom ...util.framework import create_blueprint\nfrom ...util.templating import template... | python | edit | 1 | 1 | bsd-3-clause | 69de2261c30a8bab1ac4d0749cf32baec49e0cc4 | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps | webapp/byceps/blueprints/board/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom .. import KeyValueStore\nfrom .._compat import BytesIO\n\nfrom .._compat import pickle\nfrom bson.binary import Binary\n\n\nclass MongoStore(KeyValueStore):\n \"\"\"Uses a MongoDB co... | python | edit | 1 | 2 | mit | ad98e3c25434dc251fe6d7ace3acfe418a4d8955 | mbr/simplekv,karteek/simplekv,mbr/simplekv,fmarczin/simplekv,karteek/simplekv,fmarczin/simplekv | simplekv/db/mongo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pylint: disable=R0904,W0212\n\n# Copyright (c) 2011-2013 Rackspace Hosting\n# All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the Licen... | python | edit | 1 | 1 | apache-2.0 | db46374695aed370aa8d8a51c34043d6a48a702d | checkmate/simpl,ryandub/simpl,ziadsawalha/simpl,samstav/simpl,larsbutler/simpl | waldo/tests/unit/test_contrib_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework.negotiation import BaseContentNegotiation\n\n\nclass CustomClientContentNegotiation(BaseContentNegotiation):\n def select_parser(self, request, parsers):\n \"\"\"\n Select the first parser in the `.parse... | python | edit | 1 | 2 | apache-2.0 | b92c1caa8e19376c17f503de1464d4466e547cdf | brianjgeiger/osf.io,arpitar/osf.io,TomHeatwole/osf.io,Nesiehr/osf.io,zachjanicki/osf.io,RomanZWang/osf.io,DanielSBrown/osf.io,doublebits/osf.io,crcresearch/osf.io,amyshi188/osf.io,acshi/osf.io,monikagrabowska/osf.io,petermalcolm/osf.io,GageGaskins/osf.io,kwierman/osf.io,TomHeatwole/osf.io,cslzchen/osf.io,brandonPurvis/... | api/base/content_negotiation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mythril.solidity.soliditycontract import SolidityContract\nfrom mythril.ethereum.evmcontract import EVMContract\n\n\nclass Source:\n def __init__(\n self, source_type=None, source_format=None, source_list=None, meta=None\n ... | python | edit | 1 | 9 | mit | 9410ceb83d85d70a484bbf08ecc274216fa0589f | b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril | mythril/support/source_support.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom selenium.webdriver import Firefox, Chrome, Ie, Edge, Opera, Safari, BlackBerry, PhantomJS, Android, Remote\n\nfrom seleniumrequests.request import RequestsSessionMixin\n\n\nclass Firefox(RequestsSessionMixin, Firefox):\n pass\n\n\nc... | python | edit | 1 | 0 | mit | 2d3b899011c79324195a36aaf3bd53dae6abe961 | cryzed/Selenium-Requests | seleniumrequests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport psutil\nfrom notebook.utils import url_path_join\nfrom notebook.base.handlers import IPythonHandler\n\ndef get_metrics():\n cur_process = psutil.Process()\n all_processes = [cur_process] + cur_process.ch... | python | edit | 1 | 2 | bsd-2-clause | 9e75c0b90d15222af3089d2362c28be726861558 | allanlwu/allangdrive,yuvipanda/nbresuse,allanlwu/allangdrive,yuvipanda/nbresuse | nbresuse/handlers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\npdftools Package.\n\n:author: Stefan Lehmann <<EMAIL>>\n:license: MIT, see license file or https://opensource.org/licenses/MIT\n\n:created on 2018-04-14 20:35:21\n:last modified by: Stefan Lehmann\n:last modified time: 2018-10-28 ... | python | edit | 9 | 0 | mit | b61188d2a842c4bde0b5e5c14d60db86806b0502 | MrLeeh/pdftools | pdftools/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"private_base will be populated from puppet and placed in this directory\"\"\"\n\nimport logging\n\nimport dj_database_url\n\nimport private_base as private\n\n\nADMINS = ()\n\nDATABASES = {}\nDATABASES['default'] = dj_database_url.par... | python | edit | 1 | 0 | bsd-3-clause | a4c2b68a69d89a293568fb257b4a8c0549a5ef9b | muffinresearch/solitude,muffinresearch/solitude | solitude/settings/sites/dev/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bokeh.charts import Bar, output_file, show\nfrom bokeh.charts.operations import blend\nfrom bokeh.charts.attributes import cat, color\nfrom bokeh.charts.utils import df_from_json\nfrom bokeh.sampledata.olympics2014 import data\n\nfrom ... | python | edit | 1 | 0 | bsd-3-clause | 1e0327c852b851f867d21a182ba7604b42d15331 | Karel-van-de-Plassche/bokeh,rs2/bokeh,jakirkham/bokeh,msarahan/bokeh,DuCorey/bokeh,schoolie/bokeh,schoolie/bokeh,quasiben/bokeh,timsnyder/bokeh,KasperPRasmussen/bokeh,ericmjl/bokeh,stonebig/bokeh,bokeh/bokeh,ericmjl/bokeh,bokeh/bokeh,aavanian/bokeh,dennisobrien/bokeh,clairetang6/bokeh,DuCorey/bokeh,ericmjl/bokeh,azjps/... | examples/charts/file/stacked_bar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .exposure import histogram, equalize, equalize_hist, \\\n rescale_intensity, cumulative_distribution, \\\n adjust_gamma, adjust_sigmoid, adjust_log\n\nfrom ._adapthist import equalize_adapthist... | python | edit | 1 | 0 | bsd-3-clause | 05419e49c438c3f867c1ab4bd37021755ec09332 | SamHames/scikit-image,ClinicalGraphics/scikit-image,chintak/scikit-image,bennlich/scikit-image,robintw/scikit-image,rjeli/scikit-image,youprofit/scikit-image,ClinicalGraphics/scikit-image,rjeli/scikit-image,chriscrosscutler/scikit-image,SamHames/scikit-image,blink1073/scikit-image,youprofit/scikit-image,GaZ3ll3/scikit-... | skimage/exposure/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3... | python | edit | 1 | 2 | bsd-2-clause | b890c9046d36687a65d46be724cfaa8726417b5d | mlavin/django-selectable,affan2/django-selectable,makinacorpus/django-selectable,makinacorpus/django-selectable,affan2/django-selectable,mlavin/django-selectable,mlavin/django-selectable,affan2/django-selectable | selectable/tests/runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for functions that calculate plasma parameters using cython.\"\"\"\n\nimport numpy as np\nimport pytest\nfrom astropy import units as u\nfrom warnings import simplefilter\n\nfrom ...utils.exceptions import RelativityWarning, Rel... | python | edit | 13 | 1 | bsd-3-clause | 27e137ef5f3b6c4f6c8679edc6412b2c237b8fb4 | StanczakDominik/PlasmaPy | plasmapy/physics/tests/test_parameters_cython.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n# import pandas as pd\n# import sys\nfrom scipy.special import expit\nfrom sklearn import ensemble\n\ndef get_activations(exp_data, w, b):\n exp_data = np.transpose(exp_data)\n prod = exp_data.dot(w)\n prod_with... | python | edit | 2 | 3 | apache-2.0 | 81bb47c28af70936be76f319ba780f2ad89ba2a0 | glrs/StackedDAE,glrs/StackedDAE | Train_SDAE/tools/evaluate_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pych.extern import Chapel\n\n@Chapel(sfile=\"/home/safl/pychapel/module/ext/src/mymodule.chpl\")\ndef hello_mymodule():\n return None\n\n@Chapel()\ndef hello_inline():\n \"\"\"\n writeln(\"Hello from inline.\");\n \"\"\"\n ... | python | edit | 1 | 1 | apache-2.0 | 4986f02edbe45d73f8509b01270490cd8c8f90dd | chapel-lang/pychapel,chapel-lang/pychapel,russel/pychapel,safl/pychapel,chapel-lang/pychapel,safl/pychapel,safl/pychapel,russel/pychapel,russel/pychapel,safl/pychapel | docs/source/examples/chapel.sfile-inline.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport time\nimport pandas as pd\nfrom bert_trainer import BERTTrainer\nfrom utils import *\n\nclass TestBERT(unittest.TestCase):\n\n def test_init(self):\n trainer = BERTTrainer()\n\n def test_train(self):\n ... | python | edit | 6 | 1 | apache-2.0 | 453af98b1a05c62acd55afca431236d8f54fdae3 | googleinterns/smart-news-query-embeddings,googleinterns/smart-news-query-embeddings | test_bert_trainer.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom elasticsearch import Elasticsearch\nfrom elasticsearch_dsl import Search\nfrom service import app\n\nELASTICSEARCH_ENDPOINT = app.config['ELASTIC_SEARCH_ENDPOINT']\nMAX_NUMBER_SEARCH_RESULTS = app.config['MAX_NUMBER_SEARCH_RESULTS']\n\... | python | edit | 1 | 1 | mit | 43f58f5378dda9c90f4d891d22d6f44debb3700e | LandRegistry/digital-register-api,LandRegistry/digital-register-api | service/es_access.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom datetime import date\n\nimport qual\n\nclass TestProlepticGregorianCalendar(unittest.TestCase):\n def setUp(self):\n self.calendar = qual.ProlepticGregorianCalendar()\n\n def test_valid_date(self):\n ... | python | edit | 3 | 1 | apache-2.0 | 90974a088813dcc3a0c4a7cae5758f67c4b52a15 | jwg4/qual,jwg4/calexicon | qual/tests/test_calendar.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport plotly.plotly.plotly as py\nimport plotly.tools as tls\n\n\ndef test_get_credentials():\n if 'username' in py._credentials:\n del py._credentials['username']\n if 'api_key' in py._credentials:\n del py._credential... | python | edit | 3 | 3 | mit | 6b23446292ce8e35f1e4fd5fa0bb73ca5596eddb | ee-in/python-api,plotly/python-api,plotly/plotly.py,ee-in/python-api,plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/python-api,plotly/plotly.py | plotly/tests/test_core/test_plotly/test_credentials.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\"\"\"Test that tokenizer exceptions are handled correctly.\"\"\"\n\n\nfrom __future__ import unicode_literals\n\nimport pytest\n\n\n@pytest.mark.parametrize('text', [\"e.g.\", \"p.m.\", \"Jan.\", \"Dec.\", \"Inc.\"])\ndef ... | python | edit | 1 | 1 | mit | c89e30d1a33df2d9d8c5ceb03df98d29b3b08724 | honnibal/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,recognai/spaCy,raphael0202/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,honnibal/spaCy,explosion/spaCy,raphael0202/spaCy,spacy-io/spaCy,honnibal/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,r... | spacy/tests/en/test_exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport GenotypeNetwork as gn\nimport os\nimport networkx as nx\n\nGN = gn.GenotypeNetwork()\nGN.read_sequences('test/Demo_052715.fasta')\nGN.generate_genotype_network()\nGN.write_genotype_network('test/Demo_052715.pkl')\nGN.read_genotype_ne... | python | edit | 1 | 1 | mit | 4f776ca2260419c06c2594568c73ce279426d039 | ericmjl/genotype-network | GenotypeNetwork/test_genotype_network.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n ${NAME}\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport logging\nlog = logging.getLogger(__name__)\n\ndef lazyprop(fn):\n \"\"\"\n Lazily computed property wrapper.\n\n\n... | python | edit | 1 | 2 | bsd-3-clause | dbe57e9b76194b13d90834163ebe8bf924464dd0 | vorburger/mcedit2,Rubisk/mcedit2,Rubisk/mcedit2,vorburger/mcedit2 | src/mcedit2/util/lazyprop.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport timer\nimport sys\nimport utils\n\n# A set of files already in the storage\nseen = set()\n\n# The total number of uploads\ntotal_uploads = 0\n\n# The number of files in the storage\nfiles_in = 0\n\ntmr = timer... | python | edit | 1 | 4 | apache-2.0 | 209a8e029e14766027376bb6d8f0b2e0a4a07f1b | sjakthol/dedup-simulator,sjakthol/dedup-simulator | simulator-perfect.py | rejected_duplicate | Near-duplicate of sample 4027 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport numpy\n\nimport chainer.functions as F\nfrom chainer import testing\n\n\ndef make_data(dtype, shape):\n x = numpy.random.uniform(0.1, 1, shape).astype(dtype)\n gy = numpy.random.uniform(-1, 1, shape).astype(d... | python | edit | 1 | 1 | mit | 675b860af3576251b32d14b10600f756fd1aebdf | cupy/cupy,ktnyt/chainer,ronekko/chainer,okuta/chainer,aonotas/chainer,keisuke-umezawa/chainer,jnishi/chainer,tkerola/chainer,jnishi/chainer,cupy/cupy,wkentaro/chainer,pfnet/chainer,okuta/chainer,hvy/chainer,chainer/chainer,okuta/chainer,hvy/chainer,niboshi/chainer,kiyukuta/chainer,wkentaro/chainer,wkentaro/chainer,keis... | tests/chainer_tests/functions_tests/math_tests/test_sqrt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# With mod_python we'll have to delay importing trac.web.api until\n# modpython_frontend.handler() has been called since the\n# PYTHON_EGG_CACHE variable is set from there\n#\n# TODO: Remove this once the Genshi zip_safe issue has been reso... | python | edit | 5 | 0 | bsd-3-clause | c205742520f4d2882d666e13a06c487d886ec7bc | rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac | trac/web/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nenv_vars = {}\n\n\ndef read_file(path):\n try:\n with open(path, 'r') as f:\n return f.read().strip()\n except IOError:\n return None\n\n\ndef get_memory_limit():\n limit = read_file('/... | python | edit | 1 | 4 | apache-2.0 | 99b1610fad7224d2efe03547c5114d2f046f50ca | soltysh/sti-base,mfojtik/sti-base,hhorak/sti-base,bparees/sti-base,openshift/sti-base,sclorg/s2i-base-container,openshift/sti-base,mfojtik/sti-base,bparees/sti-base | bin/cgroup-limits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass FoiRequestFollowerConfig(AppConfig):\n name = 'froide.foirequestfollower'\n verbose_name = _('FOI Request Follower')\n\n def read... | python | edit | 1 | 3 | mit | e93dadc8215f3946e4e7b64ca8ab3481fcf3c197 | fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide | froide/foirequestfollower/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport sys\nimport os\nsys.path.insert(1, os.path.join(\"..\",\"..\",\"..\"))\nimport h2o\nfrom h2o.exceptions import H2OServerError\nfrom tests import pyunit_utils\n\n\ndef trace_request():... | python | edit | 1 | 4 | apache-2.0 | 052f06b0ef4f3c2befaf0cbbfd605e42553b48da | h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3 | h2o-hadoop-common/tests/python/pyunit_trace.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pandas as pd\nimport geojson\nfrom geojson import FeatureCollection, Feature, Point\n\n# read in original data\ncsv = pd.read_csv(\"versaille_stock.csv\", sep=\"\\t\")\n\n# fetch properties, remove Long and Lat\nprops = list(csv.colu... | python | edit | 1 | 0 | apache-2.0 | 482205f4235f5a741e55fd560bab4a4d75cb5303 | mkuzak/atmap | versailes2geojson.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This is a Python-based web server that can be run to\nread with Eidos. To run the server, do\n\n python -m indra.sources.eidos.server\n\nand then submit POST requests to the `localhost:5000/process_text` endpoint\nwith JSON content... | python | edit | 1 | 4 | bsd-2-clause | 29ffe1df88927aa568d3e86b07e372e5ba589310 | sorgerlab/belpy,johnbachman/indra,bgyori/indra,johnbachman/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra | indra/sources/eidos/server.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.