messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n# This is the atca_rapid_response_api Python library.\n# Jamie Stevens 2017\n# ATCA Senior Systems Scientist\n# <EMAIL>\n\nsetup(name='atca_rapid_response_api',\n version='1.0',\n description='ATCA ... | python | edit | 1 | 0 | mit | 3ba6ad452d747135134ec23d62d0b327708e8ef5 | ste616/atca-rapid-response-api | python/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .oauth import BaseOAuth2\n\n\nclass UniverseOAuth2(BaseOAuth2):\n \"\"\"Universe Ticketing OAuth2 authentication backend\"\"\"\n name = 'universe'\n AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'\n ACCESS_TO... | python | edit | 1 | 1 | bsd-3-clause | a39c288e9beb506d62de66d72fc95750e54d833b | python-social-auth/social-core,python-social-auth/social-core | social_core/backends/universe.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys, yaml, os.path\n\ndef select_module(module, name):\n \"\"\"\n Select and return a biobox module\n \"\"\"\n mod_name = \".\".join([\"biobox_cli\", module, name])\n try:\n __import__(mod_name)\n except Impo... | python | edit | 1 | 2 | mit | 8aff9605a91f1041a1040c2cfc000dbc588c0503 | pbelmann/command-line-interface,pbelmann/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface,fungs/bbx-cli,fungs/bbx-cli,bioboxes/command-line-interface,michaelbarton/command-line-interface | biobox_cli/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Blueprint, request, render_template\nfrom ..load import processing_results, api\nimport string\nimport tweepy\n\n\ntwitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')\n\nascii_... | python | edit | 1 | 4 | mit | 2522f5e1a132597e56d1e8e8559b3e16c15be47f | griimick/feature-mlsite,griimick/feature-mlsite,griimick/feature-mlsite | app/twitter/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom datetime import date\n\nfrom base import Calendar\nfrom date import InvalidDate\nfrom main import JulianCalendar\n\nclass JulianToGregorianCalendar(Calendar):\n def date(self, year, month, day):\n gregorian_date = date(year, ... | python | edit | 1 | 3 | apache-2.0 | 22758183910a479f62f9fb42bb5acdc09deff448 | jwg4/calexicon,jwg4/qual | qual/calendars/historical.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\nimport sys\n\ntry:\n from flask import Flask\n import flask_login\n from flask_restless import APIManager\n from flask_sqlalchemy import SQLAlchemy\n import requests\nexcept ImportError:\n INT... | python | edit | 7 | 2 | mit | e09414c101d49c70c6da4fcdabf3e985fb92f468 | GregBrimble/boilerplate-web-service,GregBrimble/boilerplate-web-service | passenger_wsgi.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# pipetruncate.py\n#\n\nfrom pipe2py import util\n\ndef pipe_truncate(context, _INPUT, conf, **kwargs):\n \"\"\"This operator truncates the number of items in a feed.\n\n Keyword arguments:\n context -- pipeline context\n _INPUT... | python | edit | 1 | 3 | mit | 12a61da411134d2fc02e91d41b6687de8763a374 | nerevu/riko,nerevu/riko | modules/pipetruncate.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom haystack.views import SearchView, search_view_factory\n\nfrom ..forms import AdvancedSearchForm\n\nsearch_view = search_view_factory(view_class=SearchView,\n template='... | python | edit | 1 | 0 | bsd-3-clause | c617083fa413a0d45ff26c96751210901dfad7cf | django/djangosnippets.org,django/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org,django/djangosnippets.org | cab/urls/search.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hoomd.parameterdicts import AttachedTypeParameterDict\n\n\nclass TypeParameter:\n def __init__(self, name, type_kind, param_dict):\n self.name = name\n self.type_kind = type_kind\n self.param_dict = param_dict\n... | python | edit | 1 | 3 | bsd-3-clause | ce939b6f03260a57268a8371a2e05e531b36bce2 | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/typeparam.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom idea.models import State\n\ndef get_first_state():\n \"\"\" Get the first state for an idea. \"\"\"\n return State.objects.get(previous__isnull=True)\n\n```\n\nApply this change: Fix add_idea when multiple States have no previous... | python | edit | 1 | 1 | cc0-1.0 | bf307c6fa8c7259d49da2888f91d6bce9fc921cd | cfpb/idea-box,cfpb/idea-box,cfpb/idea-box | src/idea/utility/state_helper.py | rejected_duplicate | Near-duplicate of sample 13502 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IMode, IModuleData, Mode, ModuleData\nfrom txircd.utils import ModeType, stripFormatting\nfrom zope.interface import implements\n\nclass StripColors(ModuleData, Mode):\... | python | edit | 1 | 3 | bsd-3-clause | a8d46d56890948b36726432fbcaa3bc038a0095f | ElementalAlchemist/txircd,Heufneutje/txircd | txircd/modules/extra/stripcolors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify, render_template\nimport test, stats, os\napp = Flask(__name__)\n\ncache = {}\n\n@app.route('/')\ndef hello_world():\n return 'Hello World!'\n\n@app.route('/r/<string:subreddit>')\ndef episodes(subreddit)... | python | edit | 1 | 2 | apache-2.0 | fe217ed9436754d6f9cf01a0052091d095a6e99c | chasedog/EpisodeDiscussions,chasedog/EpisodeDiscussions | web.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThe Renderer class provides the infrastructure for generating template-based\ncode. It's used by the .grammars module for parser generation.\n\"\"\"\nfrom __future__ import print_function, division, absolute... | python | edit | 1 | 7 | bsd-2-clause | cad0f1ebeeaac1af296930bc98cf892395293112 | vmuriart/grako,frnknglrt/grako | grako/rendering.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom cle.absobj import AbsObj\n\nclass AngrExternObject(AbsObj):\n def __init__(self, alloc_size=0x1000):\n super(AngrExternObject, self).__init__('##angr_externs##')\n self._next_addr = 0\n self._lookup_table = {}\n... | python | edit | 1 | 2 | bsd-2-clause | 06ee9c73fed7a9b8488d800859f65c28ad63eb57 | angr/angr,xurantju/angr,zhuyue1314/angr,haylesr/angr,axt/angr,tyb0807/angr,terry2012/angr,avain/angr,xurantju/angr,lowks/angr,iamahuman/angr,iamahuman/angr,tyb0807/angr,iamahuman/angr,angr/angr,haylesr/angr,avain/angr,terry2012/angr,chubbymaggie/angr,cureHsu/angr,f-prettyland/angr,tyb0807/angr,schieb/angr,GuardianRG/an... | angr/extern_obj.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Define here the models for your scraped items\n#\n# See documentation in:\n# http://doc.scrapy.org/en/latest/topics/items.html\n\nimport scrapy\n\n\ndef single_item_serializer(value):\n # values are nested in... | python | edit | 1 | 2 | apache-2.0 | 795b661962915221ddab186b66523896316b2a79 | multiplechoice/workplace | jobs/jobs/items.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8; mode: Python; -*-\nfrom __future__ import unicode_literals\n\n__title__ = 'Python implementation of a REST based storage'\n\n# Please use PEP 0440 version strings.\n# https://www.python.org/dev/peps/pep-0440/\n__version... | python | edit | 1 | 0 | bsd-3-clause | 20c78cc7c4e0658be01df0ba92838b605bcafdc4 | peterdv/pyreststore | pyreststore/pyreststore/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport argparse\nimport sys\nfrom gensim.models.word2vec import Word2Vec\nimport csv\n\nfrom signal import signal, SIGINT\nsignal(SIGINT, lambda signum, frame: sys.exit(1))\n\nparser = argparse.ArgumentParser()\npar... | python | edit | 1 | 0 | mit | a18e6aa3647779de3963e6781afaeea3732d100e | dustalov/watset,dustalov/watset | similarities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python2\nimport lala\nimport ConfigParser\nimport sys\n\ndef main():\n \"\"\"Main method\"\"\"\n config = ConfigParser.SafeConfigParser()\n config.read(\"config\")\n lalaconfig = config._sections[\"lala\"]\n if \"-... | python | edit | 1 | 3 | mit | 935e16c55ac9dd59b1025c5b124ca0d15eaa02f7 | mineo/lala,mineo/lala | run-lala.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport subprocess\n\nimport sublime\nimport sublime_plugin\n\nfrom .path.skin_path_provider import get_cached_skin_path\n\n\nclass RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):\n\n def run(self):\n ... | python | edit | 1 | 2 | mit | 355a3a34b9a264734c1f5f2ec365a5873f000b77 | thatsIch/sublime-rainmeter | open_skin_as_project.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nclass Issue(models.Model):\n title = models.CharField(_('Title'), max_length=150)\n description = models.TextField(_('Description'))\n contrac... | python | edit | 1 | 0 | bsd-3-clause | efc792de5225f3a21fab6d3f299fea07c63f6d0d | RocknRoot/LIIT | incident/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport datetime\nimport logging\nimport os\nimport hashlib\n\nfrom utils.settings_handler import settings\n\n\ndef set_up_logging():\n \"\"\"\n Logger for tenhou communication and AI output\n \"\"\"\n ... | python | edit | 1 | 2 | mit | 726ebd81a592361d3e2f599d009be6d1f5a81b2c | MahjongRepository/tenhou-python-bot,MahjongRepository/tenhou-python-bot | project/utils/logger.py | rejected_duplicate | Near-duplicate of sample 15282 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Employee, Role\n\n\nclass RoleAdmin(admin.ModelAdmin):\n list_display = (\"name\",)\n\n\nclass EmployeeAdmin(admin.ModelAdmin):\n list_display = (\"username\", \"first_name\", \"la... | python | edit | 1 | 2 | apache-2.0 | a339ee67b9a2f1effcedf836f26657f628a842ee | belatrix/BackendAllStars | employees/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport os\nimport urllib.request\nfrom retry import retry\nfrom urllib.error import HTTPError\nfrom common import store_history, truncate, summarise\n\n# hack to override sqlite database filename\n# see: https://help.morph.io/t... | python | edit | 1 | 5 | mit | 2b0bcbb7ce82171965b22cf657439d6263fa9d91 | wdiv-scrapers/dc-base-scrapers | geojson_scraper.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .settings import BongSettings, DEFAULT_MESSAGE\nfrom .metadata import VERSION, SUMMARY\nimport argparse\n\nPARSER = argparse.ArgumentParser(description=SUMMARY)\nPARSER.add_argument('-V', '--version', action='version', version=VERSION,... | python | edit | 1 | 1 | mit | 7c0c349656e6f02be0f3f0044f5d225f3688be08 | prophile/bong | bong/parse_args.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport urllib3\n\ntry:\n import simplejson as json\nexcept ImportError:\n import json # pyflakes.ignore\n\nfrom .errors import NSQHttpError\n\n\nclass HTTPClient(obje... | python | edit | 1 | 3 | bsd-3-clause | 78807533031cf46acb5e73b695c0e492cf2c3e20 | hiringsolved/gnsq,wtolson/gnsq,wtolson/gnsq | gnsq/httpclient.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tddcommitmessage.messagebody import MessageBody\n\ndef test_message_wrapped_in_quotes():\n msg = MessageBody('forty-two')\n assert str(msg) == '\"forty-two\"'\n\ndef test_message_with_double_quotes_is_wrapped_with_single():\n ... | python | edit | 1 | 1 | mit | 85d12c7ce38c4349a98ccd09266bc3f08f511daa | matatk/tdd-bdd-commit,matatk/tdd-bdd-commit | tests/test_message_body.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport pkg_resources\nimport warnings\nimport numbers\n\nimport six\n\n\ndef get_version(modulename):\n \"Return a string containing the module name and the library version.\"\n version = '?'\n\n # Get the root module n... | python | edit | 1 | 6 | apache-2.0 | b5d3b84d4d2554882632fa9b10f44bd6ffb94b40 | recipy/recipy,recipy/recipy | recipyCommon/libraryversions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n#coding=utf8\n\nfrom Tkinter import *\nimport sys\nfrom ui import Gui\n \nif __name__ == '__main__':\n Root = Tk()\n App = Gui(Root)\n App.pack(expand='yes',fill='both')\n Root.geometry('320x240+10+10')\n ... | python | edit | 7 | 0 | apache-2.0 | ebf3f4a73aaab3aa2ea3e760bb44cfcbd7ca8d7f | doino-gretchenliev/Mid-Magic,doino-gretchenliev/Mid-Magic | src/main.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add build script Python version check"
},
{
"role": "assistant",
"content": "import sys\nif sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):\n sys.stderr.write('error: unsupported Python version (2.5-2.7 requir... | python | new_file | 1 | 0 | bsd-2-clause | 8caef330d6e69468833aa95f218390cc1e9088a5 | depp/sglib,depp/sglib | scripts/gen/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itertools import imap\nimport os\nimport re\nimport sys\nimport tarfile\n\ndef dontpack(fn):\n return '/.' in fn or '/CVS/' in fn\n\ndef package(indir, outfile):\n try:\n tarball = tarfile.open(outfile, 'w:bz2')\n t... | python | edit | 3 | 6 | mit | f8f1dc94bc7d48bbe9a36c7b1ffa8117ba458cba | matz-e/lobster,matz-e/lobster,matz-e/lobster | lobster/sandbox.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3.6\n# coding: utf-8\n\nimport os\nimport datetime as dt\nfrom pathlib import Path\n\nimport pytz\nfrom dotenv import load_dotenv\n\nenv_path = Path('.') / '.env'\nload_dotenv(dotenv_path=env_path)\n\nslack_verificatio... | python | edit | 1 | 0 | mit | 31f1c65d6505bc443fdb1d6ccd4849b175788f04 | eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000 | gargbot_3000/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom rest_framework import serializers\nfrom rest_framework.serializers import ValidationError\n\nfrom .models import ... | python | edit | 1 | 2 | mit | da3b2feab201782b3468e5e39232c366e0a3ebc0 | DXCanas/kolibri,lyw07/kolibri,DXCanas/kolibri,lyw07/kolibri,indirectlylit/kolibri,lyw07/kolibri,learningequality/kolibri,lyw07/kolibri,mrpau/kolibri,DXCanas/kolibri,mrpau/kolibri,indirectlylit/kolibri,DXCanas/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,lea... | kolibri/core/discovery/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\n\nfrom config import app_config as cfg\n\nfrom libraries.database_init import DataBase\nfrom libraries.tweetimporter import TweetImporter\nfrom libraries.twitterclient import TwitterClient\n\n# Twitter API configuration\nco... | python | edit | 1 | 0 | mit | d1d53bf2c2e719f2ff90d4260bb2521d0ee4af01 | franckbrignoli/twitter-bot-detection | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyxform.tests_v1.pyxform_test_case import PyxformTestCase\n\nclass WhitespaceTest(PyxformTestCase):\n def test_over_trim(self):\n self.assertPyxformXform(\n name='issue96',\n md=\"\"\"\n | sur... | python | edit | 1 | 1 | bsd-2-clause | 906f35428e36f2ece2fdb1c7fb150b979cf0457b | XLSForm/pyxform,XLSForm/pyxform | pyxform/tests_v1/test_whitespace.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom opencivicdata.models import division as models\n\n\n@admin.register(models.Division)\nclass DivisionAdmin(admin.ModelAdmin):\n list_display = ('display_name', 'id')\n search_fields = list_display... | python | edit | 1 | 0 | bsd-3-clause | 9c9127446a9c362910ea093d5a317ad0fc23e3d7 | opencivicdata/python-opencivicdata-django,opencivicdata/python-opencivicdata-django,rshorey/python-opencivicdata-django,opencivicdata/python-opencivicdata,influence-usa/python-opencivicdata-django,rshorey/python-opencivicdata-django,mileswwatkins/python-opencivicdata-django,mileswwatkins/python-opencivicdata-django,ope... | opencivicdata/admin/division.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Enable fat binaries on pitman package"
},
{
"role": "assistant",
"content": "class PixmanPackage (CairoGraphicsPackage):\n\tdef __init__ (self):\n\t\tCairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')\n\t\t\n\t\t#This packa... | python | new_file | 5 | 2 | mit | 6891981cd32a9dbf71346f95256f8447726672df | mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild | packages/pixman.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport Queue\n\nfrom parallel import worker\n\n\nclass Runner(object):\n def __init__(self, num_workers=4):\n self.in_queue = Queue.Queue()\n self.out_queue = Queue.Queue()\n self.num_workers = num_workers\n s... | python | edit | 1 | 2 | mit | e81a54a5df2aaafae230084fe3b4d59c5b4f61cc | andersonvom/mparallel | parallel/runner.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext as _\n\nfrom six import text_type\nfrom typing import Any\n\nimport os\nimport ujson\n\ndef with_... | python | edit | 4 | 2 | apache-2.0 | ddaf1a2b6744c9012546d6258b0378ab1b96d658 | grave-w-grave/zulip,amanharitsh123/zulip,kou/zulip,vikas-parashar/zulip,JPJPJPOPOP/zulip,ahmadassaf/zulip,andersk/zulip,vikas-parashar/zulip,andersk/zulip,hackerkid/zulip,kou/zulip,eeshangarg/zulip,ahmadassaf/zulip,dhcrzf/zulip,showell/zulip,punchagan/zulip,vabs22/zulip,peguin40/zulip,JPJPJPOPOP/zulip,shubhamdhama/zuli... | zerver/lib/i18n.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Python package to support the research during\nthe annual Lehrexkursion at Universität Hamburg.\n\"\"\"\nfrom os.path import dirname, join\n\nfrom . import csv\nfrom . import math\nfrom . import plots\nfrom . ... | python | edit | 1 | 1 | mit | 308f1cd155e2db37fe5ff03e158e3d9fc32d6885 | lkluft/lehrex | lehrex/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2012 Rackspace\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownersh... | python | edit | 1 | 0 | apache-2.0 | 08f36c5ff17c2bdfb98bdbcaeaaaaf30a1b71b93 | racker/python-raxcli | raxcli/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Handler utilities for getting non-monkey patched std lib stuff\n\nAllows one to get an unpatched thread module, with a thread\ndecorator that uses the unpatching OS thread.\n\n\"\"\"\ntry:\n from gevent import monkey\n [start_ne... | python | edit | 1 | 1 | apache-2.0 | b2657fd84c0d8fd4e1188a649bb2595651b83adb | harlowja/kazoo,pombredanne/kazoo,rockerbox/kazoo,AlexanderplUs/kazoo,harlowja/kazoo,pombredanne/kazoo,rgs1/kazoo,Asana/kazoo,jacksontj/kazoo,kormat/kazoo,rackerlabs/kazoo,bsanders/kazoo,tempbottle/kazoo,python-zk/kazoo,rockerbox/kazoo,jacksontj/kazoo,rackerlabs/kazoo,python-zk/kazoo,rgs1/kazoo,tempbottle/kazoo,Alexande... | kazoo/handlers/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nThe pastalog Log class, which simply sends a POST request to a the server.\n'''\nimport requests\n\n\nclass Log(object):\n def __init__(self, url, model_name):\n self.url = url\n self.model_name = model_name\n\n def... | python | edit | 1 | 1 | mit | 55378f71e8553eaad606433ae9e871983e99bd26 | rewonc/pastalog,rewonc/pastalog,rewonc/pastalog | pastalog/pastalog/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom urllib import urlopen\nfrom bs4 import BeautifulSoup\nfrom selenium import webdriver\n\ndef getBeautifulSoupObject(link):\n html = urlopen(link)\n return BeautifulSoup(html)\n\ndef getDynamicContent(link):\n driver = webdriver... | python | edit | 2 | 2 | mit | 534770cf0cc25c7aa0350570bc7a39d6239c7e05 | craftbase/chicago-murders | src/data/extractor/parsehtml.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django import forms\n\nfrom .models import Image\nfrom .widgets import MultipleUpload, CropExample\n\nfrom redactor.widgets import RedactorEditor\n\n\nclass ImageModelForm(forms.ModelForm... | python | edit | 1 | 2 | mit | d5cd8d679b08aae6d91cad003fdd71660a85c39b | williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps | opps/images/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nif sys.hexversion < 0x02070000:\n import unittest2 as unittest\nelse:\n import unittest\n\nfrom hypothesis import given, example\nfrom hypothesis.extra.datetime import datetimes\n\nfrom calexicon.calendars import Prolept... | python | edit | 6 | 2 | apache-2.0 | 580b5c48fc42f09459bcf63c0e2e239a550adb41 | jwg4/calexicon,jwg4/qual | calexicon/calendars/tests/calendar_testing.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'Maksim Dmitriev'\n\nimport argparse\nimport os\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument('-s', '--source', help='the icon to be resized', required=True)\n parser.add_ar... | python | edit | 1 | 0 | bsd-3-clause | 4ae0fccace6a3b2b640fd58c03fbd07341578acc | MaksimDmitriev/Python-Scripts | gen-android-icons.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Base classes and data for building the API \"\"\"\nfrom flask_restful import reqparse, Resource\n\nfrom .util import clean_attrs, set_attrs\nfrom dockci.server import DB\n\n\nAUTH_FORM_LOCATIONS = ('form', 'headers', 'json')\n\n\ncla... | python | edit | 1 | 3 | isc | 6a9165a55d3238a40e368a348c6d7a7a7d133f34 | RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI | dockci/api/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef hello():\n return \"Hello 0-downtime %s World!\" % os.environ.get('BLUEGREEN', 'bland')\n\n```\n\nApply this change: Add a route to send parrot image... | python | edit | 1 | 1 | mit | 25e5070a575de1ae7e20d6ede71297ab424cea87 | dbravender/gitric | bluegreen-example/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom subprocess import Popen, PIPE\nfrom genes.lib.traits import if_any\nfrom genes.ubuntu.traits import is_ubuntu\nfrom genes.debian.traits import is_debian\n\n\n# TODO: stop using sudo or ensure it exists\n# TODO: specify user ... | python | edit | 1 | 2 | mit | 77f22bd587ba2f6b1360bd5f8174e007b6028f9f | hatchery/genepool,hatchery/Genepool2 | genes/debconf/set.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ConfigParser\nimport datetime\nfrom wikitools import wiki\nfrom wikitools import category\nfrom plugin import Plugin\n\nclass MediaWiki(Plugin):\n def __init__(self, config=None):\n if config:\n try:\n self.site = wik... | python | edit | 4 | 4 | mit | 520a23caae3bd4e1db60021025b5dc3f573b0873 | k4cg/Rezeptionistin | plugins/mediawiki.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/bin/python\n\ntry:\n import urllib.request as urlrequest\nexcept ImportError:\n import urllib as urlrequest\n\nimport json\n\n\nclass RESTfulApi:\n \"\"\"\n Generic REST API call\n \"\"\"\n def __init__(self):\n ... | python | edit | 1 | 1 | apache-2.0 | 09b6f3e5cde6aeff69ea15fdc15c7db300ce3272 | Aurora-Team/BitcoinExchangeFH | python/web_socket.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- mode: python; coding: utf-8 -*-\n# Copyright (c) 2018 Radio Astronomy Software Group\n# Licensed under the 2-clause BSD License\n\n\"\"\"init file for pyuvdata.\n\n\"\"\"\nfrom __future__ import absolute_import, division, print_functi... | python | edit | 6 | 0 | bsd-2-clause | 97a1c4979f8c46833b4ac89f6920138551ed2ee6 | HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata | pyuvdata/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDataTransformer\n\n:Authors:\n\tBerend Klein Haneveld\n\"\"\"\n\nfrom vtk import vtkImageReslice\n\n\nclass DataTransformer(object):\n\t\"\"\"DataTransformer is a class that can transform a given dataset\"\"\"\n\tdef __init__(self):... | python | edit | 1 | 1 | mit | 5f7622824ac997228f83a894b451211fac4838ed | berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop | core/data/DataTransformer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom oslo_config import cfg\nfrom oslo_config import generator as gn\n\n__all__ = ['get_conf']\n\n\ndef get_conf(conf_file=None, config_file=None):\n conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'\n config_f... | python | edit | 1 | 5 | apache-2.0 | 3304b539e0f4105b3ad2603b0676b25d7c96b606 | NguyenHoaiNam/Jump-Over-Release | getconf/oldconf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom reviewboard.hostingsvcs.forms import HostingServiceForm\nfrom reviewboard.hostingsvcs.service import HostingService\n\n\nclass VersionOneForm(HostingS... | python | edit | 1 | 0 | mit | 32b00e79b9204477e94adc47fae0e3a0838dc328 | 1tush/reviewboard,custode/reviewboard,1tush/reviewboard,1tush/reviewboard,chipx86/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,KnowNo/reviewboard,brennie/reviewboard,davidt/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,beol/reviewboard,sgallagher/reviewboard,davidt/reviewboard,beol/reviewboard,bkoche... | reviewboard/hostingsvcs/versionone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom functools import wraps\nfrom sentry_sdk import Hub\n\n\ndef span(op, desc_or_func=None):\n def inner(func):\n @wraps(func)\n def wrapped(*args, **kwargs):\n if callable(desc_or_func):\n descri... | python | edit | 1 | 2 | apache-2.0 | 73a9889f0e43d2b1dc94e2235a94cb888e0eda89 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | zeus/utils/sentry.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hoomd.update.box_resize import BoxResize\n\n\n# TODO remove when no longer necessary\nclass _updater:\n pass\n\n\n__all__ = [BoxResize]\n\n```\n\nApply this change: Fix typo in hoomd.update.__all__ quote class name"
},
{
"ro... | python | edit | 1 | 0 | bsd-3-clause | 031bce223eac9eda1f856a204a07149c8e9549fd | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | hoomd/update/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nimport sqlite3\n\n\nclass DatabaseError(sqlite3.DatabaseError):\n \"\"\"\n Exception raised for errors that are related to the database.\n\n .. see... | python | edit | 3 | 1 | mit | 80dcfaa7216ed0be88eb275316d135a1089e4dbe | thombashi/SimpleSQLite,thombashi/SimpleSQLite | simplesqlite/_error.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\n\n__version_info__ = (1, 2, 0, 'dev')\n\n\n# Dot-connect all but the last. Last is dash-connected if not None.\n__version__ = '.'.join([str(i) for i in __version_info__[:-1]])\nif __version_info__[-1] is no... | python | edit | 3 | 1 | apache-2.0 | 79ef50191123c6e8a2e5e47efb8b15239a7acc5c | emory-libraries/readux,emory-libraries/readux,emory-libraries/readux | readux/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport numpy as np\ninfile = \"shapes.txt\"\nfilt = re.compile(r'^\"?([^\"]*)\"?$')\nconverter = lambda x: filt.match(x.strip()).group(1)\ndata = np.recfromcsv(infile, delimiter=',')\nshapes = np.array(map(int, [converter(x) for ... | python | edit | 11 | 0 | mit | f5c19e5814763235f8abebba2239f64135dc3188 | acbecker/kcmetrod3 | python/shapes2json.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport argparse\nimport yaml\nimport jinja2\nimport weasyprint\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--data', help='path to data directory', required=True)\nparser.add_argument('--number', hel... | python | edit | 1 | 0 | mit | 45f33dcf98b7b20fbedf3e05ca5c575ce3cbcbb3 | pwaring/125-accounts,pwaring/125-accounts | scripts/generate-invoice.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\napp = Flask(__name__)\napp.config['DEBUG'] = True\n\n# Note: We don't need to call run() since our application is embedded within\n# the App Engine WSGI application server.\n\n\n@app.route('/')\ndef hello():\n \"... | python | edit | 5 | 2 | apache-2.0 | 4f5d0e6d16835a10a36cc57fc7e18cee91da5e2b | DongjinChoi/tizen_easy_widget,DongjinChoi/tizen_easy_widget | main.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# File: say.py\n# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.\n# Programmer: Amal Shehu\n# Course: Exercism\n# Date: Wednesday 8th September 2016, ... | python | edit | 1 | 4 | mit | e2924f23c48a6e39b7c6e24ac19f73bd10181167 | amalshehu/exercism-python | say/say.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom checksum import file_sha1sum\n\n\nclass AnalysisFile(object):\n def __init__(self, filename):\n self.filename = filename\n\n def checksum(self):\n return file_sha1sum(self.filename)\n\n```\n\nApply this change: Fix ... | python | edit | 1 | 1 | mit | ad72c990051865d6c40cc0a0b3dbd1b514c5aa17 | jstutters/Plumbium | plumbium/analysis_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport Queue\nfrom elixir import Field, Unicode, Entity\n\nfrom astral.models.base import BaseEntityMixin\n\nimport logging\nlog = logging.getLogger(__name__)\n\n\nEVENT_QUEUE = Queue.Queue()\n\n\nclass Event(BaseEntityMixin, Entity):\n ... | python | edit | 2 | 1 | mit | 68c048f625aa0158f0117a737d94000da193df40 | peplin/astral | astral/models/event.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nguilds.py - All handlers under /guilds/*\n'''\n\nimport json\nimport logging\nfrom ..utils import _err, _json, strip_user_data\n\nlog = logging.getLogger(__name__)\n\nclass GuildsEndpoint:\n def __init__(self, server):\n self... | python | edit | 4 | 3 | mit | f6c2f222db0f529d3f5906d5de7a7541e835ea77 | nullpixel/litecord,nullpixel/litecord | litecord/api/guilds.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport numpy as np\n\nfrom optparse import OptionParser\n\nparser = OptionParser()\n\nparser.add_option(\"-b\",\n \"--bedpe_file\",\n dest=\"bedpe_file\",\n help=\"BEDPE file\")\n\nparser.add_opti... | python | edit | 4 | 0 | mit | e4e4db6c08612ba5b08224040d191eb83d27bf0d | arq5x/lumpy-sv,glebkuznetsov/lumpy-sv,hall-lab/lumpy-sv,cc2qe/lumpy-sv,hall-lab/lumpy-sv,glebkuznetsov/lumpy-sv,arq5x/lumpy-sv,glebkuznetsov/lumpy-sv,arq5x/lumpy-sv,cc2qe/lumpy-sv,hall-lab/lumpy-sv,cc2qe/lumpy-sv,glebkuznetsov/lumpy-sv,glebkuznetsov/lumpy-sv,hall-lab/lumpy-sv,arq5x/lumpy-sv,cc2qe/lumpy-sv,arq5x/lumpy-s... | scripts/prob_bedpe_to_bedgraph.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom threading import Lock, Event\n\n\nclass TransferEventManager(object):\n\n def __init__(self):\n self.events = dict()\n self.events_lock = Lock()\n\n def acquire_event(self, path, force_clear=False):\n with se... | python | edit | 1 | 3 | apache-2.0 | 8de10efd931e397af9c6b4c405a58af27940608a | galaxyproject/pulsar,galaxyproject/pulsar,jmchilton/pulsar,jmchilton/lwr,ssorgatem/pulsar,natefoo/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/lwr,jmchilton/pulsar | lwr/lwr_client/util.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport unittest\nfrom PythonTemplate import Model\n\n\nclass TestModel(unittest.TestCase):\n def setUp(self, use_auth=False):\n # TODO\n pass\n\n def test_do_thing(self):\n # do something\... | python | edit | 1 | 1 | apache-2.0 | 117c5f19df731dd56901023e4ed29db5741617b2 | joshvillbrandt/PythonTemplate | tests/TestModel.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# http://www.openstreetmap.org/way/219071307\nassert_has_feature(\n 16, 10478, 25338, 'roads',\n { 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })\n\n# http://www.openstreetmap.org/way/258020271\nassert_has_featur... | python | edit | 5 | 0 | mit | 90a8a55b4607e88e7e73f849250b4230185a18fd | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | integration-test/843-normalize-underscore.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\n\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings.configure(\n DATABASES={\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n ... | python | edit | 1 | 1 | bsd-3-clause | e11d201c415eb86137194d93ac1fca7c20123ae9 | caktus/django-dry-choices | runtests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Copyright (c) 2010 rPath, Inc.\n#\n# This program is distributed under the terms of the Common Public License,\n# version 1.0. A copy of this license should have been distributed with this\n# source file in a file called LICENSE. If it... | python | edit | 4 | 2 | apache-2.0 | d1ee3578cd948c28e72bda3fbd06193be5033196 | sassoftware/rpath-tools,sassoftware/rpath-tools | ractivate/utils/client.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport testbase\nschema = None\n\n__all__ = 'Table', 'Column',\n\ntable_options = {}\n\ndef Table(*args, **kw):\n \"\"\"A schema.Table wrapper/hook for dialect-specific tweaks.\"\"\"\n\n global schema\n if schema is None:\n ... | python | edit | 2 | 19 | mit | 1dc4546aa95d3adfff910430afe922bf137bf595 | graingert/sqlalchemy,alex/sqlalchemy,WinterNis/sqlalchemy,elelianghh/sqlalchemy,bdupharm/sqlalchemy,sandan/sqlalchemy,monetate/sqlalchemy,olemis/sqlalchemy,wujuguang/sqlalchemy,ThiefMaster/sqlalchemy,brianv0/sqlalchemy,j5int/sqlalchemy,wfxiang08/sqlalchemy,wujuguang/sqlalchemy,sqlalchemy/sqlalchemy,ThiefMaster/sqlalche... | test/testlib/schema.py | rejected_complexity | Cyclomatic complexity too high: 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n # during the installation process this can raise an exception.\n from .data import SkData\nexcept:\n pass\n\n__author__ = 'Ivan Ogasawara'\n__email__ = '<EMAIL>'\n__version__ = '0.1.2'\n\n\n```\n\nApply this change: Change p... | python | edit | 3 | 0 | mit | 669b9c07ebca1d80778da950fc145c8cf0c6df65 | xmnlab/skdata,OpenDataScienceLab/skdata | skdata/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subgraph_extractor.cli import extract_from_config\nimport click\nfrom cloudpathlib import AnyPath\n\n@click.command()\n@click.option(\n \"--subgraph-config-folder\",\n help=\"The folder containing the subgraph config files\",\n ... | python | edit | 1 | 2 | mit | 35409711d9976ed44e25e314486f3f703b18c068 | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/cardpay-subgraph-extraction/export.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nimport mm1\nimport sim\n\n\n### Params\n# Mean interarrival rate of customers per second;\n# hence, 0.05 <=> 3 people/minute\ninterarrival_rate = 0.05\n# Mean service rate by the teller per second... | python | edit | 1 | 0 | mit | 07f409bb6b8d008cf473aeb33fd0833dccfba402 | kubkon/des-in-python | mm1_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import path\n\nfrom ffflash import RELEASE, log, now, timeout\nfrom ffflash.lib.clock import epoch_repr\nfrom ffflash.lib.data import merge_dicts\nfrom ffflash.lib.files import read_json_file, write_json_file\n\n\nclass Container:\n... | python | edit | 1 | 2 | bsd-3-clause | 3760005cec3174b14d3f0ee20327e1b8de9ce800 | spookey/ffflash,spookey/ffflash | ffflash/lib/container.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom cobe.commands import LearnIrcLogCommand\n\nclass testIrcLogParsing(unittest.TestCase):\n def setUp(self):\n self.command = LearnIrcLogCommand()\n\n def testNonPubmsg(self):\n msg = \"this is some ... | python | edit | 1 | 1 | mit | 83c12d598221aac8e7173fb7d78083bc1c5ab64b | pteichman/cobe,wodim/cobe-ng,wodim/cobe-ng,DarkMio/cobe,tiagochiavericosta/cobe,meska/cobe,LeMagnesium/cobe,LeMagnesium/cobe,DarkMio/cobe,meska/cobe,tiagochiavericosta/cobe,pteichman/cobe | tests/test_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom glob import glob\nimport os\nimport re\n\ndef make_feedmes():\n # Used to convert all the fit*.galfit files to fit*.diff\n ids = glob('*/')\n for id in ids:\n os.chdir(id)\n feedmes = glo... | python | edit | 1 | 5 | mit | 1636757f52a553c99fb40059f4461e97485d2199 | MegaMorph/galfitm-illustrations,MegaMorph/galfitm-illustrations | fits/make_fit_feedmes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass BaseProcessor(object):\n NAME = None\n\n def process_raw(self, raw_doc, **kwargs):\n pass # pragma: no cover\n\n def process_normalized(self, raw_doc, normalized, **kwargs):\n pass # pragma: no cover\n\n```\n\... | python | edit | 1 | 2 | apache-2.0 | b60cfdb2b338a4f87b4ac6ba7dd03c9c1d751b37 | erinspace/scrapi,felliott/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi | scrapi/processing/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"This module provides an abstract base class for invocation plugins\"\"\"\n\n\nfrom abc import abstractmethod, ABCMeta\n\n\nclass BasePlugin(object):\n \"\"\"\n Abstract base class for invocation plugins.\n\n Plugin developers... | python | edit | 1 | 1 | bsd-3-clause | 471828d39ff256961bf48323feb43438901a4762 | cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt | orges/plugins/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.paginator import EmptyPage, PageNotAnInteger, Paginator\nfrom django.shortcuts import render\n\nfrom wagtail.core.models import Page\nfrom wagtail.search.models import Query\n\n\ndef search(request):\n search_query = req... | python | edit | 1 | 4 | mit | a8997dad913fbc5a12def6a31931efab16efd285 | chrisdev/wagtail-cookiecutter-foundation,chrisdev/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,chrisdev/wagtail-cookiecutter-foundation | {{cookiecutter.project_slug}}/search/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under an MIT open source license - see LICENSE\n\n\n'''\nTest functions for Cramer\n'''\n\nfrom unittest import TestCase\n\nimport numpy as np\nimport numpy.testing as npt\n\nfrom ..statistics import Cramer_Distance\nfrom ._testi... | python | edit | 1 | 1 | mit | 86e9e5a8da58b2902f5848353df9b05151bd08fa | Astroua/TurbuStat,e-koch/TurbuStat | turbustat/tests/test_cramer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom parsl.config import Config\nfrom parsl.data_provider.scheme import GlobusScheme\nfrom parsl.executors.threads import ThreadPoolExecutor\nfrom parsl.tests.utils import get_rundir\n\n# If you are a developer running tests, make sure to u... | python | edit | 1 | 0 | apache-2.0 | 3622a0354bc57d32c8b2e714c6b5f8533fa8f6d7 | swift-lang/swift-e-lab,Parsl/parsl,Parsl/parsl,Parsl/parsl,swift-lang/swift-e-lab,Parsl/parsl | parsl/tests/configs/local_threads_globus.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nTrigger the conda-forge.github.io Travis job to restart.\n\"\"\"\n\n\nimport os\n\nimport requests\nimport six\n\nimport conda_smithy.ci_register\n\n\ndef rebuild_travis(repo_slug):\n headers = conda_smithy.ci_register.travis_hea... | python | edit | 3 | 2 | bsd-3-clause | 1963012ba4628f1f66d495e777275243dc7248e4 | jakirkham/staged-recipes,Cashalow/staged-recipes,dschreij/staged-recipes,scopatz/staged-recipes,stuertz/staged-recipes,conda-forge/staged-recipes,guillochon/staged-recipes,hadim/staged-recipes,SylvainCorlay/staged-recipes,mcs07/staged-recipes,scopatz/staged-recipes,sodre/staged-recipes,pmlandwehr/staged-recipes,sannykr... | .CI/trigger_conda-forge.github.io.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8; -*-\n\nimport re\n\nfrom jenkins_autojobs import main\n\n\ndef test_filter_jobs():\n class Job:\n def __init__(self, name):\n self.name = name\n\n class jenkins:\n pass\n\n names = ['fe... | python | edit | 1 | 3 | bsd-3-clause | e87fc9172b9d56fe9d64cfda2fb36a3f71e69e70 | gvalkov/jenkins-autojobs,gvalkov/jenkins-autojobs | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 15.08.2017 15:31\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, TestCase\nfrom grammpy import *\nfrom .grammar import *\n\n\nclass RulesTest(TestCase... | python | edit | 39 | 2 | mit | 61e6c21e32a481be9b2c61d71b0faef3fe731ae6 | PatrikValkovic/grammpy | tests/rules_tests/RulesTest.py | rejected_lint | Too many lint violations: 39 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import division, print_function\nimport click\n\nCONTEXT_SETTINGS = {\n 'help_option_names': ['-h', '--help'],\n}\n\n@click.group(context_settings=CONTEXT_SETTINGS)\ndef cli():\n pass\n\n\nfrom... | python | edit | 11 | 1 | bsd-3-clause | ec2454626e22244c504bae528457fb8136c59feb | mirnylab/cooler | cooler/cli/__init__.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .location_schema import Location\nfrom marshmallow import Schema, fields, post_dump\nfrom .location_api_url import LocationUrl\n\n\nclass LocationByPointQueryString(Schema):\n point = fields.Str()\n includeEntityTypes = fields.St... | python | edit | 1 | 3 | mit | dea1d0d957cdfc07a561b42125f49d0c1e1c4da6 | bharadwajyarlagadda/bingmaps | bingmaps/urlschema/location_by_point_schema.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport twstock\n\n\ndef main(argv):\n print('四大買賣點判斷 Best Four Point')\n print('------------------------------')\n if len(argv) > 1:\n sids = argv[1:]\n for sid in sids:\n bfp = twstock.BestFourPoint(twstoc... | python | edit | 1 | 4 | mit | 05240d24f6184b015422e2e1996fb90d7f6d7654 | mlouielu/twstock,TCCinTaiwan/twstock | twstock/cli/best_four_point.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nA collection of utilities to see if new ReST files need to be automatically\ngenerated from certain files in the project (examples, datasets).\n\"\"\"\n\ndef get_hash(f):\n \"\"\"\n Gets hexadmecimal md5 hash of a string\n ... | python | edit | 4 | 4 | bsd-3-clause | 3816063967e03bc7b0cd3b7c95e74291ced04138 | musically-ut/statsmodels,bavardage/statsmodels,nguyentu1602/statsmodels,kiyoto/statsmodels,detrout/debian-statsmodels,adammenges/statsmodels,kiyoto/statsmodels,adammenges/statsmodels,edhuckle/statsmodels,edhuckle/statsmodels,yarikoptic/pystatsmodels,kiyoto/statsmodels,rgommers/statsmodels,jstoxrocky/statsmodels,wayneni... | tools/hash_funcs.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Sep 23 15:23:58 2015\n\n@author: jensv\n\"\"\"\n\nimport skin_core_scanner_simple as scss\nreload(scss)\nimport equil_solver as es\nreload(es)\nimport newcomb_simple as new\nreload(new)\n\n(la... | python | edit | 4 | 0 | mit | 10b977303008ee59a5f5c39ccf0156222a5a58c5 | jensv/fluxtubestability,jensv/fluxtubestability | test_run.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom familyconnect_registration.settings import * # flake8: noqa\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = 'TESTSEKRET'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG =... | python | edit | 2 | 0 | bsd-3-clause | 0ba57c8b908b5feb58af731c7b1c62a41ae84d8d | praekelt/familyconnect-registration,praekelt/familyconnect-registration | familyconnect_registration/testsettings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nfrom workflow import Workflow\n\n\ndef main(wf):\n user_input = wf.args[0]\n if user_input != '':\n try:\n if int(user_input) <= 100 and int(user_input) > 0:\n wf.add_item('%s%%'... | python | edit | 1 | 7 | mit | cb2f6840d34807d2df72e8c7ed0a76576a50f392 | fniephaus/alfred-brightness | src/brightness.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\r\nCreated on Jan 15, 2017\r\n\r\n@author: Marlon_2\r\n'''\r\nimport tkinter as tk # import\r\nfrom tkinter import ttk # impork ttk from tkinter\r\n\r\nwin = tk.Tk(); # create instance\r\n\r\n#add a title\r\nwin.title(\"Python H... | python | edit | 1 | 1 | mit | 4b7065426447fb27322b81b283616c9242af41b9 | martianworm17/py_his | python_hospital_info_sys/com/pyhis/gui/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom bs4 import BeautifulSoup as BS\n\npytest.main(['--durations', '10', '--cov-report', 'html'])\nurl = r'htmlcov/index.html'\npage = open(url)\nsoup = BS(page.read(), features='html5lib')\n\naggregate_total = soup.find_all(... | python | edit | 1 | 0 | mit | d0791ccd79dea2ec30d890ad9060f58d1e8b1c7c | misachi/job_match,misachi/job_match,misachi/job_match | run_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport piglatin\n\nfrom interfaces.SentenceOperation import SentenceOperation\nfrom tasks.TaskTypes import TaskType\n\nclass PigLatin(SentenceOperation):\n tasks = [\n TaskType.TEXT_CLASSIFICATION,\n TaskType.TEXT_TO_TEXT_G... | python | edit | 1 | 4 | mit | 7b15a9b510bce6a3866c0d3d7cd78c0c477cb69d | GEM-benchmark/NL-Augmenter | transformations/pig_latin/transformation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# Konstrukteur - Static website generator\n# Copyright 2013 Sebastian Fastner\n#\n\n\"\"\"\n**Konstrukteur - Static website generator**\n\nKonstrukteur is a website generator that uses a template and content files\nto create static websi... | python | edit | 1 | 1 | mit | 36065d77de34d0c8a0fc7443f01c2d9c8d63e0c4 | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | konstrukteur/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.core.exceptions import ValidationError\n\n\nclass OrderedModelManager(models.Manager):\n def swap(self, obj1, obj2):\n tmp, obj2.order = obj2.order, 0\n obj2.save(swapping=True)\n ... | python | edit | 1 | 4 | bsd-3-clause | 9e4dc6763fbd0de0f17b4acaa8109a12cdff28d6 | MagicSolutions/django-orderedmodel,MagicSolutions/django-orderedmodel | orderedmodel/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Import chosenforms for pretty search forms\nfrom chosen import forms as chosenforms\n# Import the AbstractUser model\nfrom django.contrib.auth.models import AbstractUser\n\n# Import the basic Django ORM models and... | python | edit | 8 | 1 | bsd-3-clause | 0f71f39a8634927b532c3f5b258720761f1d9c5c | briandant/mentor_up,briandant/mentor_up,briandant/mentor_up,briandant/mentor_up | mentorup/users/models.py | rejected_lint | Too many lint violations: 8 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.