messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Add electron lifetime\n\"\"\"\n\nfrom sympy.parsing.sympy_parser import parse_expr\nfrom pax import units\n\nfrom cax import config\nfrom cax.task import Task\n\n\nclass AddElectronLifetime(Task):\n \"Add electron lifetime to datas... | python | edit | 1 | 3 | isc | 3a1615238d4500f0fa7b9eea9ee2bfe460bc21f9 | XENON1T/cax,XENON1T/cax | cax/tasks/purity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\nimport os\nimport errno\n\n\ndef ensure_intermediate_dir(path):\n \"\"\"\n Basiclly equivalent to command `mkdir -p`\n\n \"\"\"\n\n try:\n\n os.makedirs(os.path.dirname(path))\n\n except OS... | python | edit | 6 | 4 | mit | fe5edfe737a774aa86cce578321fbb7fb4c8795e | huangjunwen/tagcache | tagcache/utils.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController\r\nfrom waitress import serve\r\nfrom wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp\r\n\r\nproxy = 'http://127.0.0.1:8080/auth/v1.0'\r\ninsecure = False # Set to ... | python | edit | 1 | 0 | apache-2.0 | 46511322dc8d738cc43561025bca3298946da2e6 | cschwede/swiftdav,cschwede/swiftdav | server.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# Copyright 2010 Eric Entzel <<EMAIL>>\n#\n\nfrom google.appengine.api import mail\nfrom google.appengine.ext.webapp import template\nimport os\n\n\nfrom_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspo... | python | edit | 1 | 1 | mit | 0f7ebf148ab3f88fc983e60f689a9c740ae64e47 | eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot | outgoing_mail.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport argparse\nimport json\n\nfrom flask import Flask, request\n\nparser = argparse.ArgumentParser(description=\"Start a Blindstore server.\")\nparser.add_argument('-d', '--debug', action='store_true',\n help=\"enable F... | python | edit | 1 | 1 | mit | 5ef05f6c75e3dd0febffd527aebfdf8c2ed6bb51 | blindstore/blindstore-old-scarab | server.py | rejected_duplicate | Near-duplicate of sample 170 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.views import generic\n\nfrom characters.forms import CharacterForm\nfrom characters.models import Character, Class, Race\n\n\nclass CharacterIndexView(generic.Lis... | python | edit | 5 | 4 | mit | 061306d137b85ac59e182ffbba29d22bc8c624ba | mpirnat/django-tutorial-v2 | characters/views.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom unittest import TestCase\n\n\nclass AddressBookTestCase(TestCase):\n\n def test_add_person(self):\n pass\n\n def test_add_group(self):\n pass\n\n def test_find_person_by_first_name(self):\n pass\n\n def... | python | edit | 3 | 1 | mit | b853abc579f5dfaab896cf57c39268a36c109a83 | dizpers/python-address-book-assignment | tests/test_address_book.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport sys\n\nimport sputnik\nfrom sputnik.package_list import (PackageNotFoundException,\n CompatiblePackageNotFoundException)\n\nfrom . import about\n\n\ndef downlo... | python | edit | 3 | 5 | mit | fefde8aef88cbfb13cb1f0bfcd3ac476ad7a903c | explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,spacy-io/spaCy,spacy-io/spaCy,raphael0202/spaCy,banglakit/spaCy,ex... | spacy/download.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture(autouse=True)\ndef tagschecker(request):\n tags = set(request.config.getini('TAGS'))\n\n tags_marker = request.node.get_marker('tags')\n xfailtags_marker = request.node.get_marker('xfailtags')\n ... | python | edit | 1 | 7 | mit | 68cec560ad108e0e6a081ed92aab2f06a7545821 | dincamihai/salt-toaster,dincamihai/salt-toaster | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport webtest\n\nimport moksha.tests.utils as testutils\n\nfrom moksha.api.widgets.live import get_moksha_socket\nfrom moksha.middleware import make_moksha_middleware\nfrom tw2.core import make_middleware as make_tw2_middleware\n\n\nclass ... | python | edit | 1 | 2 | apache-2.0 | 267a768bd1ccc87c3c1f54c4ac520a0e12e5fd5f | pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,mokshaproject/moksha,pombredanne/moksha | moksha/tests/test_clientsockets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python\n\n# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of ... | python | edit | 4 | 1 | apache-2.0 | 763e8b3d8cab43fb314a2dd6b5ebb60c2d482a52 | alancutter/web-animations-perf-bot | deploy_latest_build.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nINSTALLED_APPS = [\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n\n 'import_export',\n\n 'core',\n]\n\nSITE_ID =... | python | edit | 1 | 0 | bsd-2-clause | 54ab8be3e994f17077d83b0c719fc44a60b889e5 | Akoten/django-import-export,luto/django-import-export,bmihelac/django-import-export,bmihelac/django-import-export,rhunwicks/django-import-export,bmihelac/django-import-export,ylteq/dj-import-export,ylteq/dj-import-export,copperleaftech/django-import-export,luto/django-import-export,pajod/django-import-export,piran/djan... | tests/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom emaillist.models import EmailExclusion\nfrom django.shortcuts import render_to_response\n\ndef remove_email(request, email):\n if email[-1] == '/':\n email = email[:-1]\n\n #Only exclude an email once\n if EmailExclusio... | python | edit | 3 | 3 | isc | c51fbf651ae04341233dd16f4b93b1c6b8f3d30b | rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory | observatory/emaillist/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom distutils.command.install import *\nfrom distutils.command.install import install as old_install\n\nclass install(old_install):\n\n def finalize_options (self):\n old_install.finalize_options(self)\n self.install_lib... | python | edit | 4 | 5 | bsd-3-clause | c65c9fafbdd96f20c7a87ce88ff594edcd490b49 | chadnetzer/numpy-gaurdro,illume/numpy3k,illume/numpy3k,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,illume/numpy3k,efiring/numpy-work,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,Ade... | numpy/distutils/command/install.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom panoptes_client.panoptes import LinkResolver, PanoptesObject\n\n\nclass Classification(PanoptesObject):\n _api_slug = 'classifications'\n _link_slug = 'classific... | python | edit | 1 | 2 | apache-2.0 | f89dbcf6a140e02a4d5d7a89872c0c066a1dd869 | zooniverse/panoptes-python-client | panoptes_client/classification.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for scripts/print_view_controller_hierarchy.py.\"\"\"\nimport re\nimport unittest\n\nfrom test_utils import import_utils\nimport_utils.prepare_lldb_import_or_exit()\n\nimport lldb\n\nimport_utils.prepare_for_scripts_imports()\n\... | python | edit | 1 | 2 | mit | 417c838dcda8e6117f23f13a6edac02c8582e67f | mrhappyasthma/HappyDebugging,mrhappyasthma/happydebugging | tests/print_view_controller_hierarchy_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ckan.common import _\nimport ckan.lib.navl.dictization_functions as df\n\n\ndef lower_if_exists(s):\n return s.lower() if s else s\n\n\ndef upper_if_exists(s):\n return s.upper() if s else s\n\n\ndef valid_resources(private, cont... | python | edit | 1 | 6 | mit | a0e835cbf382cb55ff872bb8d6cc57a5326a82de | vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog | ckanext/ckanext-apicatalog_scheming/ckanext/apicatalog_scheming/validators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or... | python | edit | 1 | 1 | apache-2.0 | 093202349a971ba20982976f464853e657ea3237 | beni55/twine,dstufft/twine,jamesblunt/twine,mhils/twine,sigmavirus24/twine,pypa/twine,warner/twine,reinout/twine | tests/test_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPossible functions for the ``PRIVATE_STORAGE_AUTH_FUNCTION`` setting.\n\"\"\"\n\n\ndef allow_authenticated(private_file):\n try:\n return private_file.request.user.is_authenticated()\n except AttributeError:\n # ... | python | edit | 1 | 2 | apache-2.0 | 8c75327dfc6f6d6bc3097813db9dc4ae0e46489a | edoburu/django-private-storage | private_storage/permissions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ndef test_bar_fixture(testdir):\n \"\"\"Make sure that pytest accepts our fixture.\"\"\"\n\n # create a temporary pytest test module\n testdir.makepyfile(\"\"\"\n def test_sth(bar):\n ass... | python | edit | 1 | 1 | mit | 1205f30111b5f4789e3d68a1ff62bdb5b5597fc4 | pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin | pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom ..scan import Dispatcher\nfrom ..errs import SchemaError\nfrom ..spec.v3_0_0.objects import Operation\nfrom ..utils import scope_compose\nfrom ..consts import private\n\nclass TypeReduce(object):... | python | edit | 1 | 7 | mit | 4035afc6fa7f47219a39ad66f902bb90c6e81aa1 | mission-liao/pyopenapi | pyopenapi/scanner/type_reducer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom urllib import parse\n\nDEBUG = False\n\n\nDATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')\nbits = parse.urlparse(DATABASE_SA)\n\nDATABASE = {\n 'user': bits.username,\n 'database': bits.path[1:],\n 'p... | python | edit | 1 | 0 | bsd-2-clause | af722fd8c8590b92293aa35e94e8cdf675fc50b8 | d0ugal/discode-server,d0ugal/discode-server,d0ugal/discode-server | discode_server/config/base_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom mezzanine.core.models import Displayable, RichText\n\nclass RepeatType(models.Model):\n DAILY = 'daily'\n WEEKLY = 'weekly',\n MONTHLY = 'monthly'\n\n REPEAT_CHOICES = (\n (DAILY, 'REP... | python | edit | 1 | 0 | mit | 90ea0d2113b576e47284e7ab38ff95887437cc4b | jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website | website/jdevents/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cache\nimport network\nimport scraper\n\nYTS_URL = 'http://yts.re'\n\n################################################################################\ndef movie(movie_info):\n magnet_infos = []\n\n json_data = network.json_get... | python | edit | 1 | 8 | mit | e58efc792984b7ba366ebea745caa70e6660a41b | sharkone/scrapyard | scrapyard/yts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport geocoder\nimport time\n\ndef lat_longs_from_geo_strings(lst):\n lats_lons = []\n for addr_str in lst:\n g = geocoder.google(addr_str)\n if g.latlng is None:\n time.sleep(.5)\n lats_lons.exten... | python | edit | 1 | 4 | mit | 661fafef2c1f86459a11683704945a1a83e4f760 | chicago-justice-project/article-tagging,chicago-justice-project/article-tagging,kbrose/article-tagging,kbrose/article-tagging | lib/tagnews/geoloc/geocode_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logging.handlers import SysLogHandler\nimport logging\nimport sys\n\nsyslogh = None\n\n\ndef cleanup():\n global syslogh\n\n if syslogh:\n syslogh.close()\n\n logging.shutdown()\n\n\ndef get_logger(name,\n ... | python | edit | 1 | 7 | mit | 9aa2f8ebc2a9a0d9b74f2d22a3eb6d7ed3212008 | Tatsh/xirvik-tools | xirvik/logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom __future__ import absolute_import\n\nimport contextlib\nimport os.path\nimport pytest\nimport sqlite3\n\nfrom git_code_debt.create_tables import create_schema\nfrom git_code_debt.create_tables import populate_metric_ids\nfrom git_cod... | python | edit | 1 | 1 | mit | 453e2c9c30c98a6077acefff7d36a277b77c052c | Yelp/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt,ucarion/git-code-debt | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError\nfrom django.views.generic import View\n\nfrom eve_proxy.models import CachedDocument\n\n\nclass EVEAPIProxyVi... | python | edit | 3 | 6 | bsd-3-clause | 314a4088e65f8d9f619b9ddcf53e339ced11124e | nikdoof/test-auth | app/eve_proxy/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# importing modules/ libraries\nimport pandas as pd\nimport numpy as np\n\norders_prior_df = pd.read_csv('Data/orders_prior_sample.csv')\nprint('length of orders_prior_df:', len(orders_prior_df))\n\norder_products_prior_df = pd.read_csv('Da... | python | edit | 1 | 2 | mit | b181390c9e0613fed773e05a037b89cd24b225b0 | rjegankumar/instacart_prediction_model | data_preparation.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\n\n\ndef json_api_exception_handler(exc, context):\n \"\"\" Custom exception handler that returns errors object as an array \"\"\"\n\n # Import in... | python | edit | 1 | 7 | apache-2.0 | b81045a1fbfb826226fa9b6f6d0258f72a66c8fe | chrisseto/osf.io,rdhyee/osf.io,acshi/osf.io,billyhunt/osf.io,RomanZWang/osf.io,baylee-d/osf.io,emetsger/osf.io,hmoco/osf.io,samanehsan/osf.io,crcresearch/osf.io,acshi/osf.io,abought/osf.io,brianjgeiger/osf.io,sbt9uc/osf.io,TomBaxter/osf.io,rdhyee/osf.io,kwierman/osf.io,GageGaskins/osf.io,mluke93/osf.io,zachjanicki/osf.... | api/base/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls.defaults import patterns, include, url\nfrom django.contrib import admin\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.views.generic.simple import d... | python | edit | 1 | 0 | mit | 675627ee810859b405b0aca422cd85f6545581a1 | twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc | django_olcc/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# We have to import the minecraft api module to do anything in the minecraft world\nfrom mcpi.minecraft import *\nfrom mcpi.block import *\nfrom blockData import * \n\n# this means that the file can be imported without executing anything in... | python | edit | 2 | 0 | bsd-3-clause | 5abb4d9b5bfe88e9617839f5558e5b31dbf02f5b | hashbangstudio/Python-Minecraft-Examples | 19-getBlockHits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom logging import FileHandler\n\nfrom app import app\nfrom api import api\nfrom models import db\nimport os\nfrom flask import request \n\napp.config.from_pyfile('../server.cfg')\n\n@app.route(\"/edit_graph_style\", methods=['GET','POST']... | python | edit | 4 | 2 | mit | 8745f809597ec76d6fb785a356d4c611fa1afde3 | UoMCS/syllabus-visualisation,UoMCS/syllabus-visualisation,UoMCS/syllabus-visualisation | server/server.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom discussion.models import Comment, Discussion, Post\n\n\nclass CommentInline(admin.TabularInline):\n exclude = ('user',)\n extra = 1\n model = Comment\n\n\nclass PostAdmin(admin.ModelAdmin):\n ... | python | edit | 1 | 0 | bsd-2-clause | a58c3cbfa2c0147525e1afb355e355a9edeb22f8 | lehins/lehins-discussion,lehins/lehins-discussion,incuna/django-discussion,incuna/django-discussion,lehins/lehins-discussion | discussion/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom postmonkey import PostMonkey\nfrom django.core.management.base import BaseCommand\nfrom django.conf import settings\n\nfrom zerver.lib.queue import SimpleQueueClient\n\nclass Command(BaseComman... | python | edit | 5 | 3 | apache-2.0 | a33957db32006d663112a1e6a7f0832bb0bdbedd | esander91/zulip,peiwei/zulip,so0k/zulip,johnnygaddarr/zulip,bastianh/zulip,bastianh/zulip,brainwane/zulip,eastlhu/zulip,verma-varsha/zulip,PhilSk/zulip,grave-w-grave/zulip,jeffcao/zulip,PhilSk/zulip,karamcnair/zulip,swinghu/zulip,sup95/zulip,aakash-cr7/zulip,MariaFaBella85/zulip,kaiyuanheshang/zulip,samatdav/zulip,dawr... | zerver/management/commands/process_signups.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nProxy Server \"Phone Book\".\n\nSimplify running browser tests through a proxy server\nby adding your frequently-used proxies here.\n\nNow you can do something like this on the command line:\n\"pytest SOME_TEST.py --proxy=proxy1\"\n... | python | edit | 1 | 0 | mit | 402075770c43be3505bf6c38b713175fe8c202b4 | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | seleniumbase/config/proxy_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"IMAP lib fetch helpers\"\"\"\n\n\nimport collections\nimport logging\nimport os\n\nfrom imap_cli import const\n\n\napp_name = os.path.splitext(os.path.basename(__file__))[0]\nlog = logging.getLogger(app_na... | python | edit | 1 | 7 | mit | 86a26e7e6e37e5414511caef27888ec0aa019ca4 | Gentux/imap-cli,Gentux/imap-cli | imap_cli/imap/fetch.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import http\nfrom rest_framework.exceptions import NotFound\nfrom rest_framework import permissions as drf_permissions\n\nfrom framework.guid.model import Guid\nfrom framework.auth.oauth_scopes import CoreScopes, ComposedScopes\... | python | edit | 1 | 3 | apache-2.0 | 420307bcbd846e746d1a203115e0f5c21d8068e4 | kwierman/osf.io,jnayak1/osf.io,monikagrabowska/osf.io,caseyrollins/osf.io,DanielSBrown/osf.io,doublebits/osf.io,asanfilippo7/osf.io,mfraezz/osf.io,pattisdr/osf.io,aaxelb/osf.io,DanielSBrown/osf.io,RomanZWang/osf.io,TomHeatwole/osf.io,chrisseto/osf.io,TomBaxter/osf.io,CenterForOpenScience/osf.io,TomBaxter/osf.io,cslzche... | api/guids/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Unit Testing for Index view.\"\"\"\nimport pytest\n\n\n@pytest.mark.usefixtures(\"session\", \"test_app\")\nclass TestIndex:\n \"\"\"Test the index page call.\"\"\"\n\n def test_index(self, test_app):\n \"\"\"Test that th... | python | edit | 1 | 1 | mit | 23ce6ba3c22ec05caa4bdfa4714667929ecaaa76 | paulaylingdev/blogsite,paulaylingdev/blogsite | tests/test_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom studygroups.models import Course\nfrom .community_feedback import calculate_course_ratings\n\n\nclass TestCommunityFeedback(TestCase):\n fixtures = ['test_courses.json', 'test_studygroups.json', '... | python | edit | 1 | 1 | mit | 2240342e941f850d93cc6606007121159e3eb362 | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | surveys/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nhaystack_panel\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2012 by Chris Streeter.\n:license: See LICENSE for more details.\n\n\"\"\"\n\nimport pkg_resources\n\ntry:\n __version__ = pkg_resources.get_distributio... | python | edit | 3 | 0 | mit | 4644255816c8657b6578754b42fe7b9c2a7d4715 | streeter/django-haystack-panel | haystack_panel/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Taken from txircd:\n# https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/utils.py#L9\ndef _enum(**enums):\n return type('Enum', (), enums)\n\nModeType = _enum(LIST=0, PARAM_SET=1, PARAM_UN... | python | edit | 1 | 2 | mit | 5cc511e2e7d685fe8c2983c14d42a4fcfa704c6b | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | heufybot/utils/__init__.py | rejected_duplicate | Near-duplicate of sample 2857 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .dataset import Dataset, Volume, Vertex, VolumeRGB, VertexRGB, Volume2D, Vertex2D\nfrom . import align, volume, quickflat, webgl, segment, options\nfrom .database import db\nfrom .utils import *\nfrom .quickflat import make_figure as q... | python | edit | 19 | 1 | bsd-2-clause | 23e1d5d8dbac5bba45f50092d4d10aba6e0ed730 | gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex | cortex/__init__.py | rejected_lint | Too many lint violations: 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nfrom pox.core import core\nimport pox.openflow.openflow\nimport pox.topology.topology\nimport pox.openflow.of_01\nimport pox.dumb_l3_switch.dumb_l3_switch\n\n# Set default log level\nimport logging\nlogging.basicConfig(... | python | edit | 1 | 1 | apache-2.0 | 8ac0582ad601bbe2db3c21d0e4f578a7f8178f74 | chenyuntc/pox,kulawczukmarcin/mypox,denovogroup/pox,chenyuntc/pox,andiwundsam/_of_normalize,waltznetworks/pox,xAKLx/pox,kulawczukmarcin/mypox,pthien92/sdn,noxrepo/pox,noxrepo/pox,PrincetonUniversity/pox,denovogroup/pox,carlye566/IoT-POX,xAKLx/pox,pthien92/sdn,VamsikrishnaNallabothu/pox,jacobq/csci5221-viro-project,Vams... | pox.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\n\"\"\"\nRemove relationships ... | python | edit | 3 | 1 | apache-2.0 | 98fe7592af636e0f9c4e7017a1502b7d3539dd6c | josthkko/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-co... | src/ggrc/migrations/versions/20160510122526_44ebc240800b_remove_response_relationships.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the ... | python | edit | 3 | 2 | apache-2.0 | 981e576635ed1830a30fd65e65d745825f73342a | Juniper/nova,Francis-Liu/animated-broccoli,yrobla/nova,ruslanloman/nova,zhimin711/nova,mikalstill/nova,maoy/zknova,redhat-openstack/nova,adelina-t/nova,mandeepdhami/nova,maoy/zknova,russellb/nova,j-carpentier/nova,usc-isi/extra-specs,psiwczak/openstack,tudorvio/nova,apporc/nova,vladikr/nova_drafts,tudorvio/nova,houshen... | nova/db/sqlalchemy/migrate_repo/versions/034_change_instance_id_in_migrations.py | rejected_duplicate | Near-duplicate of sample 12082 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport h5py\nimport time\nfrom SimpleCV import Image\nrecordFilename = '20130727_17h34_simpleTrack'\nprint recordFilename + '.hdf5'\n#recordFile = h5py.File('20130722_21h53_simpleTrack.hdf5')\nrecordFile = h5py.File(recordFilename + '.hdf5'... | python | edit | 1 | 0 | mit | 5d136086e8bdc222cf2ec51f2ad23e2746c5c2b7 | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | Recording/save/replay.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pandas\nimport unittest\n\nimport cocoscore.ml.fasttext_helpers as fth\n\n\nclass CVTest(unittest.TestCase):\n\n def test_train_call_parameters(self):\n pass\n\n\nif __name__ == '__main__':\n unittest.main()\n\n```\n\nAp... | python | edit | 3 | 1 | mit | 3d974d0fd2e98e8030a04cf1dfbb7e05d2dd7539 | JungeAlexander/cocoscore | tests/ml/test_fasttext_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom ADIF_log import ADIF_log\nimport datetime\nimport os\n\n# Create a new log...\nlog = ADIF_log('Py-ADIF Example')\nentry = log.newEntry()\n\n# New entry from K6BSD to WD1CKS\nentry['OPerator'] = 'K6BSD'\nentry['Call'] = 'WD1CKS'\nentry[... | python | edit | 3 | 0 | bsd-2-clause | 55ebad2bd0e47f8806154e8db4f160847db33add | K6BSD/Py-ADIF | example.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom . import cdfread\nfrom . import cdfwrite\nfrom .epochs import CDFepoch as cdfepoch\n\n# This function determines if we are reading or writing a file\n\n\ndef CDF(path, cdf_spec=None, delete=False, validate=None):\n if (os... | python | edit | 3 | 3 | mit | ca50295c71432dde32eff813e5bd05b7a8e40ad1 | MAVENSDC/cdflib | cdflib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom celery.__main__ import main as celerymain\n\nfrom sea import create_app\nfrom sea.cli import jobm\n\n\ndef celery(argv, app):\n if argv[0] == \"inspect\":\n from sea.contrib.extensions.celery import empty_celery... | python | edit | 1 | 2 | mit | 07225cc0d019bb47e9d250f17639804242efcaa8 | shanbay/sea,yandy/sea,yandy/sea | sea/contrib/extensions/celery/cmd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport zipfile\n\nfrom django.views.generic import View\nfrom django.http import HttpResponse\nfrom django.core.files.base import ContentFile\nfrom django.utils.six impor... | python | edit | 1 | 2 | mit | 648c2af40cd6cae40eafadd2233802543ec70472 | thibault/django-zipview | zipview/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n\"\"\"Main entry point into the S3 Credentials service.\n\nTODO-DOCS\n\"\"\"\n\nimport base64\nimport hmac\n\nfrom hashlib import sha1\n\nfrom keystone import config\nfrom keystone.common impor... | python | edit | 1 | 2 | apache-2.0 | 3974760a4406060061017f03bb7eabe5b1937a23 | rajalokan/keystone,dsiddharth/access-keys,townbull/keystone-dtrust,klmitch/keystone,cbrucks/keystone_ldap,openstack/keystone,promptworks/keystone,takeshineshiro/keystone,ilay09/keystone,openstack/keystone,openstack/keystone,rodrigods/keystone,rickerc/keystone_audit,ging/keystone,dstanek/keystone,klmitch/keystone,reeshu... | keystone/contrib/s3/core.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = '1.0.0.dev7'\n__author__ = 'D-Wave Systems Inc.'\n__authoremail__ = '<EMAIL>'\n__description__ = 'A shared API for binary quadratic model samplers.'\n\n```\n\nApply this change: Update version 1.0.0.dev7 -> 0.6.0.dev"
},
{... | python | edit | 1 | 0 | apache-2.0 | a818fa21ed03161a24974b4980d633a724482ec6 | oneklc/dimod,oneklc/dimod | dimod/package_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module is responsible for handling configuration and files related to it,\nincluding calibration parameters.\n\"\"\"\n\nimport configparser\nimport os\n\n\n\"\"\"\nDefault options\n\"\"\"\n#TODO: more default options...\n_CONFI... | python | edit | 1 | 2 | mit | e6ed108a655b4eb1ef4ba78e66eceacaab304414 | mgunyho/kiltiskahvi | config/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport loom.benchmark\n\nDATASET = 'dd-100-100-0.5'\n\n\ndef test_shuffle():\n loom.benchmark.shuffle(DATASET, profile=None)\n\n\ndef test_infer():\n loom.benchmark.infer(DATASET, profile=None)\n\n\ndef test_checkpoint():\n loom.be... | python | edit | 1 | 1 | bsd-3-clause | 733890e0267d07c4d312427a30f136589a85626e | posterior/loom,priorknowledge/loom,posterior/loom,priorknowledge/loom,fritzo/loom,priorknowledge/loom,posterior/loom,fritzo/loom,fritzo/loom | loom/test/test_benchmark.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nChatterBot is a machine learning, conversational dialog engine.\n\"\"\"\nfrom .chatterbot import ChatBot\n\n__version__ = '0.7.1'\n__author__ = 'Gunther Cox'\n__email__ = '<EMAIL>'\n__url__ = 'https://github.com/gunthercox/ChatterBo... | python | edit | 1 | 0 | bsd-3-clause | cb0f732545ea851af46a7c96525d6b5b418b8673 | vkosuri/ChatterBot,gunthercox/ChatterBot | chatterbot/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport logging.config\nimport os\nimport sys\n\nfrom ddsc_incron.celery import celery\nfrom ddsc_incron.settings import LOGGING\n\n\ndef main():\n logging.config.dictConfig(LOGGING)\n logger =... | python | edit | 1 | 1 | mit | 8872d476f146505b40e4734a5872863a4e1ece50 | ddsc/ddsc-incron | ddsc_incron/notify.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic.list_detail import object_list, object_detail\nimport models\n\n\ndef _limit_articles(realm_object_id=None, realm_slug=None,\n realm_slug_field='slug', **kwargs):\n queryset = models.Article.o... | python | edit | 1 | 4 | mit | 4e42f231c28501442666137bf270fdfcc22c9da9 | jbradberry/django-micro-press,jbradberry/django-micro-press | micropress/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nclass AssertionsAssertionsMixin:\n def assertSortedEqual(self, one, two):\n \"\"\"Assert that the sorted of the two equal\"\"\"\n self.assertEqual(sorted(one), sorted(two))\n\n def assertJsonDictEqual(self... | python | edit | 3 | 6 | mit | 51e3f7a1fbb857b00a3102287849bc925198d473 | delfick/harpoon,realestate-com-au/harpoon,delfick/harpoon,realestate-com-au/harpoon | tests/helpers/mixins/assertions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pathlib\n\nfrom .util import set_lang_class, get_lang_class\n\nfrom . import en\nfrom . import de\nfrom . import zh\n\n\ntry:\n basestring\nexcept NameError:\n basestring = str\n\n\n\nset_lang_class(en.English.lang, en.English)... | python | edit | 7 | 2 | mit | ddeabd76c4277c35d1e583d1a2034ba2c047d128 | spacy-io/spaCy,raphael0202/spaCy,raphael0202/spaCy,explosion/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,banglakit/spaCy,recognai/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,banglakit/spaCy,explosion/spaCy,Gregory-Howard/spaCy,recognai/spaCy,bang... | spacy/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport tensorprob as tp\n\n\ndef make_normal():\n mu = tp.Scalar('mu')\n sigma = tp.Scalar('sigma', lower=0)\n distribution = tp.Normal(mu, sigma)\n return mu, sigma, distribution\n\n\ndef test_init():\n mu, sigma, distributi... | python | edit | 1 | 1 | mit | 80d557749f18ede24af7fc528a9d415af44d94f5 | ibab/tensorfit,tensorprob/tensorprob,ibab/tensorprob | tests/distributions/test_normal.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test unitaire pour l'extraction des Tags"
},
{
"role": "assistant",
"content": "from django.test import TestCase\nfrom note.models import Page\n\n# Create your tests here.\n\nclass PageMethodTests(TestCase):\n\n def test_extra... | python | new_file | 1 | 1 | mit | 992edb9ec2184f3029f1d964d6079dc28876d8ff | MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote,MaximeRaynal/SimpleNote | src/Note/tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nimport dj_database_url\n\nDEBUG = dotenv.get('DEBUG')\nALLOWED_HOSTS = ['*']\n\n# Honor the 'X-Forwarded-Proto' header for request.is_secure()\nSECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\n\nDATABASE... | python | edit | 7 | 0 | mit | 4019c093f8c75c032e71e3005a3b294db5a8b005 | teamtaverna/core | taverna_api/settings/production.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDeBaCl is a Python library for estimation of density level set trees and\nnonparametric density-based clustering. Level set trees are based on the\nstatistically-principled definition of clusters as modes of a probability\ndensity f... | python | edit | 6 | 0 | bsd-3-clause | 8a2fb9001581f66babf59b062af266a1c332f175 | CoAxLab/DeBaCl | debacl/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom merriam_webster.api import CollegiateDictionary, WordNotFoundException\nfrom translate.translate import translate_word\n\n\nDICTIONARY = CollegiateDictionary('d59bdd56-d417-42d7-906e-6804b3069c90')\n\n\ndef lookup_term(language, term):... | python | edit | 1 | 7 | mit | 6191f08963b636391982b976f59bd36ae8cce7e0 | dellsystem/bookmarker,dellsystem/bookmarker,dellsystem/bookmarker | vocab/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport urllib\nimport json\nimport yaml\n\ncredentials = yaml.load(file(\"credentials.yml\", 'r'))\n\ndef main():\n data=json.loads(urllib.urlopen(\"http://api.giphy.com/v1/gifs/search?q=cute+dog&api_key=\" + cre... | python | edit | 1 | 1 | mit | 315f98dc949a52fa56ade36276cafcc8f3d562da | brandonsoto/Dog_Giffter | dog_giffter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport requests\nfrom time import sleep\n\nfrom django.http import HttpResponse\n\nfrom .models import NewsFeed\n\nHACKER_NEWS_API_URL = 'http://api.ihackernews.com/page'\n\n\ndef get_news(request=None):\n feed = NewsFeed.ob... | python | edit | 2 | 3 | mit | 0889a9743d3563ecccaec6106549ef887c327a72 | jgasteiz/fuzzingtheweb,jgasteiz/fuzzingtheweb,jgasteiz/fuzzingtheweb | news/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | python | edit | 1 | 0 | apache-2.0 | 7d271c3f221d5fade656cd94d2a56fab0fc3b928 | DataBiosphere/dsub,DataBiosphere/dsub | dsub/_dsub_version.py | rejected_duplicate | Near-duplicate of sample 2591 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Get words from files in \"src/dictionary/\".\"\"\"\n\nimport os\n\ndef get_word_list(filepath):\n \"\"\"\n Get a list of words from a file.\n \n Input: file name\n Output: dict with formula {word: [synonym, synonym]}\"\... | python | edit | 1 | 7 | mit | 67d4f376586c912f852b98c75f7de04aeb05979a | allanburleson/python-adventure-game,disorientedperson/python-adventure-game | pag/words.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\"\"\"Fundamental matchers of objects and values, and composite matchers.\"\"\"\n\nfrom hamcrest.core.core.allof import all_of\nfrom hamcrest.core.core.anyof import any_of\nfrom hamcrest.core.core.des... | python | edit | 14 | 0 | bsd-3-clause | ce0b30775aedce3be7f25e61ec751116bb192cdc | nitishr/PyHamcrest,msabramo/PyHamcrest,msabramo/PyHamcrest,nitishr/PyHamcrest | src/hamcrest/core/core/__init__.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Just the SQL Alchemy ORM tutorial \"\"\"\n\nimport sqlalchemy\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy import Column, Integer, String\n\nengine = create_engine('s... | python | edit | 3 | 1 | mit | 7bd606d40372d874f49016ea381270e34c7c7d58 | b-ritter/python-notes,b-ritter/python-notes | database/initialize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = True\n\n# TEMPLATES[1]['DEBUG'] = True\n\nDATABASES = {\n 'default': {\n # 'ENGINE': 'django.db.backends.sqlite3',\n # 'NAME': os.path.join(BASE_DIR, '..', 'tmp', 'db.sqlite3'),\n 'ENGI... | python | edit | 3 | 0 | apache-2.0 | 9c4aadaeae4076553b32724097ed23a74ff14ab6 | patrickspencer/compass,patrickspencer/compass-python,patrickspencer/compass-python,patrickspencer/compass-python,patrickspencer/compass,patrickspencer/compass-python,patrickspencer/compass-python,patrickspencer/compass,patrickspencer/compass,patrickspencer/compass | webapp/settings/development.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\nimport os\nimport shutil\n\nfrom dbt.task.base import ProjectOnlyTask\nfrom dbt.logger import GLOBAL_LOGGER as logger\n\n\nclass CleanTask(ProjectOnlyTask):\n\n def __is_project_path(self, path):\n proj_path = os.p... | python | edit | 1 | 3 | apache-2.0 | e7759b4bae27de4a5bc4e3226287279bf64dfb5f | analyst-collective/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,fishtown-analytics/dbt,analyst-collective/dbt | core/dbt/task/clean.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport argparse\nimport shcol\nimport sys\n\n__all__ = ['main']\n\ndef main(cmd_args):\n parser = argparse.ArgumentParser(\n description='Generate columnized output for given string items.'... | python | edit | 1 | 3 | bsd-2-clause | a5e85fa144eb95b166ce4daa15780c5f4044b386 | seblin/shcol | shcol/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\nimport subprocess\nimport os\n\n\ndef gh_deploy(config):\n if not os.path.exists('.git'):\n print('Cannot deploy - this directory does not appear to be a git repository')\n return\n\n ... | python | edit | 1 | 8 | bsd-2-clause | 6b558dd7fe2bbab52e56ab54cb0143baff532e8d | cazzerson/mkdocs,michaelmcandrew/mkdocs,jeoygin/mkdocs,kubikusrubikus/mkdocs,justinkinney/mkdocs,jpush/mkdocs,peter1000/mkdocs,mkdocs/mkdocs,justinkinney/mkdocs,mkdocs/mkdocs,hhg2288/mkdocs,lbenet/mkdocs,vi4m/mkdocs,lukfor/mkdocs,mlzummo/mkdocs,lukfor/mkdocs,mlzummo/mkdocs,ramramps/mkdocs,xeechou/mkblogs,simonfork/mkdo... | mkdocs/gh_deploy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Author: Braedy Kuzma\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^posts/$', views.PostsView.as_view(), name='posts'),\n url(r'^posts/(?P<pid>[0-9a-fA-F\\-]+)/$', views.PostView.as_view(),\n ... | python | edit | 1 | 0 | apache-2.0 | bd18f52c2ee41bbc9c33a3b98fdac1ce2ea18ea7 | CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project | rest/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport json\n\nfrom django.http import HttpResponse\n\ndef json_response(content, status_code=200, headers={}):\n \"\"\"\n Simple function to serialise content and return a valid HTTP response.\n\n It tak... | python | edit | 1 | 3 | bsd-3-clause | 726a982145a5da2530056e2012853848b07d0460 | ainmosni/django-snooze,ainmosni/django-snooze | django_snooze/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\n\napp = Flask(__name__)\napp.config.from_object('carson.default_settings')\n\ndb = SQLAlchemy(app)\n\nfrom . import api\nfrom . import models\n\n```\n\nApply this chang... | python | edit | 4 | 0 | mit | 4615a9e26f9a6064572d409ccf8a79a7ab584a38 | SylverStudios/carson | carson/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__title__ = 'cihai'\n__package_name__ = 'cihai'\n__version__ = '0.9.0a3'\n__description__ = 'Library for CJK (chinese, japanese, korean) language data.'\n__author__ = 'Tony Narlock'\n__email__ = '<EMAIL>'\n__github__ = 'https://github.com/c... | python | edit | 1 | 0 | mit | 56e559171ff707703de4cd195b77a30d12eb6315 | cihai/cihai,cihai/cihai | cihai/__about__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\nimport sys\nfrom collections import namedtuple\n\nfrom .client import Elasticsearch\n\n__all__ = ('Elasticsearch',)\n\n\n__version__ = '0.1.0a'\n\nversion = __version__ + ' , Python ' + sys.version\n\n\nVersionInfo = namedtuple('... | python | edit | 1 | 3 | apache-2.0 | 3ffc8172337d25c67e5216d4eafd5289091ef411 | aio-libs/aioes | aioes/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport os\nimport datetime\n\nprint \"=====================\"\nprint str(datetime.datetime.now())+\": the daily job has started\"\nprint \"Current directory is \"+os.getcwd()\nsys.path.append(os.getcwd())\n\nimport pyvalue.jobs ... | python | edit | 6 | 0 | apache-2.0 | 6eed59360d6e2fabf1fe1d590449bce8a1c6af2e | ltangt/pyvalue | run_daily.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first simple title and parent test"
},
{
"role": "assistant",
"content": "from PySide import QtGui\n\nimport qmenuview\n\n\ndef test_title(qtbot):\n title = 'Test title'\n qmenuview.MenuView(title)\n assert qmenuview... | python | new_file | 1 | 1 | bsd-3-clause | 2cae3a623bce4336f55ef8ec12f1de1dcfb8a637 | storax/qmenuview | test/test_view.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport bs4\nimport os\nimport urllib.request\nimport shutil\nimport re\n\n\ndistDir = 'F:\\\\utorrent\\\\WEST'\np = re.compile(r'(\\D+\\d+)\\w*(.\\w+)')\n\n\nfilenames = os.listdir(distDir)\nupperfilenames = []\nprint(filen... | python | edit | 1 | 0 | mit | 89a5f257cd1fb285db78b6178e9418fbf48fdaf4 | jiangtianyu2009/PiSoftCake | YouKnowShit/DownloadFilesRename.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\n\nfrom ..models import Gift\n\n\nclass GiftFilter(django_filters.FilterSet):\n \"\"\"docstring for GiftFilter\"\"\"\n class Meta:\n model = Gift\n fields = ['region']\n\n```\n\nApply this change: E... | python | edit | 1 | 0 | mit | 15f0b27759b6c831d4196d7c067e6eb95927e5aa | webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children | ato_children/api/filters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nimport numpy\n\nimport chainer\nfrom chainer import functions\nfrom chainer import gradient_check\n\n\nclass Copy(unittest.TestCase):\n\n def setUp(self):\n self.x_data = numpy.random.uniform(\n -1, 1... | python | edit | 1 | 1 | mit | 82396b5033d1dce52e0504a3703d62cdd5bc047b | cupy/cupy,kuwa32/chainer,cupy/cupy,hvy/chainer,niboshi/chainer,cupy/cupy,AlpacaDB/chainer,niboshi/chainer,1986ks/chainer,ktnyt/chainer,tigerneil/chainer,t-abe/chainer,wkentaro/chainer,truongdq/chainer,jnishi/chainer,cemoody/chainer,ikasumi/chainer,aonotas/chainer,chainer/chainer,wkentaro/chainer,keisuke-umezawa/chainer... | tests/functions_tests/test_copy.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport logging\nimport pytz\nimport requests\nimport json\n\n\nclass JsonEncoder(json.JSONEncoder):\n def default(self, obj):\n if isinstance(obj, datetime.datetime):\n if obj.tzinfo is None:\n ... | python | edit | 1 | 3 | mit | 77faa07a81fcb03351c2926c36c716097cad9a79 | gds-attic/backdrop-collector,gds-attic/backdrop-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector | backdrop/collector/write.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAPI MAPPING FOR Eloqua API V2\n\"\"\"\n\nmapping_table = {\n\n 'content_type': 'application/json',\n 'path_prefix': '/API/REST/2.0',\n\n # Campaigns\n 'get_campaign': {\n 'method': 'GET',\n 'path': '/assets... | python | edit | 1 | 0 | mit | 11d6bc9cbea154c7526c31c6cb4d88b102826cc9 | alexcchan/eloqua | eloqua/endpoints_v2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef set_total_duration_as_duration(apps, schema_editor):\n Music = apps.get_model(\"music\", \"Music\")\n for music in M... | python | edit | 1 | 2 | mit | 25325ee55852eb65e58c13c46660701b1cdd803f | Amoki/Amoki-Music,Amoki/Amoki-Music,Amoki/Amoki-Music | music/migrations/0020_auto_20151028_0925.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls.defaults import patterns, url, include\nfrom django.views.generic.simple import redirect_to\n\nfrom sumo import views\n\n\nservices_patterns = patterns('',\n url('^/monitor$', views... | python | edit | 1 | 0 | bsd-3-clause | 72fcd8f8ec44bf11fa1ed746de188ee4312150c3 | feer56/Kitsune1,iDTLabssl/kitsune,silentbob73/kitsune,YOTOV-LIMITED/kitsune,mozilla/kitsune,rlr/kitsune,anushbmx/kitsune,anushbmx/kitsune,iDTLabssl/kitsune,silentbob73/kitsune,silentbob73/kitsune,iDTLabssl/kitsune,brittanystoroz/kitsune,safwanrahman/kitsune,orvi2014/kitsune,feer56/Kitsune2,turtleloveshoes/kitsune,MikkC... | apps/sumo/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\nimport shutil\n\nlogger = logging.getLogger('polyaxon.libs.paths')\n\n\ndef delete_path(path):\n if not os.path.exists(path):\n return\n try:\n if os.path.isfile(path):\n os.remove(p... | python | edit | 1 | 4 | apache-2.0 | c290c132368a93856066513d474078c2a2b22e39 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon/libs/paths.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom ._version import __version__\nfrom . import styles\nfrom . import examples\nfrom . import datasets\nfrom . import embed\nfrom .widgets import (Mesh,\n Scatter,\n ... | python | edit | 54 | 1 | mit | 09b2f0ca34d2f541d2f22a02961106d6edf52805 | maartenbreddels/ipyvolume,maartenbreddels/ipyvolume,maartenbreddels/ipyvolume,maartenbreddels/ipyvolume | ipyvolume/__init__.py | rejected_lint | Too many lint violations: 54 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Script to upload pictures to the gallery.\n\nThis script scans a local picture folder to determine which patients\nhave not yet been created in the gallery. It then creates the missing\npatients.\n\"\"\"\n\nfr... | python | edit | 3 | 4 | mit | 2ee3de95eac0ca26b5d7567291a1e03478fd95ff | cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website | extras/gallery_sync.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass Credentials(models.Model):\n \"Keeps track of issued MAC credentials\"\n user = models.ForeignKey(User)\n expiry = models.DateTimeField(\"Expires On\")\n ... | python | edit | 1 | 1 | mit | c90462cc685d95c8fb03858f266691123fc37049 | ndevenish/auth_mac | auth_mac/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2017 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom telemetry.core import exceptions\n\n\nclass InspectorServiceWorker(o... | python | edit | 1 | 3 | bsd-3-clause | 0ce28daf74ebff5a087ccda7db9d6bcfc77dfdf6 | catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult | telemetry/telemetry/internal/backends/chrome_inspector/inspector_serviceworker.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom flask import Request\nfrom itertools import repeat, chain\n\n\nclass AcceptRequest(Request):\n\n _json_mimetypes = ['application/json',]\n\n _html_mimetypes = ['text/html', 'application/xh... | python | edit | 1 | 3 | bsd-2-clause | 799a03a2f40186518063a12f531239071aad7d72 | paxswill/evesrp,paxswill/evesrp,paxswill/evesrp | evesrp/util/request.py | rejected_duplicate | Near-duplicate of sample 12911 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | python | edit | 3 | 0 | apache-2.0 | b3407617c723d5bac579074262166ac6790be9d6 | tartavull/google-cloud-python,dhermes/gcloud-python,jonparrott/gcloud-python,tswast/google-cloud-python,googleapis/google-cloud-python,Fkawala/gcloud-python,waprin/google-cloud-python,tseaver/google-cloud-python,daspecster/google-cloud-python,tswast/google-cloud-python,GoogleCloudPlatform/gcloud-python,calpeyser/google... | gcloud/dns/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils import ccompiler\nfrom distutils import sysconfig\nimport unittest\n\nimport pytest\n\nfrom install import build\n\n\nclass TestCheckVersion(unittest.TestCase):\n\n def setUp(self):\n self.compiler = ccompiler.new_c... | python | edit | 1 | 1 | mit | 989601aef4d8a1eeb7cf873ebd2f93ad89b67e54 | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | tests/install_tests/test_build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 The Swarming Authors. All rights reserved.\n# Use of this source code is governed by the Apache v2.0 license that can be\n# found in the LICENSE file.\n\nimport re\n\n########################################################... | python | edit | 1 | 0 | apache-2.0 | 8c15f6cde0698fdb35e0142e07730ddf0980682c | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | appengine/config_service/common.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom toolz import *\nimport pickle\n\n\ndef test_compose():\n f = compose(str, sum)\n g = pickle.loads(pickle.dumps(f))\n assert f((1, 2)) == g((1, 2))\n\n\ndef test_curry():\n f = curry(map)(str)\n g = pickle.loads(pickle.du... | python | edit | 6 | 1 | bsd-3-clause | ffc1b8c83e32f4c2b5454a0ae71b9c30cc8e7596 | pombredanne/toolz,simudream/toolz,machinelearningdeveloper/toolz,quantopian/toolz,jdmcbr/toolz,bartvm/toolz,jcrist/toolz,cpcloud/toolz,pombredanne/toolz,quantopian/toolz,simudream/toolz,machinelearningdeveloper/toolz,bartvm/toolz,llllllllll/toolz,jdmcbr/toolz,llllllllll/toolz,cpcloud/toolz,jcrist/toolz | toolz/tests/test_serialization.py | rejected_lint | Too many lint violations: 6 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.