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# Python 3.8.3\n\ndef get_input():\n with open('input.txt', 'r') as f:\n return set(int(i) for i in f.read().split())\n\ndef main():\n puzzle = get_input()\n\n last_joltage = 0\n one_jolt = 0\n three_jolts = 1 # this ... | python | edit | 1 | 5 | mit | a537f049bfb61488a056333d362d9983e8e9f88d | foxscotch/advent-of-code,foxscotch/advent-of-code | 2020/10/p1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\ndropboxFiles = []\nlocalFiles = []\nfor dirpath, dirnames, filenames in os.walk(\n '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'):\n dropboxFiles += filenames\n\nfor dirpath, dirnames, filenames in... | python | edit | 1 | 3 | mit | 18618a56ce674c479a0737dcabd4a47913ae2dde | itko/itko.github.io,itko/itko.github.io,itko/itko.github.io,itko/itko.github.io | scripts/compare_dir.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\"\"\"\nCassoundra: admin-commands\n~~~~~~~~~~\n\nModule to handle special commands to control the bot once it is already running.\n\nCreated by Joshua Prince, 2017\n\"\"\"\n\n\nimport disc... | python | edit | 1 | 4 | mit | ef15a8ba699e10b9f2d059669b63af6f4c768d39 | joshuaprince/Cassoundra,joshuaprince/Cassoundra,joshuaprince/Cassoundra | casspy/admin_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nmethod_count = 0\n\ndef method(argcount, nlocals, stacksize, flags, codestring, constants, names,\n varnames, filename, name, firstlineno, lnotab, modules, static):\n global method_count\n print 'define', nam... | python | edit | 2 | 6 | mit | 75c0861608871de2a2b1a6b4f2ea89c800dd8c07 | laffra/pava,laffra/pava | pava/implementation/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nfrom django.contrib import admin\nfrom djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal\n\nadmin.site.register(VirtualPointOfSale)\nadmin.site.re... | python | edit | 1 | 0 | mit | 31231afea71b3fd9213b39cf1bb32e10b2a9e843 | intelligenia/django-virtual-pos,intelligenia/django-virtual-pos,intelligenia/django-virtual-pos | djangovirtualpos/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nclass Formatter(object):\n pat_square_open = re.compile(\"\\[\")\n pat_square_closed = re.compile(\"\\]\")\n pat_lt = re.compile(\"<\")\n pat_gt = re.compile(\">\")\n latex_substitutions = {\n pat_squa... | python | edit | 1 | 4 | bsd-3-clause | 3b412830710018abadacd148be544b4bfb1ec2f0 | neulab/compare-mt,neulab/compare-mt | compare_mt/formatting.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom import_export import fields, resources\n\nfrom .models import Review\n\n\nclass ReviewResource(resources.ModelResource):\n\n reviewer = fields.Field(\n attribute='reviewer__email',\n readonly=True,\n )\n proposal... | python | edit | 1 | 1 | mit | 8b598333c06698185762cc98e414853e03c427f2 | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | src/reviews/resources.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''Test sentence boundaries are deserialized correctly,\neven for non-projective sentences.'''\n\nimport pytest\nimport numpy\nfrom ... tokens import Doc\nfrom ... vocab import Vocab\nfrom ... attrs import HEAD, DEP\n\n\ndef test_issue1799(... | python | edit | 4 | 1 | mit | 7e6dc283dbecf4bf9674559198b4a2c06e9f4c2e | aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/... | spacy/tests/regression/test_issue1799.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\nfrom kubernetes.client.rest import ApiException\n\nfrom django.conf import settings\n\nfrom clusters.models import Cluster\nfrom events.management.commands._base_monitor import BaseMonitorCommand\nfrom events.monitors import ... | python | edit | 1 | 5 | apache-2.0 | 7611a4b3e064868c37b9f52778c8fe9f721e86c5 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon/events/management/commands/monitor_namespace.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\ncompression\n\"\"\"\n\nclass Compress():\n \"\"\"Compress\"\"\"\n def encode(self, string):\n \"\"\"Encodes string to byte representation\"\"\"\n return b'0'\n\n def decode(self, byteString):\n \"\"\"De... | python | edit | 1 | 4 | apache-2.0 | 2a852c3ca1ff30cb02740f7934d97c1fe2da3bbe | rylans/text-compression-english | compress.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport boto3\n\nfrom bluecanary.exceptions import NamespaceError\nfrom bluecanary.utilities import throttle\n\n\n@throttle()\ndef set_cloudwatch_alarm(identifier, **kwargs):\n if not kwargs.get('Dimensions'):\n kwargs['Dimensions'... | python | edit | 1 | 4 | mit | 80a1912ce69fd356d6c54bb00f946fbc7874a9ce | voxy/bluecanary | bluecanary/set_cloudwatch_alarm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask.ext.script import Manager\n\nfrom datawire.core import app, db\nfrom datawire.model import Service\nfrom datawire.views import index\n\nmanager = Manager(app)\n\n\n@manager.command\ndef create_db():\n \"\"\" Create the databas... | python | edit | 4 | 2 | mit | ddce385c22284ec68797b512fade8599c76ce3d1 | arc64/datawi.re,arc64/datawi.re,arc64/datawi.re | datawire/manage.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tempfile\nimport unittest\nimport os\nfrom nimoy.runner.spec_finder import SpecFinder\n\n\nclass TestSpecFinder(unittest.TestCase):\n def setUp(self):\n self.temp_spec = tempfile.NamedTemporaryFile(suffix='_spec.py')\n\n ... | python | edit | 1 | 1 | apache-2.0 | b355d61edc413f8fd60c7ce3ac37d9c1da7caa67 | Luftzig/nimoy,browncoat-ninjas/nimoy | tests/nimoy/runner/test_spec_finder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 PressLabs SRL\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache... | python | edit | 1 | 1 | apache-2.0 | bdcdeee5c913f65dc2ea7f611a0ca0882b4e910f | rowhit/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs,bussiere/gitfs | tests/views/test_view.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2016, MIT Probabilistic Computing Project\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# ... | python | edit | 1 | 0 | apache-2.0 | b2ca081fbc10cc4c5d6b02ef2a4f5ce7bcab35e5 | probcomp/bayeslite,probcomp/bayeslite | doc/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nfrom PySide import QtGui\n\n\ndef _Box(box, *a):\n for arg in a:\n if isinstance(arg, tuple):\n item = arg[0]\n else:\n ... | python | edit | 1 | 6 | bsd-3-clause | 244f9ad92683a1b3a3bc8409724fea9c671f38b6 | Rubisk/mcedit2,Rubisk/mcedit2,vorburger/mcedit2,vorburger/mcedit2 | src/mcedit2/widgets/layout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport re\nimport requests\n\nclass KeyValue(object):\n\n def __init__(self, url):\n self._url = \"%s/kv\" % url\n\n def _get(self, key, recurse=None, keys=None):\n url = self._url + '/' + key\n\n par... | python | edit | 1 | 5 | mit | c37af8399decdbe3e1303f236891d694985b9040 | vcoque/consul-ri | consulrest/keyvalue.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom app import create_app\nfrom flask.ext.script import Manager\n\napplication = create_app(os.getenv('FLASH_CONFIG') or 'default')\nmanager = Manager(application)\n\nif __name__ == '__main__':\n mana... | python | edit | 1 | 0 | mit | c1fdbcf724ac7cc713cf3f5f3ca3cfca50007e34 | mtekel/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmar... | application.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.conf.urls import patterns, url\n\nfrom . import views\n\nurlpatterns = patterns(\"\",\n url(r\"^login/(?P<uuid>[\\da-f]{8}-([\\da-f]{4}-){3}[\\da-f]{12})/$\", views.LOTLogin.as_view(), name=\"login\... | python | edit | 1 | 0 | bsd-3-clause | c6298a573dc3188b8c57954287d78e7da253483a | ABASystems/django-lot | lot/urls.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\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | python | edit | 1 | 2 | bsd-3-clause | d55920576d288e9cb703337c6183cfe071d274ce | skeuomorf/cryptography,dstufft/cryptography,dstufft/cryptography,bwhmather/cryptography,kimvais/cryptography,skeuomorf/cryptography,Ayrx/cryptography,sholsapp/cryptography,dstufft/cryptography,kimvais/cryptography,sholsapp/cryptography,dstufft/cryptography,Hasimir/cryptography,sholsapp/cryptography,Ayrx/cryptography,bw... | cryptography/primitives/block/ciphers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ._library import *\nfrom ._library import __version__, __api_version__\n\ndef get_include():\n \"\"\"Returns the directory containing the C/C++ API include directives\"\"\"\n\n return __import__('pkg_resources').resource_filename(__n... | python | edit | 5 | 3 | bsd-3-clause | 7beecc71b53a14f5515763f551613e381978dd3f | tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear,tiagofrepereira2012/bob.learn.linear | xbob/learn/linear/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport sublime\n\nPACKAGE_NAME = __package__.split(\".\", 1)[0]\n\nlogging.basicConfig(\n level=logging.ERROR,\n format=\"%(name)s [%(levelname)s]: %(message)s\"\n)\nlogger = logging.getLogger(PACKAGE_NAME)\n\n\ndef lo... | python | edit | 1 | 2 | mit | bd6bb741db3b5403ec8ee590a919b0f9ff29bf14 | SublimeText-Markdown/MarkdownEditing | plugins/logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom distutils.version import StrictVersion\n\nfrom conda import __version__ as CONDA_VERSION\n\nfrom ._version import get_versions\n\n\n__version__ = get... | python | edit | 2 | 0 | bsd-3-clause | 07fd8bf23917e18ba419859d788d9f51735f3b39 | SciTools/conda-gitenv | conda_gitenv/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#/usr/bin/env python\n\nimport json\nimport os\nimport subprocess\n\n\ndef run():\n with open('gtlaunch.json', 'r') as fp:\n config = json.load(fp)\n project = config['test']\n args = ['gnome-terminal', '--maximize']\n ar... | python | edit | 1 | 3 | mit | 41df71518ba23460194194cb82d9dbb183afcc19 | GoldenLine/gtlaunch | gtlaunch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 16.08.2017 19:16\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, TestCase\nfrom grammpy import *\n\n\nclass GrammarCopyTest(TestCase):\n pass\n\n\n... | python | edit | 9 | 1 | mit | 845aee2341b3beeb6c96c0a2b830e2729f5f30d2 | PatrikValkovic/grammpy | tests/GrammarCopyTest.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom slacker import Slacker\nimport os\n\n\nclass SlackHandler(logging.Handler):\n def __init__(self, slack_token):\n logging.Handler.__init__(self)\n self.slack = Slacker(slack_token)\n\n def emit(self, ... | python | edit | 1 | 3 | mit | 82c1b2c14977040f9e6251ed9616fc0f64a52779 | sevazhidkov/leonard | system/slackhandler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport tee\n\n\nclass Process(object):\n \"\"\"Process related functions using the tee module (mostly).\"\"\"\n\n def __init__(self, quiet=False, env=None):\n self.quiet = quiet\n self.env = env\n\n def pop... | python | edit | 1 | 4 | bsd-2-clause | 7531fbb5cea5ef71f75e344c6a9e84e05377573a | Jarn/jarn.mkrelease | jarn/mkrelease/process.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom mitmproxy.addons import intercept\nfrom mitmproxy import exceptions\nfrom mitmproxy.test import taddons\nfrom mitmproxy.test import tflow\n\n\ndef test_simple():\n r = intercept.Intercept()\n with taddons.context... | python | edit | 1 | 1 | mit | 7d9e3dd9a3eca107ddcdb7304e0b0c3f61b0af18 | mitmproxy/mitmproxy,mitmproxy/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,Kriechi/mitmproxy,mitmproxy/mitmproxy,Kriechi/mitmproxy,mhils/mitmproxy,Kriechi/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,Kriechi/mitmproxy,mitmproxy/mitmproxy,mitmproxy/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,mhils/mitmproxy,vhaupert/mi... | test/mitmproxy/addons/test_intercept.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT\n# All rights reserved. This work is under a BSD license, see LICENSE.TXT.\n\nfrom __future__ import print_function\n\nimport sys, os, signal, time, subprocess32\n\n\ndef _kille... | python | edit | 1 | 2 | bsd-3-clause | 3864ef6773000d516ee6542a11db3c3b636d5b49 | lhupfeldt/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow | test/framework/killer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, render_template, request, current_app, redirect, flash\nfrom functools import wraps\nimport json\n\napp = Flask(__name__)\n\ndef jsonp(f):\n\t'''Wrap JSONified output for JSONP'''\n\t@wraps(f)\n\tdef decora... | python | edit | 5 | 2 | mit | dea384bf25e48c0f9a5dd7bc324a1a611e41c7dd | avidas/flask-jquery,avidas/flask-jquery,avidas/flask-jquery | flask_jq.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom zope.interface import implements\nfrom twisted.application.service import IServiceMaker\nfrom twisted.plugin import IPlugin\n\nfrom vumi.start_worker import VumiService, StartWorkerOptions\n\n\n# This create the service, runnable on co... | python | edit | 1 | 1 | bsd-3-clause | ddc6a446a5b728d0ae6190cfca5b8962cac89b7c | TouK/vumi,harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix | twisted/plugins/vumi_worker_starter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom re import search\n\n\"Some baseline features for testing the classifier.\"\n\ndef make_searcher(substring, field='content'):\n\tdef result(datum):\n\t\tif search(substring, datum.__dict__[field]):\n\t\t\treturn ['has_substring_' + subs... | python | edit | 1 | 2 | isc | 1685dcf871e529220f98f92a75833c388223f2c8 | aftran/classify-outbreak | features.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.urls import reverse\nfrom .models import Post\n\n\n# Create your tests here.\nclass PostModelTest(TestCase):\n\n def test_render_markdown(self):\n p = Post(content='aa')\n self.... | python | edit | 1 | 1 | mit | ca4a312e09138d295932d200cebf787b911cd2b2 | graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb | blog/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDataset collection package.\n\nThis package allows to easily manage and load pre-processed datasets in an easy\nway by using hdf5 files as metadata storage. By storing all the necessary metadata\non disk, memory RAM can be allocated... | python | edit | 11 | 0 | mit | 04fcf7d4e4cb0abefd4f6bd4ab0c1b034d43c111 | farrajota/dbcollection,dbcollection/dbcollection | dbcollection/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# from .directory_service import DirectoryService\nfrom .omdb_service import OMDBService\n\nALL_SERVICES = [\n # DirectoryService()\n OMDBService()\n]\n\n```\n\nApply this change: Make directory service the only service"
},
{
... | python | edit | 1 | 0 | bsd-3-clause | 380f565231997353faa30f77bbe84d0ed6bbf009 | Machyne/pal,Machyne/pal,Machyne/pal,Machyne/pal | pal/services/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport flask\nfrom .. import auth\nimport urllib.parse\n\ndef checkForSession():\n\tif \"uid\" in flask.session:\n\t\tsession = auth.validateSession(flask.session[\"uid\"])\n\t\tif session != None:\n\t\t\treturn session\n\treturn None\n\nde... | python | edit | 2 | 3 | mit | c4f51fd3c030f3d88f8545a94698ed4e9f5ef9bc | ollien/Timpani,ollien/Timpani,ollien/Timpani | timpani/webserver/webhelpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef test_cxx_import():\n from microscopes.mixture.model import \\\n state, fixed_state, \\\n bind, bind_fixed, \\\n initialize, initialize_fixed, \\\n deserialize, deserialize_fixed\n assert state and fixed... | python | edit | 1 | 1 | bsd-3-clause | ae600fdf602d12f1a2f8082df49693117fba2596 | datamicroscopes/mixturemodel,datamicroscopes/mixturemodel,datamicroscopes/mixturemodel | test/test_cxx_imports.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport urllib, json\nimport numpy as np\n\nfrom secrets import API_KEY # JCDECAUX's API KEY\n\ndef retrieve_data(contract=\"paris\"):\n url = \"https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}\".format(API_KEY, contract)\n ... | python | edit | 1 | 5 | mit | a017c75c7e2b8915cd2ab0bce29a0ed68c306f38 | Evarin/velib-exp | get_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Add ramp properties to paths in roads layer\n\n# Steps with ramp:bicycle=yes in Copenhagen\n# https://www.openstreetmap.org/way/91275149\nassert_has_feature(\n 15, 17527, 10257, 'roads',\n { 'id': 91275149, 'kind': 'path', 'kind_det... | python | edit | 3 | 0 | mit | 34abe198ccfb906735e68ae95ad36e603a4001ca | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | integration-test/1147-bicycle-ramps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom tests.integrations.base import BaseTest\n\n\nclass TestReadCurrentView(BaseTest):\n def test_listdirs(self):\n assert os.listdir(\"%s/current\" % self.mount_path) == ['testing', 'me']\n\n```\n\nApply this change:... | python | edit | 1 | 1 | apache-2.0 | f374ac8bb3789ed533a2371eae78a9f98e1def60 | PressLabs/gitfs,ksmaheshkumar/gitfs,bussiere/gitfs,rowhit/gitfs,PressLabs/gitfs | tests/integrations/current/test_read.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nimport virtualenv\n\n\nclass VirtualEnvManager(object):\n def __init__(self, path):\n self.venv_home = path\n\n def install(self, requirements_file=None):\n if os.path.exists(self.venv_hom... | python | edit | 1 | 4 | mit | 1e16c3810e41df7a4d6273750c713c086ad82c14 | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | weaveserver/core/plugins/virtualenv.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef __open_worksheet():\n pass\n\ndef __get_data():\n pass\n\ndef __write_data():\n pass\n\n\n```\n\nApply this change: Add code to fix failing test"
},
{
"role": "assistant",
"content": "def __open_worksheet():\n pa... | python | edit | 1 | 1 | mit | 031e7e584a6566586c1ee7758a4f619bb161f4cd | jdgillespie91/trackerSpend,jdgillespie91/trackerSpend | utils/parse_worksheet.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport socket\nimport threading\n\nimport connexion\n\nfrom swagger_tester import swagger_test\n\n\ndef test_swagger_test():\n swagger_test(os.path.join(os.path.dirname(__file_... | python | edit | 1 | 1 | mit | c673c562836c207d25d799bfd9e7189a25f51fea | Trax-air/swagger-tester | tests/test_swagger-tester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\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/l... | python | edit | 1 | 0 | apache-2.0 | d7598e96ba5bd0bb53635a62b61df077280967cc | dongwenjuan/project-config,Tesora/tesora-project-config,dongwenjuan/project-config,openstack-infra/project-config,openstack-infra/project-config,Tesora/tesora-project-config | jenkins/scripts/xstatic_check_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2013 Amazon.com, Inc. or its affiliates.\n# All Rights Reserved\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"),... | python | edit | 1 | 1 | mit | a2af3446bbb9ff2cc46fdde4a96c539f57a972f9 | Asana/boto,vijaylbais/boto,felix-d/boto,zachmullen/boto,vishnugonela/boto,weka-io/boto,revmischa/boto,weebygames/boto,nexusz99/boto,TiVoMaker/boto,garnaat/boto,alex/boto,ocadotechnology/boto,campenberger/boto,alex/boto,ddzialak/boto,awatts/boto,appneta/boto,clouddocx/boto,disruptek/boto,j-carl/boto,kouk/boto,darjus-amz... | tests/integration/directconnect/test_directconnect.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport argparse\nimport os\nimport mediachain.reader.api\nfrom mediachain.reader.api import Config\n\ndef main(arguments=None):\n if arguments == None:\n arguments = sys.argv[1:]\n\n parser = argparse.ArgumentParser... | python | edit | 3 | 2 | mit | ec85333da83e1c7de16dd7a5a3551dc9a1f660b4 | mediachain/mediachain-client,mediachain/mediachain-client | mediachain/reader/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom cookiecutter import exceptions\n\n\ndef test_undefined_variable_to_str():\n undefined_var_error = exceptions.UndefinedVariableInTemplate(\n 'Beautiful is better than ugly',\n exceptions.Cooki... | python | edit | 1 | 1 | bsd-3-clause | fb8fb61303dd567038ca812a61e6702b8b3f4edc | hackebrot/cookiecutter,dajose/cookiecutter,dajose/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,Springerle/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,Springerle/cookiecutter,willingc/cookiecutter,pjbull/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,audr... | tests/test_exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -----------------------------------------------------------------------------\n# Copyright © 2009- The Spyder Development Team\n#\n# Licensed under the terms of the MIT License\n# (see LICENSE.txt for details)\n# -------------------------... | python | edit | 5 | 0 | mit | d01217875a1c720b3c6fabe05fd3b0c2b0d3b287 | spyder-ide/qtpy | qtpy/QtWebEngineQuick.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport simuvex\nfrom simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength\n\nclass DrillerRead(simuvex.SimProcedure):\n ''' \n A custom version of read which has a symbolic return value.\n '''\n\n def run(se... | python | edit | 3 | 2 | bsd-2-clause | bb4bff73a1eefad6188f1d1544f3b4106b606d36 | shellphish/driller | driller/LibcSimProc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport requests\nfrom django.core.files import File\nfrom django.core.files.storage import Storage\nfrom davstorage.utils import trim_trailing_slash\n\n\nclass DavStorage(Storage):\n def __init__(... | python | edit | 1 | 2 | bsd-2-clause | 3b1a04b20dee933792f3f9da78c2d76941beb54f | oinopion/davstorage,oinopion/davstorage,oinopion/davstorage | davstorage/storage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os.path import dirname, abspath\n\nfrom django.conf import settings\n\nif not settings.configured:\n settings.configure(\n DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',\n ... | python | edit | 1 | 2 | apache-2.0 | 4df17e8a4d4ce48fac9c66876dc4aeb981044655 | budlight/django-bitfield,mattcaldwell/django-bitfield,joshowen/django-bitfield,disqus/django-bitfield,moggers87/django-bitfield,Elec/django-bitfield | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom rest_framework.urlpatterns import format_suffix_patterns\nfrom . import views\n\n\nurlpatterns = [\n url(r'^notes/$', views.NoteList.as_view()),\n url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail... | python | edit | 1 | 0 | unlicense | c8c0f6ec8abbcc845df38bfbba36b5ae916f77cd | rcutmore/vinotes-api,rcutmore/vinotes-api | vinotes/apps/api/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# See also examples/example_track/example_meta.py for a longer, commented example\ntrack = dict(\n author_username='dansbecker',\n)\n\nlessons = [\n dict(topic='How Models Work'),\n dict(topic='Explore Your Data')\n]\n\nnot... | python | edit | 1 | 0 | apache-2.0 | b3808c39c942bcc2c1701a1dcb61db47c69f1daa | Kaggle/learntools,Kaggle/learntools | notebooks/machine_learning/track_meta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nMinimal VLC client for AceProxy. Messages class.\n'''\n\n\nclass VlcMessage(object):\n\n class request(object):\n SHUTDOWN = 'shutdown'\n\n @staticmethod\n def startBroadcast(stream_name, input, out_port, muxer=... | python | edit | 1 | 2 | mit | eb4c308bbe2824acc1016be761dd2a9713a909a3 | deseven/aceproxy,pepsik-kiev/aceproxy,cosynus/python,Ivshti/aceproxy,ValdikSS/aceproxy | vlcclient/vlcmessages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap\nfrom django.contrib.sitemaps import Sitemap as DjangoSitemap\nfrom django.utils import timezone\n\nfrom opps.containers.models import Conta... | python | edit | 1 | 2 | mit | 2e4b4afd3b70543df7c72b81ce5c5318d00e3ff3 | jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps | opps/sitemaps/sitemaps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom functools import lru_cache\n\nfrom django.core.checks import Warning, register\nfrom willow.image import Image\n\n\n@lru_cache()\ndef has_jpeg_support():\n wagtail_jpg = os.path.join(os.path.dirname(__file__), \"check_fil... | python | edit | 1 | 3 | bsd-3-clause | 9a9100e201603e185965fff94de92db13caf45ae | wagtail/wagtail,wagtail/wagtail,zerolab/wagtail,zerolab/wagtail,thenewguy/wagtail,wagtail/wagtail,rsalmaso/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,thenewguy/wagtail,rsalmaso/wagtail,thenewguy/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,zerolab/wagtail,zerolab/wagtail,zerolab/wagtail,rs... | wagtail/images/checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nfrom .base import Logger\n\n\nclass Classic(Logger):\n '''Classic logger compatible with standard Python logger.'''\n\n def _... | python | edit | 1 | 1 | apache-2.0 | 090e89aae1a3663646167658dba242222369458f | 4degrees/sawmill,4degrees/mill | source/bark/logger/classic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Zinc dumping and parsing module\n# (C) 2016 VRT Systems\n#\n# vim: set ts=4 sts=4 et tw=78 sw=4 si:\n\nfrom .grid import Grid\nfrom .dumper import dump\nfrom .parser import parse\nfrom .metadata import MetadataObj... | python | edit | 1 | 0 | bsd-2-clause | c83f088e6f2b577aae9eceded2a8f7c3c82948b9 | vrtsystems/hszinc,vrtsystems/hszinc | hszinc/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\n\n\ndef get_next(request):\n # This is not a view\n return request.GET.get(\"next\", request.META.get(\"HTTP_REFERER\", \"/\"))\n\n\ndef render_code(code, request, context={}):\n return render(r... | python | edit | 1 | 11 | mit | af072319100be47415613d39c6b2eab22b8b4f34 | stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide | froide/helper/utils.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nModules exported by ``editorconfig`` package:\n\n- handler: used by plugins for locating and parsing EditorConfig files\n- exceptions: provides special exceptions used by other modules\n\"\"\"\n\nfrom versiontools import join_versio... | python | edit | 5 | 1 | bsd-2-clause | d041c9244a36db5aef29412824e9346aceb53c9f | VictorBjelkholm/editorconfig-vim,VictorBjelkholm/editorconfig-vim,pocke/editorconfig-vim,dublebuble/editorconfig-gedit,benjifisher/editorconfig-vim,benjifisher/editorconfig-vim,dublebuble/editorconfig-gedit,johnfraney/editorconfig-vim,dublebuble/editorconfig-gedit,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfi... | editorconfig/__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\nNUMTEAMS = 12\nROUNDBITS = 4\nMATCHBITS = 4\nSLOTBITS = 2\n\nprint \"(set-info :status unknown)\"\nprint \"(set-option :produce-models true)\"\nprint \"; Logic is now \\\"Whatever Z3 accepts\\\" (set-logic AUFBV)\"\npri... | python | edit | 11 | 0 | bsd-2-clause | 898ce6f5c77b6a63b0c34bd2a858483d0cb7083a | jmorse/numbness | schedule.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tastypie.authorization import DjangoAuthorization\nfrom tastypie import fields\nfrom tastypie.resources import ModelResource, ALL_WITH_RELATIONS\nfrom quotations.apps.quotations import models as quotations_models\nfrom quotations.libs.... | python | edit | 1 | 0 | mit | aa6c638f6aac2f452049f6314e5885c8e02fd874 | jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted,jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted | quotations/apps/api/v1.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom i3pystatus import IntervalModule\n\n\nclass Pianobar(IntervalModule):\n \"\"\"\n Shows the title and artist name of the current music\n\n In pianobar config file must be setted the fifo and event_command options\n (see man ... | python | edit | 1 | 1 | mit | 97c9cb7e80e72f13befc4cc7effb11402b238df9 | onkelpit/i3pystatus,paulollivier/i3pystatus,opatut/i3pystatus,ismaelpuerto/i3pystatus,fmarchenko/i3pystatus,paulollivier/i3pystatus,schroeji/i3pystatus,asmikhailov/i3pystatus,facetoe/i3pystatus,opatut/i3pystatus,yang-ling/i3pystatus,plumps/i3pystatus,claria/i3pystatus,richese/i3pystatus,ncoop/i3pystatus,MaicoTimmerman/... | i3pystatus/pianobar.py | rejected_duplicate | Near-duplicate of sample 9492 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .production_part import ProductionPart\n\nfrom typing import List\n\n\nclass Production:\n def __str__(self):\n return repr(self)\n\n\nclass RuleAliasProduction(Production):\n def __init__(self, rule_name: str):\n s... | python | edit | 1 | 1 | apache-2.0 | 0a73d75d5b58c3326d248875cac46ab1bc95bea3 | pdarragh/Viper | viper/parser/grammar_parsing/production.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '0.0.5'\r\n\r\n\r\ndef eat(*ex, **kwargs):\r\n error_handler = kwargs.get('error_handler', None)\r\n error_value = kwargs.get('error_value', None)\r\n\r\n def inner(func):\r\n def wrapper(*args, **kw):\r\n ... | python | edit | 1 | 3 | mit | e189844bd6179d49665deb1c9ef56206213fc800 | denizdogan/hungry | hungry/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport tempfile\nimport unittest\nfrom jupyter_core.paths import jupyter_config_dir\nfrom ..nbsetuptools import NBSetup\n\n\nclass NBSetupTestCase(unittest.TestCase):\n def setUp(self):\n self.prefix = tempfile.mkdtemp(... | python | edit | 1 | 2 | bsd-3-clause | a3bc13ed4943dae80928da4e09765002bb0db60c | Anaconda-Server/nbsetuptools,Anaconda-Server/nbsetuptools,Anaconda-Server/nbsetuptools | nbsetuptools/tests/test_nbsetuptools.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\nfrom registries.models import Organization\nfrom gwells.models import ProvinceState\n\nclass DrillerListSerializer(serializers.ModelSerializer):\n province_state = serializers.ReadOnlyField()\n\n ... | python | edit | 3 | 0 | apache-2.0 | 365411abd73275a529dc5ca7ec403b994c513aae | bcgov/gwells,rstens/gwells,bcgov/gwells,bcgov/gwells,rstens/gwells,rstens/gwells,rstens/gwells,bcgov/gwells | registries/serializers.py | rejected_duplicate | Near-duplicate of sample 2892 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\n\n\nclass DjangoCmsSpaConfig(AppConfig):\n name = 'djangocms_spa'\n\n def ready(self):\n from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple\n from .form_helpers... | python | edit | 1 | 1 | mit | e3a63e686714e888f5c393924fb98e0eea70f8eb | dreipol/djangocms-spa,dreipol/djangocms-spa | djangocms_spa/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\nimport logging\nfrom aiohttp import web\nimport asyncio\nimport json\n\nimport aiohttp\nimport litecord\n\nimport litecord_config as config\n\nlogging.basicConfig(level=logging.DEBUG, \\\n format='[%(levelname)7s]... | python | edit | 3 | 1 | mit | 3dbdac519e89985b910720092ee6bf2ad1ac8fb0 | nullpixel/litecord,nullpixel/litecord | litecord.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n:mod:`asl.application.initializers` -- ASL initializers\n=======================================================\n\n :platform: Unix, Windows\n :synopsis: The Atteq Service Layer initialization infrastructure\n\n.. moduleauthor:... | python | edit | 10 | 1 | mit | 13e70f822e3cf96a0604bb4ce6ed46dbe2dcf376 | AtteqCom/zsl,AtteqCom/zsl | zsl/application/initializers/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n import javascript\n import html\nexcept:\n from . import javascript\n from . import html\n\ndef expand(string, start, end, extension=None):\n\n if(extension in [\"html\", \"htm\", \"xml\"]):\n return html.expand(string, start... | python | edit | 1 | 2 | mit | 7e407d1185235f4a89bddcaffcde240a33b522f4 | aronwoost/sublime-expand-region,johyphenel/sublime-expand-region,johyphenel/sublime-expand-region | expand_region_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom glob import glob\nimport os\nimport re\n\ndef make_feedmes():\n # One-time script\n # Used to convert all the fit*.galfit files to fit*.diff\n ids = glob('*/')\n for id in ids:\n os.chdir(id)... | python | edit | 3 | 5 | mit | 35af67eb270c5ee177eb264c339c6f9dd390a288 | MegaMorph/galfitm-illustrations,MegaMorph/galfitm-illustrations | fits/make_fit_feedmes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport transaction\n\nfrom sqlalchemy import engine_from_config\n\nfrom pyramid.paster import (\n get_appsettings,\n setup_logging,\n )\n\nfrom pyramid.scripts.common import parse_vars\n\nfrom ..models import... | python | edit | 4 | 3 | mit | c252281ab4ba9570c8f54f3fff6e173cf4d60866 | DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal | learning_journal/scripts/initializedb.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding:utf-8 -*-\n#\n# This file is part of CoTeTo - a code generation tool\n# 201500225 Joerg Raedler <EMAIL>\n#\n\nimport sys\n\n__version__ = '0.2'\n\n# python version check\n\n# please handle py27 a s a special case which may be re... | python | edit | 1 | 2 | mit | 47de6d882c41eda98cda7e8e6ade2457591bbfa1 | EnEff-BIM/EnEffBIM-Framework,EnEff-BIM/EnEffBIM-Framework,EnEff-BIM/EnEffBIM-Framework | CoTeTo/CoTeTo/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2012 OpenStack LLC\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 obtai... | python | edit | 1 | 0 | apache-2.0 | b0ce15be3e9e24a5540215e9931ffbddc2ae42f7 | metacloud/python-glanceclient,openstack/python-glanceclient,varunarya10/python-glanceclient,ntt-sic/python-glanceclient,klmitch/python-glanceclient,klmitch/python-glanceclient,ntt-sic/python-glanceclient,metacloud/python-glanceclient,alexpilotti/python-glanceclient,varunarya10/python-glanceclient,mmasaki/python-glancec... | glanceclient/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#List\n\nl = [x for x in range(1, 10)]\nprint(l)\n\nl2 = [x ** 2 for x in range(1, 10)]\nprint(l2)\n\nl3 = [x for x in range(1, 10) if x % 2 == 0]\nprint(l3)\n\ntlist = [(x, y) for x in range(1, 3) for y in (5, 7)]\nprint(tlist)\n\nprint(li... | python | edit | 1 | 0 | apache-2.0 | 6a55bacff334905ad19e437c3ea26653f452dfbe | precompiler/python-101 | mastering-python/ch04/CollectionsComprehensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 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 at\n#\n# ... | python | edit | 1 | 0 | apache-2.0 | fec4af8b4dccb1264360e833d49688ab707b1d98 | DataBiosphere/dsub,DataBiosphere/dsub | dsub/_dsub_version.py | rejected_duplicate | Near-duplicate of sample 2591 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nCreated on 02/02/2014\n\n@author: Miguel Otero\n'''\n\nfrom .time import Time\n\n\nclass Interval(Time):\n '''\n classdocs\n '''\n MONTHLY = \"http://purl.org/linked-data/sdmx/2009/code#freq-M\"\n YEARLY = \"http://purl.... | python | edit | 1 | 1 | mit | 4e0e29199ce01c7ac8f71af78013911da11a8dc0 | weso/landportal-importers,landportal/landbook-importers,landportal/landbook-importers | LandPortalEntities/lpentities/interval.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport shutil\nimport splunk.appserver.mrsparkle.controllers as controllers\nfrom splunk.appserver.mrsparkle.lib.decorators import expose_page\n\nAPP = 'SplunkforPaloAltoNetworks'\nENABLED_NAV = os.path.join(os.environ['SPLUNK_HO... | python | edit | 1 | 2 | isc | f888de27f382b295af889da37fcb289c582bc4bd | PaloAltoNetworks-BD/SplunkforPaloAltoNetworks | appserver/controllers/nfi_nav_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom django.core.management.base import BaseCommand\nfrom cityhallmonitor.models import Document\n\nlogger = logging.getLogger(__name__)\n\nclass Command(BaseCommand):\n help = 'For each document, force an update of its r... | python | edit | 1 | 5 | mit | 7081e4c9b5b6d85921e20cd7692c0eb7b791f93a | NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor | cityhallmonitor/management/commands/rebuild_text_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n# Copyright (c) Twisted Matrix Laboratories.\n# See LICENSE for details.\n#\n# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py\n\n\nfrom twisted.internet import reactor, protocol\n\nimport rollbar\n\n\ndef bar(p)... | python | edit | 4 | 1 | mit | b4d8329f1d586160c60963270794d72372f38b03 | rollbar/pyrollbar | rollbar/examples/twisted/simpleserv.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Leetcode 49. Group Anagrams\nMedium\n\nURL: https://leetcode.com/problems/group-anagrams/\n\nGiven an array of strings, group anagrams together.\n\nExample:\nInput: [\"eat\", \"tea\", \"tan\", \"ate\", \"nat\", \"bat\"],\nOutput:\n[\n... | python | edit | 2 | 2 | bsd-2-clause | eae949e483e1d30e8c11b662bb07e9d30dcf39c5 | bowen0701/algorithms_data_structures | lc0049_group_anagrams.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport json\nimport time\n\nndex_base_url = 'http://general.bigmech.ndexbio.org:8082'\n#ndex_base_url = 'http://52.37.175.128'\n\ndef send_request(url_suffix, params):\n res = requests.post(ndex_base_url + url_suffix, da... | python | edit | 3 | 6 | bsd-2-clause | c46ee50229c13dc8b10e72fe8cb0f6dc9755cda4 | sorgerlab/belpy,pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,jmuhlich/indra,pvtodorov/indra,sorgerlab/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,jmuhlich/indra,johnbachman/indra,bgyori/ind... | indra/bel/ndex_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\n\"\"\"A green rectangle should take up most of the screen.\"\"\"\n\nimport pyglet\nimport glooey\nimport vecrec\n\nprint(__doc__)\n\nwindow = pyglet.window.Window()\nbatch = pyglet.graphics.Batch()\n\nrect = vecrec... | python | edit | 1 | 1 | mit | 3d6e25bd2df7e3591b9810888ae24ad2317b2b96 | kxgames/glooey,kxgames/glooey | tests/drawing/demo_rectangle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport rospy\nfrom trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse\nfrom geometry_msgs.msg import Point\n\ndef compute_position(request):\n t = request.t\n\n position = Point()\n posit... | python | edit | 1 | 1 | mit | a9844bad75c66e10f85be4555c9ad7aa2df15585 | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/trajectory_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth import views\n\nfrom . import views\n\napp_name=\"listings\"\n\nurlpatterns = [\n url(r'^$', views.index, name='index')... | python | edit | 2 | 0 | mit | 17e20665a5d9675e82bf1aadbc9eb4cb0f79c07f | xyb994/housing,xyb994/housing,xyb994/housing,xyb994/housing | housing/listings/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom paver.easy import *\n\n@task\ndef clean():\n for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:\n p = path(fl)\n p.rmtree()\n \n@task\ndef mk_resources():\n sh('pyuic4 -o buildnotifylib/preferen... | python | edit | 23 | 2 | mit | 09927a3ff7594213419c1445896aaa0e1d86f4f8 | rwilsonncsa/buildnotify | pavement.py | rejected_lint | Too many lint violations: 23 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\n\nimport requests\n\nOPENJUB_BASE = \"https://api.jacobs-cs.club/\"\n\nclass OjubBackend(object):\n\t\"\"\"\n\tAuthenticates credentials against the OpenJUB data... | python | edit | 3 | 5 | mit | 5b6de7e8f79182050eccaf0dc14bca80e67fcb03 | OpenJUB/jay,kuboschek/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay,OpenJUB/jay | users/ojub_auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import views\n\n\ndef register_in(router):\n router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')\n router.register(\n r'slurm-service-project-link',\n views.SlurmServiceProjectLinkViewSet,\n ... | python | edit | 1 | 1 | mit | 65390ca8677440aeb88d8946290899e8a904ac62 | opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | src/waldur_slurm/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\nfrom modules.web_caller import get_google\n\n\nclass TestWebCaller(TestCase):\n \"\"\"\n Tests for the `web_caller` module.\n \"\"\"\n\n def test_get_google(self):\n \"\"\"\n Callin... | python | edit | 1 | 1 | mit | cbb925f09f4ad5fbe3a23ec7e9816184653e0acf | tkh/test-examples,tkh/test-examples | tests/test_web_caller.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n# HTTP-Server\nSERVER_PORT = 8000\nSERVER_DEFAULT_TEMPLATE = '/choose'\n\n# PRINTER\nPRINTER_TIMEOUT = 10 # in seconds\nPRINTER_HOST = '172.22.26.67'\nPRINTER_PORT = 9100\n\n# error logging\nSENTRY_DSN = None\n\n# try to overw... | python | edit | 2 | 0 | mit | dbdab865343c0c17655fb662ac5e939eb24758c8 | chaosdorf/labello,chaosdorf/labello,chaosdorf/labello | labelprinterServeConf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pkg_resources\n\nimport wish_utils\n\n\ndef test_import_modules():\n # normal code path, pytest is a dependency\n distributions = [pkg_resources.get_distribution('pytest')]\n distributions_modules ... | python | edit | 1 | 1 | mit | 40b6b5db450c92fd5d64186981be433c47b43afd | alexamici/pytest-wish,nodev-io/pytest-nodev,alexamici/pytest-nodev | tests/test_wish_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Fill missing values in a grid.\"\"\"\n# Copyright (c) 2012-2014 Andrew Dawson\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"... | python | edit | 1 | 0 | mit | 1e04f0960ee0fb8d243516ac72746a4442a656e3 | ajdawson/gridfill | lib/gridfill/__init__.py | rejected_duplicate | Near-duplicate of sample 13279 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nBenchExec is a framework for reliable benchmarking.\nThis file is part of BenchExec.\n\nCopyright (C) 2007-2015 Dirk Beyer\nAll rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use ... | python | edit | 1 | 3 | apache-2.0 | f3d8cb7f173b671b38dda6c4a917b1056dbab767 | sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,martin-neuhaeusser/benchexec,IljaZakharov/benchexec,dbeyer/benchexec,IljaZakharov/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,martin-neuhaeusser/benchexec,martin-neuhaeusser/benchexec,IljaZakharo... | benchexec/tools/lctd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Callable, List\n\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\n\n\nclass Task(object):\n \"\"\"A task for use in an MMTL MetalModel\n\n Args:\n name: The na... | python | edit | 1 | 2 | apache-2.0 | 75f73632914f5d649b4154f86b665619b4c9268d | HazyResearch/metal,HazyResearch/metal | metal/mmtl/task.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pipeyql.py\n#\n\nimport urllib\nimport urllib2\n\nfrom xml.etree import cElementTree as ElementTree\n\nfrom pipe2py import util\n\ndef pipe_yql(context, _INPUT, conf, **kwargs):\n \"\"\"This source issues YQL queries.\n \n Keywo... | python | edit | 2 | 6 | mit | 02483546e2d6e134689a0d746025c4256279c05d | nerevu/riko,nerevu/riko | modules/pipeyql.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 awx.main.migrations import _rbac as rbac\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('main', '0003_... | python | edit | 1 | 0 | apache-2.0 | a2b9777cc7ec4d606d3a33400c4f242bc9177fab | wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx | awx/main/migrations/0004_rbac_migrations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\n\nclass Utils(object):\n \"\"\"\n A few things we'll (eventually) use.\n \"\"\"\n\n def __init__(self):\n # These are file types we do not want to send to DocumentCloud.\n self.file_excludes = (\n ... | python | edit | 1 | 4 | mit | beee964585dfc79b3c83deadce7b68922350f9be | anthonydb/pneumatic | pneumatic/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom .views import MainHandler, ProcessHandler, DashboardHandler\n\n\nINCLUDE_URLS = [\n (r\"/process/(?P<slug>[\\w-]+).json\", ProcessHandler),\n (r\"/dashboard/(?P<slug>[\\w-]+)\", Das... | python | edit | 1 | 0 | mit | 946213058ba049fecaffdfa6e88e69295e042edf | seagoat/mining,mlgruby/mining,AndrzejR/mining,seagoat/mining,mining/mining,AndrzejR/mining,chrisdamba/mining,avelino/mining,mlgruby/mining,jgabriellima/mining,mining/mining,mlgruby/mining,chrisdamba/mining,avelino/mining,jgabriellima/mining | mining/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\n\nclass UserSerializer(serializers.Serializer):\n username = serializers.CharField(max_length=255)\n email = serializers.CharField(max_length=255)\n id = serializers.IntegerField()\n\n```\n... | python | edit | 1 | 0 | mit | 023109283545141dc0ed88a8a7f67d7c21da2a89 | ZeusWPI/oauth,ZeusWPI/oauth | oauth/api/serializers.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.