messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom .utils.version import get_version\n\n#: This may not be the exact version as it's subject to modification with\n#... | python | edit | 1 | 0 | mit | 760ca4809259df4cf24d77385f35bf41ec1c5383 | indirectlylit/kolibri,benjaoming/kolibri,learningequality/kolibri,christianmemije/kolibri,benjaoming/kolibri,benjaoming/kolibri,jonboiser/kolibri,christianmemije/kolibri,DXCanas/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,jonboiser/kolibri,benjaoming/kolibri,DXCanas/kolibri,mrpau/kolibri,DXCana... | kolibri/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'moshebasanchig'\n\nfrom hydro.connectors.base_classes import DBBaseConnector\nimport pyodbc\nfrom hydro.exceptions import HydroException\n\nDSN = 'dsn'\n\n\nclass VerticaConnector(DBBaseConnector):\n \"\"\"\n implementat... | python | edit | 2 | 2 | mit | 5d643a8f4a5e689cb2c5aaa0e98efcf17862fc3e | Convertro/Hydro,Convertro/Hydro | src/hydro/connectors/vertica.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom IPython.terminal.embed import InteractiveShellEmbed\n\nfrom libcloud.compute.types import Provider\nfrom libcloud.compute.providers import get_driver\nimport libcloud.security as sec\n\nsec.VERIFY_SSL_CERT = False\n\napike... | python | edit | 1 | 0 | apache-2.0 | ce4ee9558ed0c53e03cb31627c597d5388b56ffa | briancurtin/libcloud,Cloud-Elasticity-Services/as-libcloud,niteoweb/libcloud,lochiiconnectivity/libcloud,wrigri/libcloud,apache/libcloud,JamesGuthrie/libcloud,atsaki/libcloud,andrewsomething/libcloud,wido/libcloud,cryptickp/libcloud,Itxaka/libcloud,iPlantCollaborativeOpenSource/libcloud,mistio/libcloud,sahildua2305/lib... | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport smtpd\nfrom email.parser import Parser\nfrom mailchute import db\nfrom mailchute import settings\nfrom mailchute.model import RawMessage, IncomingEmail\nfrom logbook import Logger\n\n\nlogger = Logger(__name__)\n\n\n... | python | edit | 1 | 4 | bsd-3-clause | e73409c17c89ef54f5c7e807059b229517e77617 | kevinjqiu/mailchute,kevinjqiu/mailchute | mailchute/smtpd/mailchute.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 unittest\n\nfrom ParseArticleReferenceTest import ParseArticleReferenceTest\nfrom SortReferencesVisitorTest import SortReferencesVisitorTest\nfrom ParseEditTest import ParseEditTest\n... | python | edit | 9 | 0 | mit | be2d33152c07594465c9b838c060edeaa8bc6ddc | Legilibre/duralex | tests/main.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport angr\nimport os\nimport nose\n\ntest_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),\n '../../binaries/tests'))\nbinpath = os.path.join(test_location, \"x86_64/test_gdb_plugin\... | python | edit | 1 | 1 | bsd-2-clause | cfc9c21121f06007dd582fe6cd0162e4df2a21d5 | schieb/angr,iamahuman/angr,iamahuman/angr,f-prettyland/angr,axt/angr,f-prettyland/angr,angr/angr,tyb0807/angr,chubbymaggie/angr,axt/angr,tyb0807/angr,schieb/angr,schieb/angr,angr/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/angr,iamahuman/angr,angr/angr,f-prettyland/angr,axt/angr | tests/test_cle_gdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# The MIT License (MIT)\n#\n# Copyright (c) 2013 CFEngine AS\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 | 3 | 0 | mit | 0068c9da4b8af1d51928ce3d2f326130dbf342f2 | michaelclelland/documentation-generator,stweil/documentation-generator,stweil/documentation-generator,nickanderson/documentation-generator,cfengine/documentation-generator,michaelclelland/documentation-generator,cfengine/documentation-generator,nickanderson/documentation-generator,michaelclelland/documentation-generato... | _scripts/cfdoc_bootstrap.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2020 The Tensor2Robot Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License a... | python | edit | 1 | 1 | apache-2.0 | a3674958a046de711e37445d39afd4e529d8dd09 | google-research/tensor2robot | bin/run_t2r_trainer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport operator\nimport itertools\n\nclass NotImplementedByController(unittest.SkipTest, NotImplementedError):\n def __str__(self):\n return 'Not implemented by controller: {}'.format(self.args[0])\n\nclass Option... | python | edit | 3 | 4 | mit | d705c4ffbe60a11a0cde55f5caa2324349366bab | ProgVal/irctest | irctest/optional_extensions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 0xc0170\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/... | python | edit | 2 | 0 | apache-2.0 | 3364747195f0f3d2711169fb92c250fc10823d82 | 0xc0170/valinor,sarahmarshy/project_generator,autopulated/valinor,ARMmbed/valinor,sg-/project_generator,ohagendorf/project_generator,molejar/project_generator,aethaniel/project_generator,0xc0170/project_generator,sg-/project_generator,project-generator/project_generator,hwfwgrp/project_generator | default_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Base objects to be exported for use in Controllers\"\"\"\nfrom paste.registry import StackedObjectProxy\n\nfrom pylons.config import config\n\n__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',\n '... | python | edit | 1 | 3 | bsd-3-clause | 448f412790220a48a26c595c9dd6f6a5f412d995 | obeattie/pylons,obeattie/pylons | pylons/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\nfrom discord.ext import commands\n\n\nclass Default:\n @commands.command(aliases=['p'])\n async def ping(self, ctx):\n \"\"\"Get the ping to the websocket.\"\"\"\n msg = await ctx.send(\"Pong! :ping_pong:\... | python | edit | 1 | 2 | mit | 69f0b89c306b6a616e3db2716669a2aa04453222 | BeatButton/beattie,BeatButton/beattie-bot | cogs/default.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses th... | python | edit | 1 | 0 | apache-2.0 | dc251707fdcd9fe021b6f8627ffbb139d42423b3 | nathanbjenx/cairis,nathanbjenx/cairis,nathanbjenx/cairis,failys/CAIRIS,failys/CAIRIS,failys/CAIRIS,nathanbjenx/cairis | cairis/test/CairisDaemonTestCase.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\n\nfrom django.core.exceptions import ValidationError\nfrom polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError\nfrom pol... | python | edit | 1 | 3 | apache-2.0 | 7f1ae8ac882dff05332e9f98f5b6396224392723 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | api/libs/spec_validation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom SublimeLinter.lint import Linter, util\n\n\nclass Cppcheck(Linter):\n cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')\n regex = (\n r'^(?P<file>(:\\\... | python | edit | 1 | 3 | mit | ad7d39c472130e7f06c30d06a5aed465d2e5ab2c | SublimeLinter/SublimeLinter-cppcheck | linter.py | rejected_duplicate | Near-duplicate of sample 19761 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nThis module will retrieve info about students registered in the course\n\nUsage:\n\npython user_info.py\n\n'''\n\nfrom collections import defaultdict\n\nfrom base_edx import EdXConnection\nfrom generate_csv_report import CSV \n\nconnec... | python | edit | 3 | 0 | mit | 2e9527d00358027a3f85d3087734ab4e87441fc4 | andyzsf/edx_data_research,andyzsf/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research | reporting_scripts/user_info.py | rejected_duplicate | Near-duplicate of sample 19640 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.core.exceptions import ValidationError\n\nfrom .models import Tag\n\n\nclass TagForm(forms.ModelForm):\n class Meta:\n model = Tag\n exclude = tuple()\n\n def clean_name(self):\n ... | python | edit | 1 | 2 | bsd-2-clause | e40e30170b76ce7761a398d6c9ee7bac1f18a621 | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | organizer/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Aparajita Fishman\n# Contributors: Francis Gulotta, Josh Hagins\n# Copyright (c) 2013 Aparajita Fishman\n#\n# License: MIT\n#\n\n\"\"... | python | edit | 1 | 0 | mit | cf948bd38a57b459db9f37ac584207f36cb3610e | SublimeLinter/SublimeLinter-rubocop | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.14 on 2020-02-28 17:30\nfrom __future__ import unicode_literals\n\n\nfrom django.db import migrations\nimport mimetypes\n\n\ndef forward(apps, schema_editor):\n AttachmentModel = apps.g... | python | edit | 1 | 4 | bsd-2-clause | 4c2cc3c8a37082fe4d87f0a522e440cead8d2b4f | makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin | geotrek/common/migrations/0011_attachment_add_is_image.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.cred import portal\nfrom twisted.conch.checkers import SSHPublicKeyDatabase\n\nfrom carapace.util import ssh as util\n\nfrom peloid.app import mud\nfrom peloid.app.shell import gameshell, setupshell\n\n\ndef getGameShellFactory... | python | edit | 1 | 1 | mit | a72cf5997439533d7ce74d6c4fc50d1189466c1b | oubiwann/peloid | peloid/app/shell/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport igraph\n\ndef packing_graph(tets, vx, vy, vz, independent = 0):\n N = len(tets)\n g = igraph.Graph()\n g.add_vertices(N)\n for i in range(N):\n for j in range(max(i, independent),N):\n for s in tets[j].g... | python | edit | 1 | 8 | mit | aada9a317eb8aed5dcd8ff6731692ef25ff52a67 | maxhutch/packtets,maxhutch/packtets | packtets/graph/generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.translation import get_language\nfrom django.db.models import Model\nfrom django.conf import settings\n\ntry:\n from django.utils.translation import override\nexcept ImportError:\n from django.utils.translation impor... | python | edit | 3 | 4 | apache-2.0 | 8fce8e72f5ff40e51605f3b14bcde5006f4eaa71 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | molly/utils/i18n.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Category, Keyword, Subcategory\r\nfrom rest_framework import serializers\r\n\r\n\r\nclass KeywordSerializer(serializers.ModelSerializer):\r\n class Meta:\r\n model = Keyword\r\n fields = ('pk', 'name')\r... | python | edit | 1 | 0 | apache-2.0 | 71d227e96eeeac09dc7fc25298600f159cf338a0 | belatrix/BackendAllStars | categories/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"feed_to_kippt.settings\")\n\n from django.core.management import execute_from_command_line\n\n execu... | python | edit | 1 | 6 | mit | 8c19549071782f3a07f1a6f1656817bb36b00dbe | jpadilla/feedleap,jpadilla/feedleap | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Finding a sequence.\n\nUsage: sequencefinding.py NUMBERS...\n\nArguments:\n NUMBERS your sequence of numbers\n\"\"\"\n\nimport docopt\n\n\ndef differences(a):\n return [t - s for s, t in zip(a, a[1:])]\n\n\ndef constant_differ... | python | edit | 1 | 4 | mit | 4148feec637dbc1b6619cd45ed14b4d4fb6f4148 | joostrijneveld/sequencefinder | sequencefinding.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom pacman103.core import control\nfrom pacman103 import conf\n\nfrom . import builder\n\n\nclass Simulator(object):\n def __init__(self, model, dt=0.001, seed=None, use_serial=False):\n # Build the model\n s... | python | edit | 1 | 1 | mit | 64c31f5630975a30a8187ad51566b4ff723b4d28 | ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014 | nengo_spinnaker/simulator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nfrom django.conf import settings\nfrom rest_framework import serializers\nfrom rest_framework.validators import UniqueTogetherValidator\nfrom server.api.serializers.chapters import ChapterSerializer\nfrom .riders import Rid... | python | edit | 4 | 0 | mit | 715e304de7a61e4cd14f26afe819d1eeb1d72f2e | Techbikers/techbikers,mwillmott/techbikers,Techbikers/techbikers,mwillmott/techbikers,mwillmott/techbikers,Techbikers/techbikers,Techbikers/techbikers,mwillmott/techbikers | server/api/serializers/rides.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom collections import defaultdict\nimport operator\n\nimport six\n\nfrom semanticizest._util import ngrams_with_pos, tosequence\n\n\nclass Semanticizer(object):\n def __init__(self, link_count, N=7):\n commonness = defaultdict(l... | python | edit | 3 | 5 | apache-2.0 | aec36263dac9037afa0343dcef87ae97530e1ad3 | semanticize/semanticizest | semanticizest/_semanticizer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .client.telegramclient import TelegramClient\nfrom .network import connection\nfrom .tl import types, functions, custom\nfrom .tl.custom import Button\nfrom . import version, events, utils, errors\n\n__version__ = version.__version__\n... | python | edit | 3 | 0 | mit | 0e8bd8248cc649637b7c392616887c50986427a0 | LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon | telethon/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom tempfile import SpooledTemporaryFile\nfrom contextlib import contextmanager\n\n@contextmanager\ndef redirect_stream(output_stream, destination):\n \"\"\"\n Redirect anything written to ``output_stream`` (typically ``sy... | python | edit | 2 | 2 | bsd-2-clause | 6ba3ae92d1bf72f5076ebf35b2b370cfebb8f390 | bartscheers/tkp,transientskp/tkp,mkuiack/tkp,transientskp/tkp,bartscheers/tkp,mkuiack/tkp | tkp/utility/redirect_stream.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport abc\n\n\nclass BaseMetric(abc.ABC):\n ALIAS = 'base_metric'\n\n @abc.abstractmethod\n def __call__(self, y_true, y_pred):\n \"\"\"\"\"\"\n\n def __repr__(self):\n return self.ALIAS\n\n\ndef parse_metric(metr... | python | edit | 1 | 7 | apache-2.0 | 2d4aebc6f4ce658395304a407de6519c55679029 | faneshion/MatchZoo,faneshion/MatchZoo | matchzoo/engine/base_metric.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom binder import Sqlite3Connection\nfrom binder import MysqlConnection\nimport os\n\n\n# sqlite3\n_bindertest_dir = os.path.dirname( __file__ )\nDBFILE = os.path.join(_bindertest_dir, \"test.db3\")\ndef connect_sqlite3(read_only=None):\... | python | edit | 1 | 2 | mit | 57d95df9147de57be3652e633de394095b0de54f | divtxt/binder | test/bindertest/testdbconfig.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base_settings import *\nimport dj_database_url\nimport os\n\nALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']\n\ndb_from_env = dj_database_url.config(conn_max_age=500)\nDATABASES['default'].update(db_from_env)\n\n# Static fi... | python | edit | 3 | 0 | mit | d0d823e8639c8c8c69960a2dc64ce3edfb1a7dcf | EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat | halaqat/settings/shaha.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom nose.tools import eq_\nfrom resumable import rebuild, split\n\n\ndef test_simple():\n @rebuild\n def function(original):\n return split(str.upper)(original)\n\n original = 'hello'\n\n origin... | python | edit | 1 | 1 | mit | 5e6fc0017d6e4c35338455496924616b12d4b9e1 | Mause/resumable | tests/test_simple.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport httpretty\n\nfrom scrapi.base import OAIHarvester\nfrom scrapi.linter import RawDocument\n\nfrom .utils import TEST_OAI_DOC\n\n\nclass TestHarvester(OAIHarvester):\n base_url = ''\n lo... | python | edit | 1 | 3 | apache-2.0 | 22c56941d054e083b1d406b1440efd8c0ecc5f11 | erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,erinspace/scrapi,fabianvf/scrapi | tests/test_oai_harvester.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport uuid\n\n\ndef make_arn_for_topic(account_id, name):\n return \"arn:aws:sns:us-east-1:{}:{}\".format(account_id, name)\n\n\ndef make_arn_for_subscription(topic_arn):\n subscription_id = uuid.uuid4()\n return \"{}:{}\".format(... | python | edit | 1 | 1 | apache-2.0 | e38f7d46626f96cb033360764c269aa5c69dda76 | okomestudio/moto,whummer/moto,tootedom/moto,ZuluPro/moto,araines/moto,DataDog/moto,spulec/moto,heddle317/moto,Brett55/moto,andresriancho/moto,im-auld/moto,dbfr3qs/moto,gjtempleton/moto,braintreeps/moto,Brett55/moto,gjtempleton/moto,dbfr3qs/moto,botify-labs/moto,okomestudio/moto,gjtempleton/moto,okomestudio/moto,jrydber... | moto/sns/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport billboard\nimport unittest\nfrom nose.tools import raises\nfrom requests.exceptions import ConnectionError\nimport six\n\n\nclass MiscTest(unittest.TestCase):\n @raises(ConnectionError)\n def test_tim... | python | edit | 1 | 1 | mit | cbe07cd63d07f021ccd404cba2bcfe2a6933457b | guoguo12/billboard-charts,guoguo12/billboard-charts | tests/test_misc.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix test_version() to support 3 or 4 elements\n\nSigned-off-by: Stephen L. <<EMAIL>>"
},
{
"role": "assistant",
"content": "def test_version():\n from tqdm import __version__\n assert 3 <= len(__version__.split('.')) <= 4\n... | python | new_file | 1 | 1 | mit | efc19658e081dc66e387f8e26c310943eacf21e7 | lrq3000/tqdm | tqdm/tests/tests_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Leetcode 118. Pascal's Triangle\nEasy\n\nURL: https://leetcode.com/problems/pascals-triangle/\n\nGiven a non-negative integer numRows, generate the first numRows of \nPascal's triangle.\n\nIn Pascal's triangle, each number is the sum ... | python | edit | 1 | 6 | bsd-2-clause | 476d8663b8b85ca902703eeee697ae5be0eefabb | bowen0701/algorithms_data_structures | lc0118_pascal_triangle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module runs the api server.\"\"\"\nimport os\nfrom app import flask_app, db\nfrom app.models import User, BucketList, BucketListItem\nfrom flask.ext.script import Manager, Shell\nfrom flask.ext.migrate import Migrate, MigrateComm... | python | edit | 4 | 1 | mit | 56879634bda7c6c7024d0b9b4bf77c99e703f4f3 | andela-akiura/bucketlist | server.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom painindex.settings.settings_base import *\n\n# This file is NOT part of our repo. It contains sensitive settings like secret key\n# and db setup.\nfrom env import *\n\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\n\n# Apps used... | python | edit | 6 | 0 | mit | 94f1d4af970076005d7271c1e91b8b9a148a018d | xanv/painindex | painindex/settings/settings_prod.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport keras.backend as K\nimport numpy as np\n\n\ndef psnr(y_true, y_pred):\n \"\"\"Peak signal-to-noise ratio averaged over samples and channels.\"\"\"\n mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))\n return K.mean(20 * K... | python | edit | 1 | 1 | mit | f813f72ad02bbf4b8e4ad0b190064879f6c3df3e | qobilidop/srcnn,qobilidop/srcnn | toolbox/metrics.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This is imported from setup.py and the test script\ntests_require = [\n 'pytest',\n 'pytest-capturelog',\n 'pytest-cov',\n]\n\n```\n\nApply this change: Add coveralls to test requirements"
},
{
"role": "assistant",
"c... | python | edit | 1 | 0 | bsd-2-clause | e3c1819b6b5ddec1ff326c3693d48ec8a8b3a834 | sjkingo/fantail,sjkingo/fantail,sjkingo/fantail | fantail/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom jsonschema import validate, ValidationError\nfrom flask import current_app\nimport json\nimport os\n\n\ndef validate_schema(data, schema_name):\n \"\"\"\n Validate the provided data against the provided JSON schema.\n \n :p... | python | edit | 1 | 2 | apache-2.0 | e1f8f0b9e898521b9f25611ec7e6b8ecc8f1af8d | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords | app/lib/json_schema_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom src import rules\n\nclass TestRules(unittest.TestCase):\n\tdef test_good_value_1(self):\n\t\trules_obj = rules.Rules()\n\t\tresult = rules_obj.convertCharToInt('1')\n\t\tself.assertEqual(result, 1)\n\n\tdef test_good_v... | python | edit | 1 | 1 | mit | f50d1834580f0b516035b3a5693b45bf4689bed3 | blairck/jaeger | test/test_rules.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n import pync\n pync_available = True\nexcept ImportError:\n pync_available = False\n\nfrom .alerter import Alerter\n\nclass NotificationCenterAlerter(Alerter):\n \"\"\"Send alerts to the Mac OS X Notification Center.\"\"\"... | python | edit | 1 | 5 | bsd-3-clause | a14a911ae49d8354f61426cee2925b2a24a9b521 | jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor | Alerters/nc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis file contains the code needed for dealing with some of the mappings. Usually a map is just a\ndictionary that needs to be loaded inside a variable.\nThis file carries the function to parse the files and the variables containing... | python | edit | 1 | 1 | mit | 886b064fb22400b1fa8706a740b738ec057d4117 | danodic/pianopad | src/map_manager.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport logging\nlogger = logging.getLogger(\"robots\")\nlogger.setLevel(logging.DEBUG)\n\nconsole = logging.StreamHandler()\nconsole.setLevel(logging.DEBUG)\nformatter = logging.Formatter('%(asctime)-15s %(name)s: ... | python | edit | 1 | 2 | isc | 8dc27ef7eae79992e8db94e580faf7e16c03e949 | chili-epfl/pyrobots,chili-epfl/pyrobots-nao | scripts/base_interaction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nlong_description = '''\\\nimage-diet2 is a Django application for removing unnecessary bytes from image\nfiles. It optimizes images without changing their look or visual quality\n(\"losslessly\").\n\nIt work... | python | edit | 1 | 0 | mit | f4f65dd62e5f70a17cecbddf960fa7a0c9699820 | samastur/image-diet2 | setup.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 sys\nfrom setuptools import setup, find_packages\n\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as history_file:\n histor... | python | edit | 2 | 0 | mit | 443a66e04c18de2653791710b387220bf456380d | johanvdw/niche_vlaanderen | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.internet.task import LoopingCall\nfrom twisted.python import log as twistedLog\n\nfrom src.shared import config\nfrom src.server.game_state_manager import GameStateManager\nfrom src.server.networking import runServer, Connectio... | python | edit | 1 | 1 | mit | 5556c3c0b4fc55f17de1f3d8d96288746a36775a | CheeseLord/warts,CheeseLord/warts | src/server/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport os, glob, string, shutil\n\n# Packages\n\npackages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'ne... | python | edit | 6 | 1 | bsd-3-clause | a25e6fb5f9e63ffa30a6c655a6775eead4206bcb | gef756/statsmodels,kiyoto/statsmodels,hainm/statsmodels,wdurhamh/statsmodels,detrout/debian-statsmodels,kiyoto/statsmodels,cbmoore/statsmodels,edhuckle/statsmodels,alekz112/statsmodels,hainm/statsmodels,bsipocz/statsmodels,phobson/statsmodels,huongttlan/statsmodels,ChadFulton/statsmodels,wkfwkf/statsmodels,josef-pkt/st... | setup.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os, sys\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='towncrier',\n maintainer='Amber Brown',\n maintainer_email... | python | edit | 4 | 0 | mit | 2fc2a0a216d4d57e8157622c69b59fe566b885a2 | hawkowl/towncrier | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\nimport os\n\nfrom deflect import __version__ as version\n\n\ndef read_file(filename):\n \"\"\"\n Utility function to read a provided filename.\n \"\"\"\n return open(os.... | python | edit | 1 | 1 | bsd-3-clause | 2251ef09b75b60268b6d28ff4ec5a04e8eef209f | jbittel/django-deflect | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom haystack import indexes\nfrom haystack import site\n\nfrom publicbody.models import PublicBody\n\n\nclass PublicBodyIndex(indexes.SearchIndex):\n text = indexes.CharField(document=True, use_template=True)\n name = indexes.CharFie... | python | edit | 1 | 1 | mit | 319d6cb62c55d4eec124d9872d491aebaaad468a | ryankanno/froide,stefanw/froide,fin/froide,okfse/froide,LilithWittmann/froide,CodeforHawaii/froide,catcosmo/froide,catcosmo/froide,CodeforHawaii/froide,LilithWittmann/froide,ryankanno/froide,okfse/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,ryankanno/froide,catcosmo/froide,okfse/froide,LilithWittm... | froide/publicbody/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='discord-curious',\n version='0.1.1',\n packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],\n url='https://github.com/SunDwarf/curious',\n... | python | edit | 1 | 0 | mit | 9295a2937e4d8dfa031d8153755e25fddf34aac4 | SunDwarf/curious | setup.py | rejected_duplicate | Near-duplicate of sample 17414 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport sys\n\nversion = '2.0.0'\n\nif sys.version_info >= (3,):\n python_dateutils_version = 'python-dateutil>=2.0'\nelse:\n python_dateutils_version = 'python-dateutil<2.0'\n\n\nsetup(name='pyactiveresou... | python | edit | 1 | 0 | mit | 6eba2b16f91b679384503af46bda82233e1f8f65 | piran/pyactiveresource,hockeybuggy/pyactiveresource,metric-collective/pyactiveresource,varesa/pyactiveresource | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='nchp',\n version='0.1',\n description='NGINX based Configurable HTTP Proxy for use with jupyterhub',\n url='http://github.com/yuvipanda/jupyterhub-nginx-chp',\n author='Yuvi Pand... | python | edit | 1 | 0 | bsd-3-clause | 73da02cc3cc33f287a78f9d7d0c7904058ec8c01 | yuvipanda/jupyterhub-nginx-chp | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nfrom setuptools import setup, Command\n\nimport restle\n\n\nclass PyTest(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n... | python | edit | 3 | 1 | bsd-3-clause | 2cadcdbe2c9226547e95247a228aeec397a0f311 | consbio/restle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom trakt.version import __version__\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='trakt.py',\n version=__version__,\n license='MIT',\n url='https://github.com/fuzeman/trakt.py',\n\n author='Dean Gardiner'... | python | edit | 1 | 0 | mit | cd05732abb9d8d6c5dbacb5fea0b3bb01d066e0b | shad7/trakt.py,fuzeman/trakt.py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numpy.distutils.core import setup\nfrom numpy.distutils.misc_util import Configuration\nfrom numpy.distutils.system_info import get_info\nfrom os.path import join\n\nflags = ['-W', '-Wall', '-march=opteron', '-O3']\n\ndef configuration... | python | edit | 1 | 2 | bsd-2-clause | f40fca40d5e09d7ae64acab1258f58cea6810662 | dopplershift/Scattering | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import abspath, dirname, join, normpath\n\nfrom setuptools import find_packages, setup\n\n\nsetup(\n\n # Basic package information:\n name = 'django-twilio',\n version = '0.1',\n packages = find_packages(),\n\n #... | python | edit | 1 | 0 | unlicense | 4ffaf3d689dcb56d61c7e687b9d56e588c6ac9b6 | rdegges/django-twilio,aditweb/django-twilio | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\nfrom sys import stdin\n\nfor line in stdin:\n line = line.strip()\n\n if line == '':\n print('')\n else:\n wf, feats, lemma, label, ann = line.split('\\t')\n\n lemmas = ann\n i... | python | edit | 1 | 4 | apache-2.0 | b8688879de84b405d8c54add3ca793df54e2f39a | mpsilfve/FinnPos,mpsilfve/FinnPos,mpsilfve/FinnPos,mpsilfve/FinnPos | bin/finnpos-restore-lemma.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nextras_require = {\n 'backends': ('peewee', \"redis\"),\n}\n\nsetup(\n name='huey',\n version=__import__('huey').__version__,\n description='huey, a little task queue',\n autho... | python | edit | 1 | 0 | mit | 32f6acb989ea5bcf7df1ad1dbc6385c48f443d3e | pombredanne/huey,rsalmaso/huey,coleifer/huey | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='akanda-rug',\n version='0.1.5',\n description='Akanda Router Update Generator manages tenant routers',\n author='DreamHost',\n author_email='<EMAIL>',\n url='ht... | python | edit | 1 | 0 | apache-2.0 | 5e9818c17b94be9c60271e756e7e88aedc63cb7a | dreamhost/akanda-rug,openstack/akanda-rug,markmcclain/astara,stackforge/akanda-rug,stackforge/akanda-rug,openstack/akanda-rug | setup.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\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup, find_packages\n\n\nreadme = open('README.rst').read()\n\nrequirements = ma... | python | edit | 1 | 0 | bsd-3-clause | 997bebada0ff6e3f9b9110a4c583ca5ef59238f0 | freshbooks/sqlcop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCopyright 2017 BlazeMeter Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o... | python | edit | 1 | 0 | apache-2.0 | de26cffafb9aba0e4981be2bd40617719052b438 | Blazemeter/apiritif,Blazemeter/apiritif | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nlong_description = '''\nThis module allows you to perform IP subnet calculations, there is support\nfor both IPv4 and IPv6 CIDR notation.\n'''\n\nsetup(name='ipcalc',\n versi... | python | edit | 2 | 0 | bsd-2-clause | 6fd8bf7a3113c82c88325dd04fe610ba10049855 | panaceya/ipcalc,tehmaze/ipcalc | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nfrom distutils.core import setup, Command\n\n\nclass TestCommand(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def ... | python | edit | 1 | 1 | mit | d38d26d1d613ba9550bb247eaed8af62bbd99d16 | GallopLabs/facebook-ads-api,narrowcast/facebook-ads-api,taenyon/facebook-ads-api | setup.py | rejected_duplicate | Near-duplicate of sample 5384 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nScript to install Souma on OsX, Windows, and Unix\n\nUsage:\n python setup.py py2app\n\"\"\"\nimport ez_setup\nez_setup.use_setuptools()\n\nimport sys\nfrom setuptools import setup\n\nAPP = ['run.py']\n\nif sys.platform == 'darwi... | python | edit | 1 | 0 | apache-2.0 | bc9814efad3050f522ad103603f681b8d74fca5c | ciex/souma,ciex/souma,ciex/souma | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nREQUIREMENTS = [\n \"docopt==0.6.1\",\n \"feedparser==5.1.3\",\n \"jabberbot==0.15\",\n \"xmpppy==0.5.0rc1\",\n]\n\nif __name__ == \"__main__\":\n setuptools.setup(\n name=\"dudebot\",\n ver... | python | edit | 1 | 0 | bsd-2-clause | a9c8d3331451deaaa6b156d73df951021705fd71 | sujaymansingh/dudebot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, os\nsys.path.insert(0, os.path.join(os.getcwd(),'lib'))\n\nfrom distutils.core import setup\nimport simpletal\n\nsetup(name=\"SimpleTAL\",\n\tversion= simpletal.__version__,\n\tdescription=\"SimpleTAL is... | python | edit | 1 | 0 | bsd-3-clause | 8651c367d05798323e33066c520cf8e988937a78 | g2p/SimpleTAL | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport wsgi_intercept\n\nfrom setuptools import setup, find_packages\n\nCLASSIFIERS = \"\"\"\nEnvironment :: Web Environment\nIntended Audience :: Developers\nLicense :: OSI Approved :: MIT License\nOperating System :: OS Independent\nProgr... | python | edit | 1 | 0 | mit | f66a205ad14bdd55011abb2b2e9c821162358e8e | cdent/wsgi-intercept,sileht/python3-wsgi-intercept | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nfrom hdx.utilities.path import script_dir_plus_file\n\nrequirements = ['ckanapi',\n 'colorlog',\n 'ndg-httpsclient',\n 'pyasn1',\n 'p... | python | edit | 1 | 1 | mit | 679ea714796fcf6f11c0f14301f95a37914fd653 | OCHA-DAP/hdx-python-api | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\nimport os\nfrom setuptools import find_packages\n\nname = 'Mikko Korpela'\n# I might be just a little bit too much afraid of those bots..\naddress = name.lower().replace(' ', '.')+c... | python | edit | 1 | 0 | apache-2.0 | 2c5e1c0803675df0f93b62f09eb355b2cd43f907 | mkorpela/pabot,mkorpela/pabot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='permission',\n version='0.2.0',\n author='Zhipeng Liu',\n author_email='<EMAIL>',\n url='https://github.com/hustlzp/permission',\n packages=['permission'],\n license='M... | python | edit | 1 | 0 | mit | 736963683e57256bbcd6e2c7d620f8651946c40a | hustlzp/permission | setup.py | rejected_duplicate | Near-duplicate of sample 14917 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"\nCreated by: Lee Bergstrand (2018)\n\nDescription: Setup for installing pygenprop.\n\"\"\"\n\nfrom setuptools import setup\n\nsetup(name='pygenprop',\n version='0.5',\n description='A python library... | python | edit | 1 | 0 | apache-2.0 | e6e25b3d872d4812df8be0655eb582a301dfb51c | LeeBergstrand/pygenprop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup, Extension\r\n\r\nsetup (\r\n name='PPeg',\r\n version='0.9',\r\n description=\"A Python port of Lua's LPeg pattern matching library\",\r\n url='https://bitbucket.org/pmoore/ppeg',\r\n\r\n aut... | python | edit | 1 | 0 | mit | 33f28ad9ba7c6eeec1f85be43863ea4c7b04128f | moreati/ppeg,moreati/ppeg | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n# Copyright 2022 The Balloon Learning Environment Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy ... | python | edit | 1 | 0 | apache-2.0 | 6c1f071876334b12f0c2f753efd42b0cd7bea135 | google/balloon-learning-environment | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\n\n\n# Do this first, so setuptools installs cffi immediately before trying to do\n# the below import\nDistribution(dict(setup_requires='cffi'))... | python | edit | 1 | 0 | isc | 93bcfe8d79e5835649239840ec3d4fd63a3a2567 | eevee/sanpera,eevee/sanpera | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport glob\n\nfrom django.apps import apps\nfrom django.db import connection\nfrom django.core.management.base import BaseCommand\n\n\nclass Command(BaseCommand):\n \"\"\"\n Turn off auto system check for all apps\n We ... | python | edit | 3 | 1 | bsd-3-clause | 2e56f7674191aca7a03ede8586f2e18abb617a0b | chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations | polling_stations/apps/addressbase/management/commands/import_cleaned_addresses.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptes_client',\n url='https://github.com/zooniverse/panoptes-python-client',\n author='Adam McMaster',\n author_email='<EMAIL>',\n version='1.1.1',\n package... | python | edit | 1 | 0 | apache-2.0 | eeb9f4c01bba1df8b3946a319c5d904711ee4a18 | zooniverse/panoptes-python-client | setup.py | rejected_duplicate | Near-duplicate of sample 5694 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import abspath, dirname, join, normpath\n\nfrom setuptools import find_packages, setup\n\n\nsetup(\n\n # Basic package information:\n name = 'django-twilio',\n version = '0.2',\n packages = find_packages(),\n\n #... | python | edit | 1 | 0 | unlicense | 6d1ba5e05c68dfe03676cd5a572bdf9107c18cb5 | rdegges/django-twilio,aditweb/django-twilio | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom setuptools import find_packages, setup\n\n\nVERSION = '2.0.dev0'\n\n\ninstall_requires = [\n 'django-local-settings>=1.0a10',\n 'stashward',\n]\n\nif sys.version_info[:2] < (3, 4):\n install_requires.append('enum... | python | edit | 1 | 0 | mit | aca0e79216cc1e87bf70dd4cae042de8155f9893 | wylee/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,PSU-OIT-ARC/django-arcutils | setup.py | rejected_duplicate | Near-duplicate of sample 20610 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Test UW Menu Flask application.\"\"\"\n\nimport unittest\n\nfrom uwmenu import app, attach_filters\n\n\nclass UWMenuTestCase(unittest.TestCase):\n\n def setUp(self):\n attach_filters()\n app.c... | python | edit | 1 | 1 | mit | 79f1f198820f74a62501fc572b2f1162eafede2e | alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu | tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nDEFAULTS = {\n # Install\n 'kubernetes_version': None, # must be provided\n 'kubernetes_download_base_url': 'https://dl.k8s.io',\n 'kubernetes_install_dir': '/usr/local/kubernetes',\n 'kubernetes_bin_dir': '/usr/local/bin',\... | python | edit | 1 | 0 | mit | e7f923488ebf589aa78f7dc37792ffba3fffd2a3 | EDITD/pyinfra-kubernetes,EDITD/pyinfra-kubernetes | pyinfra_kubernetes/defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim:ts=4:sts=4:sw=4:expandtab\n\"\"\"The core of the system. Manages the database and operational logic. Functionality is\nexposed over Thrift.\n\"\"\"\n\nimport os\n\n\ndef manage():\n from django.core.management import execute_manage... | python | edit | 1 | 2 | mit | 642f3109cb9fb6179d51de7a7d5781044ff6be3b | zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori | satori.core/satori/core/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom avocado.query.translators import Translator, registry\nfrom modeltree.tree import trees\n\n\nclass AllowNullsTranslator(Translator):\n \"\"\"For data sources that only apply to SNPs, this translator ensures only\n SNPs are filter... | python | edit | 1 | 2 | bsd-2-clause | 3f7ccf17528b91b0b1145ad81c3f5aad68085aa5 | chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify | varify/variants/translators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom django.contrib.auth.admin import UserAdmin\nfrom hr.models import Application, Recommendation, Audit, Blacklist, BlacklistSource\n\nclass ApplicationAdmin(a... | python | edit | 4 | 1 | bsd-3-clause | 6054f2a103639dc1da51ddd4d63777a9d728a9ba | nikdoof/test-auth | hr/admin.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom .queues import get_unique_connection_configs\n\nSHOW_ADMIN_LINK = getattr(settings, 'RQ_SHOW_ADMIN_LINK', False)\n\nQUEUES = getattr(settings,... | python | edit | 1 | 0 | mit | 3ebcbafdaff070b2157b5fb065da9a950ba58d1c | sbussetti/django-rq,lechup/django-rq,mjec/django-rq,lechup/django-rq,mjec/django-rq,1024inc/django-rq,ryanisnan/django-rq,ui/django-rq,sbussetti/django-rq,viaregio/django-rq,ui/django-rq,viaregio/django-rq,ryanisnan/django-rq,1024inc/django-rq | django_rq/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim: set ts=4 sts=4 sw=4 expandtab smartindent:\n# Copyright (C) 2008-2010, Luis Pedro Coelho <<EMAIL>>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and a... | python | edit | 9 | 0 | mit | 02548b44a3b5de203e4a82693288ebae4037d90e | unode/jug,luispedro/jug,luispedro/jug,unode/jug | jug/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.core.urlresolvers import reverse\nfrom whats_fresh_api.models import *\nfrom django.contrib.gis.db import models\nimport json\n\n\nclass ListProductTestCase(TestCase):\n fixtures = ['test_fix... | python | edit | 8 | 3 | apache-2.0 | e57793b654ac29becb358832d83d4dea78dc1a50 | iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api | whats_fresh/whats_fresh_api/tests/views/entry/test_list_products.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport deepstream\n\nversion = deepstream.version_to_string()\n\nif deepstream.version_to_string() != \"0.1.0\":\n raise Exception(\"Version mismatch; expected 0.0.1, got {}\".format(version))\n\n\n\n\n\n\n```\n... | python | edit | 1 | 0 | apache-2.0 | cd4534ee267bd06944dcce1fe40ee662351eb114 | deepstreamIO/deepstream.io-client-cpp,deepstreamIO/deepstream.io-client-cpp,deepstreamIO/deepstream.io-client-cpp,deepstreamIO/deepstream.io-client-cpp | test/python-swig-test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWarnings Module\n===============\n\nContains a collection of warning messages for consistent package wide notifications\n\n\"\"\"\n\n#-Numba-#\nnumba_import_fail_message = \"Numba import failed. Falling back to non-optimized routin... | python | edit | 1 | 0 | bsd-3-clause | ee4faf2e1a81fe400d818a5a7337cf562c968d2e | gxxjjj/QuantEcon.py,agutieda/QuantEcon.py,andybrnr/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,andybrnr/QuantEcon.py,gxxjjj/QuantEcon.py,QuantEcon/QuantEcon.py,dingliumath/quant-econ,mgahsan/QuantEcon.py,jviada/QuantEcon.py,dingliumath/quant-econ,agutieda/QuantEcon.py,jviada/QuantEcon.py,mgahsan/QuantEcon.p... | quantecon/common_messages.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport subprocess\n\n\nclass Semanticizer:\n ''' Wrapper for semanticizest go implementation. '''\n\n def __init__(self, model='nl.go.model', stPath='./bin/semanticizest'):\n ''' Create an instance of Semanticizer.... | python | edit | 1 | 2 | apache-2.0 | 156d6f7dd56a5f2554a425fb5a001c99656e320b | semanticize/st,semanticize/st | semanticize/_semanticizer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Configure basic securesystemslib top-level logger\n\nAs pointed out by @FlorianVeaux in #210, securesystemslib does not\ncorrectly initialize its loggers. As a consequence the logging\nmodule logs a one-off \"No handler could be found ...\" ... | python | new_file | 1 | 0 | mit | 7f0684583de39552e4117df8cd12c3e030c98f3e | secure-systems-lab/securesystemslib,secure-systems-lab/securesystemslib | securesystemslib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSimple test runner to separate out the functional tests and the unit tests.\n\"\"\"\nimport os\nimport subprocess\n\nPLATFORMS = ['bsd', 'linux', 'nt']\n\n# Detect what platform we are on\ntry:\n platform = os.uname()[0].lower()\... | python | edit | 3 | 2 | bsd-3-clause | cd91c7f1db5c2462127a76dd9957c36017ac06cd | Zephor5/pika,jstnlef/pika,fkarb/pika-python3,vitaly-krugl/pika,pika/pika,Tarsbot/pika,skftn/pika,benjamin9999/pika,reddec/pika,vrtsystems/pika,zixiliuyue/pika,shinji-s/pika,hugoxia/pika,knowsis/pika,renshawbay/pika-python3 | tests/run_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport h5py\nimport bitshuffle.h5\nimport numpy\nimport tempfile\n\n\ndef test_is_h5py_correctly_installed():\n \"\"\"\n If this test fails you probably need to install h5py from source manually:\n\n $ pip install --no-binary=h5py ... | python | edit | 3 | 1 | bsd-3-clause | 375513808e3fa83ff23de942aeedbd0d9cc4d1c2 | UCBerkeleySETI/blimpy,UCBerkeleySETI/blimpy | tests/test_h5py.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ast\n\nfrom .context import ContextScope\nfrom .parser import Parser\nfrom .utils import Helpers\n\n\ndef kompile(src, raw=False, filename='<compiler>'):\n '''\n Creates a new class based on the supplied template, and returnsit... | python | edit | 1 | 6 | mit | 2726404284fbae6388dbf40e01b6ad5ccf1c56a2 | funkybob/knights-templater,funkybob/knights-templater | knights/compiler.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef make_tree(posts):\n levels = []\n depth = 0\n html = '<ul>'\n\n for post in posts:\n ... | python | edit | 1 | 5 | mit | b0237011251815e883b4fa60839dafd513907227 | Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano | forum/templatetags/forum_extras.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.