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": "Write python code for the following: Add failing test showing the issue\n\nRelates to issue #258."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8; -*-\nimport re\n\nfrom sqlalchemy import Column, Integer, MetaData, String, Table\nfrom sqlalchemy.sql.ddl i... | python | new_file | 4 | 1 | mit | 3bf3813ed03f755d7aa777fc023add5c51a54311 | laughingman7743/PyAthena | tests/test_sqlalchemy_create_table.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test script for environment."
},
{
"role": "assistant",
"content": "\"\"\"\nThis script tests whether the current environment works correctly or not.\n\"\"\"\n\nimport sys; sys.path.insert(0, '../geoplot/')\nimport geoplot as... | python | new_file | 3 | 0 | mit | ea893b3ed7c42522720cd98a0a98a397accd9e07 | ResidentMario/geoplot | scripts/test-env.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple unittests for serio message\n\nSigned-off-by: Jan Losinski <<EMAIL>>"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom meshnet.serio.messages import SerialMessage, MessageType\n\nKEY = b'\\x00\\x01\\x02\\x... | python | new_file | 1 | 1 | bsd-3-clause | 80a9cc1ed5bed794769a511a4c2bf0070821ab7d | janLo/automation_mesh,janLo/automation_mesh,janLo/automation_mesh | tests/serio/test_messages.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add image url replacement script"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport os\n\n\nROOT_FOLDER = '/home/mjulian/coding/figarocorso.github.io/'\nPOST_FOLDER = ROOT_FOLDER + '_posts... | python | new_file | 2 | 4 | mit | 9950d25a2659509c81c29f9d834dd6c39e8b4015 | figarocorso/figarocorso.github.io,figarocorso/figarocorso.github.io,figarocorso/figarocorso.github.io,figarocorso/figarocorso.github.io | scripts/blog_image_refactor.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add coverage test for \"deprecated\" decorater"
},
{
"role": "assistant",
"content": "import warnings\n\nfrom sympy.core.decorators import deprecated\nfrom sympy.utilities.exceptions import SymPyDeprecationWarning\n\n\ndef test_d... | python | new_file | 1 | 1 | bsd-3-clause | 522918a2edd8c664771cc8dde2c4e91174ff83f7 | diofant/diofant,skirpichev/omg | sympy/utilities/tests/test_exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve reverse a linked list"
},
{
"role": "assistant",
"content": "#!/bin/python3\n\nimport math\nimport os\nimport random\nimport re\nimport sys\n\nclass SinglyLinkedListNode:\n def __init__(self, node_data):\n self.da... | python | new_file | 6 | 3 | mit | cc52901c65480a4a3662f5302b2b2a92832a3dd5 | rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank | python/reverse-a-linked-list.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: ADD Network users unit tests"
},
{
"role": "assistant",
"content": "\ndef test_create_user(client):\n result = client.post(\"/users/\", data={\"username\": \"test\", \"password\": \"1234\"})\n assert result.status_code == 2... | python | new_file | 2 | 1 | apache-2.0 | 82e3f0d72f6d334108c4777c0e4906d258c9efc6 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | apps/network/tests/test_routes/test_users.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create class for terminal adding test when gramar is create"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfr... | python | new_file | 2 | 0 | mit | 58221f7915d6f22e882e2094df57aa47840b23a6 | PatrikValkovic/grammpy | tests/grammar_creation_test/TerminalAdding.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to find parameters for SVC"
},
{
"role": "assistant",
"content": "import asl\n\nfrom sklearn.cross_validation import train_test_split\nfrom sklearn.grid_search import GridSearchCV\nfrom sklearn.metrics import classific... | python | new_file | 2 | 0 | mit | 224c7487e8f8f7b19fe81b02b60a72ce5b2cc12f | ssaamm/sign-language-translator,ssaamm/sign-language-tutor,ssaamm/sign-language-translator,ssaamm/sign-language-tutor | find_params.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing addoncategory migrations (follow-up from fd2e3b1d)"
},
{
"role": "assistant",
"content": "# Generated by Django 2.2.12 on 2020-06-04 09:28\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration)... | python | new_file | 1 | 0 | bsd-3-clause | 493a2323187448f925abefdc63600b4deba3d95c | diox/olympia,eviljeff/olympia,mozilla/olympia,diox/olympia,eviljeff/olympia,mozilla/olympia,mozilla/addons-server,eviljeff/olympia,wagnerand/addons-server,bqbn/addons-server,diox/olympia,mozilla/olympia,eviljeff/olympia,diox/olympia,mozilla/addons-server,mozilla/addons-server,wagnerand/addons-server,wagnerand/addons-se... | src/olympia/addons/migrations/0008_auto_20200604_0928.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a snippet to remove LangSys from DFLT script\n\nSuch fonts violate the spec and OTS rejects them, this snippet should\nhelp quickly fixing such fonts."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport arg... | python | new_file | 1 | 9 | mit | 7bea4c66c6d44af743955500d31ea1f963edf013 | googlefonts/fonttools,fonttools/fonttools | Snippets/fix-dflt-langsys.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to check tunnel shuts down child"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nfrom subprocess import Popen\nfrom test_common import *\nimport socket, ssl, time, os, signal\n\nif __name__ == \"__main__... | python | new_file | 24 | 0 | apache-2.0 | a4a6901638cf2240e48bd29eb364ad54de6ba81e | square/ghostunnel,square/ghostunnel | tests/test-server-chain-exec-shutdown.py | rejected_lint | Too many lint violations: 24 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nimport os\n\nbind = \"127.0.0.1:%(gunicorn_port)s\"\nworkers = (os.sysconf(\"SC_NPROCESSORS_ONLN\") * 2) + 1\nloglevel = \"error\"\nproc_name = \"%(proj_name)s\"\n\n```\n\nApply this change: Update t... | python | edit | 1 | 0 | bsd-2-clause | 9eb265fa2142b559b15063bc9322fc60b46a300b | promil23/mezzanine,damnfine/mezzanine,Cajoline/mezzanine,stephenmcd/mezzanine,agepoly/mezzanine,damnfine/mezzanine,mush42/mezzanine,eino-makitalo/mezzanine,mush42/mezzanine,stephenmcd/mezzanine,stephenmcd/mezzanine,emile2016/mezzanine,frankier/mezzanine,promil23/mezzanine,readevalprint/mezzanine,webounty/mezzanine,dovy... | mezzanine/project_template/deploy/gunicorn.conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for CPU widget"
},
{
"role": "assistant",
"content": "# Copyright (c) 2021 elParaguayo\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation f... | python | new_file | 1 | 1 | mit | 57f20289f942489c961ccbc9f7f8c5c3f2cb8c83 | qtile/qtile,qtile/qtile,ramnes/qtile,ramnes/qtile | test/widgets/test_cpu.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add module declaration for karenina"
},
{
"role": "assistant",
"content": "from karenina import modules\n\n\nclass Admin(modules.InstallableModule):\n icon = \"mdi-action-settings-applications\"\n order = 1000\n\n @prope... | python | new_file | 1 | 1 | bsd-3-clause | ed7570acc307207b96e1df848edbeef104230179 | afifnz/django-material,2947721120/django-material,thiagoramos-luizalabs/django-material,un33k/django-material,Axelio/django-material,thiagoramos-luizalabs/django-material,Axelio/django-material,sourabhdattawad/django-material,viewflow/django-material,afifnz/django-material,MonsterKiller/django-material,koopauy/django-m... | material/admin/modules.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for loading native libraries of a Java archive."
},
{
"role": "assistant",
"content": "import os\nimport angr\n\nself_dir = os.path.dirname(os.path.realpath(__file__))\n\ndef test_loading_of_native_libs():\n\n binary_... | python | new_file | 1 | 2 | bsd-2-clause | 7b791900202cb60746af54e63fc166dc0de3560f | iamahuman/angr,schieb/angr,iamahuman/angr,angr/angr,angr/angr,schieb/angr,iamahuman/angr,angr/angr,schieb/angr | tests/test_mixed_java.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for the assert statement"
},
{
"role": "assistant",
"content": "assert a or b, 'aaa'\n\n\n\nassert : keyword.control.flow.python, source.python\n a : source.python\nor : keyword.operator.py... | python | new_file | null | null | mit | 0291ac95161db254e5daa111670c422fdd2b1571 | MagicStack/MagicPython,MagicStack/MagicPython,MagicStack/MagicPython | test/expressions/expr8.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Check occurrences for exclusion dates and patterns"
},
{
"role": "assistant",
"content": "from datetime import datetime\nfrom recurrence import Recurrence, Rule\nimport recurrence\n\n\ndef test_exclusion_date():\n rule = Rule(... | python | new_file | 1 | 2 | bsd-3-clause | c55f4d6fd10463db590e2763f95b20d3b7004347 | django-recurrence/django-recurrence,FrankSalad/django-recurrence,Nikola-K/django-recurrence,linux2400/django-recurrence,Nikola-K/django-recurrence,linux2400/django-recurrence,FrankSalad/django-recurrence,django-recurrence/django-recurrence | tests/test_exclusions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a py script to get monthly totals."
},
{
"role": "assistant",
"content": "# calculate_totals.py\n\nimport json\nimport datetime\nfrom collections import defaultdict\n\n# http://stackoverflow.com/questions/6999726/how-can-i-co... | python | new_file | 1 | 1 | mit | dccc36a49111cd978add1ea9cd1fe26e6526c69f | jimbo00000/meetup-attendance-graph | data/calculate_totals.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add magice circle demo app"
},
{
"role": "assistant",
"content": "#!/usr/bin/python2\n\nimport sys\nsys.path = ['', 'pyglet-1.1.4'] + sys.path\n\nimport math\n\nimport pyglet\nfrom pyglet.graphics import vertex_list\nfrom pyglet ... | python | new_file | 2 | 3 | mit | 920e578c7ff192621a982b154f0b22c408667fed | dragonfi/snowfall,dragonfi/snowfall | main_circle.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add node to use tf2"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport rospy\nimport tf2_ros\nfrom geometry_msgs.msg import TransformStamped\n\n\nclass TransformBroadcaster(object):\n '''This is hack to avo... | python | new_file | 1 | 1 | apache-2.0 | 243744ce6f692b524c4cf65508f2aecba8a035d2 | sem23/cozmo_driver,OTL/cozmo_driver | nodes/transform_stamped_to_tf2.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example showing the use of the delaunay2d filter to build a surface from a scattered set of points."
},
{
"role": "assistant",
"content": "\"\"\"\nAn example which shows how to plot a surface from data acquired\nirregularl... | python | new_file | 1 | 1 | bsd-3-clause | 842035001d5119e1cb5effd192ab245450be01d8 | alexandreleroux/mayavi,liulion/mayavi,dmsurti/mayavi,liulion/mayavi,alexandreleroux/mayavi,dmsurti/mayavi | examples/mayavi/surface_from_irregular_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Throw things into a queue."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nenqueue-test.py\n\nCreated by Gavin M. Roy on 2009-09-11.\nCopyright (c) 2009 Insider Guides, Inc.. All rights re... | python | new_file | 4 | 2 | bsd-3-clause | 3a6dc8d05f158f08d064fd6bccd6d93843651deb | gmr/rejected,gmr/rejected | enqueue-test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add more direct RPC size tests"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nfrom pyon.net.endpoint import RPCClient\n#from interface.services.idatastore_service import IDatastoreService\nfrom interface.services... | python | new_file | 5 | 2 | bsd-2-clause | 1ec07fa16d3be0796b7783fe3b5a3ba0728fb7bc | mkl-/scioncc,ooici/pyon,scionrep/scioncc,scionrep/scioncc,mkl-/scioncc,crchemist/scioncc,scionrep/scioncc,mkl-/scioncc,crchemist/scioncc,ooici/pyon,crchemist/scioncc | prototype/speed/rpcsize.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for removing e-book records\n\nAdded temporary script to remove Harmatheque e-book records from R00\nreport. Script should be integrated into mars_enhance.csv."
},
{
"role": "assistant",
"content": "#!/usr/bin/env pyth... | python | new_file | 1 | 0 | mit | e8b3d1ea64407322cc578752c49eaa1a33027d40 | mbeckett7/mars-reports-project | mars_r00_harmatheque.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to re-index users' files in quickfiles nodes"
},
{
"role": "assistant",
"content": "import sys\n\nimport progressbar\nfrom django.core.paginator import Paginator\n\nfrom website.app import setup_django\nsetup_django()\... | python | new_file | 1 | 5 | apache-2.0 | ac3447251395a0f6ee445d76e1c32910505a5bd4 | caseyrollins/osf.io,sloria/osf.io,erinspace/osf.io,aaxelb/osf.io,pattisdr/osf.io,sloria/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,HalcyonChimera/osf.io,icereval/osf.io,adlius/osf.io,brianjgeiger/osf.io,mattclark/osf.io,Johnetordoff/osf.io,adlius/osf.io,aaxelb/osf.io,caseyrollins/osf.io,CenterForOpenScience/osf... | scripts/remove_after_use/reindex_quickfiles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to create plugins faster"
},
{
"role": "assistant",
"content": "import os\n\nimport click\n\n\n@click.command()\n@click.option(\n '--matcher',\n type=click.Choice(['url', 'body', 'header']),\n required=True,\n... | python | new_file | 1 | 2 | mit | 2c071f2d8cdcf92f0d383422017ddc2a24189f68 | spectresearch/detectem | scripts/add_new_plugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for the data seeder."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2010-2012 Cidadania S. Coop. Galega\n#\n# This file is part of e-cidadania.\n#\n# e-cidadania is free software: you... | python | new_file | 1 | 1 | apache-2.0 | cb1a0aa689f9f86ba576f9637a8548cfaeaf0439 | cidadania/e-cidadania,cidadania/e-cidadania | tests/src/test_data_seeder.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for lib.download"
},
{
"role": "assistant",
"content": "# Run the following command to test:\n#\n# (in /usr/local/googkit)\n# $ python -m {test_module_name}\n#\n# See also: http://docs.python.org/3.3/library/un... | python | new_file | 3 | 1 | mit | 804f2dbc31a36d55d422c69d35cc93e645634f09 | googkit/googkit,googkit/googkit,googkit/googkit | test/lib/test_download.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add ORM models for filter/qdisc"
},
{
"role": "assistant",
"content": "from simplesqlite.model import Integer, Model, Text\n\nfrom .._const import Tc\n\n\nclass Filter(Model):\n device = Text(attr_name=Tc.Param.DEVICE, not_nul... | python | new_file | 1 | 0 | mit | cb45cea953880bf87a774bec4120bb0e7331d480 | thombashi/tcconfig,thombashi/tcconfig | tcconfig/parser/_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"ACME protocol implementation.\n\nThis module is an implementation of the `ACME protocol`_. Latest\nsupported version: `v02`_.\n\n.. _`ACME protocol`: https://github.com/letsencrypt/acme-spec\n\n.. _`v02`:\n https://github.com/letsenc... | python | edit | 1 | 0 | apache-2.0 | ebfe1254ea11112689fa606cd6c29100a26e058d | jsha/letsencrypt,letsencrypt/letsencrypt,mitnk/letsencrypt,stweil/letsencrypt,bsmr-misc-forks/letsencrypt,stweil/letsencrypt,letsencrypt/letsencrypt,VladimirTyrin/letsencrypt,lmcro/letsencrypt,lmcro/letsencrypt,DavidGarciaCat/letsencrypt,DavidGarciaCat/letsencrypt,twstrike/le_for_patching,brentdax/letsencrypt,mitnk/let... | acme/acme/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom string import ascii_lowercase\nimport django\nimport os\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')\ndjango.setup()\n\nfrom breach.models import Target, Victim\n\nendpoint = 'https://dimkarakostas.com/rupture... | python | edit | 3 | 0 | mit | dac411035f12f92f336d6c42aa3103b3c04f01ab | dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/ruptur... | backend/populate_dimkarakostas.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for _wget method in tomcat module"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n# Import future libs\nfrom __future__ import absolute_import, print_function, unicode_literals\n\n# Import Salt Tes... | python | new_file | 1 | 5 | apache-2.0 | 2e5dbd5f76839e65e7d6658a0f5fabe9ce00f3d4 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/unit/modules/test_tomcat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import division\nfrom django.core.management.base import BaseCommand\nfrom django.utils import timezone\nfrom thezombies.models import (Agency, Probe)\n\nREPORT_DATE_FORMATTER = u\"{:%Y-%m-%d %I:%M%p %Z}\\n\"\n\n\nclass Comm... | python | edit | 1 | 5 | bsd-3-clause | 1eb2d3b9fa773455e9c69921b58529241e59b00e | sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies | thezombies/management/commands/report_invalid_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add visualize to diagnostics import"
},
{
"role": "assistant",
"content": "from .profile import Profiler, ResourceProfiler\nfrom .progress import ProgressBar\ntry:\n from .profile_visualize import visualize\nexcept ImportError... | python | new_file | 6 | 0 | bsd-3-clause | d36053764e8a5776d3c37a7e35beb9ba5cb67386 | PhE/dask,mraspaud/dask,vikhyat/dask,dask/dask,jcrist/dask,vikhyat/dask,mrocklin/dask,mrocklin/dask,cpcloud/dask,pombredanne/dask,ContinuumIO/dask,ContinuumIO/dask,dask/dask,gameduell/dask,blaze/dask,blaze/dask,jakirkham/dask,chrisbarber/dask,jcrist/dask,PhE/dask,mikegraham/dask,jakirkham/dask,cowlicks/dask,mraspaud/das... | dask/diagnostics/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 by MPI-SWS and Data-Ken Research.\n# Licensed under the Apache 2.0 License.\n\"\"\"\nThis is the main package for antevents. Directly within this package you fill\nfind the following modules:\n\n * `base` - the core abstrac... | python | edit | 1 | 0 | apache-2.0 | 2280624b54ec8f1ebae656336fab13d032f504ad | mpi-sws-rse/thingflow-python,mpi-sws-rse/antevents-python,mpi-sws-rse/thingflow-python,mpi-sws-rse/antevents-python | antevents/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom .utils.version import get_version\n\n#: This may not be the exact version as it's subject to modification with\n#... | python | edit | 1 | 0 | mit | 3fc1637350cb85b3c83d1a4561493bf526cea810 | benjaoming/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,DXCanas/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,DXCanas/kolibri,benjaoming/kolibri,benjaoming/kolibri,jonboiser/kolibri,learningequality/kolibri,lyw07/kolibri,mrpau/kolibri,jonboiser/kolibri,lyw07/kolibri,lyw07/kolibri,learningequality/kol... | kolibri/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Unit tests for `pycall.actions`.\"\"\"\n\n\nclass TestActions(TestCase):\n\t\"\"\"Test all `pycall.actions` classes to ensure they are actual\n\t`pycall.actions.Action` subclasses.\n\t\"\"\"\n\tpass\n\n```\n\nApply this change: Revert... | python | edit | 1 | 0 | unlicense | 9138112f3abef61a96485ade7e0b484a43429b81 | rdegges/pycall | tests/unit/actions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pwd import getpwnam\nfrom grp import getgrnam\nfrom traceback import format_exc\nfrom os import getuid, setgroups, setgid, setuid, umask\n\n\nfrom circuits.core import handler, BaseComponent\n\n\nclass DropPrivileges(BaseComponent):\n\... | python | edit | 1 | 4 | mit | bae391e1f5485dfb3f973144ef8d8413a2ac2f75 | nizox/circuits,treemo/circuits,treemo/circuits,eriol/circuits,eriol/circuits,eriol/circuits,treemo/circuits | circuits/app/dropprivileges.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nThis module defines all of our bbcode capabilities.\n\nTo add a new bbcode tag do the following:\n\n def bbcode_<tag_name>(tag_name, value, options, parent, context):\n return formatted_html\n\n bbcode_parser.add_format... | python | edit | 1 | 4 | mit | 88bd75c4b0e039c208a1471d84006cdfb4bbaf93 | Starbow/StarbowWebSite,Starbow/StarbowWebSite,Starbow/StarbowWebSite | starbowmodweb/site/templatetags/bbformat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\ndef frange(start, end, step):\n\ttmp = start\n\twhile(tmp <= end):\n\t\tyield tmp\n\t\ttmp += step\n\n```\n\nApply this change: Move activity SQL query into a dedicated function\n\nThe SQL query based on the UNION... | python | edit | 1 | 5 | mit | 462b8e53c8a1add0f471f53d31718816939f1372 | ptitoliv/cineapp,ptitoliv/cineapp,ptitoliv/cineapp | cineapp/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nfrom datetime import datetime\n\nfrom stock import Stock\n\n\nclass StockTest(unittest.TestCase):\n def test_price_of_a_new_stock_class_should_be_None(self):\n stock = Stock(\"GOOG\")\n self.assertIsNone(st... | python | edit | 1 | 1 | mit | 1b0d153b0f08e0ca5b962b0b9d839f745a035c62 | bsmukasa/stock_alerter | tests/test_stock.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport logging\nimport os.path\nimport shutil\nimport sys\nimport tempfile\n\nimport fiona\n\ndef test_options(tmpdir=None):\n \"\"\"Test that setting CPL_DEBUG=ON works\"\"\"\n if tmpdir is None:\n tempdir = tempfile.mkdtemp... | python | edit | 3 | 4 | bsd-3-clause | 6ecc64a7a22b9b57958dad704d309b18028140e1 | perrygeo/Fiona,Toblerity/Fiona,rbuffat/Fiona,perrygeo/Fiona,rbuffat/Fiona,Toblerity/Fiona,johanvdw/Fiona | tests/test_drivers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os.path import abspath, dirname, join\n\nimport sh\nimport psycopg2\nimport requests\n\nPROJECT_FOLDER=dirname(dirname(abspath(__file__)))\nDOCKER_FOLDER=join(PROJECT_FOLDER, 'docker')\n\ndef docker_compose(version, *args):\n sh.doc... | python | edit | 1 | 2 | mit | 6c417f49ebd0f466ebf8100a28006e7c5ea2ff3d | matthewfranglen/postgres-elasticsearch-fdw | tests/lib/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Username to UUID\n Converts a Minecraft username to it's UUID equivalent.\n\nUses the official Mojang API to fetch player data.\n\"\"\"\nimport http.client\nimport json\n\n\nclass UsernameToUUID:\n def __init__(self, username):\n ... | python | edit | 1 | 6 | mit | ec6099421bad222595be15f4f0b2596952d8c9cc | mrlolethan/MinecraftUsernameToUUID | username_to_uuid.py | rejected_duplicate | Near-duplicate of sample 40 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nlink_re = re.compile(\"(\\s|^)<(https?://[\\w./?+]+)>(\\s|$)\")\n\n\ndef extract_url(message):\n \"\"\"\n Returns the first url in a message. If there aren't any returns None\n \"\"\"\n answer = link_re.search(messa... | python | edit | 1 | 2 | mit | fcb5c5756299a2804c08c8682430d4a0545ae3d9 | iwi/linkatos,iwi/linkatos | linkatos/message.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\nfrom web_test_base import *\n\nclass TestIATIPreview(WebTestBase):\n requests_to_load = {\n 'IATI Preview': {\n 'url': 'http://preview.iatistandard.org/'\n }\n }\n\n def test_contains_links(s... | python | edit | 11 | 1 | mit | b69301c57076f86e99f738d5434dd75fd912753d | IATI/IATI-Website-Tests | tests/test_preview.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'jaraco.packaging.sphinx',\n 'rst.linker',\n]\n\nmaster_doc = 'index'\n\nlink_files = {\n\t'../CHANGES.rst': dict(\n\t\tusing=dict(\n\t\t\t... | python | edit | 1 | 0 | mit | 689f700fcfcdfcdc7d027f204a9654b101ac9ecb | yougov/mettle,cherrypy/magicbus,python/importlib_metadata,jaraco/keyring,jaraco/jaraco.context,pwdyson/inflect.py,yougov/mettle,yougov/librarypaste,jaraco/jaraco.text,jaraco/jaraco.collections,jaraco/jaraco.functools,jaraco/hgtools,yougov/pmxbot,jaraco/zipp,hugovk/inflect.py,jaraco/jaraco.path,yougov/mettle,jaraco/jara... | docs/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Django Evolution version and package information.\n\nThese variables and functions can be used to identify the version of\nReview Board. They're largely used for packaging purposes.\n\"\"\"\n\nfrom __future__ import unicode_literals\n... | python | edit | 1 | 5 | bsd-3-clause | 4594ed6599d98f1773a6e393c617c3230a1d8bec | beanbaginc/django-evolution | django_evolution/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport functools\nimport tensorflow as tf\n\nfrom . import cnn_dailymail_rc\nfrom .. import collections\nfrom ..flags import FLAGS\nfrom ..util import func_scope, dtypes\nfrom .util import batch_queue, add_queue_runner\n\n\n\nREADERS = { \"... | python | edit | 3 | 2 | unlicense | d4c9603e4c5913b02746af3dec21f682d906e001 | raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten | nn/file/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom annotypes import Anno, Array, Union, Sequence, add_call_types\n\nfrom malcolm.core import Part, StringArrayMeta, Widget, config_tag, \\\n PartRegistrar, APartName\nfrom ..hooks import ValidateHook, AAxesToMove\n\n\nwith Anno(\"Initi... | python | edit | 5 | 1 | apache-2.0 | e8ad5aafb63c2aea5b855b000cafcc1ba9248af6 | dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm | malcolm/modules/scanning/parts/simultaneousaxespart.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport logging\nlogging.basicConfig(level=logging.INFO)\nlog = logging.getLogger()\n\ndef yield_packages(handle, meta=False, retcode=None):\n for lineno, line in enumerate(handle):\n if line.startswith('#'):... | python | edit | 4 | 7 | mit | 02f8f992aca37d21b9ae119f13b46de8eb1541ae | erasche/community-package-cache,erasche/community-package-cache,gregvonkuster/cargo-port,erasche/community-package-cache,galaxyproject/cargo-port,galaxyproject/cargo-port,gregvonkuster/cargo-port,gregvonkuster/cargo-port | gsl/utils.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.14.2\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\... | python | edit | 1 | 0 | mit | b95fbc22615e94cea4bd16b17c887214aba44175 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/config/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tailor.swift.swiftlistener import SwiftListener\nfrom tailor.utils.charformat import isUpperCamelCase\n\n\nclass MainListener(SwiftListener):\n\n def enterClassName(self, ctx):\n className = ctx.getText()\n if not isUp... | python | edit | 1 | 2 | mit | 508167ee3c289258857aee0963d4917c39201d9a | sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor | tailor/listeners/mainlistener.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.forms import ModelForm\n\nfrom .models import Client\n\n\nclass ClientForm(ModelForm):\n class Meta:\n model = Client\n fields = (\n \"name\",\n \"address_line_1\",\n \"address_l... | python | edit | 1 | 0 | mit | a9abf8361f8728dfb1ef18a27c5eaad84ca2f054 | kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting | accounting/apps/clients/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n\nimport mraa\nimport time\n\nresetPin = mraa.Gpio(8)\nresetPin.dir(mraa.DIR_OUT)\n\nresetPin.write(0)\ntime.sleep(0.2)\nresetPin.write(1)\n\n```\n\nApply this change: Reset script first pulls pin high"
},
{
... | python | edit | 1 | 0 | bsd-3-clause | 8e8986a17b7fa38417fe39ec8fbf4e1d3ee43f64 | Pavlos1/SensoringJMSS,Pavlos1/SensoringJMSS,Pavlos1/SensoringJMSS,Pavlos1/SensoringJMSS | arduino_flasher/reset_arduino.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nimport mock\n\nimport oauth2u\nimport oauth2u.server.log\n\n\ndef test_should_have_optional_port():\n server = oauth2u.Server()\n assert 8000 == server.port\n\n\ndef test_should_accept_custom_port():\n server = oa... | python | edit | 4 | 1 | mit | 24c6e2852e319ec0d0f4e8d0539bc69a9915c3e7 | globocom/oauth2u,globocom/oauth2u | tests/server/test_server.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import conversions\nfrom .file_formats import FileFormats\n\n\nclass FileConverter(object):\n\n def get_conversion(self, source_format, target_format):\n\n return {\n 'application/pdf': conversions.NoOp,\n ... | python | edit | 1 | 1 | mit | 1e29540ee08ca8faaed5e3a8ab1ac9def290155b | wilbertom/fileconversions | fileconversions/file_converter.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\nfrom traits.api import HasTraits, Instance\nfrom traitsui.api import View, UItem, Item, RangeEditor, Group, VGroup, HGroup\nfrom enable.api import ComponentEditor\n\nfrom enable.gadgets.vu_meter import VUMeter\n\n\nclass Demo(HasTraits)... | python | edit | 1 | 0 | bsd-3-clause | 9c11fa9d0a26d1e4caa47d2b3f0f1bf92cf8e965 | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | examples/enable/gadgets/vu_demo.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom haystack import indexes\n\nfrom .models import Event\n\n\nclass EventIndex(indexes.SearchIndex, indexes.Indexable):\n text = indexes.CharField(document=True, use_template=True)\n\n def get_model(self):\... | python | edit | 1 | 2 | bsd-3-clause | a485998447ffbe5a19ce8f9b49e61ac313c8241a | blancltd/django-glitter-events,blancltd/django-glitter-events | glitter_events/search_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n\"Clase de Test\"\nimport unittest\nimport json\n\n\nfrom app import app\n\n\nclass BasicTestCase(unittest.TestCase):\n \"Test Class\"\n\n def setUp(self):\n \"\"\"\n Setup function... | python | edit | 1 | 1 | apache-2.0 | 01a60e0a0ab1e3b178cf7a56b4250ddee965e742 | kamaxeon/learning-flask,kamaxeon/learning-flask | 01_todo_list/test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport matplotlib.pyplot as plt\n\nfrom bluesky import RunEngine, Mover, SynGauss\nfrom bluesky.examples import adaptive_scan\n\n\nRE = RunEngine()\nRE.verbose = False\nmotor = Mover('motor', ['pos'])\ndet = SynGauss('det', motor, 'pos', ce... | python | edit | 5 | 0 | bsd-3-clause | e04cec6c4260a181c773371406323758d9f162bf | dchabot/bluesky,sameera2004/bluesky,ericdill/bluesky,klauer/bluesky,ericdill/bluesky,sameera2004/bluesky,dchabot/bluesky,klauer/bluesky | examples/adaptive_scan_demo.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import APIView\nfrom django.http import Http404\n\nfrom three import Three\n\nclass QCThree(Three):\n\tdef __init__(self):\n\t\tself.endpoint = \"http://dev-api.ville.quebec.qc.ca/open311/v2/\"\n\t\tself.format = \"json\"\n\t\tse... | python | edit | 1 | 2 | mit | c3ed431f97e4ca24a00ff979a5204d65b251dd87 | ironweb/lesfeuxverts-backend | greenlight/views/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom playhouse.migrate import *\n\ncistern_folder = os.getenv('CISTERNHOME', os.path.join(os.environ['HOME'], '.cistern'))\ndb = SqliteDatabase(os.path.join(cistern_folder, 'cistern.db'))\nmigrator = SqliteMigrator(db)\n\ndate_... | python | edit | 6 | 1 | mit | c27a1fc4c0251b896667e21a0a88fb44a403242f | archangelic/cistern | cistern/migrations.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | python | edit | 1 | 1 | apache-2.0 | 5dbd9019744621f84c3775de12b895021c3b8eb8 | stackforge/senlin,openstack/senlin,Alzon/senlin,openstack/senlin,openstack/senlin,tengqm/senlin-container,stackforge/senlin,Alzon/senlin,tengqm/senlin-container | senlin/drivers/openstack/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''\nScript: fy_print_seq_len_in_fasta.py\nFunction: Print sequence length to STDOUT in fasta file\nNote: Python3 is not default installed for most computer, \n and the extra-installed module like Biopython cou... | python | edit | 1 | 0 | bsd-2-clause | 1371f1a1b2914a7f2e328f69bdc599c1eada54db | lileiting/gfat | Python-practice/fy_print_seq_len_in_fasta.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import with_statement\n\nfrom fabric.api import *\nfrom fabtools import require\nimport fabtools\n\n\n@task\ndef python():\n \"\"\"\n Check Python package installation\n \"\"\"\n require.python.virtualenv('/tmp/v... | python | edit | 1 | 1 | bsd-2-clause | 5aad2212340a5eba4bbf4615d58ed6b3c205bc7f | prologic/fabtools,ahnjungho/fabtools,ronnix/fabtools,davidcaste/fabtools,pombredanne/fabtools,pahaz/fabtools,badele/fabtools,AMOSoft/fabtools,wagigi/fabtools-python,fabtools/fabtools,hagai26/fabtools,n0n0x/fabtools-python,sociateru/fabtools,bitmonk/fabtools | fabtools/tests/fabfiles/python.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport zipfile\n\nimport pytest\n\nfrom setuptools.command.upload_docs import upload_docs\nfrom setuptools.dist import Distribution\n\nfrom .textwrap import DALS\nfrom . import contexts\n\n\nSETUP_PY = DALS(\n \"\"\"\n from... | python | edit | 2 | 1 | mit | db80c8f857b0c4ff3a5ad02a59e6442629599914 | pypa/setuptools,pypa/setuptools,pypa/setuptools | setuptools/tests/test_upload_docs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\n\nclass UserProfile(models.Model):\n user = models.OneToOneField(User)\n ... | python | edit | 1 | 3 | mit | 5e6d52277e34c254bad6b386cf05f490baf6a6f2 | super1337/Super1337-CTF,super1337/Super1337-CTF,super1337/Super1337-CTF | webapp-django/accounts/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nif __name__ == '__main__':\n setup(name='sphinxcontrib-coffee',\n version='0.1.0',\n license='BSD',\n author=\"Stephen Sugden\",\n author_email=\"<EMAIL>\... | python | edit | 1 | 0 | bsd-2-clause | e95f2c986f407e0c6f65ef1cd37bdefa98a01213 | sphinx-contrib/spelling,sphinx-contrib/spelling | coffeedomain/setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2014 IBM Corp.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.o... | python | edit | 1 | 0 | apache-2.0 | 9174de810bc4be3376521eecdb82a84486591e73 | magic0704/oslo.utils,varunarya10/oslo.utils,openstack/oslo.utils | oslo_utils/_i18n.py | rejected_duplicate | Near-duplicate of sample 2196 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom zeus import auth\nfrom zeus.api import client\nfrom zeus.exceptions import ApiError\nfrom zeus.models import Email, Identity\n\nfrom .base import Resource\nfrom ..schemas import EmailSchema, IdentitySchema, UserSchema\n\... | python | edit | 1 | 3 | apache-2.0 | 2a843e46fabf616517847a304170fbce75afd167 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | zeus/api/resources/auth_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import url\n\nurlpatterns = [\n url(r'^upload-batch/', 'mla_game.apps.transcript.views.upload_batch', name='upload-batch'),\n]\n\n```\n\nApply this change: Remove unused URL, will revisit later"
},
{
"role":... | python | edit | 3 | 0 | mit | 862301e319be09d3c163c8248f18ed23c3b1fab5 | WGBH/FixIt,WGBH/FixIt,WGBH/FixIt | mla_game/apps/transcript/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numba import exportmany, export\nfrom numba.pycc import CC\n\n\n# New API\n\ncc = CC('pycc_test_output')\n\n@cc.export('multf', 'f4(f4, f4)')\n@cc.export('multi', 'i4(i4, i4)')\ndef mult(a, b):\n return a * b\n\n_two = 2\n\n# This o... | python | edit | 1 | 1 | bsd-2-clause | 47eddebccf80bd066fd12f07316a2d283ff21774 | jriehl/numba,seibert/numba,ssarangi/numba,gmarkall/numba,stonebig/numba,stuartarchibald/numba,pitrou/numba,pombredanne/numba,gmarkall/numba,IntelLabs/numba,sklam/numba,gmarkall/numba,pitrou/numba,stonebig/numba,stuartarchibald/numba,numba/numba,sklam/numba,pombredanne/numba,pombredanne/numba,sklam/numba,cpcloud/numba,s... | numba/tests/compile_with_pycc.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import template\nfrom copy import copy\nfrom molo.yourwords.models import (YourWordsCompetition, ThankYou,\n YourWordsCompetitionIndexPage)\nfrom molo.core.templatetags.core_tags import get_page... | python | edit | 1 | 3 | bsd-2-clause | 6a15b33d69d8d66643bb8886f9916fa28ecaedea | praekelt/molo.yourwords,praekelt/molo.yourwords | molo/yourwords/templatetags/competition_tag.py | rejected_duplicate | Near-duplicate of sample 1054 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rest_framework import generics\nfrom .permissions import IsOrderCreator\nfrom .serializers import PaymentSerializer\nfrom .models import Payment\n\n\nclass PaymentDetail(generics.RetrieveUpdateAPIView):\n \"\"\"\n View for workin... | python | edit | 1 | 2 | bsd-3-clause | 8c07012e423d592a4638d6dac58ca5e67d9dd5a6 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | apps/cowry/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\n\nfrom bermann import RDD\n\n\nclass TestRDD(unittest.TestCase):\n\n def test_cache_is_noop(self):\n rdd = RDD([1, 2, 3])\n\n cached = rdd.cache()\n\n self.assertEqual(rdd, cached)\n\n # collect\n... | python | edit | 1 | 1 | mit | d792679461357fa17b1f852d7a72921aed2fe271 | oli-hall/bermann | bermann/rdd_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom mopidy import config, ext\n\n\n__version__ = \"1.1.1\"\n\n\nclass Extension(ext.Extension):\n\n dist_name = \"Mopidy-ALSAMixer\"\n ext_name = \"alsamixer\"\n version = __version__\n\n def get_default_config(sel... | python | edit | 1 | 1 | apache-2.0 | 1f6c1a4f596222b424d9f51ca30f5eb4d80f9942 | mopidy/mopidy-alsamixer | mopidy_alsamixer/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom numdist_copy import default_lib_dirs, default_include_dirs, \\\n default_src_dirs, get_standard_file\nfrom numdist_copy import msvc_runtime_library\n\nfrom conv_template import process_file as process_c_file\nfr... | python | edit | 10 | 0 | bsd-3-clause | 641b2d07a4250a779ad6ff31f579968f69362cc0 | cournape/numscons,cournape/numscons,cournape/numscons | numscons/numdist/__init__.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\nimport os\nfrom flask import Flask\nfrom flask_cors import CORS\n\nfrom apisql import apisql_blueprint\n\napp = Flask(__name__)\nlog = logging.getLogger(__name__)\nlog.setLevel(logging.INFO)\n\nMAX_ROWS = int(os.environ.get(... | python | edit | 1 | 1 | mit | 22e3ed1791698e2f2ffa7b8ce9b62a9f4c533b7b | OpenBudget/open-budget-data-api,OpenBudget/open-budget-data-api | open_budget_data_api/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom typing import Any\n\nfrom django.conf import settings\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.template.defaultfilters import pluralize, slugify\nfrom django.urls import reverse\nfrom django.util... | python | edit | 1 | 1 | apache-2.0 | 8dd1164979ae8fce031fea153178ab7940e21069 | punchagan/zulip,andersk/zulip,andersk/zulip,zulip/zulip,hackerkid/zulip,rht/zulip,eeshangarg/zulip,eeshangarg/zulip,punchagan/zulip,punchagan/zulip,hackerkid/zulip,hackerkid/zulip,eeshangarg/zulip,rht/zulip,zulip/zulip,rht/zulip,rht/zulip,eeshangarg/zulip,kou/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,kou/zulip,h... | zproject/jinja2/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2012-2019, Mark Peek <<EMAIL>>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n#\n# *** Do not modify - this file is autogenerated ***\n# Resource specification version: 15.1.0\n\n\nfrom . import AWSObject\... | python | edit | 9 | 0 | bsd-2-clause | 5f70d83408d177e803ce8edfb0ebd2b909722a64 | cloudtools/troposphere,cloudtools/troposphere | troposphere/certificatemanager.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file)"
},
{
"role": "assistant",
"content": "from trac.versio... | python | new_file | 4 | 0 | bsd-3-clause | 477faabee7fc674f8ce0c04663b9eff3943e83fa | moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dokipen/trac,moreati/trac-gitsvn,dafrito/trac-mirror,moreati/trac-gitsvn,exocad/exotrac | trac/versioncontrol/web_ui/__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 os\nimport subprocess\n\nif __name__ == '__main__':\n if os.environ.has_key('APP'):\n graphical_app = os.environ['APP']\n process = subprocess.Popen(graphical_app, shell=True,\n ... | python | edit | 1 | 0 | apache-2.0 | 8dbcd07e0db34d39ad8f79067282d4359d79439d | thewtex/docker-opengl,thewtex/docker-opengl | usr/bin/graphical-app-launcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport imp\n\nimport synapse\nfrom synapse.tests.common import *\n\nclass InitTest(SynTest):\n\n def test_init_modules(self):\n os.environ['SYN_MODULES'] = 'fakenotrealmod , badnothere,math'\n msg = 'SYN_MODULES ... | python | edit | 7 | 0 | apache-2.0 | 6155cfa0d16bfde8b412a3b2c68983ef939d518c | vertexproject/synapse,vertexproject/synapse,vivisect/synapse,vertexproject/synapse | synapse/tests/test_init.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mockredis import MockRedis as _MockRedis\n\nfrom .generic import GenericCommandsMixin\nfrom .hash import HashCommandsMixin\nfrom .list import ListCommandsMixin\nfrom .set import SetCommandsMixin\n\n__all__ = ['MockRedis']\n\n\nclass Mo... | python | edit | 1 | 2 | apache-2.0 | c947ecffd771117ce531f5058356a17b7db82fdb | kblin/mockaioredis,kblin/mockaioredis | mockaioredis/commands/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\nfrom django.contrib.auth.models import User\n# Create your models here.\n\n\nclass CompletedCourse(models.Model):\n \"\"\"\n Model for completed studies\n \"\"\"\n student = models.ForeignKey(User... | python | edit | 1 | 0 | mit | 022d8b992a88fd4c489c068ba57b4b2fcf6dde98 | jpvanhal/cloudsizzle,jpvanhal/cloudsizzle | cloudsizzle/studyplanner/completedstudies/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport platform\nimport sys\n\nfrom setuptools import setup\nfrom setuptools_rust import RustExtension\n\nsetup(\n name=\"rust-with-cffi\",\n version=\"0.1.0\",\n classifiers=[\n \"License :: OSI Appro... | python | edit | 4 | 0 | mit | 7039dd833186ba8430aae55de3e856ac0426f90c | PyO3/setuptools-rust,PyO3/setuptools-rust | examples/rust_with_cffi/setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | python | edit | 1 | 1 | apache-2.0 | 4c799fe2c14d5c602f1eda83a3ab226eb2e7060e | stackforge/fuel-octane,Mirantis/octane,stackforge/fuel-octane,Mirantis/octane | octane/tests/test_upgrade_node.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\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('iaas', '0010_auto_20150118_1834'),\n ]\n\n ope... | python | edit | 1 | 0 | mit | fe9e11af28e2ffe2b3da5ebb0971cd712136284c | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | nodeconductor/iaas/migrations/0011_cloudprojectmembership_availability_zone.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import *\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'docs',\n 'USER': 'postgres', # Not used with sqlite3.\n 'PASSWORD': '',... | python | edit | 3 | 0 | mit | a6606da129674fa47b2d32711a6c81f6bcd7d8ca | agjohnson/readthedocs.org,tddv/readthedocs.org,VishvajitP/readthedocs.org,sils1297/readthedocs.org,GovReady/readthedocs.org,jerel/readthedocs.org,soulshake/readthedocs.org,fujita-shintaro/readthedocs.org,raven47git/readthedocs.org,Carreau/readthedocs.org,LukasBoersma/readthedocs.org,gjtorikian/readthedocs.org,Tazer/rea... | readthedocs/settings/postgres.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.utils import translation\n\nfrom rest_framework import response\n\nfrom bluebottle.utils.views import GenericAPIView\nfrom .models import HomePage\nfrom .serializers import HomePageSerializer\n\n\n# Instead of serving all the ob... | python | edit | 1 | 1 | bsd-3-clause | 1187deb4140ad0c7d66f0f25ae6d019f8ffb6168 | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/homepage/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport pydle\n\nsetup(\n name=pydle.__name__,\n version=pydle.__version__,\n packages=[\n 'pydle',\n 'pydle.features',\n 'pydle.features.rfc1459',\n 'pydle.fe... | python | edit | 3 | 0 | bsd-3-clause | 0b05101696989a3b88a4a630a6886c5db142175b | Shizmob/pydle | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"django-minio-storage-py-pa\",\n license=\"MIT\",\n use_scm_version=True,\n description=\"Django file storage using the minio python client\",\n author=\"Tom Houlé\",\n author... | python | edit | 1 | 0 | apache-2.0 | fd79655ff898b715273512cd8a655b262321444a | tomhoule/django-minio-storage | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Tests for fullqualname.\"\"\"\n\nimport nose\nimport sys\n\nfrom fullqualname import fullqualname\n\n\ndef test_builtin_function():\n # Test built-in function object.\n\n obj = len\n\n # Type is 'builtin_function_or_method'.\... | python | edit | 1 | 2 | bsd-3-clause | 424980a48e451d1b99397843001bd75fa58e474e | etgalloway/fullqualname | tests/test_fullqualname.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetuptools.setup(\n name = 'ferretmagic',\n packages = ['ferretmagic'],\n py_modules = ['ferretmagic'],\n version = '20181001',\n descript... | python | edit | 1 | 0 | mit | 13c060f47d16860e0c67ace5adbde3c9167f343e | PBrockmann/ipython-ferretmagic,PBrockmann/ipython_ferretmagic,PBrockmann/ipython_ferretmagic | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\nfrom setuptools import setup\n\nthisdir = os.path.abspath(os.path.dirname(__file__))\nversion = open(os.path.join(thisdir, 'asciigraf', 'VERSION')).read().strip()\n\n\ndef readme():\n with open(\"README.rst\", 'r') as f:\... | python | edit | 1 | 1 | mit | 0fae9740d62d25469b42e8912bcad7de7d904b26 | AnjoMan/asciigraf | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# flake8: noqa\nfrom .typing import Observer, Scheduler\n\nfrom .disposable import Disposable\nfrom .anonymousobserver import AnonymousObserver\n\nfrom . import observerextensions\nfrom .pipe import pipe\n\nfrom .observable import Observabl... | python | edit | 1 | 0 | mit | c259e42ea95fdc43ad9345d702d3cab901d88f93 | ReactiveX/RxPY,ReactiveX/RxPY | rx/core/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport setuptools\n\nimport samsungctl\n\nsetuptools.setup(\n name=samsungctl.__title__,\n version=samsungctl.__version__,\n description=samsungctl.__doc__,\n url=samsungctl.__url__,\n author=samsungc... | python | edit | 1 | 0 | mit | b42d2239d24bb651f95830899d972e4302a10d77 | dominikkarall/samsungctl,Ape/samsungctl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='tangled.session',\n version='0.1a3.dev0',\n description='Tangled session integration',\n long_description=open('README.rst').read(),\n url='http://tangledframework.org/',\n ... | python | edit | 1 | 0 | mit | 16374d0fde1a9e88211090da58fa06dba968501b | TangledWeb/tangled.session | setup.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.