messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport sys\nfrom pprint import pprint\n\ndef loadJSON(fInput):\n with open(fInput) as f:\n return json.load(f)\n return None\n\nif __name__ == '__main__':\n filePath = 'data/example.json'\n data = ... | python | edit | 4 | 1 | apache-2.0 | 0fb7f7950039d937df35f90a44cabc5603d238de | kilikkuo/kernel-mapper,PyOCL/kernel-mapper | main.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nimport gym\nfrom gym.spaces.box import Box\n\nfrom baselines import bench\nfrom baselines.common.atari_wrappers import wrap_deepmind\n\ntry:\n import pybullet_envs\nexcept ImportError:\n pass\n\n\ndef make_env(env_id, see... | python | edit | 2 | 3 | mit | 5bd9de24e63c557aed1779f6cee611cfeb52ddc0 | YuhangSong/GTN,YuhangSong/GTN,ikostrikov/pytorch-a2c-ppo-acktr | envs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport yaml\n\ndef load_config(keys=None):\n with open('config.yml', 'r') as yf:\n conf = yaml.load(yf)\n\n if keys is not None:\n return [conf[k] for k in keys]\n\n return conf\n```\n\nApply this change: Use safe_loa... | python | edit | 1 | 3 | cc0-1.0 | 0ef1e9b77ad31c13a32c285b4b07e5d19a5d6c92 | dateutil/tzdata | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\n\nclass Config(object):\n DEBUG = True\n # WTF_CSRF_ENABLED = False\n DATABASE_NAME = \"projectp\"\n\n BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top\n APP_STATIC = os.path.joi... | python | edit | 1 | 0 | mit | 0cfb43da3c579bca84be1c774c1306ac2f54ffda | Proj-P/project-p-api,Proj-P/project-p-api | config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nfrom cryptography.hazmat.primitives.asymmetric import padding\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives import serialization\n\nimport base64\n\nr = requests.get('https... | python | edit | 1 | 4 | mit | 0b6aabf043cd96e82972376b632067dc624daf0d | gforsyth/doctr_testing,doctrtesting/doctr,drdoctr/doctr | test.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 Anton Lavrenov\n# Copyright (c) 2014 Anton Lavrenov\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Tslint plugin class.\"\"\"... | python | edit | 1 | 0 | mit | 26eec2d069075c662d5b935474e8a2eea0d195b5 | lavrton/SublimeLinter-contrib-tslint | linter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-*- coding: utf-8 -*-\nfrom django.shortcuts import render_to_response\nfrom django.shortcuts import get_object_or_404\nfrom django.template import RequestContext\nfrom apps.events.models import Event, AttendanceEvent, Attendee\nimport dat... | python | edit | 1 | 3 | mit | 1b15198842d60582930f828656a2353f85a05d44 | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | apps/events/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils.decorators import available_attrs\nfrom django.utils.http import urlquote\nfrom django.http import HttpResponse\nfrom django.template import loader, RequestContext\n\nfrom functools import wraps\n\ndef singleton(cls):\n ... | python | edit | 3 | 2 | mit | c8177562558d4b59d6d0a8f3fb4518c067394a31 | bueda/django-comrade | comrade/core/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"A simple example of how you can use MayaVi and mlab without\nusing Envisage or the MayaVi envisage application.\n\n\"\"\"\n# Author: Gael Varoquaux <<EMAIL>> \n# Copyright (c) 2007, Enthought, Inc.\n# License: B... | python | edit | 1 | 0 | bsd-3-clause | 83fdd99aead08614a12b4eb48f6075599ca60cbe | liulion/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,liulion/mayavi,alexandreleroux/mayavi | examples/mayavi/standalone_mlab.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python3\n# -*- coding: utf8 -*\n\nimport sys\n\n# Fix for file paths errors\nimport os\nPATH = os.path.dirname(os.path.realpath(__file__))\n\n# Import other files from the project\nfrom game import Game\nfrom idlerpg import IdleR... | python | edit | 3 | 1 | mit | d79edc34bece193b0cf1bc7117c3559ed62e0a7f | DanielNautre/idle-rpg | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport sys\n\n'''\nCleans an MS with a single channel given a mask and a model\n'''\n\nvis = sys.argv[4]\nmodel = sys.argv[5]\nmask = sys.argv[6]\n\nout_root = vis[:-3]\n\nclean(vis=vis, imagename=out_root+'.clean', field='M33*',\n r... | python | edit | 2 | 0 | mit | 048dcc39703cb00ce5616e9ed2b07be8dbde4038 | e-koch/canfar_scripts,e-koch/canfar_scripts | img_pipe/archival_data/single_channel_clean.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .utils import assert_eval\n\n\ndef test_simple_func():\n assert_eval('(def @a $a 8) (@a)', 1, 8)\n\n\ndef test_simple_func_args():\n assert_eval(\n '(def @a $a $a)'\n '(@a 1)'\n '(@a 2)'\n '(@a 5)',\n ... | python | edit | 1 | 1 | bsd-3-clause | ff0ae66ee16bc3ac07cb88ddacb52ffa41779757 | sapir/tinywhat,sapir/tinywhat,sapir/tinywhat | tests/test_func.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nError heirarchy for stratis cli.\n\"\"\"\n\nclass StratisCliError(Exception):\n \"\"\"\n Top-level stratis cli error.\n \"\"\"\n pass\n\n\nclass StratisCliValueError(StratisCliError):\n \"\"\" Raised when a parameter ... | python | edit | 1 | 2 | apache-2.0 | c9c618cfcd8caeac9ba23ec1c53d3ebdf32d563d | stratis-storage/stratis-cli,stratis-storage/stratis-cli | src/cli/_errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport logging\nfrom datetime import datetime\nfrom flask import Flask\n\nfrom update_wrapper import UpdateWrapper\n\nLOG_FILE = datetime.now().strftime(\"%Y%m%d%H%M%S%f\")\nLOG_D... | python | edit | 1 | 1 | mit | 8dd873a485eba31e5fa99b88708a2771f6ef0240 | stormaaja/csvconverter,stormaaja/csvconverter,stormaaja/csvconverter | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module exposes Home Assistant via Zeroconf.\n\nZeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).\n\nFor more details about Zeroconf, please refer to the documentation at\nhttps://home-assistant.io/components/zer... | python | edit | 1 | 1 | mit | e1ffdcc5f12be623633e2abab2041fcb574173ea | miniconfig/home-assistant,Julian/home-assistant,toddeye/home-assistant,ct-23/home-assistant,deisi/home-assistant,tchellomello/home-assistant,rohitranjan1991/home-assistant,Julian/home-assistant,Duoxilian/home-assistant,betrisey/home-assistant,keerts/home-assistant,ct-23/home-assistant,tboyce021/home-assistant,kyvinh/ho... | homeassistant/components/zeroconf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Improve the proxy module which maps to a module which uses __all__.\n\nThe notes I made in the code apply to all proxy modules which map\nto a module which uses __all__."
},
{
"role": "assistant",
"content": "# proxy\n\n__all__ =... | python | new_file | 7 | 0 | bsd-3-clause | 30a4281f2602bd6b9d90d89375785a2645854a0d | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | enthought/enable2/pyglet_backend/pyglet_app.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport fnmatch\nimport os\nimport unittest\n\nfrom . import validate_json_format\n\n\nclass TestSettings(unittest.TestCase):\n def _get_json_files(self, file_pattern, folder='.'):\n for ro... | python | edit | 1 | 7 | mit | 2d0e742c0f8d5f0a9d72b8c2c6fa751ba7842668 | jonlabelle/Trimmer,jonlabelle/Trimmer | tests/test_json.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nclass ParserError(Exception):\n \"\"\"Raised when parsing input fails.\"\"\"\n\nclass OpenParenError(ParserError):\n \"\"\"Raised when there are too few opening parenthesis.\"\"\"\n\n @staticmethod\n def build():\n retu... | python | edit | 1 | 2 | mit | c24fa91c900fc4f0d3ac5a10d10bfe5c57c9ef5c | jasontbradshaw/plinth | errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\nfrom polygraph.types.scalar import Int\n\n\nclass IntTest(TestCase):\n def test_class_types(self):\n x = Int(245)\n self.assertIsInstance(x, int)\n self.assertIsInstance(x, Int)\n ... | python | edit | 1 | 1 | mit | 8373c005cbf8ebc4069faf5291bb126db2cbb20f | polygraph-python/polygraph | polygraph/types/tests/test_scalars.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport pymongo\nimport praw\n\nfrom pymongo import MongoClient\n\nclient = MongoClient()\ndb = client.reddit\nposts = db.data\nposts.create_index([(\"text\", pymongo.TEXT),\n (\"subreddit\", pymongo.ASCENDING... | python | edit | 4 | 2 | unlicense | a0b52b5a9b825e1a17d9c92694ac944f09411011 | vilie/rp,vilie/rp | db/database.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n from numpy.distutils.system_info import get_info\n config = Configuration('linalg',parent_package,top_path)\n\n config... | python | edit | 3 | 3 | bsd-3-clause | 9af440d8d7d2dc7b6ecf254ee1150f03d090cb6a | jschueller/numpy,CMartelLML/numpy,cowlicks/numpy,larsmans/numpy,rudimeier/numpy,bertrand-l/numpy,ViralLeadership/numpy,sonnyhu/numpy,mattip/numpy,moreati/numpy,ViralLeadership/numpy,pyparallel/numpy,dato-code/numpy,mattip/numpy,nbeaver/numpy,dch312/numpy,ajdawson/numpy,WarrenWeckesser/numpy,leifdenby/numpy,larsmans/num... | numpy/linalg/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Test Mach angle functions.\n\nTest data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.\n\"\"\"\n\n\nimport nose\nimport nose.tools as nt\n\nfrom properties.prandtl_meyer_function impo... | python | edit | 1 | 1 | mit | 1c65ef8eeccd433b256ed2cd1d3db7b6264fe8f2 | iwarobots/TunnelDesign | properties/tests/test_mach_angle.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\"\"\"\nSimple Kamaelia Example that shows how to use a simple UDP Peer.\nA UDP Peer actually sends and recieves however, so we could have\nmore fun example here with the two peers sending each other messages.\n\nIt's wor... | python | edit | 1 | 0 | apache-2.0 | 8e67071e82e13ae4131da773947f767f1fe91f40 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | Code/Python/Kamaelia/Examples/UDP_Systems/SimplePeer_Example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass ComputedFieldMixin(object):\n def __init__(self, func, *args, **kwargs):\n self.computer = func\n\n kwargs[\"editable\"] = False\n\n super(ComputedFieldMixin, self).__init__(*a... | python | edit | 1 | 1 | bsd-3-clause | 3b01b6b67e8cf05c31f2c30a3e45a59ffbb31adb | kirberich/djangae,asendecka/djangae,kirberich/djangae,potatolondon/djangae,kirberich/djangae,potatolondon/djangae,grzes/djangae,asendecka/djangae,grzes/djangae,grzes/djangae,asendecka/djangae | djangae/fields/computed.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"lcp URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app import ... | python | edit | 1 | 0 | bsd-2-clause | d028ada7a1d1c7c66cb6e3e76cd5ed676981bc57 | mblayman/lcp,mblayman/lcp,mblayman/lcp | lcp/urls.py | rejected_duplicate | Near-duplicate of sample 20585 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport csv\nfrom datasource import Datasource\nfrom ..dataset import Dataset\n\nclass CSVDatasource(Datasource):\n\n def read(self):\n with open(self.path, 'rb') as infile:\n reader = csv.reader(infile)\n\n h... | python | edit | 1 | 3 | mit | 179c13d3fe2589d43e260da86e0465901d149a80 | rsk-mind/rsk-mind-framework | rsk_mind/datasource/datasource_csv.py | rejected_duplicate | Near-duplicate of sample 14579 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom string import Template\n\n__author__ = 'maa'\n\ntemplates_folder = 'file_templates_folder\\\\'\n\n\ndef create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):\n template_file = open(templates_folder... | python | edit | 1 | 1 | apache-2.0 | fc105f413e6683980c5d2fcc93a471ebbc9fecba | amatkivskiy/baidu,amatkivskiy/baidu | utils/files_provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n__author__ = 'Superbil'\n__version__ = '0.1.0'\n\nimport shapefile\n\nsf = shapefile.Reader(\"shapefiles/路網數值圖103年_西屯區道路路段\")\n\n# 確認 shapeType 種類\nif sf.shapeType is 3:\n print(\"PolyLi... | python | edit | 4 | 0 | mit | 3e0ecb96845f7b2efbb9b62c5eb1372cbe1452c5 | GIS-FCU/sdi-converter | s2motc.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\nimport os\nfrom .app import app\nfrom .server import StandaloneServer\n\n\n@click.command()\n@click.option(\n '--port',\n default=8000,\n help='Port to listen on, default is 8000'\n)\n@click.option(\n '--upload-dir... | python | edit | 1 | 2 | mit | d85d04da0f6ce283f53678bd81bd0987f59ce766 | kennell/curldrop,kevvvvv/curldrop | curldrop/cli.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 | 5 | 1 | apache-2.0 | c265b49a5961f48542d22d8a4174ee885568c08c | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | luigi/tasks/export/fasta/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms import StringField, HiddenField, SubmitField\nfrom wtforms.validators import DataRequired, Length\nfrom flask_babel import lazy_gettext as _\n\n\nclass CreditCardForm(Form):\n stripe_key = HiddenF... | python | edit | 1 | 0 | mit | a050d510bce159ba646de322de31b05fede349e7 | nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask | catwatch/blueprints/billing/forms.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# Runs the development server of the downstream_node app.\n# Not for production use.\n\nimport argparse\n\nfrom downstream_node.startup import app, db\n\n\ndef initdb(sys=None):\n db.engi... | python | edit | 1 | 2 | mit | c2b53224eecd6b5651e75b821ba68a471ed558d6 | Storj/downstream-node,Storj/downstream-node | runapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\ndef prependAbbrev(front, abbr):\n if type(front) is type(abbr[0]):\n return [front + abbr[0]] + abbr[1:]\n else:\n return [front] + abbr\n\ndef prefixAll(p, lst):\n return [prependAbbrev(p, l) for l in l... | python | edit | 3 | 2 | mit | 43c62ea6d5558b0e6e5104eb05d45d89239e70b8 | UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016 | q3/FindAllAbbreviations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom optparse import OptionParser\n\nfrom conda_verify.errors import RecipeError\nfrom conda_verify.verify import Verify\nfrom conda_verify.utilities import render_metadata, iter_cfgs\n\n\ndef cli():\n p = Option... | python | edit | 1 | 7 | bsd-3-clause | 3e03d66c5351ac5e71f82a56aa01ba06865e1c25 | mandeep/conda-verify | conda_verify/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef check_iso_mcp(input_file):\n\t\"\"\"\n\tChecks if MCP conversion is allowed for the given file.\n\n\tMCP files are only created if the DIF has an ISO Topic Category of\n\t\"OCEANS\".\n\t\"\"\"\n\n\tallowed = False\n\n\t# Cannot use the ... | python | edit | 3 | 2 | mit | 67637039b95f4030a462edb35d614bb678426dd3 | AustralianAntarcticDataCentre/metadata_xml_convert,AustralianAntarcticDataCentre/metadata_xml_convert | conversion_check.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.contrib.auth.models import User, Group\nfrom osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP\n\n\nclass TestFrontendPermissions(TestCase):\n def test... | python | edit | 1 | 1 | mit | 1b44849f9fac68c6ce0732baded63681cbf58ccb | geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx | osmaxx-py/osmaxx/contrib/auth/tests/test_frontend_permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef get_field(self):\n try:\n field = self.REQUEST['sort']\n except (KeyError, ValueError, TypeError):\n field = ''\n return (self.direction == 'desc' and '-' or '') + field\n\ndef get_direction(self):\n try:\n ... | python | edit | 1 | 4 | bsd-3-clause | a57d4e3e1fa65b11b55d6f46dd778cdaf1ed8504 | artscoop/webstack-django-sorting,artscoop/webstack-django-sorting | webstack_django_sorting/middleware.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 Jon Surrell\n# Copyright (c) 2014 Jon Surrell\n#\n# License: MIT\n#\n\n\"\"\"This module exports the Govet plugin class.\"\"\"\n\nfro... | python | edit | 1 | 0 | mit | 428ff9d74f52d938b9ee5ac03aec975dd5af191a | sirreal/SublimeLinter-contrib-govet | linter.py | rejected_duplicate | Near-duplicate of sample 3387 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom .models import Story\nfrom cms.forms import ContentManageableModelForm\n\n\nclass StoryForm(ContentManageableModelForm):\n class Meta:\n model = Story\n fields = (\n 'name',\n ... | python | edit | 1 | 3 | apache-2.0 | 43c3a8a94c7783aadb440e529645f7db7c7913ff | proevo/pythondotorg,manhhomienbienthuy/pythondotorg,manhhomienbienthuy/pythondotorg,Mariatta/pythondotorg,python/pythondotorg,python/pythondotorg,Mariatta/pythondotorg,manhhomienbienthuy/pythondotorg,proevo/pythondotorg,Mariatta/pythondotorg,python/pythondotorg,manhhomienbienthuy/pythondotorg,python/pythondotorg,Mariat... | successstories/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom celery.decorators import task\n\nfrom hiicart.models import HiiCart\nfrom hiicart.gateway.braintree.ipn import BraintreeIPN\n\nlog = logging.getLogger('hiicart.gateway.braintree.tasks')\n\n\n@task\ndef update_payment_... | python | edit | 1 | 3 | mit | e56e47828d381022cb2742b06f7f47d3fb64a499 | hiidef/hiicart,hiidef/hiicart | hiicart/gateway/braintree/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django import template\n\nfrom physical.models import EngineType, Environment, Plan\n\nregister = template.Library()\n\n\n@register.inclusion_tag('dashboard/menu.html')\ndef render_menu():\n\n data_engines =... | python | edit | 1 | 4 | bsd-3-clause | e960bf04d3885228c0df9c182c8d073e800ec122 | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | dbaas/dashboard/templatetags/menu.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\nimport os\n\nfrom flask.ext.debugtoolbar import DebugToolbarExtension\nfrom flask.ext.migrate import Migrate, MigrateCommand\nfrom flask.ext.script import Manager\n\nfrom flask_app.app import app\nfrom flask_app.models imp... | python | edit | 1 | 1 | mit | a03f3ae483e7cdacbd50ad0646273b7e0c18b10f | getslash/mailboxer,getslash/mailboxer,vmalloc/mailboxer,getslash/mailboxer,Infinidat/lanister,Infinidat/lanister,vmalloc/mailboxer,vmalloc/mailboxer | manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport dbus\n\nsession_bus = dbus.SessionBus()\nspotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')\nspotify_properties = dbus.Interface(spotify_bus... | python | edit | 2 | 0 | mit | cb9b7dcd01495999fac0671acd9e4bf138bd71ea | EllisV/dotfiles,EllisV/dotfiles | scripts/spotify-current.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.utils.html import conditional_escape\nfrom django.core.serializers.json import DjangoJSONEncoder\n\n\nclass SafeJSONEncoder(DjangoJSONEncoder):\n def _recursive_escape(self, o, esc=conditional_escape)... | python | edit | 1 | 7 | bsd-3-clause | 26de8a5b63d6da42bbafaa3d520fe0fbbb3a7d54 | frnhr/django-cms,andyzsf/django-cms,jeffreylu9/django-cms,timgraham/django-cms,qnub/django-cms,leture/django-cms,mkoistinen/django-cms,chmberl/django-cms,saintbird/django-cms,datakortet/django-cms,keimlink/django-cms,josjevv/django-cms,youprofit/django-cms,Livefyre/django-cms,takeshineshiro/django-cms,chkir/django-cms,... | cms/utils/encoder.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport requests\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass APIError(Exception):\n pass\n\n\nclass BaseService(object):\n\n def __init__(self, api, **config):\n self.api = api\n self.requester = ... | python | edit | 1 | 3 | mit | 2bedbab8eb7d2efb9ff8e39a821fd2796dd4ce3f | rkhleics/police-api-client-python | police_api/service.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nfrom os import environ\n\nfrom eve import Eve\nfrom eve.io.mongo import Validator\n\nfrom settings import API_NAME, URL_PREFIX\n\n\nclass KeySchemaValidator(Validator):\n def _validate_keyschema(self, schema, field, dct):\n ... | python | edit | 1 | 2 | apache-2.0 | 99be36b77741a9b2e3d330eb89e0e381b3a3081f | gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa | api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic script to get most common committers"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\ntry:\n import configparser\nexcept ImportError:\n raise ImportError(\"Must be using Python 3\")\n\nimport argpa... | python | new_file | 5 | 4 | mit | f74f46e4a3222fe0f6e10e38c204d2e3108bbf18 | albertyw/git-reviewers,albertyw/git-reviewers | git_reviewers/reviewers.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nsentry.rules\n~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom .base import * # NOQA... | python | edit | 1 | 5 | bsd-3-clause | ad2ec120cb890de622d54f61104353c9427c788a | JamesMura/sentry,looker/sentry,jean/sentry,fotinakis/sentry,ifduyue/sentry,alexm92/sentry,fotinakis/sentry,mvaled/sentry,gencer/sentry,gencer/sentry,zenefits/sentry,ifduyue/sentry,BuildingLink/sentry,gencer/sentry,beeftornado/sentry,ifduyue/sentry,jean/sentry,BuildingLink/sentry,fotinakis/sentry,daevaorn/sentry,JamesMu... | src/sentry/rules/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom SPARQLWrapper import SPARQLWrapper, JSON\nfrom flask import request, jsonify\nfrom flask.ext.cors import CORS\n\napp = Flask(__name__)\nCORS(app)\n\n@app.route('/')\ndef hello_world():\n auth = request.autho... | python | edit | 1 | 5 | apache-2.0 | ce25be4609f6206343cdcb34b5342843f09f557b | jvdzwaan/visun-flask | server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport simplejson as json\nimport os\nimport sys\nimport urllib2\nfrom pprint import pprint\nfrom collections import defaultdict\nfrom flask import Flask, render_template, request, jsonify, redirect\nimport time\n\napi = Flask(__name__)\n\n... | python | edit | 4 | 4 | mit | b8aaaeb454f933b642bcd3a5a5931ca0286addd2 | captainsafia/dont-read-the-ipsum,captainsafia/dont-read-the-ipsum,captainsafia/dont-read-the-ipsum | api.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\n\nimport tornado.ioloop\nimport tornado.log\nimport tornado.web\n\n\ndef configure_tornado_logging():\n fh = logging.handlers.RotatingFileHandler(\n '/var/log/ipborg/tornado.log', maxBytes=2**29, backupC... | python | edit | 1 | 1 | mit | 6be8e85b17d390abea25897bd7a2703fb3300261 | jiffyclub/ipythonblocks.org,jiffyclub/ipythonblocks.org | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom time import gmtime, strftime\nfrom foaas import foaas\nfrom diaspy_client import Client\n\nimport re\nimport urllib2\n\nclient = Client()\nnotify = client.notifications()\nfor n in notify:\n if not n.unread: ... | python | edit | 4 | 0 | mit | fea4ef7bc124da42c00989d8e4d69ff463854f02 | Zauberstuhl/foaasBot | bot.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pop the current directory from search path\n# python interpreter adds this to a top level script\n# but we will likely have a name conflict (runtests.py .vs runtests package)\nimport sys; sys.path.pop(0)\nfrom runtests import Tester\nimpo... | python | edit | 2 | 0 | mit | 4c2c0e9da70459063c6f1f682a181e4d350e853c | sbird/fake_spectra,sbird/fake_spectra,sbird/fake_spectra | do_the_tests.py | rejected_duplicate | Near-duplicate of sample 14590 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.core.urlresolvers import reverse\n# Smrtr\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\n\nurlpatterns = patterns('',\n\... | python | edit | 7 | 0 | bsd-3-clause | 563eb0c209a0cc75742d8acbae5dd6053e60636c | mfitzp/smrtr,mfitzp/smrtr | apps/welcome/urls.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTransport for Zuora SOAP API\n\"\"\"\nimport httplib2\n\nfrom suds.transport import Reply\nfrom suds.transport.http import HttpTransport\nfrom suds.transport.http import HttpAuthenticated\n\n\nclass HttpTransportWithKeepAlive(HttpAu... | python | edit | 1 | 1 | bsd-3-clause | 0c5165bdddbce057cc4777d91cb1e4fc661b5925 | liberation/zuora-client | zuora/transport.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import render_template\nfrom queries import get_filenames, get_metadata\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\n@app.route(\"/<item>\")\ndef index(item=\"002341336\"):\n\tfiles = get_filenames(it... | python | edit | 2 | 1 | mit | fbc4154aeabd644390b9abca1a2382c0cc4298e0 | MITLibraries/ebooks,MITLibraries/ebooks | app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\n >>> getg()\n 5\n >>> setg(42)\n >>> getg()\n 42\n\"\"\"\n\ng = 5\n\n\ndef setg(a):\n global g\n g = a\n\n\ndef getg():\n return g\n\n\nclass Test(object):\n \"\"\"\n >>> global_in_class\n 9\n >>>... | python | edit | 1 | 1 | apache-2.0 | 11f7c1ecadbbc68aa0a7d87570d25b24efb71fe6 | cython/cython,cython/cython,da-woods/cython,da-woods/cython,da-woods/cython,cython/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython,scoder/cython,scoder/cython | tests/run/ass2global.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport shutil\n\nimport pytest\ntry:\n import six\nexcept ImportError:\n from django.utils import six\nfrom django.conf import settings\n\n\ndef teardown_assets_directory():\n # Removing the temporary TEMP_DIR. Ensure we pass in un... | python | edit | 1 | 3 | apache-2.0 | 98550946e8bc0da9a1ecdec8f0e53490f8fd5e91 | j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy | conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import render_template\n\nimport argparse\nimport games\nimport json\n\n\nGAMES_COUNT = 100\n\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef index():\n return render_template('games_list.html')\n... | python | edit | 2 | 3 | bsd-3-clause | c9ba5f2e402b46036f0b9a86bf34ac94db51edfb | siggame/ng-games,siggame/ng-games,siggame/ng-games | server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nconstant_bits = {\n \"CFG_CENTER_MID.ALWAYS_ON_PROP1\": \"26_2206\",\n \"CFG_CENTER_MID.ALWAYS_ON_PROP2\": \"26_2207\",\n \"CFG_CENTER_MID.ALWAYS_ON_PROP3\": \"27_2205\"\n}\n\nwith open(sys.argv[1], \"a\") as f:\n ... | python | edit | 1 | 0 | isc | 5238fed5b5557b8a282a9120380eee01abb49bc5 | SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray | fuzzers/038-cfg/add_constant_bits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# logger.py\n\n\"\"\"Log the serial output from the Arduino to a text file.\n\"\"\"\n\nimport sys\nimport serial\n\ndef log_serial(filename, device='/dev/ttyACM0', baud=9600):\n ser = serial.Serial(device, baud)\n... | python | edit | 1 | 2 | mit | 9b4f83ec89c76d8a5b5d0502e2903e2821078271 | wapcaplet/ardiff | logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*\n\n\"\"\"\nSimple fabric file to test oinspect output\n\"\"\"\n\nfrom __future__ import print_function\n\nimport webbrowser\n\nimport oinspect.sphinxify as oi\n\ndef test_basic():\n \"\"\"Test with an empty context... | python | edit | 1 | 1 | bsd-3-clause | 13e4d867e724f408b5d2dd21888b2f8a28d8fbc6 | techtonik/docrepr,spyder-ide/docrepr,techtonik/docrepr,techtonik/docrepr,spyder-ide/docrepr,spyder-ide/docrepr | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''py.test standard config file.'''\n\nimport sys\n\n# pylint: disable=invalid-name\n\ncollect_ignore = ('setup.py',)\n\n# pylint: enable=invalid-name\n\ndef pytest_cmdline_preparse(args):\n is_pylint_compatible = (2, 7) <= sys.version_i... | python | edit | 1 | 2 | bsd-3-clause | e6c91c06005c131805edeaf6b4980ff7f73b87b6 | jvanasco/tldextract,john-kurkowski/tldextract | conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndefinitions = (\n { \"doc\": \"basicStats\", \"view\": \"addCar\",\n \"map\": \"\"\"\n function(doc) {\n // car creations\n for (var id in doc.cars){\n if (doc.cars[id].state && doc.cars... | python | edit | 1 | 0 | apache-2.0 | a04a5a80057e86af2c5df0e87a7d2c3c221123ae | anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46 | rpc_server/CouchDBViewDefinitions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom prod import *\n\n# The same settings as production, but no database password.\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'bongo_test',\n 'USER': 'postgres',\n... | python | edit | 3 | 0 | mit | 7de22e999bb63cd83f8af6065638a97eeb3ba2d6 | BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo | bongo/settings/travis.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#import os, json\n#from jasy.core.Util import executeCommand\n#import jasy.core.Console as Console\n#import urllib.parse\n\n# Little helper to allow python modules in current jasylibrarys path\nimport sys, os.path, inspect\nfilename = inspe... | python | edit | 4 | 2 | mit | f9eeb75292f9a3f134f4b33849ee2d6a51bc4e4e | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | jasylibrary.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2010-2012 Cidadania S. Coop. Galega\n#\n# This file is part of e-cidadania.\n#\n# e-cidadania is free software: you can redistribute it and/or modify\n# it under the terms of... | python | edit | 1 | 1 | apache-2.0 | c7ee6f0094535aa0ea37becfc4e9403a3d511304 | cidadania/e-cidadania,cidadania/e-cidadania | tests/src/core/views/test_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing Libs\nfrom tests.support.case import SSHCase\nfrom tests.support.unit import skipIf\n\n# Import Salt Libs\nimport salt.utils\n\... | python | edit | 1 | 2 | apache-2.0 | 9e67babf85a46128b96dd6818fa860447b4052e7 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/ssh/test_mine.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\n\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(\n name='pylint-venv',\n version='2.0.0.dev0',\n description='pylint-venv provides a Pylint init... | python | edit | 1 | 0 | mit | 11e89d42949ff49890cc380f72061aac0e6b02e0 | jgosmann/pylint-venv | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nsetuptools.setup(\n name=\"inidiff\",\n version=\"0.1.0\",\n url=\"https://github.com/kragniz/inidiff\",\n\n author=\"Louis Taylor\",\n author_email=\"<EMAIL>\",\n\n description=\"Find the differences ... | python | edit | 1 | 0 | mit | e2a7e7c80ef4d9c82b0a57908398f43f24234c63 | kragniz/inidiff | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport codecs\n\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n filename = path.join(path.dirname(__file__), *parts)\n with codecs.open(filename, encoding=\"utf-8\") as fp:\n return fp... | python | edit | 1 | 1 | mit | bbba98884aff75e2b0d6af81150a3596a7c76038 | swilcox/pinax-blog,cdvv7788/pinax-blog,miurahr/pinax-blog,salamer/pinax-blog,pinax/pinax-blog,swilcox/pinax-blog,miurahr/pinax-blog,easton402/pinax-blog,easton402/pinax-blog,pinax/pinax-blog,pinax/pinax-blog | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright Least Authority Enterprises.\n# See LICENSE for details.\n\nimport setuptools\n\n_metadata = {}\nwith open(\"src/txkube/_metadata.py\") as f:\n exec(f.read(), _metadata)\n\nsetuptools.setup(\n name... | python | edit | 1 | 0 | mit | 1cb261bce94e7eb5bccccd282f938074e758f5bc | LeastAuthority/txkube | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nfrom setuputils import find_version, read\n\n\nsetup(\n name='astor',\n version=find_version('astor/__init__.py'),\n description='Read/rewrite/write Python ASTs',\n long_d... | python | edit | 1 | 0 | bsd-3-clause | 7f226d265c65cca2d74988695502d2edff3aa6a3 | berkerpeksag/astor,zackmdavis/astor | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Set up framework, need to work on strategy"
},
{
"role": "assistant",
"content": "# ghost.py\n\n# globals\ng_words = dict()\n_END = \"_END\"\n\ndef addWord(word):\n # check if subset is already in the dictionary\n cur = g_w... | python | new_file | null | null | cc0-1.0 | dd55baacdda9e0a88ec6924bbe29ad3f4bb30d21 | tobiaselder/ghost | ghost.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Defines the setup for the declxml library\"\"\"\nfrom setuptools import setup\n\nsetup(\n name='declxml',\n description='Declarative XML processing library',\n version='0.11.0',\n url='http://declxml.readthedocs.io/',\n ... | python | edit | 1 | 0 | mit | b1a92e41e31e18d2a273c476414e702daf1c1847 | gatkin/declxml | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\n\nINCOMPLETE_TASK_RE = re.compile(r'<li>\\[ \\] (.*?)(<ul.*?>|</li>)', re.DOTALL)\nINCOMPLETE_TASK_SUB = (r'<li class=\"task-list-item\">'\n r'<input type=\"checkbox\" '\n r'class=\"t... | python | edit | 1 | 2 | mit | 3d04bb1774e286df4cda3695b938251e0a6266ae | joeyespo/grip,joeyespo/grip | grip/patcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Always prefer setuptools over distutils\nfrom setuptools import setup, find_packages\n\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(her... | python | edit | 1 | 0 | mit | d5094e3b9ea2ff62483093e3415dee1044fd9974 | Kankroc/pdf2image,Belval/pdf2image | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nGITHUB_ALERT = \"\"\"**NOTE**: These are the docs for the version of envbuilder in git. For\ndocumentation on the last release, see the `pypi_page <http://pypi.python.org/pypi/envbuilder/>`_.... | python | edit | 1 | 0 | bsd-3-clause | 7681cfa394cdc91f77389a77ed8379cd5335f2c9 | jasonbaker/envbuilder,jasonbaker/envbuilder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module is for generating fake game data for use with the API.\n\nAn example of some game data::\n\n {\n \"id\": 1,\n \"logURL\": \"http://derp.nope/\",\n \"updates\": [\n {\n \"... | python | edit | 2 | 2 | bsd-3-clause | 54ab75918503ccaa991f9298c01d54a99b830c9b | siggame/ng-games,siggame/ng-games,siggame/ng-games | games.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\nimport skypipe\n\nsetup(\n name='skypipe',\n version=skypipe.VERSION,\n author='Jeff Lindsay',\n author_email='<EMAIL>',\n description='Magic pi... | python | edit | 1 | 0 | mit | 55a87e2fa74af95cbfa86ccde427b16bf1512690 | progrium/skypipe,progrium/skypipe | setup.py | accepted | null | 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 requires += ['simplejson']\n\nsetup(\n name='jasinja',\n version=jasinja.__version__,\n url='http://bitbucket.org/djc/ja... | python | edit | 1 | 0 | bsd-3-clause | e3765f9d109a6eacfce30a14ff01bd00a56c4c21 | djc/jasinja,djc/jasinja | setup.py | rejected_duplicate | Near-duplicate of sample 18324 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\nimport os\n\n\ndef get_package_data():\n paths = [os.path.join('data', '*.txt')]\n return {'astroquery.alma.tests': paths}\n\n```\n\nApply this change: Include xml d... | python | edit | 1 | 1 | bsd-3-clause | 07c9b76d63714c431a983f0506ff71f19face3bd | imbasimba/astroquery,imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery | astroquery/alma/tests/setup_package.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom neuroimaging.testing import *\n\nfrom neuroimaging.algorithms.onesample import ImageOneSample\nfrom neuroimaging.core.api import load_image\nfrom neuroimaging.utils.tests.data import repository\n\nclass test_OneSample(TestCase):\n @... | python | edit | 6 | 1 | bsd-3-clause | c89157c748bedb65d74f4109a7398cafc7e58f9d | alexis-roche/nireg,arokem/nipy,arokem/nipy,alexis-roche/nipy,bthirion/nipy,nipy/nipy-labs,alexis-roche/nipy,bthirion/nipy,alexis-roche/register,alexis-roche/register,alexis-roche/nireg,bthirion/nipy,nipy/nireg,alexis-roche/register,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/niseg,arokem/nipy,arokem/nipy,alexis-roche... | neuroimaging/algorithms/tests/test_onesample.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='turtleart',\n version='0.2',\n description='Library to facilitate Turtle Art',\n author='Ava and Teo Lisitza',\n author_email='<EMAIL>',\n packages=['turtleart', 'turtlear... | python | edit | 1 | 0 | apache-2.0 | 86c3859838c93df1bbe90bce8abc9971f0affe1f | teolisitza/turtleart | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport uuid\nimport os\nfrom audio_pipeline.util.AudioFileFactory import AudioFileFactory\nfrom audio_pipeline.util import Exceptions\n\n\nmbid_directory = \"Ready To Filewalk\"\npicard_directory = \"Picard Me!\"\n\ncache_limit = 30\n\ncanc... | python | edit | 4 | 5 | mit | c0ee0f27b21ed7c6eb97ad6b1fc1c7d72127c772 | hidat/audio_pipeline | audio_pipeline/tb_ui/util/Resources.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n\tname = \"idea-collection\", \n\tversion = \"0.1\", \n #url = \"TBD\",\n\tlicense = \"public domain\", \n\tdescription = \"An idea collection tool for django\", \n\tauthor = \"J... | python | edit | 1 | 0 | cc0-1.0 | 8ecd9c4605e92946941fe29a837b0b1855232135 | cfpb/idea-box,18F/idea-box,cfpb/idea-box,m3brown/idea-box,geomapdev/idea-box,geomapdev/idea-box,CapeSepias/idea-box,CapeSepias/idea-box,CapeSepias/idea-box,cmc333333/idea-box,cmc333333/idea-box,geomapdev/idea-box,m3brown/idea-box,18F/idea-box,cfpb/idea-box,18F/idea-box,cmc333333/idea-box | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"clipspy\",\n version=\"0.0.1\",\n author=\"Matteo Cafasso\",\n author_email=\"<EMAIL>\",\n description=(\"CLIPS Python bindings.\"),\n packages=find_packages()... | python | edit | 1 | 0 | bsd-3-clause | 9bd2a3951dca5e014799f31da30b4814af2b7a3b | noxdafox/clipspy,noxdafox/clipspy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | 539c8cbb91465fe1aabc25452bce7067c7474da5 | Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport re\nfrom pathlib import Path\nfrom setuptools import setup\n\n\nproject_path = Path(__file__).parent\n\nREADME = (project_path / 'README.md').read_text()\n\nversion_text = (project_path / 'django_admin_json_editor' / '__in... | python | edit | 1 | 0 | mit | 0e472a135a22470f87a90f941ddfbb0a1cfd3a70 | abogushov/django-admin-json-editor,abogushov/django-admin-json-editor | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom fabric.api import task, local, run, lcd, cd, env\nfrom os.path import exists as file_exists\nfrom fabtools.python import virtualenv\nfrom os import path\n\n\nPWD = path.join(path.dirname(__file__), '..')\nVENV_DIR = path.join(PWD, '.en... | python | edit | 6 | 1 | mit | 82316ec166b4ab64f1890f33e8b9b75bd6733e53 | spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | fabfile/eg.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# Copyright 2015, Dmitry Veselov\n\nfrom plyplus import Grammar, ParseError\ntry:\n # Python 2.x and pypy\n from itertools import imap as map\nexcept ImportError:\n # Python 3.x already have lazy map\n pas... | python | edit | 1 | 2 | mit | 9a003165301e60ee4486b0a8bdde79e84eef65d8 | dveselov/rparse | rparse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nfrom html import _escape_map_full\nfrom html.entities import codepoint2name\n\nhtml_entities = {_ord: '&{0};'.format(value)\n for _ord, value in codepoint2name.items()}\nhtml_entities.upda... | python | edit | 1 | 1 | bsd-3-clause | e751cb4f4805aed079fc025b9b1655f30cf5e69a | watsonpy/watson-html | watson/html/entities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='panoptescli',\n version='1.1.1',\n url='https://github.com/zooniverse/panoptes-cli',\n author='Adam McMaster',\n author_email='<EMAIL>',\n description=(\n ... | python | edit | 1 | 0 | apache-2.0 | 2c4964026e07f572ccd2213b2093a39b99a8888a | zooniverse/panoptes-cli | setup.py | rejected_duplicate | Near-duplicate of sample 5293 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | b49314c656db718c17ad8beadedf95b365ca7fc5 | Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\nimport sr.comp.scheduler.metadata as md\n\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(name='sr.comp.scheduler',\n version=md.VERSION,\n packages=find_packag... | python | edit | 1 | 0 | mit | 89a700b49d89a711f44a834d879c5edef959c195 | prophile/sr-scheduler-2015 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\nimport os\n\ndata = list()\nfor d in os.walk('markdo/'):\n if len(d[2]) > 0:\n path_list = map(\n lambda x: str.join('/', os.path.join(d[0], x).split('/')[1:]),\n d[2]\n )... | python | edit | 1 | 0 | mit | d0472714a97af951250f68c7c22e57448f689291 | nitipit/markdo,nitipit/markdo,nitipit/markdo | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nimport populous\n\nrequirements = [\n \"click\",\n \"cached-property\",\n \"fake-factory\",\n]\n\nsetup(\n name=\"populous\",\n version=populous.__version__,\n url=populous.__... | python | edit | 1 | 0 | mit | 0ca332f81d8c5be094855f32971da40bed991540 | novafloss/populous | setup.py | rejected_duplicate | Near-duplicate of sample 20433 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\n\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nclassifiers = [\n 'Development Status :: 4 - Beta',\n 'License :: OSI Approved :: BSD License',\n 'Programming Language :: Pyt... | python | edit | 4 | 0 | bsd-2-clause | 73c5ec2b477dc172dedf0b30dae16665babb14f6 | getwarped/powershift-cluster,getwarped/powershift-cluster | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nfrom setuptools import setup\n\nwith open('mashdown/__init__.py') as f:\n version = re.search(\n r'(?<=__version__ = \\')\\d\\.\\d\\.\\d(?=\\')',\n f.read()\n ).group()\n\n\nwith open('README.rst') as f:\n ... | python | edit | 1 | 0 | mit | 43ad157b058693fd38280a802ed4da92301ef4f1 | brouberol/mashdown | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime_plugin\nimport sublime\nimport os\n\n\nclass TypescriptBuildCommand(sublime_plugin.WindowCommand):\n def run(self):\n file_name = self.window.active_view().file_name()\n directory = os.path.dirname(file_name)... | python | edit | 1 | 2 | apache-2.0 | 551335ba6cd219cd90bf7419bb73804bb5851c64 | RyanCavanaugh/TypeScript-Sublime-Plugin,kungfusheep/TypeScript-Sublime-Plugin,Microsoft/TypeScript-Sublime-Plugin,zhengbli/TypeScript-Sublime-Plugin,fongandrew/TypeScript-Sublime-JSX-Plugin,Microsoft/TypeScript-Sublime-Plugin,zhengbli/TypeScript-Sublime-Plugin,hoanhtien/TypeScript-Sublime-Plugin,zhengbli/TypeScript-Sub... | typescript/commands/build.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.