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#!/usr/bin/env python\nimport sys, os\nfrom opentreetesting import test_http_json_method, config\nDOMAIN = config('host', 'apihost')\nSUBMIT_URI = DOMAIN + 'v3/amendments/list_all'\nr = test_http_json_method(SUBMIT_URI,\n ... | python | edit | 3 | 0 | bsd-2-clause | 193ef7e8e4f6629e8534083e705826656c908cab | OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api | ws-tests/test_amendment_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ndef restrict_len(content):\n if len(content) > 320:\n content = content[:310].strip() + '...'\n return content\n\n\ndef detect_language(config, langs, word):\n from yandex_translate import YandexTranslate\n translator = Y... | python | edit | 1 | 4 | mit | b18aa2f4400deab98cc0e27c798ee6d7893232cd | Elishanto/HarryBotter | utils/text.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Functional tests for the xml api part of aniauth project.\n\nThis is a temporary app as EVE Online's xml api is deprecated and will be\ndisabled March 2018.\n\n\"\"\"\nfrom django.contrib.staticfiles.testing import StaticLiveServerTes... | python | edit | 5 | 1 | mit | 41fe44e99361d9006a8b196e9b886ffdb3e8e460 | randomic/aniauth-tdd,randomic/aniauth-tdd | functional_tests/test_evexml.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom context import core\nfrom context import models\n\nfrom models import model\nfrom core import logic\n\nimport unittest\n\nclass test_logic(unittest.TestCase):\n\tdef test_create_room_office(self):\n\t\tnew_office = logic.create_room('o... | python | edit | 4 | 1 | mit | 8efab7ddd356a9b2e2209b668d3ed83a5ac9faf2 | georgreen/Geoogreen-Mamboleo-Dojo-Project | tests/test_logic.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom discord.ext import commands\r\n\r\n\r\ndef is_owner_or(**perms):\r\n async def predicate(ctx):\r\n owner = ctx.bot.is_owner(ctx.author)\r\n permissions = ctx.channel.permissions_for(ctx.author)\r\n return all(ge... | python | edit | 1 | 3 | mit | b457ab3abc0dbcfd94b26f7107144af67b8a85f4 | BeatButton/beattie-bot,BeatButton/beattie | utils/checks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nimport yaml\n\n\ndef job_config(args):\n\ttry:\n\t\tconfig_file = './config/{0}.yml'.format(args[0])\n\texcept IndexError:\n\t\tsys.exit(\"Job name is a required argument. Example: chicago_cta\")\n\n\ttry:\n\t\twith open(config_... | python | edit | 1 | 3 | mit | 87881f594836b7cf92ffce69dbb643ee05df88d1 | projectweekend/Transit-Stop-Collector | utils/config_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nWSGI config for untitled1 project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/\n\"\"\"\n\n... | python | edit | 1 | 0 | mit | b544361b2e3f7942a82a911a8d6d314a2044be97 | lorenanicole/almost_funded,lorenanicole/almost_funded,lorenanicole/almost_funded | almostfunded/wsgi.py | rejected_duplicate | Near-duplicate of sample 3764 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom database import User, Paste, ApiKey\nfrom flask import abort, current_app\nfrom flask_login import current_user\nfrom flask_admin import BaseView, Admin\nfrom flask_admin.contrib.mongoengine import ModelView\n\n\ndef is_admin():\n i... | python | edit | 1 | 2 | mit | f699281496950a10ec59651ed93f61e8ef79c1e7 | zifnab06/zifb.in,zifnab06/zifb.in | admin/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for the isort import placement module\"\"\"\nfrom functools import partial\n\nfrom isort import place, sections\nfrom isort.settings import Config\n\n\ndef test_module(src_path):\n place_tester = partial(place.module, config=... | python | edit | 1 | 1 | mit | 58cc02faf08ec499f0d9239959b6d50a1b2b90ad | PyCQA/isort,PyCQA/isort | tests/unit/test_place.py | rejected_duplicate | Near-duplicate of sample 16305 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport subprocess\nimport sys\nimport uuid\n\n\nusage = \"\"\"\\\nRun a command using a temporary docker-compose cluster, removing all containers \\\nand associated volumes after command completion (regardless of succ... | python | edit | 1 | 5 | apache-2.0 | 5fa20295eadf01e4567d89713e406ce82b738cf5 | fuziontech/pgshovel,fuziontech/pgshovel,disqus/pgshovel,disqus/pgshovel,fuziontech/pgshovel | ephemeral-cluster.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport os\nfrom .config import config\n\n\ndef get_status(name):\n uri = os.path.join(config.lock_server, 'nodes', name, '')\n response = requests.get(uri)\n success = response.ok\n if success:\n return r... | python | edit | 1 | 2 | mit | ad278fdc71140dfb4be27895e747356e668e3b6c | ceph/teuthology,t-miyamae/teuthology,zhouyuan/teuthology,caibo2014/teuthology,tchaikov/teuthology,dmick/teuthology,robbat2/teuthology,dreamhost/teuthology,ivotron/teuthology,ivotron/teuthology,SUSE/teuthology,robbat2/teuthology,michaelsevilla/teuthology,tchaikov/teuthology,michaelsevilla/teuthology,ceph/teuthology,drea... | teuthology/lockstatus.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Classes that simplify learning rate modification. \"\"\"\n\n\nimport theano\nimport theano.tensor as TT\n\n\nclass _LearningRate(object):\n \"\"\" Suplerclass for learning rates. \"\"\"\n\n def __init__(self, initial_rate):\n \"... | python | edit | 1 | 1 | mit | e1acfc8a05f1a131dc4b146837e007efa58a2ebf | djpetti/rpinets,djpetti/rpinets | theano/learning_rates.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport unittest\n\n\nclass TestCase(unittest.TestCase):\n \"\"\"\n Parent TestCase to use for all tests.\n \"\"\"\n pass\n\n```\n\nApply this change: Implement unittest.TestCase.assertGreaterEqual for pythons less than 2.7"
... | python | edit | 1 | 2 | mit | e469ae00a815b25ab7d0e45c7f8076c56ae834b4 | pombredanne/jsonstats,pombredanne/jsonstats,RHInception/jsonstats,RHInception/jsonstats | test/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom rest_framework.serializers import (\n HyperlinkedModelSerializer, HyperlinkedIdentityField,\n)\n\nf... | python | edit | 1 | 0 | mit | 3e2baaed603ef9d904926049414bf51b48898776 | bjoernricks/trex,bjoernricks/trex | trex/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\n\nimport requests\nfrom requests import delete, get, head, options, patch, post, put\n\n\nclass RequestCommand(sublime_plugin.TextCommand):\n\n def run(self, edit):\n self.import_variables()\n ... | python | edit | 11 | 3 | mit | 1c16c8e98845550b19f6c75db5253805f656c636 | kylebebak/Requester,kylebebak/Requester | http_requests.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport asana\nimport requests\nimport responses\nimport unittest\nimport json\n\nfrom six import next\nfrom responses import GET, PUT, POST, DELETE\n\n# Define JSON primitives so we can just copy in JSON:\nfalse = False\ntrue = True\nnull... | python | edit | 9 | 5 | mit | 8d99b27125af58aacbb9556c68774bdaf27fdda5 | asana/python-asana,Asana/python-asana,asana/python-asana | tests/helpers.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2014 Ansible, Inc.\n# All Rights Reserved.\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.utils.functional import cached_property\n\n\nclass InstanceManager(models.Manager):\n \"\"\"A custo... | python | edit | 3 | 4 | apache-2.0 | 53234eb1ab0bafe49b8e198336d7958fed3e3f61 | snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx | awx/main/managers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.contrib.syndication.views import Feed, FeedDoesNotExist\nfrom django.shortcuts import get_object_or_404\nfrom Instanssi.ext_blog.models import BlogEntry\nfrom Instanssi.kompomaatti.models import Event\... | python | edit | 2 | 3 | mit | a0791aeead7eb77ddf1553a3392f1302a1a5acbb | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | Instanssi/ext_blog/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.version import StrictVersion\nfrom platform import python_version\n\nmin_supported_python_version = '3.6'\n\nif StrictVersion(python_version()) < StrictVersion(min_supported_python_version):\n error_msg = (\n \"Tohu... | python | edit | 9 | 0 | mit | b860372a9e874e8bc06efc9711f7b58591300e81 | maxalbert/tohu | tohu/__init__.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nclass Post(models.Model):\n body = models.TextField()\n title = models.CharField(max_length=50)\n display_title = models.CharField(max_length=50)\n publication_date = models.DateTimeField(auto_now... | python | edit | 1 | 1 | mit | 715dcb62966b5c80544ed9eee79a6c69d3b9d927 | Lukasa/minimalog | blog/posts/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url, include\nfrom django.views.generic.base import TemplateView\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth import views as auth_views\nfrom django.contrib imp... | python | edit | 6 | 0 | mit | d8b4acd0617dc93646e177ac56b0205be1b7ff88 | grollins/sea-web-django | seaweb_project/seaweb_project/urls.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nSettings file for the Auditlog test suite.\n\"\"\"\n\nSECRET_KEY = 'test'\n\nINSTALLED_APPS = [\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'auditlog',\n 'auditlog_tests',\n]\n\nMIDDLEWARE_CLASSES = (\n ... | python | edit | 1 | 0 | mit | 82aca6b352de3133f1fba454d82e1a20f3da2436 | Zmeylol/auditlog,jjkester/django-auditlog,kbussell/django-auditlog,chris-griffin/django-auditlog | src/auditlog_tests/test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django.dispatch\n\n# Behaves like Djangos normal pre-/post_save signals signals with the\n# added arguments ``target`` and ``position`` that matches those of\n# ``move_to``.\n# If the signal is called from ``save`` it'll not be pass ... | python | edit | 1 | 0 | mit | 3d2a67ab4b46bf389376544fb21341163b57e8fa | matthiask/django-mptt,matthiask/django-mptt,matthiask/django-mptt,matthiask/django-mptt | mptt/signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test ELB creation functions.\"\"\"\nfrom foremast.elb.create_elb import SpinnakerELB\n\n\ndef test_splay():\n \"\"\"Splay should split Health Checks properly.\"\"\"\n health = SpinnakerELB.splay_health('HTTP:80/test')\n asser... | python | edit | 1 | 1 | apache-2.0 | 88a83ebcfe5a3841db4cf75985a2365df87395f8 | gogoair/foremast,gogoair/foremast | tests/test_create_elb.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\n# from django.contrib import admin\n# admin.autodiscover()\n\nurlpatterns = patterns('posts.views',\n # Examples:\n url(r'^$',... | python | edit | 3 | 0 | mit | 26bac2e3f01ed6b7b631f9dec8d2c3156e9ce01a | Lukasa/minimalog | blog/blog/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport rethinkdb as r\n\n\nclass MetaEngine(object):\n def __init__(self, hostname, port, db, table):\n self.rdb = r.connect(host=hostname, port=port, db=db, timeout=20)\n self.table = table\n\n def get_all(self):\n ... | python | edit | 5 | 3 | mit | c9e11c04bd5981f810b47a659f0777d1976cb01f | VauxIo/core | vaux/storage/metadata.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nfrom ses import email_message_from_s3_bucket, event_msg_is_to_command, recipient_destination_overlap\nfrom cnc import handle_command\n\nimport boto3\n\nses = boto3.client('ses')\n\nfrom config import... | python | edit | 1 | 5 | mit | 52fa13e103b77365acc9769f205d6b92af94b738 | ilg/LambdaMLM | lambda/lambda.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom copy import copy\n\nfrom preparation.resources.Resource import names_registered, resource_by_name\nfrom hb_res.storage import get_storage\n\n\ndef rebuild_from_resource(resource_name: str):\n resource = resource_by_name(resource_nam... | python | edit | 1 | 5 | mit | fc6202425e0c855dc29980904949b60c0ac48bbf | hatbot-team/hatbot_resources | preparation/tools/build_assets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport deployer.logger\nfrom celery.signals import setup_logging\n\n\n__version__ = '0.3.8'\n__author__ = 'sukrit'\n\ndeployer.logger.init_logging()\nsetup_logging.connect(deployer.logger.init_celery_... | python | edit | 1 | 0 | mit | 248b43bdfe0ad42772bf76f2e64b1624460ce494 | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | deployer/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom itertools import chain\n\ndef threes_and_fives_gen(num=1000):\n for i in range(num):\n if i % 3 == 0 or i % 5 == 0:\n yield i\n\ndef threes_and_fives_fun(n):\n return set(chain(range(3, n+1, 3), range(5, n+1, 5)... | python | edit | 1 | 4 | mit | 40688413e59aaabd4a92dba4d2f402fb42fee143 | dawran6/project-euler | 1-multiples-of-3-and-5.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n\nurlpatterns = patterns(\n 'us_ignite.search.views',\n url(r'apps/', 'search_apps', name='search_apps'),\n url(r'events/', 'search_events', name='search_events'),\n url(r'hubs/', 's... | python | edit | 1 | 0 | bsd-3-clause | 53878700a4da22e80114ef67a4aee340846abf91 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/search/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom .models import Person, Residence, RelationshipType, Relationship\n\nadmin.site.register(Person)\nadmin.site.register(Residence)\nadmin.site.register(RelationshipType)\nadmin.site.register(Relationshi... | python | edit | 1 | 0 | apache-2.0 | d054180fe1ff5ff7f4a0bc5b62f8dfcbb15a9c09 | Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django | winthrop/people/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport time\nimport os\n\nfrom tempfile import NamedTemporaryFile\nfrom sys import platform as _platform\n\nfrom gtts import gTTS\n\nfrom .playsound import playsound\nfrom ..queues import QueueTtS\nfrom ..components import _BaseComponent\n\... | python | edit | 1 | 4 | mit | 1d8fc0e63e5527b6f65da4899b432dcdfa243557 | ava-project/AVA | ava/text_to_speech/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom whitepy.lexerconstants import *\nimport whitepy.lexer as lexer\nimport unittest\n\n\nclass TestLexer(unittest.TestCase):\n\n def _get_lexer(self, line):\n return lexer.Lexer(line=line)\n\n def _valid_ws(self):\n ret... | python | edit | 9 | 3 | apache-2.0 | ac8e58e1430ca7418f64bb547e3513032d5b49e8 | yasn77/whitepy | tests/lexer_test.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pip._internal.distributions.source import SourceDistribution\nfrom pip._internal.distributions.wheel import WheelDistribution\n\nfrom pip._internal.utils.typing import MYPY_CHECK_RUNNING\n\nif MYPY_CHECK_RUNNING:\n from pip._interna... | python | edit | 4 | 3 | mit | e31192cf4989c1cef481eb92d6a91ae99dd8e5f5 | xavfernandez/pip,pradyunsg/pip,rouge8/pip,rouge8/pip,sbidoul/pip,sbidoul/pip,pypa/pip,pfmoore/pip,pradyunsg/pip,xavfernandez/pip,pfmoore/pip,xavfernandez/pip,pypa/pip,rouge8/pip | src/pip/_internal/distributions/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\nimport settings\nimport os\nimport urllib2\nfrom proto import gtfs_realtime_pb2\n\nmessage = gtfs_realtime_pb2.FeedMessage()\nurl = urllib2.urlopen('http://datamine.mta.info/mta_esi.php?key={0}&feed_id=... | python | edit | 4 | 1 | isc | f6194866a98dccdb8e1c1a1dfee40b11034461ba | natestedman/nyct-json,natestedman/nyct-json | src/nyct-json.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A python library wrapping the Cap'n Proto C++ library\n\nExample Usage::\n \n import capnp\n\n addressbook = capnp.load('addressbook.capnp')\n\n # Building\n addresses = addressbook.AddressBook.newMessage()\n people ... | python | edit | 18 | 0 | bsd-2-clause | 26579d307d44f00fe71853fa6c13957018fe5c0f | rcrowder/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,tempbottle/pycapnp,tempbottle/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,jparyani/pycapnp,tempbottle/pycapnp,rcrowder/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp | capnp/__init__.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport scipy.misc\nimport scipy.special\n\n\ndef get_num_hole_card_combinations(game):\n num_players = game.get_num_players()\n num_hole_cards = game.get_num_hole_cards()\n num_cards = game.get_num_suits() * game.get_num_ranks()\n ... | python | edit | 1 | 3 | mit | 685365af5126c6e83db468eef24b008fc1526462 | JakubPetriska/poker-cfr,JakubPetriska/poker-cfr | tools/game_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom unittest import TestCase\n\nfrom byceps.application import create_app\nfrom byceps.blueprints.brand.models import Brand\nfrom byceps.blueprints.party.models import Party\nfrom byceps.database import db\n\n\nc... | python | edit | 1 | 1 | bsd-3-clause | 003c7f9b7c6d35e176a9a4d5c56b61b0b4f96281 | m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps | webapp/tests/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nProvides JSONP rendering support.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom rest_framework.renderers import JSONRenderer\n\n\nclass JSONPRenderer(JSONRenderer):\n \"\"\"\n Renderer which serializes to json,\n ... | python | edit | 1 | 3 | isc | 4368567e44c144e85fa9fcdb72f2648c13eb8158 | baxrob/django-rest-framework-jsonp | rest_framework_jsonp/renderers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\n```\n\nApply this change: Add... | python | edit | 1 | 1 | apache-2.0 | e9c32014093af49edc6a12b6db37b44a04d12892 | josthkko/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,selahs... | test/integration/ggrc_workflows/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nGiven the names and grades for each student in a Physics class of N students,\nstore them in a nested list and print the name(s) of any student(s) having the second lowest grade.\n\nNote: If there are multiple students with the same gr... | python | edit | 1 | 0 | unlicense | edae3aa862d6266ee1f2f96a2427e88af994f590 | jasielserra/PythonDevs | Nested_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom .context import tohu\nfrom tohu.v5.primitive_generators import *\n\n\nEXEMPLAR_GENERATORS = [\n Constant(\"quux\"),\n Boolean(p=0.3),\n]\n\n\n@pytest.fixture\ndef exemplar_generators():\n \"\"\"\n Return a ... | python | edit | 6 | 1 | mit | 3e6e485443a901660a461dbbc8b324bfe4c19c8f | maxalbert/tohu | tests/v5/conftest.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nSTEP_COUNTS = {\n \"import_reference\": 0,\n \"setup_remote_reference\": 0,\n \"update_remote_reference\": 0,\n \"update_software\": 0,\n \"install_hmms\": 0\n}\n\nFIRST_STEPS = {\n \"import_reference\": \"load_file\",\n ... | python | edit | 1 | 2 | mit | f946ca92b74bb945c3884fcfa3e515132ec56b06 | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | virtool/processes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom flask_bootstrap import Bootstrap\nfrom flask_nav import Nav\n\nfrom flask_wtf import FlaskForm\nfrom wtforms import StringField\nfrom wtforms.validators import DataRequired\n\n\nclass SimpleSea... | python | edit | 1 | 2 | apache-2.0 | 7d43df8d861b73ffb7c5e11531f3848a248bcc6a | hniedner/ctrp_rest_client,hniedner/ctrp_rest_client,hniedner/ctrp_rest_client | trial_search_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django_filters\nfrom django.shortcuts import get_object_or_404\ntry:\n from django_filters import rest_framework as filters\nexcept ImportError: # Back-ward compatible for django-rest-framework<3.7\n from rest_framework import... | python | edit | 1 | 2 | bsd-3-clause | 606cb3475e2e4220822f924d13881dfaefb51aa4 | ad-m/django-teryt-tree | teryt_tree/rest_framework_ext/viewsets.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom cms_shiny.views import ShinyAppListView, ShinyAppDetailView\n\nurlpatterns = patterns('',\n url(r'^$', ShinyAppListView.as_view(), name='shiny_list'),\n url(r'^(?P<slug>[^/]+)$', ShinyA... | python | edit | 1 | 0 | bsd-3-clause | 5d44a67c1e416f8024bac1cbef5f3b3516ffd42a | mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app | cms_shiny/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: UTF-8 -*-\n\n__version__ = '0.1.0'\n\n\ndef flatkeys(d, sep=\".\"):\n \"\"\"\n Flatten a dictionary: build a new dictionary from a given one where all\n non-dict values are left untouched but nested ``dict``s are recu... | python | edit | 1 | 5 | mit | 63c0cd90ff9e9a721b175cdd4af8dc52ed6412ad | bfontaine/flatkeys | flatkeys/__init__.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\nimport django_fsm\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('iaas', '0037_init_security_groups... | python | edit | 3 | 1 | mit | 1090acb35ea4ce5c8d17db716539d3354feabc12 | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/iaas/migrations/0038_securitygroup_state.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n### required - do no delete\ndef user(): return dict(form=auth())\ndef download(): return response.download(request,db)\ndef call(): return service()\n### end requires\n\ndef index():\n return dict()\n\n\n```\n... | python | edit | 8 | 1 | bsd-2-clause | afa10a27aa1fe1eaa719d988902c2f3f4d5d0928 | OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree | webapp/controllers/contact.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Generates color arrays for use in a C project.\n\nThis scipt generates a dump of array/color data for use in a A project. This simplifies the need\nto hand-create and edit the data in many projects. This is useful, for instance, with ... | python | edit | 3 | 2 | mit | d4607cec7bc4fb4bcfc601fc8f1c35ea93131d3d | evilsoapbox/GlowColors | generate_c_arrays.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom catchy import HttpCacher, DirectoryCacher, NoCachingStrategy\n\nfrom .installer import Installer\nfrom .sources import PackageSourceFetcher\nfrom .providers import CachingPackageProvider\nfrom .deployer import PackageDeplo... | python | edit | 3 | 3 | bsd-2-clause | 555d441053731957f9648e835e4dbbd686f2f7e5 | mwilliamson/whack | whack/operations.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom SteamworksParser import steamworksparser\nimport interfaces\nimport constants\nimport enums\nimport structs\n\ndef main():\n if len(sys.argv) != 2:\n print(\"TODO: Usage Instructions\")\n return\n\n stea... | python | edit | 1 | 2 | mit | 721f9d02645ba91c542e9eba243ddb617db0975e | rlabrecque/Steamworks.NET-CodeGen,rlabrecque/Steamworks.NET-CodeGen,rlabrecque/Steamworks.NET-CodeGen,rlabrecque/Steamworks.NET-CodeGen | Steamworks.NET_CodeGen.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Git Commit Auto Save.\n\nSublime Text 3 package to auto save commit messages when the window is closed.\nThis allows the user to close the window without having to save before,\nor having to deal with the \"Save File\" popup.\n\"\"\"\... | python | edit | 1 | 4 | mit | 504bd32e2f91b074595e1b86065eed318a22da8c | aristidesfl/sublime-git-commit-message-auto-save | gitcommitautosave.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom openerp import fields, models \n \n''' ... | python | edit | 2 | 2 | apache-2.0 | ac1f9ab2cb06be4060100fd8c0714e26a9e5c970 | hellomoto6/openacademy | openacademy/model/openacademy_course.py | rejected_duplicate | Near-duplicate of sample 1697 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport requests\n\nclass TalonOneAPIError(Exception):\n \"\"\"\n TalonOne API Exceptions\n \"\"\"\n def __init__(self, message, *args):\n self.message = message\n\n # try to enhance with detailed error... | python | edit | 1 | 5 | mit | f5c5c9297bb5c7dfa0ee6c3077329c8e7fa00b06 | talon-one/talon_one.py,talon-one/talon_one.py | talon_one/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom meetup_facebook_bot import server\nfrom meetup_facebook_bot.models import base, talk, speaker\n\n\nbase.Base.metadata.create_all(bind=server.engine)\nsession = server.Session()\n\n# This part of the script provides the a... | python | edit | 1 | 0 | mit | 1fdcb2a94f4af2357c24d528ecdba356074d4101 | Stark-Mountain/meetup-facebook-bot,Stark-Mountain/meetup-facebook-bot | database_setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask.ext.admin import Admin\nfrom flask.ext.admin.contrib.sqla import ModelView\n\nfrom dadd.master import models\n\n\ndef admin(app):\n admin = Admin(app)\n session = models.db.session\n admin.add_view(ModelView(models.Proce... | python | edit | 1 | 1 | bsd-3-clause | 2548ecd64d6a26b09fe79f5a369f731c66410aa0 | ionrock/dadd,ionrock/dadd,ionrock/dadd,ionrock/dadd | dadd/master/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\nfrom ._testing import (SkipTest, requires_application, requires_img_lib, # noqa\n ... | python | edit | 1 | 0 | bsd-3-clause | 9d8b648163ede522eed6d9b742e8e7393dc2f6dc | Eric89GXL/vispy,michaelaye/vispy,Eric89GXL/vispy,drufat/vispy,dchilds7/Deysha-Star-Formation,bollu/vispy,jdreaver/vispy,jdreaver/vispy,bollu/vispy,sbtlaarzc/vispy,jay3sh/vispy,inclement/vispy,sh4wn/vispy,drufat/vispy,hronoses/vispy,bollu/vispy,julienr/vispy,ghisvail/vispy,sbtlaarzc/vispy,kkuunnddaannkk/vispy,sh4wn/visp... | vispy/testing/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy\ntry:\n import spacy\nexcept ImportError:\n spacy = None\n\nSPACY_MODELS = {}\nVECTORS = {}\n\n\ndef get_spacy(lang, **kwargs):\n global SPACY_MODELS\n if spacy is None:\n raise ImportError(\"Could not import... | python | edit | 1 | 5 | mit | 7aff5878747c000c5868e3a5ddd8b205d74770b0 | explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc | thinc/extra/load_nlp.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework.generics import RetrieveAPIView\n\nfrom jarbas.core.models import Company\nfrom jarbas.core.serializers import CompanySerializer\nfrom jarbas.chamber_of_deputies.serializer... | python | edit | 1 | 1 | mit | 30e050b836a4e8df3f918738b78552a070a1a176 | datasciencebr/serenata-de-amor,marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/jarbas,datasciencebr/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/jarbas | jarbas/core/views.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 watchdog import watchmedo\nimport pytest\nimport yaml\nimport os\n\n\ndef test_load_config_valid(tmpdir):\n \"\"\"Verifies the load of a valid yaml file\"\"\"\n\n ... | python | edit | 1 | 1 | apache-2.0 | e4297f0f7149763f6e93536746e3c87f9d1fa699 | gorakhargosh/watchdog,gorakhargosh/watchdog | tests/test_watchmedo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport cybox.utils\n\n\nclass ObjectTestCase(object):\n \"\"\"A base class for testing all subclasses of ObjectProperties.\n\n Each subclass of ObjectTestCase should subclass both unittest.TestCase\n and ObjectTestCase, and defined... | python | edit | 1 | 2 | bsd-3-clause | 5076055b54d18ea2441abaf604a4ea4dd79353c5 | CybOXProject/python-cybox | cybox/test/objects/__init__.py | rejected_duplicate | Near-duplicate of sample 15243 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom piper.core import Piper\n\n\ndef main():\n # TODO: dat argparse\n env_key = sys.argv[1]\n set_key = sys.argv[2]\n\n piper = Piper(env_key, set_key)\n piper.setup()\n piper.execute()\n\n```\n\nApply this ... | python | edit | 1 | 2 | mit | 92a44ab657cf56dc6effd4fa841187d88ead879b | thiderman/piper | piper/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth import REDIRECT_FIELD_NAME\nfrom django.utils.http import is_safe_url\n\n\ndef get_redirect_location(request, redirect_field_name=REDIRECT_FIELD_NAME, default='/'):\n \"\"\"Attempt to choose an optimal redirect l... | python | edit | 1 | 9 | mit | 6fecc53b63023e6d25722aa66038285be3b4d46b | PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils | arcutils/response.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom flask.ext.socketio import SocketIO\nimport os\n\n# The main application folder\n_basedir = os.path.abspath(os.path.dirname('..'))\nSQLALCHEMY_DATABASE_URI = 'sqlite:... | python | edit | 4 | 0 | mit | 486e2fc3f2db9afabaf0dd279be0675439304d83 | jawrainey/healthchat,jawrainey/healthchat | app/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom msgpack import packb, Unpacker\nfrom snappy import compress, decompress # noqa\nfrom btree import Tree, Node, Leaf, LazyNode\n\n\ndef encode_btree(obj):\n if isinstance(obj, (Tree, Node, Leaf)):\n return {'__class__': obj.__... | python | edit | 1 | 4 | mit | f97b5ec83601430ae63ac6c0a6e651cc7a0cf90d | Snuggert/moda | project/encode.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\nimport environ\n\nif __name__ == \"__main__\":\n if os.path.isfile('.env'):\n environ.Env.read_env('.env')\n os.environ.setdefault(\"DJANGO_SETTINGS_MODUL... | python | edit | 1 | 0 | mit | 7cc968f90407745b84bd2f663e5f64b9c0923605 | hacklab-fi/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,rambo/asylum,jautero/asylum,rambo/asylum,rambo/asylum,rambo/asylum,jautero/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum | project/manage.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nfrom . import export\n\n@export\ndef fuzzyfinder(text, collection):\n \"\"\"\n Args:\n text (str): A partial string which is typically entered by a user.\n collection (iterable): A col... | python | edit | 1 | 4 | bsd-3-clause | fff1312d506b4268be2e2ce7c333d9f25babdd59 | harrisonfeng/fuzzyfinder,amjith/fuzzyfinder,adammenges/fuzzyfinder | fuzzyfinder/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport random\n\n\ndef generateWord(meaning, form, categories, settings, formrules=None):\n '''Takes an English string, desired form, generation\n categories, settings, and optional form-specific rules.\n Returns a generated word.\... | python | edit | 1 | 4 | mit | 0cf18a615ef671e6bee44da386016d8ab1b8b012 | kdelwat/Lexeme | Generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import url_for\nimport pytest\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.support import expected_conditions\nfrom selenium.webdriver.support.wait import WebDriverWait\n\nfrom tests.helpers import slow\n... | python | edit | 1 | 1 | isc | d33d791a5e90ab1a389d85b5e93df7f07167eb5b | textbook/flash,textbook/flash,textbook/flash | tests/integration/test_home_page.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nPykka is a concurrency abstraction which makes actors look like regular\nobjects.\n\nSee http://jodal.github.com/pykka/ for more information.\n\"\"\"\n\nfrom pykka.actor import Actor\nfrom pykka.future import Future, get_all, wait_a... | python | edit | 1 | 2 | apache-2.0 | 24d148e33218a3f08a56a95052b0cfe8ecb0cecd | jodal/pykka,tamland/pykka,tempbottle/pykka | pykka/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom luigi_td.bulk_import import BulkImport\nfrom luigi_td.client import ResultProxy\nfrom luigi_td.config import Config, get_config\nfrom luigi_td.task import DatabaseTask, TableTask, Query\nfrom luigi_td.targets.result import ResultTarget... | python | edit | 1 | 0 | apache-2.0 | c28f0313a96be4f4095f542ba2a9524c129c88f7 | treasure-data/luigi-td | luigi_td/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom os import environ, path\n\nfrom ._settings_default import *\nfrom ..exceptions import ImproperlyConfigured\n\nPROFILE = environ.get(\"GOLD_DIGGER_PROFILE\", \"local\")\n\nif PROFILE == \"master\":\n from .... | python | edit | 4 | 0 | apache-2.0 | 4bd4c209862db759102c869da324db3e74347880 | business-factory/gold-digger | gold_digger/settings/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport inspect\nimport os\n\n\nclass Namer(object):\n ClassName = ''\n MethodName = ''\n Directory = ''\n\n def setForStack(self, caller):\n stackFrame = caller[self.frame]\n self.MethodName = stackFrame[3]\n ... | python | edit | 1 | 1 | apache-2.0 | b74971eaf180c14fef68142bffc689b1bc7340f4 | approvals/ApprovalTests.Python,approvals/ApprovalTests.Python,approvals/ApprovalTests.Python,tdpreece/ApprovalTests.Python | approvaltests/Namer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport numpy as np\n\ndef extract_features(image, measurements):\n\t\"\"\"\n\tGiven an image as a Numpy array and a set of measurement objects\n\timplementing a compute method returning a feature vector, return a combined\n\tfeature vector.... | python | edit | 1 | 2 | apache-2.0 | 832256925a08c0bbfe3f507ef613d51e11ac8103 | widoptimization-willett/feature-extraction | feature_extraction/extraction.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom api.views.signup import signup\nfrom rest_framework.test import APIRequestFactory\n\nfrom api import factories, serializers\nfrom api.models import User\nfrom api.serializers import UserSerializer\n\n\... | python | edit | 1 | 1 | mit | 9ea35a99c30f2ec7ed3946e71a286e689d2a50a3 | frostblooded/kanq,frostblooded/kanq,frostblooded/kanq,frostblooded/kanq,frostblooded/kanq | api/tests/test_signup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nenv_vars = {}\n\n\ndef read_file(path):\n try:\n with open(path, 'r') as f:\n return f.read().strip()\n except IOError:\n return None\n\n\ndef get_memory_limit():\n limit = read_file('/... | python | edit | 1 | 4 | apache-2.0 | 2d1c8a62295ed5150f31e11cdbbf98d4d74498d8 | openshift/sti-base,hhorak/sti-base,soltysh/sti-base,openshift/sti-base,bparees/sti-base,sclorg/s2i-base-container,mfojtik/sti-base,mfojtik/sti-base,bparees/sti-base | bin/cgroup-limits.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models.signals import pre_save\nfrom django.dispatch import receiver\n\n\ndef cleans_field(field_ref):\n \"\"\"Decorator to registers a field cleaning methods on the pre_save signal.\n\n Args:\n field_ref (str): ... | python | edit | 1 | 2 | mit | 911c79f8f76187601ac2df835541d6d76f172b3b | lamarmeigs/django-clean-fields | decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add version placeholder for now"
},
{
"role": "assistant",
"content": "from byteaccess.byteaccess import ByteAccess, access_over_file\nfrom byteaccess.winmemaccess import access_over_process\n\n__version__ = 'TODO: Figure out Pyt... | python | new_file | 5 | 0 | bsd-2-clause | 85a047ce00f86727b2d260c609049f82927825ff | ChadSki/byteaccess,ChadSki/halolib | byteaccess/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/python\n\nfrom build_rpm import BuildModelRPM\nfrom nose.tools import *\n\n@raises(TypeError)\ndef test_fail_with_no_parameters():\n BuildModelRPM(None)\n\n@raises(TypeError)\ndef test_fail_with_one_parameter():\n BuildMod... | python | edit | 5 | 1 | mit | 905b7849d319e5147653754ceaead333873bd401 | csdms/packagebuilder | packager/rpm/test/test_build.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db.models import Count\nfrom django.shortcuts import render\nfrom django.views.generic import TemplateView\nfrom django.views.generic.base import ContextMixin\n\nfrom meupet import models\n\n\ndef get_adoption_kinds():\n retu... | python | edit | 1 | 1 | mit | cbcd4ebcc01646382595ce9ee10d278120ce00ce | dirtycoder/pets,dirtycoder/pets,dirtycoder/pets | pets/common/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python3\n\"\"\" A Word class\n\nOriginally obtained from the 'pharm' repository, but modified.\n\"\"\"\n\nclass Word(object):\n \n doc_id = None\n sent_id = None\n insent_idx = None\n word = None\n pos = None... | python | edit | 1 | 2 | apache-2.0 | 2206b4b96805e35a612f471fb8f843b35fe45021 | HazyResearch/dd-genomics,HazyResearch/dd-genomics,HazyResearch/dd-genomics,amwenger/dd-genomics,HazyResearch/dd-genomics,rionda/dd-genomics,rionda/dd-genomics,amwenger/dd-genomics,amwenger/dd-genomics,HazyResearch/dd-genomics | code/dstruct/Word.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Simple library for parsing deeply nested structure (dict, json)\ninto regular object. You can specify fields to extract, and argument\nnames in created object.\nExample\n\n content = {\n 'name': 'Bob... | python | edit | 1 | 5 | mit | 25dfc009b380b2a63619651dbcba2c7d7ade929c | bradojevic/deep-parse | deep_parse.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n gauge\n ~~~~~\n\n Deterministic linear gauge library.\n\n :copyright: (c) 2013-2017 by What! Studio\n :license: BSD, see LICENSE for more details.\n\n\"\"\"\nfrom __future__ import absolute_import... | python | edit | 1 | 0 | bsd-3-clause | 736d4b8207cb63bda86f4338c08cc8719416fbe7 | what-studio/gauge | gauge/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file\n# for details. All rights reserved. Use of this source code is governed by a\n# BSD-style license that can be found in the LICENSE file.\n\... | python | edit | 2 | 9 | bsd-3-clause | 84b27afce57232bc0c8170eaad1beb26fd96eef0 | dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dar... | tools/gyp/find_mac_gcc_version.py | rejected_duplicate | Near-duplicate of sample 19 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Setting for template directory not found by app_directories.Loader. This\n# allows templates to be identified by two paths which enables a template to be\n# extended by a template with the same identifier.\nTEMPLATE_DIR = os.path.join(\n... | python | edit | 1 | 0 | bsd-3-clause | cfcd3aa71001f74915a938aa0ec1ae58c4db3e06 | django-oscar/django-oscar-accounts,django-oscar/django-oscar-accounts | src/oscar_accounts/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom io import BytesIO\nfrom kqml import KQMLObject\nfrom .util import safe_decode\n\nclass KQMLString(object):\n def __init__(self, data=None):\n if data is None:\n self.data = ''\n else:\n self.data ... | python | edit | 1 | 3 | bsd-2-clause | a8c824741ac0c4bd9a12c2fa62050b2608e7ad22 | bgyori/pykqml | kqml/kqml_string.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom .core import compile\nfrom ._info import __version__\n\n```\n\nApply this change: Remove import of deleted file"
},
{
"role": "assistant",
"content": "from... | python | edit | 3 | 0 | mit | 321a0cea6a71e29a3f00116c52c1056d7dcfef7e | Savvysherpa/dask-funk | daskfunk/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass SourceCoordinate(object):\n\n _immutable_fields_ = ['_start_line', '_start_column', '_char_idx']\n\n def __init__(self, start_line, start_column, char_idx):\n self._start_line = start_line\n self._start_column = ... | python | edit | 1 | 2 | mit | d406aa60f31f5e318a46e84539546a4452574ce6 | SOM-st/RPySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM,smarr/PySOM,SOM-st/PySOM,SOM-st/RPySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM,smarr/PySOM,SOM-st/PySOM | src/rtruffle/source_section.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom globus_cli.parsing import globus_main_func\n\nfrom globus_cli.login import login_command\nfrom globus_cli.list_commands import list_commands\nfrom globus_cli.config_command import config_command\nfrom globus_cli.helpers import common_o... | python | edit | 1 | 1 | apache-2.0 | 9a239c993502e3f317edd478a5d8b5f225c24b18 | globus/globus-cli,globus/globus-cli | globus_cli/run.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport data, json, os, sys\n\ndef make_hash_dict(top):\n \"\"\"\n Returns a dictionary with file paths and corresponding hashes.\n \n Parameters\n ----------\n data : str\n The path to the directory containing files... | python | edit | 3 | 3 | bsd-3-clause | ce3028f29e40ce72693394798ca0a8daa98c1a4a | berkeley-stat159/project-delta | data/make_hash_dict.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nfrom flask import Blueprint, request\n\nfrom aleph.model import Collection\nfrom aleph.queues import get_active_collection_status\nfrom aleph.views.util import jsonify\nfrom aleph.logic import resolver\nfrom aleph.views.util... | python | edit | 1 | 4 | mit | aff8945aef3f10fa9d1243b25301e84611c27422 | alephdata/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph | aleph/views/status_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nimport deployer.logger\nfrom celery.signals import setup_logging\n\n\n__version__ = '0.3.11'\n__author__ = 'sukrit'\n\ndeployer.logger.init_logging()\nsetup_logging.connect(deployer.logger.init_celery... | python | edit | 1 | 0 | mit | 047f061514740d7935cce8e2aa25ef138b93f91f | totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer | deployer/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport lit.formats\nimport lit.TestRunner\n\n# Custom format class for static analyzer tests\nclass AnalyzerTest(lit.formats.ShTest):\n\n def execute(self, test, litConfig):\n result = self.executeWithAnalyzeSubstitution(\n ... | python | edit | 1 | 7 | apache-2.0 | 8660d5570144894cf4e6e07b3a30526b35575dce | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... | test/Analysis/analyzer_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\nimport os\n\n\nclass UnauthorizedToken(Exception):\n pass\n\n\nclass UdacityConnection:\n\n def __init__(self):\n self.certifications_url = 'https://review-api.udacity.com/api/v1/me/certifications.json'\n ... | python | edit | 1 | 4 | mit | 3082fb50c028979643d479c0e65cb92ef12de586 | anapaulagomes/reviews-assigner | hunter/udacity.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n__all__ = [\n 'annotate',\n 'basic_sin',\n 'circle_patch',\n 'dual_axis',\n 'errorband',\n 'errorbar',\n 'fancybox',\n 'heat',\n 'image_plot',\n 'legends2',\n 'legends',\n 'loglogplot',\n 'logplot',\... | python | edit | 22 | 0 | mit | 7266d78fa491acc5d2000bdf14cb8bc8dbc8c7f4 | nschloe/matplotlib2tikz,danielhkl/matplotlib2tikz,m-rossi/matplotlib2tikz,dougnd/matplotlib2tikz | test/testfunctions/__init__.py | rejected_lint | Too many lint violations: 22 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom django.db import DEFAULT_DB_ALIAS\n\nfrom optparse import make_option\n\n\nclass Command(BaseCommand):\n\n option_list = BaseCommand.option_list + (\n make_option('--connec... | python | edit | 3 | 3 | mit | 3e37885f7241b985740bf753ca237c31497ac57e | ulule/django-courriers,ulule/django-courriers | courriers/management/commands/mailjet_sync_unsubscribed.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom .data_format import dumps\n\n\nclass RemoteRepo(object):\n def __init__(self, repo_dir):\n self.repo_dir = repo_dir\n\n # initial setup\n pool_relative_dir = \"pool\"\n ... | python | edit | 1 | 4 | mit | 62f028d61b9d5669bc05c2bbe5ce5f4e0d4401cc | howl-anderson/vimapt,howl-anderson/vimapt | src/vimapt/library/vimapt/RemoteRepo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Update to dev version 2022-04-22"
},
{
"role": "assistant",
"content": "\"\"\"The version number defined here is read automatically in setup.py.\"\"\"\n\n__version__ = \"0.12.2.dev20220422\"\n"
}
] | python | new_file | 1 | 0 | apache-2.0 | 53025df032e1b9296713f3d8f7866e9936ed1af7 | quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim | qsimcirq/_version.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.