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# -*- coding: utf-8 -*-\nfrom django.contrib.auth.models import User\nfrom django.db import models\n\n\nclass ItsiUserManager(models.Manager):\n def create_itsi_user(self, user, itsi_id):\n itsi_user = self.create(user=user, itsi_... | python | edit | 2 | 2 | apache-2.0 | ea8cbcaf41f01a46390882fbc99e6e14d70a49d1 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | src/mmw/apps/user/models.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# Copyright (c) 2013 Aparajita Fishman\n#\n# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshin... | python | edit | 1 | 0 | mit | bf7562d9f45a777163f2ac775dc9cf4afe99a930 | tylertebbs20/Practice-SublimeLinter-jshint,tylertebbs20/Practice-SublimeLinter-jshint,SublimeLinter/SublimeLinter-jshint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement support for the 'D' type in packb()"
},
{
"role": "assistant",
"content": "\nimport struct\n\nSUPPORTED_TYPES = set([\n 'D',\n 'T',\n 'DT',\n 'DTZ',\n 'DTS',\n 'DTSZ',\n])\n\nSTRUCT_32 = struct.Struct(... | python | new_file | 1 | 10 | bsd-3-clause | 30020d3826a2460288b6a57963753787020a945a | wbolster/temporenc-python | temporenc/temporenc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404, redirect, render\n\nfrom characters.forms import CharacterForm\nfrom characters.models import Character, Class, Race\n\n\ndef index(request):\n all_characters = Character.objects.all()\n ... | python | edit | 4 | 4 | mit | bae4032cc686fbac906d19456ed744a97b0e1365 | mpirnat/django-tutorial-v2 | characters/views.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\n```\n\nApply this change: Fix Pytho... | python | edit | 3 | 0 | bsd-3-clause | 933a082a76c6c9b72aaf275f45f0d155f66eeacf | waylonflinn/asv,airspeed-velocity/asv,edisongustavo/asv,giltis/asv,giltis/asv,qwhelan/asv,edisongustavo/asv,pv/asv,edisongustavo/asv,waylonflinn/asv,mdboom/asv,qwhelan/asv,cpcloud/asv,spacetelescope/asv,qwhelan/asv,pv/asv,giltis/asv,ericdill/asv,cpcloud/asv,mdboom/asv,mdboom/asv,ericdill/asv,cpcloud/asv,pv/asv,airspeed... | asv/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\n\nfrom django.views.generic import TemplateView\n\nfrom votes.views import VoteView, results, system_home\n\nurlpatterns = [\n url(r'^$', system_home, name=\"system\"),\n url(r'^(?P<vote_name... | python | edit | 4 | 0 | mit | b1eb69620bbe875d117498ed95e009a019e54fab | kuboschek/jay,OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay,kuboschek/jay | votes/urls.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A class to store tables.\"\"\"\n\n\nclass SgTable:\n \"\"\"A class to store tables.\"\"\"\n\n def __init__(self):\n self._fields = []\n self._table = []\n\n def __len__(self):\n return len(self._table)\n\... | python | edit | 3 | 5 | mit | 7b746d2d4ae732ee1eae326254f3a6df676a7973 | lnishan/SQLGitHub | components/table.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\r\nimport logging.handlers\r\nfrom django.conf import settings\r\n\r\nfrom django_assets.filter import BaseFilter\r\n\r\n\r\n__all__ = ('CSSUtilsFilter',)\r\n\r\n\r\nclass CSSUtilsFilter(BaseFilter):\r\n \"\"\"Minifies CSS... | python | edit | 1 | 4 | bsd-2-clause | 52873e4238a54cb93f403d509d2bebef8971ec9b | 0x1997/webassets,rs/webassets,scorphus/webassets,wijerasa/webassets,heynemann/webassets,aconrad/webassets,scorphus/webassets,florianjacob/webassets,aconrad/webassets,0x1997/webassets,glorpen/webassets,aconrad/webassets,heynemann/webassets,wijerasa/webassets,glorpen/webassets,JDeuce/webassets,heynemann/webassets,florian... | django_assets/filter/cssutils/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import messages\nfrom django.contrib.auth import REDIRECT_FIELD_NAME, logout\nfrom django.core.urlresolvers import reverse_lazy\nfrom django.views.generic import RedirectView, TemplateView\nfrom django.utils.http import ... | python | edit | 1 | 3 | bsd-3-clause | ce83a4fb2f650380b7683ea688791e078b6fe7ec | YouNeedToSleep/sleepy,YouNeedToSleep/sleepy,YouNeedToSleep/sleepy | src/sleepy/web/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nStart active players for the week\n\nIdeas:\n- Include the names of players who cannot be started\n - And maybe the full roster on those dates\n\nTODO:\n- Add required packages in requirements.txt\n\"\"\"\n\nimport requests\nfrom... | python | edit | 1 | 0 | mit | 6a27bd99352e4dc7f38c6f819a8a45b37c1a094c | jbrudvik/yahoo-fantasy-basketball | start-active-players.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hypothesis_auto import auto_pytest_magic\n\nfrom isort import comments\n\nauto_pytest_magic(comments.parse)\nauto_pytest_magic(comments.add_to_line)\n\n```\n\nApply this change: Add additional test case for comments"
},
{
"role... | python | edit | 1 | 1 | mit | ae8f9c39cd75d837a4cb5a4cea4d3d11fd1cabed | PyCQA/isort,PyCQA/isort | tests/test_comments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, print_function\n\nfrom .manager import Manager\nfrom .coverage import CoverageHandler\nfrom .xunit import XunitHandler\n\n\nmanager = Manager()\nmanager.register(CoverageHandler, ['coverage.xml'])\nma... | python | edit | 1 | 0 | apache-2.0 | 20e8ef6bd68100a70b9d50013630ff71d8b7ec94 | dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes | changes/artifacts/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom cqlengine.columns import *\nfrom cqlengine.functions import *\nfrom cqlengine.models import Model\nfrom cqlengine.query import BatchQuery\n\n__cqlengine_version_path__ = os.path.realpath(__file__ + '/../VERSION')\n__versio... | python | edit | 7 | 0 | apache-2.0 | 270c8ca68357f92999474fbf110fed7b01cdfdf2 | bbirand/python-driver,mike-tr-adamson/python-driver,HackerEarth/cassandra-python-driver,vipjml/python-driver,coldeasy/python-driver,jregovic/python-driver,jregovic/python-driver,datastax/python-driver,thobbs/python-driver,stef1927/python-driver,markflorisson/python-driver,coldeasy/python-driver,bbirand/python-driver,jf... | cqlengine/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n#\n# Copyright 2014 Eugene Frolov <<EMAIL>>\n#\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in complia... | python | edit | 1 | 1 | apache-2.0 | 374c386a6b2dd1ad1ba75ba70009de6c7ee3c3fc | phantomii/restalchemy | restalchemy/api/applications.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef test_environ(script, tmpdir):\n \"\"\"$PYTHONWARNINGS was added in python2.7\"\"\"\n demo = tmpdir.join('warnings_demo.py')\n demo.write('''\nfrom pip._internal.utils import deprecation\ndeprecation.install_warning_logger()\n... | python | edit | 1 | 1 | mit | a84dde598297495fe6f0f8b233b3a3761b0df7d4 | pypa/pip,pfmoore/pip,pypa/pip,pradyunsg/pip,rouge8/pip,xavfernandez/pip,pradyunsg/pip,rouge8/pip,xavfernandez/pip,xavfernandez/pip,rouge8/pip,sbidoul/pip,sbidoul/pip,techtonik/pip,techtonik/pip,techtonik/pip,pfmoore/pip | tests/functional/test_warning.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright 2014 Objectif Libre\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 Li... | python | edit | 1 | 2 | apache-2.0 | 0ea32a2b51438b55130082e54f30fc9c97bd9d85 | openstack/cloudkitty,openstack/cloudkitty | cloudkitty/db/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 2015-10-23 08:06:00\n\n@author: Tran Huu Cuong <<EMAIL>>\n\n\"\"\"\nimport os\n\n# Blog configuration values.\n\n# You may consider using a one-way hash to generate the password, and then\n# use t... | python | edit | 1 | 0 | mit | b79a80d894bdc39c8fa6f76fe50e222567f00df1 | tranhuucuong91/simple-notebooks,tranhuucuong91/simple-notebooks,tranhuucuong91/simple-notebooks | config_default.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport subprocess\nimport re\nimport semver\n\n\ndef tag_to_version(tag):\n version = re.sub(r'binary-', '', tag)\n version = re.sub(r'-[x86|i686].*', '', version)\n return version\n\n\nsubproce... | python | edit | 3 | 1 | mit | d966b0973da71f5c883697ddd12c2728b2a04cce | autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L... | ci/cleanup-binary-tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Room(object):\n def __init__(self, room_name, room_type, max_persons):\n self.room_name = room_name\n self.room_type = room_type\n self.max_persons = max_persons\n self.persons = []\n\n def add_occupa... | python | edit | 1 | 3 | mit | d13204abb2cf5d341eff78416dd442c303042697 | peterpaints/room-allocator | classes/room.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"This script manages all tasks for the TRAVIS build server.\"\"\"\nimport os\nimport subprocess\n\nif __name__ == \"__main__\":\n os.chdir(\"promotion/grmpy_tutorial_notebook\")\n cmd = [\n \"jupyter... | python | edit | 1 | 0 | mit | 72941398fd2e78cbf5d994b4bf8683c4bdefaab9 | grmToolbox/grmpy | utils/travis_runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\n\nfrom lib import contract\n\ndata_dir = os.path.join(os.environ['PORTER'], 'data')\n\n\n@contract.accepts(str)\n@contract.returns(list)\ndef read_and_parse_json(data_type):\n sub_dir = os.path.join(data_dir, data... | python | edit | 2 | 1 | mit | be929d518ff320ed8e16f57da55f0855800f7408 | Tactique/game_engine,Tactique/game_engine | src/engine/file_loader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom cms.admin.placeholderadmin import PlaceholderAdminMixin\n\nfrom lab_members.models import Scientist\nfrom lab_members.admin import ScientistAdmin\n\nclass CMSScientistAdmin(PlaceholderAdminMixin, Scien... | python | edit | 1 | 0 | bsd-3-clause | 52239a9b6cd017127d52c29ac0e2a0d3818e7d9e | mfcovington/djangocms-lab-members,mfcovington/djangocms-lab-members | cms_lab_members/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add varint and varlong tests"
},
{
"role": "assistant",
"content": "from spock.mcp import datautils\nfrom spock.utils import BoundBuffer\n\n\ndef test_unpack_varint():\n largebuff = BoundBuffer(b'\\x80\\x94\\xeb\\xdc\\x03')\n ... | python | new_file | 1 | 1 | mit | e7c462af8382a5eb7f5fee2abfc04f002e36b193 | SpockBotMC/SpockBot,nickelpro/SpockBot,gamingrobot/SpockBot,MrSwiss/SpockBot,Gjum/SpockBot,luken/SpockBot | tests/mcp/test_datautils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nfrom ggrc import db\nfrom .mi... | python | edit | 1 | 0 | apache-2.0 | 1b726978e1604269c8c4d2728a6f7ce774e5d16d | kr41/ggrc-core,kr41/ggrc-core,vladan-m/ggrc-core,vladan-m/ggrc-core,vladan-m/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,VinnieJohns/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,uskudnik/ggrc-core,uskudnik/ggrc-core,selahssea/ggrc-cor... | src/ggrc/models/control_assessment.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n#\n# This file is part of ckanext-nhm\n# Created by the Natural History Museum in London, UK\nfrom collections import OrderedDict\n\n# the order here matters as the default option should always be f... | python | edit | 1 | 0 | mit | 3026d78dc6e2a0f6f391819370f2369df94e77eb | NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm | ckanext/nhm/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#encoding:utf-8\n\nfrom utils import get_url, weighted_random_subreddit\n\n\n# Group chat https://yal.sh/dvdahoy\nt_channel = '-1001065558871'\nsubreddit = weighted_random_subreddit({\n 'ANormalDayInRussia': 1.0,\n 'ANormalDayInAmeric... | python | edit | 1 | 1 | mit | 90d3f00cd8fea8fab9274069ac06ea461f8e4dfd | nsiregar/reddit2telegram,Fillll/reddit2telegram,nsiregar/reddit2telegram,Fillll/reddit2telegram | channels/ooo_b_r/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\ndef foo():\n\t\"\"\"\n\tThis is crappy function. should be removed using git checkout\n\t\"\"\"\n\tif True == True:\n\t\treturn True\n\telse:\n\t\treturn False\n\n\ndef main():\n\tpass\n\nif __name__ == '__main__':\n\tmain()\n\... | python | edit | 3 | 1 | apache-2.0 | 34fa7433ea6f04089a420e0392605147669801d1 | kp89/do-git | dummy.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add method to generate list of abscissa dicts\n\nThis method will generate a list of dicts which can initialize an\nobject which features a method to calculate the ordinates the user\nwants."
},
{
"role": "assistant",
"content": ... | python | new_file | 1 | 2 | mit | cbae828ee9eb91a2373a415f1a1521fb5dee3100 | jrsmith3/datac,jrsmith3/datac | datac/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.shortcuts import render\nfrom django.contrib.auth.decorators import login_required\nfrom posts.models import Post, Tag\n\n@login_required\ndef index(request):\n context = {'posts': Post.objects.all(... | python | edit | 3 | 1 | mit | 05939b0b797780ac1d265c8415f72f1ca44be53d | NA5G/coco-server-was,NA5G/coco-server-was,NA5G/coco-server-was | coco/dashboard/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport threading\nimport time\nfrom observer.event_loop import PlanetStackObserver\nfrom observer.event_manager import EventListener\nfrom util.logger import Logger, logging\n\nlogger = Logger(level=logging.INFO)\n\nclass Backend:\n \n ... | python | edit | 3 | 1 | apache-2.0 | a6a95afca2964756a7777ea43839da1709187a27 | opencord/xos,opencord/xos,zdw/xos,open-cloud/xos,cboling/xos,zdw/xos,cboling/xos,opencord/xos,open-cloud/xos,zdw/xos,cboling/xos,cboling/xos,cboling/xos,open-cloud/xos,zdw/xos | planetstack/openstack_observer/backend.py | rejected_duplicate | Near-duplicate of sample 15150 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nexec_order = []\n\nclass Imports(object):\n exec_order = exec_order\n def __init__(self):\n self.v = 1\n\nimports = Imports()\n\noverrideme = \"not overridden\"\n\nfrom . import cls as loccls\nfrom .imports import cls as upcl... | python | edit | 1 | 1 | apache-2.0 | 34db4460aa67fc9abfaaaf2c48a6ea7c5b801ff0 | spaceone/pyjs,minghuascode/pyj,pombredanne/pyjs,lancezlin/pyjs,Hasimir/pyjs,gpitel/pyjs,pyjs/pyjs,anandology/pyjamas,gpitel/pyjs,pombredanne/pyjs,minghuascode/pyj,minghuascode/pyj,lancezlin/pyjs,pyjs/pyjs,pyjs/pyjs,pyjs/pyjs,minghuascode/pyj,spaceone/pyjs,spaceone/pyjs,anandology/pyjamas,Hasimir/pyjs,pombredanne/pyjs,p... | examples/libtest/imports/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .core import *\nfrom . import ros\n\nmessage_type_to_class = {\n # Navigation solution messages.\n PoseMessage.MESSAGE_TYPE: PoseMessage,\n PoseAuxMessage.MESSAGE_TYPE: PoseAuxMessage,\n GNSSInfoMessage.MESSAGE_TYPE: GNSSIn... | python | edit | 22 | 0 | mit | 37fa40a9b5260f8090adaa8c15d3767c0867574f | PointOneNav/fusion-engine-client,PointOneNav/fusion-engine-client,PointOneNav/fusion-engine-client | python/fusion_engine_client/messages/__init__.py | rejected_lint | Too many lint violations: 22 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass CommentConfig(AppConfig):\n name = 'froide.comments'\n verbose_name = _('Comments')\n\n def ready(self):\n from froide.acc... | python | edit | 1 | 4 | mit | 9de0a05d28c83742224c0e708e80b8add198a8a8 | stefanw/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide | froide/comments/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\ngeos_ptrn = re.compile(\n \"^SRID=([0-9]{1,});POINT\\(([0-9\\.]{1,})\\s([0-9\\.]{1,})\\)$\"\n)\n\n\ndef geosgeometry_str_to_struct(value):\n '''\n Parses a geosgeometry string into struct.\n\n Example:\n SRID... | python | edit | 1 | 2 | mit | c3b0d4b05314dc9fd51c790a86d30659d09c5250 | Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget | wagtailgeowidget/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Spatial reference systems\"\"\"\nfrom osgeo import osr\n\n\n# Monkey patch SpatialReference since inheriting from SWIG classes is a hack\ndef srid(self):\n \"\"\"Returns the EPSG ID as int if it exists.\"\"\"\n epsg_id = (self.G... | python | edit | 1 | 4 | bsd-3-clause | 72b3642953d0e14d4b4c9ec03560a96d259f7d16 | bkg/greenwich | contones/srs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.urls import path\nimport eventex.subscriptions.views as s\n\n\napp_name = 'subscriptions'\n\n\nurlpatterns = [\n path('', s.new, name='new'),\n path('<int:id>/', s.detail, name='detail'),\n path('json/donut/', s.paid_li... | python | edit | 1 | 0 | mit | 68c4f723f5eea2802209862d323825f33a445154 | rg3915/wttd2,rg3915/wttd2,rg3915/wttd2,rg3915/wttd2 | eventex/subscriptions/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom zope.interface import directlyProvides\nfrom zope.schema.interfaces import IVocabularyFactory\nfrom zope.schema.vocabulary import (\n SimpleVocabulary,\n SimpleTerm,\n)\nfrom zope.i18nmessageid import MessageFactory\nfrom .utils ... | python | edit | 1 | 3 | bsd-3-clause | 586418860c0441eaebadd0fe79989d6d9f90fa28 | espenmn/bda.plone.productshop,espenmn/bda.plone.productshop,espenmn/bda.plone.productshop | src/bda/plone/productshop/vocabularies.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom csympy import Symbol, Integer\n\ndef test_arit1():\n x = Symbol(\"x\")\n y = Symbol(\"y\")\n e = x + y\n e = x * y\n e = Integer(2)*x\n e = 2*x\n\ndef test_arit2():\n x = Symbol(\"x\")\n y = Symbol(\"y\")\n a... | python | edit | 6 | 1 | mit | 7e45a26f86095ee2f6972e08697aa132e642636e | bjodah/symengine.py,bjodah/symengine.py,symengine/symengine.py,bjodah/symengine.py,symengine/symengine.py,symengine/symengine.py | csympy/tests/test_arit.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nADMINFAG = [\"RealDolos\"]\nPARROTFAG = \"Parrot\"\n\nBLACKFAGS = [i.casefold() for i in (\n \"kalyx\", \"merc\", \"loliq\", \"annoying\", \"bot\", \"RootBeats\", \"JEW2FORU\", \"quag\", \"mire\", \"perici\")]\nOBAMAS = [i.casefold() for... | python | edit | 1 | 0 | mit | a364196814c3b33e7fd51a42b4c3a48a3aaeaee8 | RealDolos/volaparrot | volaparrot/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.importlib import import_module\nfrom django.conf import settings\n\n# Managers\nmkdocs = import_module(getattr(settings, 'MKDOCS_BACKEND', 'doc_builder.backends.mkdocs'))\nsphinx = import_module(getattr(settings, 'SPHINX_B... | python | edit | 1 | 0 | mit | 07aca8e96d5e93edb684d0c4684ef8f837e8fc58 | sunnyzwh/readthedocs.org,hach-que/readthedocs.org,kenwang76/readthedocs.org,singingwolfboy/readthedocs.org,sid-kap/readthedocs.org,michaelmcandrew/readthedocs.org,dirn/readthedocs.org,sid-kap/readthedocs.org,espdev/readthedocs.org,tddv/readthedocs.org,mrshoki/readthedocs.org,SteveViss/readthedocs.org,sils1297/readthedo... | readthedocs/doc_builder/loader.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport fabric.api as fab\n\n\ndef generate_type_hierarchy():\n \"\"\"\n Generate a document containing the available variable types.\n \"\"\"\n fab.local('./env/bin/python -m puresnmp.types > docs/typetree.rst')\n\n\n@fab.task\n... | python | edit | 1 | 1 | mit | 6fae23c1d442880256ed2d4298844a50d6a7968e | exhuma/puresnmp,exhuma/puresnmp | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n__version__ = '0.3.7'\n__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']\n\nfrom .application_master import ApplicationMaster\nfrom .history_server import HistoryServer\nfrom .node_m... | python | edit | 1 | 0 | bsd-3-clause | d994337007eb9cfe41edef591cbd30765660a822 | toidi/hadoop-yarn-api-python-client | yarn_api_client/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom django.core.urlresolvers import reverse\n\nfrom sentry.plugins import plugins\nfrom sentry.web.frontend.base import ProjectView\n\n\nclass ProjectPluginEnableView(ProjectView):\n required_sc... | python | edit | 1 | 3 | bsd-3-clause | 0ca727f0ce5877ba2ca3ef74c9309c752a51fbf6 | looker/sentry,looker/sentry,jean/sentry,ifduyue/sentry,jean/sentry,BuildingLink/sentry,fotinakis/sentry,zenefits/sentry,BuildingLink/sentry,jean/sentry,fotinakis/sentry,daevaorn/sentry,looker/sentry,alexm92/sentry,fotinakis/sentry,beeftornado/sentry,JackDanger/sentry,nicholasserra/sentry,BuildingLink/sentry,mvaled/sent... | src/sentry/web/frontend/project_plugin_enable.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import base\nfrom . import mixins\n\n\nclass TransformedRecord(mixins.GenericCompensationMixin,\n mixins.GenericDepartmentMixin, mixins.GenericIdentifierMixin,\n mixins.GenericJobTitleMixin, mixins.GenericPersonMixin,\n... | python | edit | 1 | 1 | apache-2.0 | 2cf4a0b93db423207798ffd93b2e91cdb73b6d2b | texastribune/tx_salaries,texastribune/tx_salaries | tx_salaries/utils/transformers/ut_brownsville.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nfrom flask import url_for\n\n\ndef register_template_utils(app):\n \"\"\"Register Jinja 2 helpers (called from __init__.py).\"\"\"\n\n @app.template_test()\n def equalto(value, other):\n return value == other\n\n ... | python | edit | 1 | 3 | mit | 825eb37e15e2fb08ac205b7495e93a91acb79c26 | hack4impact/clean-air-council,hack4impact/clean-air-council,hack4impact/clean-air-council | app/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"The parameters dictionary contains global parameter settings.\"\"\"\n\n__all__ = ['Parameters', 'parameters']\n\n# Be EXTREMELY careful when writing to a Parameters dictionary\n# Read here for reference: http://wiki.c2.com/?GlobalVari... | python | edit | 2 | 2 | mit | 5cda63163acec59a43c3975f1320b7268dcf337b | opesci/devito,opesci/devito | devito/parameters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom cyder.cydns.forms import DNSForm\nfrom cyder.cydns.ptr.models import PTR\n\n\nclass PTRForm(DNSForm):\n def delete_instance(self, instance):\n instance.delete()\n\n class Meta:\n model = ... | python | edit | 1 | 1 | bsd-3-clause | c8fa72a130d84d921b23f5973dafb8fa91367381 | drkitty/cyder,murrown/cyder,zeeman/cyder,murrown/cyder,OSU-Net/cyder,murrown/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,zeeman/cyder,akeym/cyder,murrown/cyder,akeym/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,drkitty/cyder | cyder/cydns/ptr/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport rospy\nfrom portal_config.srv import *\n\n\nclass ConfigRequestHandler():\n def __init__(self, url):\n self.url = url\n\n def get_config(self):\n return '{\"foo\": \"bar\"}'\n\n def han... | python | edit | 6 | 1 | apache-2.0 | c426ae514227adaf9dd86f6ada6ce05bc76298c2 | EndPointCorp/appctl,EndPointCorp/appctl | catkin/src/portal_config/scripts/serve_config.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# -*- coding: utf-8 -*-\n\"\"\"\nMain server script for a pyqode.python backend. You can directly use this\nscript in your application if it fits your needs or use it as a starting point\nfor writing your own server.\... | python | edit | 1 | 0 | mit | 4839121f90934f7e52e51c05d052d27124680be7 | pyQode/pyqode.python,pyQode/pyqode.python,mmolero/pyqode.python,zwadar/pyqode.python | pyqode/python/backend/server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Copyright 2016 BMC Software, Inc.\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... | python | edit | 3 | 0 | apache-2.0 | f3724421fa859a5970e66353b6a311aa14b866ec | boundary/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,boundary/tsi-lab,boundary/tsi-lab | labs/lab-5/ex5-1.log.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport warnings\n\nfrom scipy.constants import find\nfrom numpy.testing import assert_equal\n\ndef test_find():\n\n warnings.simplefilter('ignore', DeprecationWarning)\n\n keys = find('weak mixing', disp=False)\n assert_equal(key... | python | edit | 1 | 1 | bsd-3-clause | 377aef17394b2dabd6db7439d3cfcd4e0d54a3c2 | jasonmccampbell/scipy-refactor,scipy/scipy-svn,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,scipy/scipy-svn,scipy/scipy-svn | scipy/constants/tests/test_codata.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport json\nfrom . import Scraper\n\n\nclass LayersScraper:\n \"\"\"A superclass for scraping Layers of the UofT Map.\n\n Map is located at http://map.utoronto.ca\n \"\"\"\n\n host = 'http://map.utoronto.ca/'\n... | python | edit | 4 | 3 | mit | f96989d067f6fd073d04f96bdf2ae314c9b02d49 | kshvmdn/uoft-scrapers,cobalt-uoft/uoft-scrapers,arkon/uoft-scrapers,g3wanghc/uoft-scrapers | uoftscrapers/scrapers/utils/layers.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import serializers, viewsets\n\nfrom document.models import Document, Kamerstuk, Dossier\n\n\nclass DossierSerializer(serializers.HyperlinkedModelSerializer):\n documents = serializers.HyperlinkedRelatedField(read_onl... | python | edit | 1 | 0 | mit | 6c11b9cc9b213928e32d883d4f557f7421da6802 | openkamer/openkamer,openkamer/openkamer,openkamer/openkamer,openkamer/openkamer | document/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.gis.forms import widgets\n\nclass LeafletPointWidget(widgets.BaseGeometryWidget):\n template_name = 'leaflet/leaflet.html'\n\n class Media:\n css = {\n 'all': ('https://cdn.leafletjs.com/leaflet/v... | python | edit | 1 | 2 | bsd-3-clause | 3ddddbd24bb37c30df80233ec4c70c38b6c29e82 | EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient | emstrack/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom distarray import utils\n\n\nclass TestMultPartitions(unittest.TestCase):\n \"\"\"\n Test the multiplicative parition code.\n \"\"\"\n\n def test_both_methods(self):\n \"\"\"\n Do the two metho... | python | edit | 1 | 3 | bsd-3-clause | c8fdcf888f6c34e8396f11b3e7ab3088af59abb6 | RaoUmer/distarray,enthought/distarray,enthought/distarray,RaoUmer/distarray | distarray/tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# This script makes mitmproxy switch to passthrough mode for all HTTP\n# responses with \"Connection: Upgrade\" header. This is useful to make\n# WebSockets work in untrusted environments.\n#\n# Note: Chrome (and possibly other browsers), w... | python | edit | 1 | 3 | mit | 9674a0869c2a333f74178e305677259e7ac379c3 | liorvh/mitmproxy,ccccccccccc/mitmproxy,dwfreed/mitmproxy,mhils/mitmproxy,ryoqun/mitmproxy,Kriechi/mitmproxy,azureplus/mitmproxy,dufferzafar/mitmproxy,ikoz/mitmproxy,jpic/mitmproxy,tfeagle/mitmproxy,rauburtin/mitmproxy,MatthewShao/mitmproxy,pombredanne/mitmproxy,pombredanne/mitmproxy,laurmurclar/mitmproxy,StevenVanAcker... | examples/ignore_websocket.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\r\nfrom django.core.exceptions import ImproperlyConfigured\r\n\r\nfrom email_extras.settings import USE_GNUPG\r\n\n\n__version__ = \"0.1.0\"\r\n\r\nif USE_GNUPG:\r\n\ttry:\r\n\t\timport gnupg\r\n\texcept ImportError:\r\n\t\traise Improperl... | python | edit | null | null | bsd-2-clause | 2a08d3154992b5f0633d7cd2ca1bbfc7ecd63f69 | dreipol/django-email-extras,blag/django-email-extras,stephenmcd/django-email-extras,blag/django-email-extras,dreipol/django-email-extras,stephenmcd/django-email-extras | email_extras/__init__.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport collections\nimport itertools\n\n\n# from jaraco.collections 3.5\nclass DictStack(list, collections.abc.Mapping):\n \"\"\"\n A stack of dictionaries that behaves as a view on those dictionaries,\n giving preference to the la... | python | edit | 1 | 3 | mit | 788cc159e4d734b972e22ccf06dbcd8ed8f94885 | pypa/setuptools,pypa/setuptools,pypa/setuptools | distutils/_collections.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\n\nfrom .models import Calendar,MonthCache\n\n\n# Register your models here.\n@admin.register(Calendar)\nclass CalendarAdmin(admin.ModelAdmin):\n list_display = ('name','remote_id','css_class')\n\n@admi... | python | edit | 1 | 0 | mit | 6d83f2150f7c6177385b9f2d8abbe48cd2979130 | Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters | events/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport logging\nimport sys\n\nfrom dbaas_zabbix.dbaas_api import DatabaseAsAServiceApi\nfrom dbaas_zabbix.provider_factory import ProviderFactory\nfrom pyzabbix import ZabbixAPI\n\nstream = lo... | python | edit | 1 | 2 | bsd-3-clause | a8cb15b1983c48547edfeb53bfb63245f7e7c892 | globocom/dbaas-zabbix,globocom/dbaas-zabbix | dbaas_zabbix/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport cProfile\n\nfrom mappyfile.parser import Parser\nfrom mappyfile.pprint import PrettyPrinter\nfrom mappyfile.transformer import MapfileToDict\n\n\ndef output(fn):\n \"\"\"\n Parse, transform, and pretty print\n ... | python | edit | 3 | 2 | mit | a6435a8713985464b8c37a438ac035d65f66b4cd | geographika/mappyfile,geographika/mappyfile | tests/test_large_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport argparse\nimport yaml\nfrom jinja2 import Template\n\n\ndef render(template_string, context_dict):\n template = Template(template_string)\n return template.render(**context_dict)\n\n\ndef main():\n\n parser = arg... | python | edit | 1 | 2 | unlicense | ba1186c47e5f3466faeea9f2d5bf96948d5f7183 | j4mie/confuzzle | confuzzle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\n\nfrom simpleflow import (\n activity,\n Workflow,\n futures,\n)\n\n\n@activity.with_attributes(task_list='quickstart', version='example')\ndef increment(x):\n return x + 1\n\n\n@activity.with_attributes(task_list='... | python | edit | 2 | 1 | mit | dbce79102efa8fee233af95939f1ff0b9d060b00 | botify-labs/simpleflow,botify-labs/simpleflow | examples/basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport io\n\nimport six\n\nfrom setuptools.command import setopt\nfrom setuptools.extern.six.moves import configparser\n\n\nclass TestEdit:\n @staticmethod\n def parse_conf... | python | edit | 1 | 2 | mit | b336e83a63722b3a3e4d3f1779686149d5cef8d1 | pypa/setuptools,pypa/setuptools,pypa/setuptools | setuptools/tests/test_setopt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.servers.basehttp import WSGIRequestHandler\nfrom django.db import connection\n\nfrom devserver.utils.time import ms_from_timedelta\n\nfrom datetime import datetime\n\nclass SlimWSGIRequestH... | python | edit | 1 | 8 | bsd-3-clause | eb102bb8550d59b34373f1806633a6079f7064a8 | caffodian/django-devserver,madgeekfiend/django-devserver,jimmyye/django-devserver,takeshineshiro/django-devserver,pjdelport/django-devserver,bastianh/django-devserver,Stackdriver/django-devserver,dcramer/django-devserver,chriscauley/django-devserver,coagulant/django-devserver,mathspace/django-devserver | devserver/utils/http.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import with_statement\n\nfrom datetime import datetime\nimport copy\nimport getpass\nimport sys\n\nimport paramiko\nfrom nose.tools import with_setup\nfrom fudge import (Fake, clear_calls, clear_expectations, patch_object, v... | python | edit | 1 | 1 | bsd-2-clause | c2df896183f80fe3ca0eab259874bc4385d399e9 | bitprophet/fabric,MjAbuz/fabric,likesxuqiang/fabric,sdelements/fabric,opavader/fabric,TarasRudnyk/fabric,tekapo/fabric,haridsv/fabric,SamuelMarks/fabric,bspink/fabric,tolbkni/fabric,rane-hs/fabric-py3,mathiasertl/fabric,askulkarni2/fabric,fernandezcuesta/fabric,elijah513/fabric,xLegoz/fabric,raimon49/fabric,amaniak/fab... | tests/test_parallel.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTests for ecdf.py\n\n\"\"\"\nimport unittest\nimport numpy as np\nfrom quantecon import ECDF\n\n\nclass TestECDF(unittest.TestCase):\n\n @classmethod\n def setUpClass(cls):\n cls.obs = np.random.rand(40) # observations... | python | edit | 1 | 1 | bsd-3-clause | b39518482da1d3e064cdbc34490e4a9924f6d5f1 | oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py | quantecon/tests/test_ecdf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.views.static import serve\n\nurlpatterns = [\n url(r'^', include('dj... | python | edit | 1 | 0 | mit | f585a7cdf4ecbecfe240873a3b4b8e7d4376e69c | fladi/django-campus02,fladi/django-campus02 | campus02/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nA configuration for testing in travis CI with sqlite3\n'''\n\nfrom .default import * # noqa\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n # https://docs.djangoproject.com/en/1.10/topics/t... | python | edit | 1 | 0 | mit | f1c270f2145cf1f48a0207696cb4f6e9592af357 | henryyang42/NTHU_Course,henryyang42/NTHU_Course,henryyang42/NTHU_Course,henryyang42/NTHU_Course | NTHU_Course/settings/testing_sqlite.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\"\"\"\nA program to extract all text sent by a particular user from a Telegram chat log which is in json form\n\"\"\"\nimport argparse\nfrom json import loads\n\ndef main():\n\n parser = argparse.ArgumentParser(\... | python | edit | 1 | 13 | mit | c5b00edd9b8acbe594e43ecce093cd1c695b8b01 | expectocode/telegram-analysis,expectocode/telegramAnalysis | getalltextfromuser.py | rejected_complexity | Cyclomatic complexity too high: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import HttpResponse\nfrom django.contrib.auth.decorators import login_required\nfrom django.views.decorators.http import require_http_methods\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom go.dashboard import... | python | edit | 1 | 1 | bsd-3-clause | 48b227f0019fb28a5b96874f62662fee79998fe5 | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/dashboard/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nfrom celery_haystack.signals import CelerySignalProcessor\nfrom django.contrib.admin.models import LogEntry\nfrom reversion.models import Version, Revision\nfrom .tasks import auto... | python | edit | 1 | 2 | bsd-3-clause | 0138eacf0d518b86e819a70000b7b527434a6b35 | dezede/dezede,dezede/dezede,dezede/dezede,dezede/dezede | libretto/signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom django.db.models.fields import NOT_PROVIDED\n\nfrom nap.utils import digattr\n\n\nclass field(property):\n '''A base class to compare against.'''\n def __get__(self, instance, cls=None):\n if instance is None:\n ... | python | edit | 1 | 4 | bsd-3-clause | 872a96b52061bd9ab3a3178aacf3e3d0be2cc498 | limbera/django-nap,MarkusH/django-nap | nap/dataviews/fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nImplementation of methods for sampling initial points.\n\"\"\"\n\n# future imports\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\n# global imports\nimport numpy as ... | python | edit | 1 | 2 | bsd-2-clause | 8998d0f617791f95b1ed6b4a1fffa0f71752b801 | mwhoffman/pybo,jhartford/pybo | pybo/bayesopt/inits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.... | python | edit | 1 | 0 | apache-2.0 | c170765132d6f24b08a4e40274df589813cebf85 | mahak/neutron,klmitch/neutron,openstack/neutron,openstack/neutron,huntxu/neutron,openstack/neutron,noironetworks/neutron,wolverineav/neutron,mahak/neutron,wolverineav/neutron,bigswitch/neutron,cloudbase/neutron,dims/neutron,MaximNevrov/neutron,klmitch/neutron,eayunstack/neutron,sebrandon1/neutron,noironetworks/neutron,... | neutron/cmd/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\"\"\"\nPatch courtesy of:\nhttps://marmida.com/blog/index.php/2012/08/08/monkey-patching-assert_raises/\n\"\"\"\n\n# code for monkey-patching\nimport nose.tools\n\n# let's fix nose.tools.assert_rais... | python | edit | 1 | 2 | apache-2.0 | 82bc502cf7bb64236feba6e140d98bb9e555f4ca | rocky4570/moto,ZuluPro/moto,Affirm/moto,Affirm/moto,kefo/moto,botify-labs/moto,okomestudio/moto,spulec/moto,Affirm/moto,dbfr3qs/moto,okomestudio/moto,kefo/moto,heddle317/moto,whummer/moto,2rs2ts/moto,Brett55/moto,dbfr3qs/moto,ZuluPro/moto,kefo/moto,william-richard/moto,spulec/moto,spulec/moto,ZuluPro/moto,gjtempleton/m... | tests/backport_assert_raises.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom datetime import datetime\nfrom time import mktime\n\nfrom django.core.management.base import BaseCommand\nfrom django.utils.timezone import get_default_timezone, make_aware\nfrom feedparser import parse\n\nfrom ...models import Link\... | python | edit | 1 | 4 | bsd-2-clause | cc184c3e4a911bab38ec5feb62a3fbef3c81ff08 | abendig/drum,abendig/drum,yodermk/drum,renyi/drum,baturay/ne-istiyoruz,stephenmcd/drum,yodermk/drum,skybluejamie/wikipeace,skybluejamie/wikipeace,renyi/drum,tsybulevskij/drum,sing1ee/drum,tsybulevskij/drum,baturay/ne-istiyoruz,stephenmcd/drum,renyi/drum,yodermk/drum,j00bar/drum,j00bar/drum,sing1ee/drum,j00bar/drum,tsyb... | main/management/commands/poll_rss.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom libgbdt import Forest as _Forest\n\nclass Forest:\n def __init__(self, forest):\n if type(forest) is str or type(forest) is unicode:\n self._forest = _Forest(forest)\n elif type(forest) is _Forest:\n ... | python | edit | 2 | 4 | apache-2.0 | 9729c3aecccfa8130db7b5942c423c0807726f81 | yarny/gbdt,yarny/gbdt,yarny/gbdt,yarny/gbdt | python/gbdt/_forest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401\nfrom .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401\nfrom .mappers import get_active_lines # noqa: F401\nf... | python | edit | 1 | 1 | apache-2.0 | 170dce0afe013dee6721237219b9dfa5f2813780 | RedHatInsights/insights-core,RedHatInsights/insights-core | falafel/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport imp\nimport json\nimport os\nimport sys\n\n\nclass Dot(dict):\n\n def __init__(self, d):\n super(dict, self).__init__()\n for k, v in d.iteritems():\n if isinstance(v, dict):\n self[k] = Dot... | python | edit | 2 | 5 | mit | 29521ac7b540c2f255b163f9139453103b76b38f | kragniz/json-sempai | jsonsempai.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may ob... | python | edit | 2 | 1 | apache-2.0 | aa3fc2e32d5b16ff30ab6f288b1a5554c4add374 | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | luigi/tests/rnacentral/utils_test.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 versioneer\n\nsetup(\n name='iterm2-tools',\n version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(),\n description='''iTerm2 tools.''',\n auth... | python | edit | 1 | 0 | mit | 7f3d76bdec3731ae50b9487556b1b2750cd3108e | asmeurer/iterm2-tools | 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\nfrom distribute_setup import use_setuptools\nuse_setuptools()\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\nimport sys\n\nextra = {}\nif sys.versi... | python | edit | 1 | 0 | mit | b0d54c11ea76c6485982e274e8226dfc6da25ceb | zhilts/pymockito,zhilts/pymockito | setup.py | rejected_duplicate | Near-duplicate of sample 1254 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Setup script for PythonTemplateDemo.\"\"\"\n\nimport setuptools\n\nfrom demo import __project__, __version__\n\ntry:\n README = open(\"README.rst\").read()\n CHANGELOG = open(\"CHANGELOG.rst\").read()\ne... | python | edit | 1 | 0 | mit | da4dee483ff244e4e964282032a0813a85680cd2 | jacebrowning/template-python-demo | setup.py | rejected_duplicate | Near-duplicate of sample 11755 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tungsten\nfrom distutils.core import setup\n\nsetup(\n name='Tungsten',\n version=tungsten.__version__,\n author='Seena Burns',\n packages={'tungsten': 'tungsten'},\n license=open('LICENSE.txt').read(),\n descriptio... | python | edit | 1 | 0 | bsd-3-clause | 7a00ff49799afc50da74a748d07c52fef57ebc84 | seenaburns/Tungsten | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\nsetup(\n name='etl-framework',\n version='0.1',\n url=\"https://github.com/pantheon-systems/etl-framework@master\",\n description='Etl Framework',\n long_description='',\n autho... | python | edit | 1 | 0 | mit | e6ae57355530376a1253bc73e10a188743784161 | pantheon-systems/etl-framework | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.http import Http404\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.utils.decorators import method_decorator\n\nimport waffle\nfrom csp.decorators import csp_exempt\nfrom graphene_django.views import GraphQLVi... | python | edit | 1 | 2 | bsd-3-clause | f4275a930410e71cd3b505c8be279d5e9ca8c92e | mozilla/mozillians,mozilla/mozillians,akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians,akatsoulas/mozillians | mozillians/graphql_profiles/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\nimport setuptools\nif sys.version_info[0] < 3:\n from codecs import open\n\ndef local_file(name):\n return os.path.relpath(os.path.join(os.path.dirname(__file__), name))\n\nREADME = local_file(\"README.rst\")\n\... | python | edit | 2 | 1 | apache-2.0 | dfcac1268a46a879cb1c387fa8b33f450860038c | stratis-storage/stratis-cli,stratis-storage/stratis-cli | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Build import cythonize\n\nsetup(\n name='cygroonga',\n version='0.1.0',\n ext_modules=cythonize([\n Extension(\"cygroonga\", [\"cygroon... | python | edit | 1 | 0 | apache-2.0 | dfac0fe079f1f4f9d789632702b5750d706aa832 | hnakamur/cygroonga | setup.py | rejected_duplicate | Near-duplicate of sample 18158 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nREPO_URL = 'http://github.com/datasciencebr/serenata-toolbox'\n\n\nsetup(\n author='Serenata de Amor',\n classifiers=[\n 'Development Status :: 4 - Beta',\n 'Intended Audience :: Science/R... | python | edit | 1 | 0 | mit | 61697dba563a6f89d58ce7e2e7a182113c3f692c | datasciencebr/serenata-toolbox | setup.py | rejected_duplicate | Near-duplicate of sample 14964 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nlong_description = (open('README.rst').read() +\n open('CHANGES.rst').read() +\n open('TODO.rst').read())\n\n\nsetup(\n name='django-model-utils',\n ... | python | edit | 1 | 0 | bsd-3-clause | f18a180d0e3ac07412d814e326b3875c7468afc8 | kezabelle/django-model-utils,patrys/django-model-utils,timmygee/django-model-utils,timmygee/django-model-utils,carljm/django-model-utils,patrys/django-model-utils,carljm/django-model-utils,kezabelle/django-model-utils,nemesisdesign/django-model-utils,yeago/django-model-utils,yeago/django-model-utils,nemesisdesign/djang... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nfrom codecs import open\nfrom setuptools import setup\n\n\nsetup(name=\"abzer\",\n author=\"Wieland Hoffmann\",\n author_email=\"<EMAIL>\",\n packages=[\"abzer\"],... | python | edit | 1 | 0 | mit | 90e614755370c3aafcf55cb76292f2848c797bd6 | mineo/abzer,mineo/abzer | setup.py | rejected_duplicate | Near-duplicate of sample 17053 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport jasinja, sys\n\nrequires = ['Jinja2']\nif sys.version_info < (2, 6):\n requirements += ['simplejson']\n\nsetup(\n name='jasinja',\n version=jasinja.__version__,\n url='http://bitbucket.org/dj... | python | edit | 1 | 0 | bsd-3-clause | af599f0168096fa594773d3fac049869c31f8ecc | djc/jasinja,djc/jasinja | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport json\n\nfrom channels.generic.websocket import JsonWebsocketConsumer\n\nfrom auth_API.helpers import get_or_create_user_information\nfrom experiment.models import ExperimentAction\n\n\nclass ExperimentConsumer(JsonWe... | python | edit | 1 | 4 | mit | a55f5c1229e67808560b3b55c65d524a737294fa | seakers/daphne_brain,seakers/daphne_brain | experiment/consumers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='wunderclient',\n packages=['wunderclient'],\n version='0.0.1',\n description='A Wunderlist API client',\n author='Kevin LaFlamme',\n author_email='<EMAIL>',\n url='http... | python | edit | 1 | 0 | mit | e3aea0f6edbb477b22ebed1f769ff684fddd31a1 | lamflam/wunderclient | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom distutils.core import Extension\n\nsetup(name = 'wrapt',\n version = '0.9.0',\n description = 'Module for decorators, wrappers and monkey patching.',\n author = 'Graham Dumpleton',\n ... | python | edit | 1 | 0 | bsd-2-clause | 7c88ecf10c3197c337990c7f92c7ace6a85d316e | akash1808/wrapt,github4ry/wrapt,wujuguang/wrapt,akash1808/wrapt,wujuguang/wrapt,pombredanne/wrapt,pombredanne/wrapt,GrahamDumpleton/wrapt,pombredanne/python-lazy-object-proxy,ionelmc/python-lazy-object-proxy,linglaiyao1314/wrapt,GrahamDumpleton/wrapt,linglaiyao1314/wrapt,pombredanne/python-lazy-object-proxy,ionelmc/pyt... | 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 os\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'cloudsizzle',\n fullname = 'CloudSizzle',\n version = '0.1',\n author = '',\n author_email = '',\n ... | python | edit | 3 | 0 | mit | bbf92b251203bc3556a6e91c25209fc14046ca50 | jpvanhal/cloudsizzle,jpvanhal/cloudsizzle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPush/pop stack of buffer names. The top buffer of the stack is the one that\ncurrently has the focus.\n\nNote that the stack can contain `None` values. This means that none of the\nbuffers has the focus.\n\"\"\"\nfrom __future__ imp... | python | edit | 1 | 2 | bsd-3-clause | f5f95550af953fc9f2875f40ba7f89df468485fc | jonathanslenders/python-prompt-toolkit,ddalex/python-prompt-toolkit,melund/python-prompt-toolkit,amjith/python-prompt-toolkit,ALSchwalm/python-prompt-toolkit,niklasf/python-prompt-toolkit | prompt_toolkit/focus_stack.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Main codrspace views\"\"\"\n\nfrom django.shortcuts import render, redirect\nfrom settings import GITHUB_CLIENT_ID\n\nimport requests\n\n\ndef index(request, slug=None, template_name=\"base.html\"):\n return render(request, templat... | python | edit | 1 | 3 | mit | b8de193d6d0ca5ef00bebb9c375df141335a1f95 | durden/dash,durden/dash | apps/codrspace/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import unicode_literals\nfrom wagtail_mvc import __version__\nfrom setuptools import setup, find_packages\n\nsetup(\n name='wagtail_mvc',\n version=__version__,\n description='Allows bet... | python | edit | 1 | 0 | mit | dae46d466f84ab8694094214b15315e657d80d54 | fatboystring/Wagtail-MVC,fatboystring/Wagtail-MVC | setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.