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: Make all models visible in Admin" }, { "role": "assistant", "content": "from django.contrib import admin\n\nfrom .models import Voter, Flag, Vote \n\nadmin.site.register(Voter)\nadmin.site.register(Flag)\nadmin.site.register(Vote...
python
new_file
1
0
bsd-3-clause
3f6fe2658fef0f0a27f58e67da7cc64c2fba7371
shearichard/django-channels-demo,shearichard/django-channels-demo,shearichard/django-channels-demo
chnnlsdmo/chnnlsdmo/admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check to see if input is executed" }, { "role": "assistant", "content": "foo = input(\"Try to type eval(2+2), if the result is '4' this is unsafe: \")\nprint(\"You typed the following: \\\"\",foo,\"\\\".\")\ninput(\"Press [Enter]...
python
new_file
1
0
mit
ca1a8434fd16100509c6ab0c197e562ff767fa06
RobertGresdal/python
basics/read_input.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integrated tests for interaction PDBs" }, { "role": "assistant", "content": "from unittest import TestCase\nimport pygtop\n\nclass InteractionPropertyTests(TestCase):\n\n def test_can_get_gtop_pdbs(self):\n target =...
python
new_file
1
1
mit
d549285e2269f0078fefdb054d542c2cbb26dc89
samirelanduk/pygtop
integrated_tests/test_interactions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional tests for servers\n\nChange-Id: Iff4101b3d45e04d7f6e25b5f599a7647c8cd2a80" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file exce...
python
new_file
1
4
apache-2.0
0e8c93177aff661ec7ec37f0a3175f670faefa45
stackforge/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk,dtroyer/python-openstacksdk,dudymas/python-openstacksdk,dudymas/python-openstacksdk,mtougeron/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-openstacksdk,mtougeron/python-openstacksdk,openstack/python-ope...
openstack/tests/functional/compute/v2/test_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: MP-795: Add wsgi file for web410" }, { "role": "assistant", "content": "\"\"\"WSGI File for Web410\n\"\"\"\n\nimport os\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"marco.settings\")\nactivate_this = '/home/point97/env/...
python
new_file
2
0
isc
2ba2d08804280cfdfa2c2ae6ca516fb68dd98ea7
Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2
marco/marco/wsgi_web410.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for assignable mixin" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE fi...
python
new_file
1
1
apache-2.0
140f0da41966db7e4a932ee917961c9d27eab87f
AleksNeStu/ggrc-core,prasannav7/ggrc-core,josthkko/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core...
src/ggrc/migrations/versions/20160203143912_6bed0575a0b_migrate_assessment_to_assignable_mixin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic duplicate resolution cmd with log info" }, { "role": "assistant", "content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom collections import defaultdict\nimport csv\nimport dateti...
python
new_file
4
3
bsd-3-clause
76bf2bd2a3a570b8ab7632c709deb6fcd9bc20a4
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/enikshay/management/commands/resolve_duplicate_persons.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tests for the classification\"\"\"\n\nimport unittest\nimport axelrod\n\n\nclass TestClassification(unittest.TestCase):\n\n def test_known_classifiers(self):\n # Grabbing all the strategies: this will be changed to just be `...
python
edit
1
3
mit
63ff6313c1200910b749dc8d8488d6c7f2cd9c5f
emmagordon/Axelrod,emmagordon/Axelrod,risicle/Axelrod,kathryncrouch/Axelrod,bootandy/Axelrod,uglyfruitcake/Axelrod,mojones/Axelrod,uglyfruitcake/Axelrod,bootandy/Axelrod,mojones/Axelrod,kathryncrouch/Axelrod,risicle/Axelrod
axelrod/tests/unit/test_classification.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to save every file so that it can be indexed" }, { "role": "assistant", "content": "\"\"\"\nSaves every file to have new save() logic index those files.\n\"\"\"\nimport sys\nimport logging\n\nfrom website.app import...
python
new_file
1
4
apache-2.0
f7f19b5074fa28431f8d5fc4d3284f61542423fd
pattisdr/osf.io,zamattiac/osf.io,mluo613/osf.io,ZobairAlijan/osf.io,CenterForOpenScience/osf.io,asanfilippo7/osf.io,chrisseto/osf.io,saradbowman/osf.io,aaxelb/osf.io,zachjanicki/osf.io,wearpants/osf.io,zachjanicki/osf.io,mfraezz/osf.io,kwierman/osf.io,TomHeatwole/osf.io,laurenrevere/osf.io,caseyrollins/osf.io,Johnetord...
scripts/migration/migrate_index_for_existing_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add auto django migration for ProductTranslation alter name operation" }, { "role": "assistant", "content": "# Generated by Django 3.0.5 on 2020-04-23 12:37\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrati...
python
new_file
1
0
bsd-3-clause
ae7b39075f3dde712e50f09a388ccbf9e187eab9
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/product/migrations/0117_auto_20200423_0737.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for bulk importer" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrighted by participating institutions in DataONE....
python
new_file
1
1
apache-2.0
6789fbc32400dd3b32a39881ffdacfd1a3729fa0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
gmn/src/d1_gmn/tests/test_mgmt_import.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for UniProt client" }, { "role": "assistant", "content": "from indra.databases import uniprot_client\n\ndef test_query_protein_exists():\n g = uniprot_client.query_protein('P00533')\n assert(g is not None)\n\ndef ...
python
new_file
1
1
bsd-2-clause
b50a1859d09a9172225a21a96748bfdf9a13515f
johnbachman/belpy,jmuhlich/indra,johnbachman/belpy,pvtodorov/indra,jmuhlich/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,jmuhlich/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,pv...
indra/tests/test_uniprot_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for type hierarchy" }, { "role": "assistant", "content": "import unittest\nfrom fluentcheck.check import Check, CheckError\n\nclass ParentA:\n def __init__(self):\n pass\n\nclass Child(ParentA):\n def __ini...
python
new_file
1
2
mit
2e173a0d8503a152eba1a99ee66a7a81127496a8
csparpa/check
fluentcheck/tests/test_type_hierarchy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for ensure schemas" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-24 19:33\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom django.db import m...
python
new_file
1
3
apache-2.0
2ad1c276a96a77d2088f996ebc32fa74206d1cef
CenterForOpenScience/osf.io,mattclark/osf.io,pattisdr/osf.io,caseyrollins/osf.io,crcresearch/osf.io,adlius/osf.io,erinspace/osf.io,baylee-d/osf.io,cslzchen/osf.io,laurenrevere/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,baylee-d/osf.io,binoculars/osf.io,mattclark/osf.io,pattisdr/osf.io,sloria/osf.io,brianjgeiger...
osf/migrations/0036_ensure_schemas.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some basic tests for backward compatibility.\n\n\ngit-svn-id: 353d90d4d8d13dcb4e0402680a9155a727f61a5a@1082028 13f79535-47bb-0310-9956-ffa450edef68" }, { "role": "assistant", "content": "# Licensed to the Apache Software Foun...
python
new_file
37
1
apache-2.0
b4db8160e18ceedb3d7946c180fa8963d9e9755d
aleGpereira/libcloud,wido/libcloud,ClusterHQ/libcloud,cryptickp/libcloud,sfriesel/libcloud,Kami/libcloud,supertom/libcloud,ZuluPro/libcloud,carletes/libcloud,mistio/libcloud,techhat/libcloud,aleGpereira/libcloud,andrewsomething/libcloud,lochiiconnectivity/libcloud,ninefold/libcloud,Cloud-Elasticity-Services/as-libcloud...
test/compute/test_backward_compatibility.py
rejected_lint
Too many lint violations: 37
true
[ { "role": "user", "content": "Write python code for the following: Add new test case for unrolled list comprehension comprehension" }, { "role": "assistant", "content": "#pythran export list_comp(int list list)\n#runas list_comp([[], [], [1]])\n\ndef foo(cc, x, y):\n for a in cc:\n if ...
python
new_file
1
4
bsd-3-clause
55c1aaa740724661d58f17b9be818e91a04fde9c
pbrunet/pythran,serge-sans-paille/pythran,pombredanne/pythran,pombredanne/pythran,hainm/pythran,artas360/pythran,artas360/pythran,serge-sans-paille/pythran,hainm/pythran,pbrunet/pythran,artas360/pythran,hainm/pythran,pombredanne/pythran,pbrunet/pythran
pythran/tests/cases/comp_unrolling.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow plugins to have models.py files in their own plugin folders" }, { "role": "assistant", "content": "# __init__.py\n\n## This module is so that all plugins can have custom models.py files in\n## their own folders and have the...
python
new_file
1
0
apache-2.0
2f5bf2a03a8115240690af7fa43244ade5a285a5
kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2,kiwiheretic/logos-v2
plugins/models/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add incomplete test file for CSR" }, { "role": "assistant", "content": "import os, sys\nimport numpy as np\nfrom numpy.testing import assert_equal, assert_almost_equal\nfrom skan import csr\n\nrundir = os.path.dirname(os.path.abs...
python
new_file
3
1
bsd-3-clause
3a28809b5a642d14d7174c8a309b130822d30e72
jni/skan
skan/test/test_csr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove database default on rate_limit column\n\nThe default for the rate_limit column in the services and\nservices_history model is now set in the model, so we can remove the\ndefault from the database.\n\nPivotal story: https://www.pivotal...
python
new_file
3
1
mit
f6ef0ebbd71e684f803c0d5c0f1a3da0c65a13d6
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0158_remove_rate_limit_default.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Improve category filter for activities" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.6 on 2017-11-11 03:35\nfrom __future__ import unicode_literals\n\nimport django.core.validators\nfr...
python
new_file
1
0
bsd-2-clause
5484e1acb69d8a7238bbfa1056551867f9d52525
wodo/WebTool3,wodo/WebTool3,wodo/WebTool3,wodo/WebTool3
webtool/server/migrations/0013_auto_20171111_0435.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 671. Second Minimum Node In a Binary Tree\n\n671. Second Minimum Node In a Binary Tree: https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/" }, { "role": "assistant", "content": "# Definition f...
python
new_file
1
7
apache-2.0
29bc58359f2468ef488563abb4f2d1974e848b1c
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/second-minimum-node-in-a-binary-tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add HTML tag stripper/remover (also remove <script> and <style> contents)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport urllib2\nfrom HTMLParser import HTMLParser\n\n# HTML Tag St...
python
new_file
1
6
mit
89fa1ce2fbf16a65d78a8d7bf0f0600240500630
rawswift/python-collections
html/cli-html-tag-stripper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 374. Guess Number Higher or Lower\n\n374. Guess Number Higher or Lower: https://leetcode.com/problems/guess-number-higher-or-lower/" }, { "role": "assistant", "content": "# The guess API is already defined for...
python
new_file
2
4
apache-2.0
493f6ccfe05bd2b06c21f2a70c552a79be2a3f67
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/guess-number-higher-or-lower.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nDEPS = [\n 'builder_name_schema',\n 'depot_tools/bot_update',\n 'depot...
python
edit
1
0
bsd-3-clause
039afd96fd66844e3d0ac031458c976d74aca325
HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,HalCanary/ski...
infra/bots/recipe_modules/flavor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a snippet (Python physics)." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)\n\n# Permission is hereby granted, free of charge...
python
new_file
1
1
mit
087d33b85381c0096be583bbae67ab0030a90f4f
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
python/tkinter/python3/keyboard_events.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ADD PyGrid SetupService message tests" }, { "role": "assistant", "content": "# syft absolute\nimport syft as sy\nfrom syft.core.io.address import Address\nfrom syft.grid.messages.setup_messages import CreateInitialSetUpMessage\nf...
python
new_file
1
1
apache-2.0
67596d081059a004e5f7ab15f7972773fdf2f15e
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
tests/syft/grid/messages/setup_msg_test.py
rejected_duplicate
Near-duplicate of sample 7622
true
[ { "role": "user", "content": "Write python code for the following: Test that the output format adapter works with Django" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom chatterbot.ext.django_chatterbot.models import Statement\n\n\nclass OutputIntegrationTestCase(Tes...
python
new_file
1
1
bsd-3-clause
d6d4601a5a1238cf7d2f0a6bdf782a77318d28a3
vkosuri/ChatterBot,Reinaesaya/OUIRL-ChatBot,maclogan/VirtualPenPal,gunthercox/ChatterBot,davizucon/ChatterBot,Gustavo6046/ChatterBot,Reinaesaya/OUIRL-ChatBot
tests_django/integration_tests/test_output_adapter_integration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add trace log stats extractor" }, { "role": "assistant", "content": "\nimport re\nimport sys\n\nfrom collections import Counter\n\ndef oneof(strs):\n return \"(?:%s)\" % \"|\".join(strs)\n\nBRIDGE_REGEX = r\"# bridge out of Gu...
python
new_file
1
3
mit
8aa36c52a2a2e3e24b5d36251416ecd4a9aba0f1
samth/pycket,magnusmorton/pycket,magnusmorton/pycket,magnusmorton/pycket,pycket/pycket,pycket/pycket,pycket/pycket,cderici/pycket,cderici/pycket,samth/pycket,cderici/pycket,samth/pycket
utils/logstats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove context from Request to_dict, add Request from_dict" }, { "role": "assistant", "content": "import unittest\n\nfrom pkg_resources import require\n\nfrom malcolm.core.wscomms.wsservercomms import WSServerComms\n\nrequire(\"m...
python
new_file
3
1
apache-2.0
06804a64167ee09a7cf9c1681267223b2ce187e2
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
tests/test_core/test_wsservercomms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_nova_api_docs_tracker\n----------------------------------\n\nTests for `nova_api_docs_tracker` module.\n\"\"\"\n\nimport unittest\n\nfrom nova_api_docs_tracker import nova_api_d...
python
edit
3
1
apache-2.0
44023406197bd9271afd60405e323503ce6963a1
missaugustina/nova-api-docs-tracker,missaugustina/nova-api-docs-tracker,missaugustina/nova-api-docs-tracker,missaugustina/nova-api-docs-tracker
tests/test_nova_api_docs_tracker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write test for core module of cupy" }, { "role": "assistant", "content": "import unittest\n\nimport cupy\nfrom cupy.core import core\n\n\nclass TestGetSize(unittest.TestCase):\n\n def test_none(self):\n self.assertEqual...
python
new_file
1
1
mit
60edb041e6096f37cc451acb77a44f421c37d910
delta2323/chainer,AlpacaDB/chainer,benob/chainer,okuta/chainer,niboshi/chainer,benob/chainer,muupan/chainer,hvy/chainer,t-abe/chainer,chainer/chainer,kiyukuta/chainer,cupy/cupy,muupan/chainer,AlpacaDB/chainer,ktnyt/chainer,anaruse/chainer,jnishi/chainer,ysekky/chainer,wkentaro/chainer,t-abe/chainer,chainer/chainer,jnis...
tests/cupy_tests/core_tests/test_core.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add working test for minimal income adjustment functionality" }, { "role": "assistant", "content": "from django.test import SimpleTestCase\nfrom ...profile_data.indicators import (\n IncomeAdjustments,\n)\nfrom collections imp...
python
new_file
1
1
mit
5b9d718cd02581659a8ab65c399ecf02884ae28c
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
scorecard/tests/indicators/test_income_adjustments.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a driver for Ciena SAOS devices\n\nCiena carrier ethernet devices - previous Worldwide Packets" }, { "role": "assistant", "content": "\"\"\"\nA driver for Ciena SAOS carrier ethernet devices\n\"\"\"\nimport re\nfrom Exscript....
python
new_file
1
2
mit
7279b4f4a96472cd78bfb645b8c6d0aac4290fd7
knipknap/exscript,maximumG/exscript,knipknap/exscript,maximumG/exscript
Exscript/protocols/drivers/cienasaos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for options module" }, { "role": "assistant", "content": "from nose2 import options\nfrom nose2.compat import unittest\n\n\nclass TestMultipassOptionParser(unittest.TestCase):\n\n def setUp(self):\n self....
python
new_file
2
1
bsd-2-clause
f65eb2c5e3b07775285c231e5c211ef6739ac51a
little-dude/nose2,leth/nose2,ezigman/nose2,ptthiem/nose2,little-dude/nose2,leth/nose2,ojengwa/nose2,ojengwa/nose2,ptthiem/nose2,ezigman/nose2
nose2/tests/unit/test_options.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom os import path\n\nfrom pal.services.service import Service\nfrom pal.services.service import wrap_response\n\n\ndef get_jokes():\n file_path = path.realpath(path.join(path.dirname(__file__),\n ...
python
edit
1
3
bsd-3-clause
b612c3703a3b1581bfc7826f1e29a3b6053f0f4e
Machyne/pal,Machyne/pal,Machyne/pal,Machyne/pal
pal/services/joke_service.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement script to make TRIPS ontology" }, { "role": "assistant", "content": "import os\nimport sys\nimport xml.etree.ElementTree as ET\nfrom rdflib import Graph, Namespace, Literal\n\n\ntrips_ns = Namespace('http://trips.ihmc.u...
python
new_file
4
5
bsd-2-clause
b8598cf14e2c9d0be404082c0761b4abecf7f97d
sorgerlab/bioagents,bgyori/bioagents
bioagents/resources/make_trips_ontology.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add script to move files (move this out of MetaControl)" }, { "role": "assistant", "content": "import os\nimport subprocess\n\nclass MoveFiles:\n\n def __init__(self, rule, copy):\n \"\"\"\n Move audiofiles to th...
python
new_file
8
11
mit
b13c4be2c839618a91d199ad941411d70214e9bd
hidat/audio_pipeline
audio_pipeline/tb_ui/model/MoveFiles.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for object state" }, { "role": "assistant", "content": "\"\"\"Test Object State Module\"\"\"\n\nimport unittest\nimport ggrc.app # noqa pylint: disable=unused-import\nfrom ggrc.models import all_models\n\n\nclass T...
python
new_file
1
3
apache-2.0
7a09d36448d646e29c8d0aeeb7c39df2d20885ab
selahssea/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core
test/unit/ggrc/models/test_states.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple tests for pipelines." }, { "role": "assistant", "content": "from twisted.internet import defer\nfrom twisted.internet.defer import Deferred\nfrom twisted.trial import unittest\n\nfrom scrapy import Spider, signals, Req...
python
new_file
1
1
bsd-3-clause
5980d3bbff67d060a1a1b15372293ced972dbe8b
pawelmhm/scrapy,scrapy/scrapy,pawelmhm/scrapy,scrapy/scrapy,elacuesta/scrapy,dangra/scrapy,eLRuLL/scrapy,eLRuLL/scrapy,elacuesta/scrapy,eLRuLL/scrapy,elacuesta/scrapy,pablohoffman/scrapy,starrify/scrapy,dangra/scrapy,pawelmhm/scrapy,starrify/scrapy,scrapy/scrapy,dangra/scrapy,pablohoffman/scrapy,pablohoffman/scrapy,sta...
tests/test_pipelines.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add node to convert BNI trajectories (e.g. from SpiralCoords) to BART trajectories." }, { "role": "assistant", "content": "# Author: Ashley Anderson III <<EMAIL>>\n# Date: 2016-01-25 13:58\n\nimport numpy as np\nimport gpi\n\ncla...
python
new_file
3
3
bsd-3-clause
c4f1a3dd38e83c799dcd505f81b9b14308331cb6
nckz/bart,nckz/bart,nckz/bart,nckz/bart,nckz/bart
gpi/BNI2BART_Traj_GPI.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration tests for SSL security provider" }, { "role": "assistant", "content": "from . import base\n\n\nclass SSLTestCase(base.IntegrationTestCase):\n '''RabbitMQ integration test case.'''\n CTXT = {\n 'plugin...
python
new_file
1
0
bsd-3-clause
fadde85c5dac5509e1497aeaee97100cc9f5b3bd
rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective
tests/integration/test_with_ssl.py
rejected_duplicate
Near-duplicate of sample 5343
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim:fileencoding=utf-8:noet\n\nfrom powerline.renderer import Renderer\nfrom powerline.colorscheme import ATTR_BOLD, ATTR_ITALIC, ATTR_UNDERLINE\n\nfrom xmlrpclib import escape as _escape\n\n\nclass PangoMarkupRenderer(Renderer):\n\t'''Po...
python
edit
1
12
mit
66cdb36231ff1192a8a2e6b15c4b8d524cfbff6d
dragon788/powerline,xxxhycl2010/powerline,cyrixhero/powerline,s0undt3ch/powerline,S0lll0s/powerline,EricSB/powerline,prvnkumar/powerline,blindFS/powerline,QuLogic/powerline,lukw00/powerline,dragon788/powerline,firebitsbr/powerline,Liangjianghao/powerline,DoctorJellyface/powerline,wfscheper/powerline,wfscheper/powerline...
powerline/renderers/pango_markup.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: XenAPI: Add script to destroy cached images.\n\nOperations will want the ability to clear out cached images when\ndisk-space becomes an issue.\n\nThis script allows ops to clear out all cached images or just cached\nimages that aren't in cur...
python
new_file
3
2
apache-2.0
8b847215c2ae071a4a2e402167e20fdd641b222d
emonty/oslo-hacking,zancas/hacking,zancas/hacking,emonty/oslo-hacking,hyakuhei/cleantox,hyakuhei/cleantox,openstack-dev/hacking,openstack-dev/hacking
xenserver/destroy_cached_images.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set up contextmanager for db cals" }, { "role": "assistant", "content": "# muddersOnRails()\n# Sara McAllister November 5, 2-17\n# Last updated: 11-5-2017\n\n# library for SQLite database calls for teamwork analysis app\n\nimport...
python
new_file
1
2
mit
0aaed7764d743afe46af503fe5938fa718fe3abc
nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis,nathanljustin/teamwork-analysis
teamworkApp/lib/dbCalls.py
rejected_duplicate
Near-duplicate of sample 6628
true
[ { "role": "user", "content": "Write python code for the following: Add \"RGB\" colorspace volume computation example." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nShowcases RGB colourspace volume computations.\n\"\"\"\n\nfrom __future__ import ...
python
new_file
1
0
bsd-3-clause
dd9b7efa6e1255a26ae05ccab8e7ed19ac83961b
colour-science/colour
colour/examples/volume/examples_rgb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add small script for calculating shock retrieval times" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport requests\nimport time\nimport sys\nfrom pymongo.mongo_client import MongoClient\n\n\nMONGO_DB = 'ws_tes...
python
new_file
6
7
mit
11c8b8c7e7e6a57148533ec6f9af138c4164d518
kbase/workspace_deluxe,MrCreosote/workspace_deluxe,kbase/workspace_deluxe,MrCreosote/workspace_deluxe,MrCreosote/workspace_deluxe,kbase/workspace_deluxe,MrCreosote/workspace_deluxe,kbase/workspace_deluxe,kbase/workspace_deluxe,kbase/workspace_deluxe,kbase/workspace_deluxe,MrCreosote/workspace_deluxe,MrCreosote/workspac...
performance/us/kbase/workspace/performance/workspace/get_from_shock.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add test of empty geometry collection creation.\n\ngit-svn-id: 1a8067f95329a7fca9bad502d13a880b95ac544b@1599 b426a367-1105-0410-b9ff-cdf4ab011145" }, { "role": "assistant", "content": "import unittest\nfrom shapely.geometry.colle...
python
new_file
1
1
bsd-3-clause
e2caa28af50b5c053b8da248c3b05b3a3bb33be0
mindw/shapely,mouadino/Shapely,mouadino/Shapely,mindw/shapely,abali96/Shapely,jdmcbr/Shapely,jdmcbr/Shapely,abali96/Shapely
shapely/tests/test_collection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function to plot spanwise pressure" }, { "role": "assistant", "content": "\"\"\"\nPlotting functions.\n\"\"\"\n\nimport matplotlib.pyplot as plt\nfrom .processing import *\n\n\ndef plot_spanwise_pressure(ax=None):\n \"\"\"...
python
new_file
3
2
mit
295772657e61edf0dc10b3c5206248c6bfb6273f
petebachant/actuatorLine-3D-turbinesFoam,petebachant/actuatorLine-3D-turbinesFoam,petebachant/actuatorLine-3D-turbinesFoam,petebachant/NACA0020-3D-OpenFOAM,petebachant/NACA0020-3D-OpenFOAM,petebachant/NACA0020-3D-OpenFOAM
py_naca0020_3d_openfoam/plotting.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for time units methods." }, { "role": "assistant", "content": "from nose.tools import assert_equal\n\nfrom pymt.framework.bmi_bridge import _BmiCap\n\n\nclass SimpleTimeBmi():\n def get_time_units(self):\n ret...
python
new_file
1
1
mit
57c55df6e848b7e43cc306ae9ae05363de766df9
csdms/pymt,csdms/coupling,csdms/coupling
pymt/framework/tests/test_bmi_time_units.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a small utility for testing to update an event" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom ci import models\nfrom optparse import make_option\nimport json, random\nfrom ci ...
python
new_file
1
6
apache-2.0
2cc323c72d296c3264ed90f3f404c1e9d04f5575
idaholab/civet,brianmoose/civet,idaholab/civet,idaholab/civet,brianmoose/civet,brianmoose/civet,brianmoose/civet,idaholab/civet
ci/management/commands/update_event.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add spacewalk runner command parsing tests" }, { "role": "assistant", "content": "\"\"\"\nUnit tests for Spacewalk runner\n\"\"\"\nimport salt.runners.spacewalk as spacewalk\nfrom tests.support.mock import Mock, call, patch\n\n\n...
python
new_file
1
1
apache-2.0
8a48b9517a844a426319f584ea27ba341d79c8b0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/unit/runners/test_spacewalk.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights deposit profit problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Deposit Profit Problem\n\n\ndef depositProfit(deposit, rate, threshold):\n years = 0\n while deposit < t...
python
new_file
1
3
mit
8a58e8052c2873181278100de575a24392fe0299
HKuz/Test_Code
CodeFights/depositProfit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights prime sum problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Prime Sum Problem\n\n\ndef primeSum(a, b):\n return sum(filter(lambda p: p > 1 and all(p % n for n in\n ...
python
new_file
1
3
mit
696c9f81590eff6a127eed91257517cb0e37c81c
HKuz/Test_Code
CodeFights/primeSum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for triggering Buildbucket builds\n\nBUG=493885\nTESTED=See https://paste.googleplex.com/5622248052359168\n\nReview URL: https://codereview.chromium.org/1164363003\n\ngit-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@295569 4ff...
python
new_file
2
4
bsd-3-clause
5f0788be20bad0cef4a31a88b7513da58822a157
duongbaoduy/gtools,mlufei/depot_tools,aleonliao/depot_tools,azunite/chrome_build,azunite/chrome_build,disigma/depot_tools,hsharsha/depot_tools,chinmaygarde/depot_tools,kaiix/depot_tools,fracting/depot_tools,disigma/depot_tools,fracting/depot_tools,mlufei/depot_tools,aleonliao/depot_tools,ajohnson23/depot_tools,mlufei/d...
buildbucket.py
rejected_duplicate
Near-duplicate of sample 10240
true
[ { "role": "user", "content": "Write python code for the following: Add functional tests for add & remove router interface\n\nChange-Id: If0616ebd088d3840ca09fbc95494f455b85c1967" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# ...
python
new_file
1
1
apache-2.0
58f8c6b28014122fc8dcd8ec41e3dd817de2e017
stackforge/python-openstacksdk,briancurtin/python-openstacksdk,dudymas/python-openstacksdk,dudymas/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,mtougeron/python-openstacksdk,mtougeron/python-openstacksdk,openstack/python-openstacksdk,openstack/python-opensta...
openstack/tests/functional/network/v2/test_router_add_remove_interface.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add DB migration to remove unique on TalkGroup dec_id" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.6 on 2017-03-05 21:36\nfrom __future__ import unicode_literals\n\nfrom django.db impo...
python
new_file
1
0
mit
0d9656bf5031f3a4d393bf81f8322909ba48110b
ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player
radio/migrations/0026_auto_20170305_1336.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add placeholder for gwas catalog coverage" }, { "role": "assistant", "content": "# ------------------------------------------------\n# built-ins\nimport unittest\n\n# local\nfrom utils.base import TestPostgapBase\n# -------------...
python
new_file
1
1
apache-2.0
33282c65743c86cbad38160b801e7155ab16c60f
Ensembl/cttv024,Ensembl/cttv024
tests/data_checks/test_gwas_catalog_coverage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration test for sts regionalization" }, { "role": "assistant", "content": "# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")....
python
new_file
3
1
apache-2.0
7f0086f966a2403fb8c653b5f897b73ab1fc4b88
pplu/botocore,boto/botocore
tests/integration/test_sts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove PyPy 2 as well." }, { "role": "assistant", "content": "import jpype\nimport jpype.imports\njpype.startJVM()\n\nfrom java.util.jar import JarOutputStream\nfrom java.util.jar import JarInputStream\nfrom java.util.jar import ...
python
new_file
3
0
apache-2.0
3dd7ba37476322a68a5488aab0eabe8f2cf88ec6
originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype
project/utility/alter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: migrations: Add migration to set default of can_remove_subscribers_group.\n\nThis migration sets can_remove_subscribers_group value to admins system\ngroup for all the existing streams. In further commit we would change\ncan_remove_subscribe...
python
new_file
1
2
apache-2.0
c9c230c2da15fcef5352a67018f43a445caa5c35
rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,andersk/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,rht/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,zulip/zulip,rht/zulip,andersk/zulip,zulip/zulip,zulip/zulip,andersk/zulip,andersk/zulip
zerver/migrations/0409_set_default_for_can_remove_subscribers_group.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 'dtool copy' functional test" }, { "role": "assistant", "content": "\"\"\"Test the ``dtool dataset copy`` command.\"\"\"\n\nimport os\n\nfrom click.testing import CliRunner\n\nfrom dtoolcore import DataSet, ProtoDataSet\n\nfr...
python
new_file
3
1
mit
dec55dcd877f026ce38c728df0bdcb26ac89f361
jic-dtool/dtool-create
tests/test_dtool_dataset_copy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a templatetag to display markdown" }, { "role": "assistant", "content": "import bleach\nimport markdown\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\nALLOWED_T...
python
new_file
1
2
mit
197c0fc802bd6936790500339fa64cbded18ab46
letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click
letsmeet/main/templatetags/rich_text.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for session" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# coding=utf-8\n\ntry:\n import unittest.mock as mock\nexcept ImportError:\n import mock\nimport unittest\ntry: \n from StringIO i...
python
new_file
3
1
mit
35f267249955b4c09cbf4432e452dc987488454e
sait-berkeley-infosec/pynessus-api
tests/test_session.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 566. Reshape the Matrix\n\n566. Reshape the Matrix: https://leetcode.com/problems/reshape-the-matrix/" }, { "role": "assistant", "content": "from operator import add\nclass Solution(object):\n def matrixRes...
python
new_file
2
3
apache-2.0
c98c9f11d886885110bf6a832595f5a814fa65b9
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/reshape-the-matrix.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for AWS Product Advertising API" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n'''\nAmazon Product Advertising API Client\n'''\nfrom xml.etree import ElementTree\nimport urllib.parse\nimport dewpoint.a...
python
new_file
1
2
bsd-2-clause
11f78d16c22a3bdf56ffaf87f68eb226e418140d
JeremyGrosser/dewpoint
examples/aws_product_advertising.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to run server" }, { "role": "assistant", "content": "# -*- coding: UTF-8 -*-\nfrom picar import app\n\n\nif __name__ == '__main__':\n app.run(debug=True, host='0.0.0.0', port=8080, master=True, processes=1)\n" } ]
python
new_file
1
0
apache-2.0
04c786d973bdeb99e0e327ec1f0ebb377fb139e0
lukaszo/picar_worhshop,lukaszo/picar_worhshop,lukaszo/picar_worhshop,lukaszo/picar_worhshop
run_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add APT plugin to alert of Debian security updates" }, { "role": "assistant", "content": "from sauna.plugins import Plugin, PluginRegister\n\nmy_plugin = PluginRegister('Apt')\n\n\n@my_plugin.plugin()\nclass AptPlugin(Plugin):\n\...
python
new_file
1
7
bsd-2-clause
2cbf4c844bb2fc92504aa60a448265fc5c291e9f
NicolasLM/sauna,NicolasLM/sauna
sauna/plugins/ext/apt.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add more time to mqtt.test.client" }, { "role": "assistant", "content": "import time\nfrom django.test import TestCase\n\nfrom django.contrib.auth.models import User\nfrom django.conf import settings\n\nfrom rest_framework.render...
python
new_file
30
1
bsd-3-clause
c8c439b92e3f466da58ab1a0c2b8ff3bf9242bf4
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
mqtt/tests/test_client.py
rejected_lint
Too many lint violations: 30
true
[ { "role": "user", "content": "Write python code for the following: Create the Account Detail Page - Part II > New Account - Create Form" }, { "role": "assistant", "content": "from django import forms\n\nfrom .models import Account\n\nclass AccountForm(forms.ModelForm):\n class Meta:\n ...
python
new_file
1
0
mit
ff3a6b35e85058c711a056401b7c3e2d7c7b1260
deenaariff/Django,tabdon/crmeasyapp,tabdon/crmeasyapp
crmapp/accounts/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add disk space healthcheck test" }, { "role": "assistant", "content": "import unittest\nimport mock\n\nfrom cla_public.apps.base import healthchecks\n\n\nclass DiskSpaceHealthcheckTest(unittest.TestCase):\n @mock.patch('os.sta...
python
new_file
1
1
mit
80ea3719a01f8e3017796fbcb075fc5d21ed8bc5
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/apps/base/tests/test_healthchecks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test module for SampleExpectationsDatasetProfiler\n\n- add test__find_next_low_card_column" }, { "role": "assistant", "content": "import json\nimport os\nfrom collections import OrderedDict\n\nimport pytest\nfrom six import P...
python
new_file
15
1
apache-2.0
d230a6bdb62a5c6e70dbc57921478f7fb224b534
great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations
tests/profile/test_SampleExpectationsDatasetProfiler.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Write python code for the following: Add example tests for \"load_html_string()\" and \"set_content()\"" }, { "role": "assistant", "content": "import pytest\r\nfrom seleniumbase import BaseCase\r\n\r\n\r\n@pytest.mark.offline # Can be run with: \"pytest -m offline\...
python
new_file
1
1
mit
3850f29d7dc53ffa53a7f08e0ea96d174259273f
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
examples/offline_examples/load_html_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first version of genome merge pipeline" }, { "role": "assistant", "content": "import os\nimport luigi\nimport json\nimport subprocess\n\nfrom support import merge_fasta as mf\n\n# add parent directory to path\nif __name__ == ...
python
new_file
6
4
apache-2.0
7dd898309e81feb686220757a740b6b7b934462d
Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production
pipelines/genome_merge.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Set up edit service serializers" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.6 on 2017-05-05 18:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models...
python
new_file
1
0
mit
4a7f47bec8c3089df988ffcf03a27fb2225b2259
Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform
services/migrations/0008_auto_20170505_1805.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Define a first concept of the backend API" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# This file is part of TinyIDS.\n#\n# TinyIDS is a distributed Intrusion Detection System (IDS) for Unix systems. \n#\...
python
new_file
1
6
apache-2.0
b7fac69907e004d02554ccf0f151c7247d464c1b
rafaelang/tinyids
src/TinyIDS/collector.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add combined string formatting test" }, { "role": "assistant", "content": "a = \"well\"\nb = \"seems to work\"\nc = \"something else\"\nd = 10\nf = 15\n\ns = \"%s: %d, %s: %d, %s: %d\" % (a, d, b, f, c, d)\nprint s\n" } ]
python
new_file
2
0
mit
f9efd374d11faf709e37bbee05d4735ab94c4b46
mattpap/py2js,buchuki/pyjaco,chrivers/pyjaco,buchuki/pyjaco,buchuki/pyjaco,mattpap/py2js,qsnake/py2js,chrivers/pyjaco,chrivers/pyjaco,qsnake/py2js
tests/strings/string_format_combined_simple.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional test for listing profile_type\n\nThis patch adds a functional test case for listing Senlin profile\ntypes.\n\nChange-Id: I2510e3d0d7d3b9a216019dc1fda6aebe4a25e2fd" }, { "role": "assistant", "content": "# Licensed u...
python
new_file
1
1
apache-2.0
eba23f8dc96e9f14a27b813313f579b6b9146f09
openstack/senlin,Alzon/senlin,Alzon/senlin,openstack/senlin,stackforge/senlin,tengqm/senlin-container,stackforge/senlin,openstack/senlin,tengqm/senlin-container
senlin/tests/functional/test_profile_type.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Split the blast search functionality from the compare feature to compartmentalize time heavy features." }, { "role": "assistant", "content": "import os\nimport re\nimport sets\nimport glob\nimport logging\nimport MySQLdb\nimport ...
python
new_file
15
0
bsd-3-clause
bef7208ea4bbaa26638f8ab22148b2c63fed5a2a
lcoghill/phyloboost,lcoghill/phyloboost,lcoghill/phyloboost
blast-search.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Write python code for the following: ADD script to generate test bench" }, { "role": "assistant", "content": "import sys\nimport os\nimport string\nimport copy\nfrom string import Template\n\nsys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))\nimpor...
python
new_file
2
1
mit
af6f37dd7ccc38d788614a033440a9dafdabb884
CospanDesign/nysa,CospanDesign/nysa
nysa/ibuilder/lib/gen_scripts/gen_sim_tb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a* tree search algorithm using manhattan distance heuristic" }, { "role": "assistant", "content": "\"\"\"\npynpuzzle - Solve n-puzzle with Python\n\nA* tree search algorithm using manhattan distance heuristic\n\nVersion : 1.0...
python
new_file
1
5
mit
e01eb8dd1fa7e79a176cc1017cff0e3b2e619540
mahdavipanah/pynpuzzle
algorithms/a_star_tree_manhattan_distance.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to synthesize all uploaded files. Patch by Dan Callahan." }, { "role": "assistant", "content": "#!/usr/bin/python\n\"\"\"\nThis script touches all files known to the database, creating a skeletal\nmirror for local deve...
python
new_file
4
2
bsd-3-clause
51e04ff17bccb4b71b8d5db4057a782fd2f8520c
techtonik/pydotorg.pypi,techtonik/pydotorg.pypi
tools/touch_all_files.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Create ProcessedDataModels for OCD models, group loading into one cmd" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nLoad data extracted from scrape and raw data snapshot into OCD m...
python
new_file
1
5
mit
29467c4a52bb5caf492460b70cb58caf5fe8f728
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/management/commands/loadocdmodels.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool to update method names." }, { "role": "assistant", "content": "#!/bin/env python3\n\nimport os\nimport re\nimport sys\n\nif len(sys.argv) < 2 :#or sys.argv[1] == \"--help\":\n print(\"rename_code.py <source_code_direc...
python
new_file
1
0
apache-2.0
5e1ec7c300126ddec9976c7441cb255d36c36904
google/ci_edit,google/ci_edit,google/ci_edit
tools/rename_code.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for detailed_object_repr field" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport jsonfield.fields\n\n\nclass ...
python
new_file
3
0
mit
d4522ad74add7848cfddb25bfcab656a7d47730e
jjkester/django-auditlog,johnrtipton/django-auditlog,rauleb/django-auditlog,chris-griffin/django-auditlog,robmagee/django-auditlog,Zmeylol/auditlog,kbussell/django-auditlog
src/auditlog/migrations/0003_logentry_detailed_object_repr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add task to fix created_by for courses without it" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand, CommandError\n\nfrom studygroups.models import Course\nfrom django.contrib.auth.models ...
python
new_file
3
1
mit
944379d74969a17fa85cb05c5541d3d569764097
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
studygroups/management/commands/fix_course_created_by.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test creating letter notification via API" }, { "role": "assistant", "content": "from retry.api import retry_call\nfrom config import Config\n\nfrom tests.postman import (\n send_notification_via_api,\n get_notification_by_...
python
new_file
1
1
mit
306d4a11681ac34e5241059dc165d69725f46472
alphagov/notifications-functional-tests,alphagov/notifications-functional-tests
tests/functional/preview_and_dev/test_notify_api_letter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add preprocessor for codefolding extension\n\nThes preprocessor removes folded lines in codecells as defined by the\ncell metadata" }, { "role": "assistant", "content": "\"\"\"This preprocessor removes lines in code cells that ha...
python
new_file
3
7
bsd-3-clause
13b5e76f80bf3364e1609e97970117c7b980c359
andyneff/IPython-notebook-extensions,benvarkey/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,davande/IPython-notebook-extensions,jbn/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,motleytech/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions,andyneff/IPython-notebook-exte...
usability/codefolding/codefoldingpreprocessor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tag EC2 dependencies Lambda Python code." }, { "role": "assistant", "content": "'''\nCopyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\")....
python
new_file
3
12
apache-2.0
c0d2550e4cfb647b21e6fdde9705fe6e4a76a2df
rsavordelli/aws-support-tools,rsavordelli/aws-support-tools,rsavordelli/aws-support-tools,rsavordelli/aws-support-tools,rsavordelli/aws-support-tools,rsavordelli/aws-support-tools
Lambda/Functions/TagEC2Dependencies/tag_ec2_dependencies.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add script to read file and generate abuse" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\nimport random\n\nfrom abuse.parse import parse\nfrom abuse.generate import generate\nfrom abuse.generate impor...
python
new_file
2
1
bsd-2-clause
2263af5f5aad3c787e566a629bf8ab6b1a1a36d6
mwilliamson/abuse,mwilliamson/abuse
generate-abuse.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the Freenode module to contrib." }, { "role": "assistant", "content": "import logging\n\nfrom kitnirc.modular import Module\n\n\n_log = logging.getLogger(__name__)\n\n\nclass FreenodeModule(Module):\n \"\"\"A KitnIRC modul...
python
new_file
1
2
mit
16104da5676ea7f62bd85c69df9afe5305125c79
ayust/kitnirc
kitnirc/contrib/freenode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to sort graphics" }, { "role": "assistant", "content": "import os, shutil\n\ndef copyFile(src, dest):\n try:\n shutil.copy(src, dest)\n # eg. src and dest are the same file\n except shutil.Error as e:\n...
python
new_file
1
3
mit
81467f6cfd238dcfea5b4c60954bb8584f5d659d
marsbard/puppet-alfresco,marsbard/puppet-alfresco,digcat/puppet-alfresco,digcat/puppet-alfresco,marsbard/puppet-alfresco,marsbard/puppet-alfresco,digcat/puppet-alfresco,digcat/puppet-alfresco,marsbard/puppet-alfresco,digcat/puppet-alfresco
files/scripts/replacefilesinalfresco.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add @njk345's initial work on networktables" }, { "role": "assistant", "content": "import time\nfrom networktables import NetworkTables\n\nrioIP = '10.58.06.2' #this shouldn't change\ntableName = 'JetsonToRio' #should be same in ...
python
new_file
1
0
mit
bf7f3dfa737c01a441064d4dad0be3978fe1e2c5
frc5806/Steamworks,frc5806/Steamworks,frc5806/Steamworks,frc5806/Steamworks
jetson/networkTable.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add read soft dog data function.\n\nSigned-off-by: Yunchao Chen <<EMAIL>>" }, { "role": "assistant", "content": "from ctypes import *\n\nSOFT_DOG_DATA_SIZE = 256\nSOFT_DOG_LIBRARY = \"win32dll.dll\"\n\ndef LOGE(message):\n\tprint...
python
new_file
4
4
mit
9f087d3a25839719b080ed1170084196a8e476bd
iiiCode/network-diagnostic-tools
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Drop is_enabled column from people table" }, { "role": "assistant", "content": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICE...
python
new_file
1
1
apache-2.0
3512a5cf05a1063375ad394d79ce6824fe4c66ef
andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,prasannav7/ggrc-core,prasannav7/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,selahssea/ggrc-core,hasanalom/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,...
src/ggrc/migrations/versions/20150611124244_1d1e9807c46c_drop_is_enabled_column.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Refactor location of tests for login_manager.py" }, { "role": "assistant", "content": "# !/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom project.tests.base import UtilsTestCase\nimport base64\nimport project.home.login_manager as...
python
new_file
1
1
mit
bb1ce3c92de3ad1390034db2c916d1b82e65c70c
andreffs18/flask-template-project,andreffs18/flask-template-project,andreffs18/flask-template-project
project/user/tests/test_login_manager.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create form widget multiple upload" }, { "role": "assistant", "content": "from django import forms\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\n\n\nclass MultipleUpload(forms.FileInput):...
python
new_file
1
2
mit
39b771089507b6c510837808018125f0e6adf611
jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,jeanmask/opps
opps/images/widgets.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ADD Network setup unit tests" }, { "role": "assistant", "content": "\n\ndef test_initial_setup(client):\n result = client.post(\"/setup/\", data={\"setup\": \"setup_configs_sample\"})\n assert result.status_code == 200\n ...
python
new_file
1
1
apache-2.0
a91523943d6fb6790e91c3b348ab665c9b63c608
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
apps/network/tests/test_routes/test_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add failing test for missing About You section on review page when on passported benefits" }, { "role": "assistant", "content": "from collections import defaultdict\nimport logging\nimport unittest\n\nfrom bs4 import BeautifulSou...
python
new_file
1
3
mit
dee765818c054959a663f31c82ac34bcc908739f
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/apps/checker/tests/test_review_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Jenkins jobs per Github repository" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nCreate Jenkins job corresponding to each Github repository.\n\"\"\"\n\nimport os\nimport getpass\nimport github3\ni...
python
new_file
2
5
mit
1a8e623e13323187dc6b40a7358d6293d4f39706
stain/github2jenkins
github2jenkins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 658. Find K Closest Elements\n\n658. Find K Closest Elements: https://leetcode.com/problems/find-k-closest-elements/" }, { "role": "assistant", "content": "class Solution(object):\n def findClosestElements(...
python
new_file
1
9
apache-2.0
971958a489f61920911b5d44f9491fa163017069
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/find-k-closest-elements.py
accepted
null
true