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: [AC-6187] Add migration for image field" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.8 on 2018-12-17 21:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations...
python
new_file
1
0
mit
384e6ffcef5844b451dccd2fedbfdaef38851e1e
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0029_add_help_text_on_image_field.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for injecting InChI keys and string (and others)" }, { "role": "assistant", "content": "import CoolProp\nfrom chemspipy import ChemSpider\nfrom chemspipy_key import key # private file with the key (DO NOT COMMIT!!)\nim...
python
new_file
4
1
mit
a2a7197834dab6cbdd1d402f10382a6a3514af8f
JonWel/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,dcprojects/CoolProp,JonWel/CoolProp,DANA-Laboratory/CoolProp,JonWel/CoolProp,JonWel/CoolProp,CoolProp/CoolProp,DANA-Laboratory/CoolProp,henningjp/CoolProp,CoolProp/CoolProp,DANA-Laboratory/CoolProp,JonWel/CoolProp,dcprojects/CoolProp,henningjp/CoolProp,JonWel/CoolProp...
dev/scripts/inject_InChI.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Make validation and test separate scripts" }, { "role": "assistant", "content": "import sys\nimport torch\nimport visdom\nimport argparse\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvi...
python
new_file
3
7
mit
8389b23b3eefa3a4eeb84fa58837271ea1548514
meetshah1995/pytorch-semseg,hzh8311/project,ibadami/pytorch-semseg
validate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update photo and album models for non-required fields" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrat...
python
new_file
1
0
mit
f0c0edcbb6d88cb9f7215c16128dd2471ee16789
jesseklein406/django-imager,jesseklein406/django-imager,jesseklein406/django-imager
imagersite/imager_images/migrations/0004_auto_20150728_1555.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add random script for renaming toutv files" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# coding=utf8\n\nfrom enum import Enum\nimport os\nimport os.path\nimport re\nimport sys\n\ndef main():\n VideoTypes = En...
python
new_file
1
9
mit
d4f6de5bf5fc7ccf2d50d90f7e3b9b43b2715aff
bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile
python/misc/toutv-rename.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cumulative 60 module (L2)" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport json\nimport zmq\nimport zconfig\nimport zutils\n\n\ndef main():\n logger = zutils.getLogger(__name__)\n\n ctx = zmq.Cont...
python
new_file
1
5
mit
12281dbedc0bd43ef4b85b936cb662f5092d8a72
mangalaman93/pstickle
cum60.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [svn] Add a reminder to write a HTML formatter test.\n\n--HG--\nbranch : trunk" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\n Pygments HTML formatter tests\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n :c...
python
new_file
7
1
bsd-2-clause
c8af96f89ca218c0c49b90b39fe6ea4339e39321
aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygments,aswinpj/Pygmen...
tests/test_html_formatter.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test for librato uptime" }, { "role": "assistant", "content": "import os\nimport sys\nimport unittest\nimport json\n\nsys.path.insert(0, os.path.abspath('./situation'))\nsys.path.insert(0, os.path.abspath('./'))\n\nfrom situa...
python
new_file
1
1
mit
ca9a19f721b06b619ffdab5bda1814667294d505
balanced/status.balancedpayments.com,chriskuehl/kloudless-status,chriskuehl/kloudless-status,balanced/status.balancedpayments.com,balanced/status.balancedpayments.com,chriskuehl/kloudless-status
tests/test_librato_uptime.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write tests for the command server" }, { "role": "assistant", "content": "import os\nimport select\nimport socket\nimport time\nimport unittest\n\nfrom jobmon.protocol import *\nfrom jobmon import command_server, protocol, transp...
python
new_file
6
2
bsd-2-clause
aace23c5cd0d420f05affab431c71ff9b384154f
adamnew123456/jobmon
jobmon/test/test_command_server.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Create basic url on opps article" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\nfrom django.conf.urls.defaults import patterns, url\nfrom django.conf.urls import include\n\nfrom opps.art...
python
new_file
1
0
mit
67e0765e3bc98720fbda5febffdd5d4c3b9865ef
williamroot/opps,williamroot/opps,opps/opps,opps/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps
opps/article/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add config file for global user-defined variables" }, { "role": "assistant", "content": "# Additional configuration\n\n# User defined global variables\n\n# Snack calling method\n# Choices are 'exe', 'python', 'tcl'\n# Setting it ...
python
new_file
1
0
apache-2.0
204f195891fa8f071009f0015fb81c280c3c5cbe
voicesauce/opensauce-python,voicesauce/opensauce-python,voicesauce/opensauce-python
userconf.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for dakota.dakota_utils" }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Tests for dakota.dakota_utils module.\n#\n# Call with:\n# $ nosetests -sv\n#\n# Mark Piper (<EMAIL>)\n\nimport os\nfrom n...
python
new_file
15
1
mit
f5d418c229ea240b097c091ceb00d5d07275b56a
csdms/dakota,csdms/dakota
dakota/tests/test_dakota_utils.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 1a" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*- \n\n# Copyright 2014 Fabian M.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo...
python
new_file
1
4
apache-2.0
cc744124bafd3b26cec54d8ef8dc5b08ad7e0f9f
fabianm/olympiad,fabianm/olympiad,fabianm/olympiad
olympiad/christmas_tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add negative test-cases for openstack node create command\n\nChange-Id: Icf7afa131f3cc07c19df88bd254b4aa823c6bef4\nPartial-Bug: #1630288" }, { "role": "assistant", "content": "# Copyright (c) 2016 Mirantis, Inc.\n#\n# Licensed un...
python
new_file
1
2
apache-2.0
411e42feab4d5102cb7f7c591afaa3404fe76912
openstack/python-ironicclient,openstack/python-ironicclient
ironicclient/tests/functional/osc/v1/test_baremetal_node_create_negative.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to aggregate RouteDates and display ranked lists of routes." }, { "role": "assistant", "content": "from collections import defaultdict\nimport sys\nimport django\ndjango.setup()\n\nfrom busshaming.models import RouteDa...
python
new_file
1
10
mit
2f1eb9eda871cd2b7cd0f9300d15cdedab609248
katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming
scripts/generate_bus_ranking.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add configs unit test case\n\nChange-Id: I9a9bb85226059cf6421282d72e4f6b8fd4df7d7f" }, { "role": "assistant", "content": "# Copyright (c) 2015 Intel Corp.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n#...
python
new_file
1
1
apache-2.0
93cee311a2044f52e41596c0e581a7d30926f46c
egafford/sahara,crobby/sahara,openstack/sahara,crobby/sahara,openstack/sahara,crobby/sahara,tellesnobrega/sahara,zhangjunli177/sahara,egafford/sahara,ekasitk/sahara,ekasitk/sahara,tellesnobrega/sahara,zhangjunli177/sahara,ekasitk/sahara,zhangjunli177/sahara
sahara/tests/unit/utils/test_configs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration file to generate certificatesubscription table" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf im...
python
new_file
1
0
mit
8c9cd95e473ded8f9716705a6ef27c420c8f7b8d
gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID
monitors/migrations/0003_certificatesubscription.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add reset_polymorphic_ctype() function to assist with migration to polymorphic" }, { "role": "assistant", "content": "from django.contrib.contenttypes.models import ContentType\n\n\ndef reset_polymorphic_ctype(*models, **filters)...
python
new_file
1
4
bsd-3-clause
11a471ae01b1ad80f090d952a744679aac6d5d15
chrisglass/django_polymorphic,skirsdeda/django_polymorphic,chrisglass/django_polymorphic,skirsdeda/django_polymorphic,skirsdeda/django_polymorphic
polymorphic/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for goto_line" }, { "role": "assistant", "content": "\"\"\"\nThis module tests the text api module (pyqode.core.text)\n\"\"\"\nimport os\nfrom PyQt4 import QtGui\nfrom PyQt4.QtTest import QTest\nimport sys\n\nfrom pyqo...
python
new_file
1
2
mit
9701566d43905d858ab01d82aa414d5b5a93f8f6
pyQode/pyqode.core,pyQode/pyqode.core,zwadar/pyqode.core
test/test_text_api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a mixin form that provides bidirectional m2m fields in the admin" }, { "role": "assistant", "content": "from django.forms import ModelForm\n\n\nclass BidirectionalM2MForm(ModelForm):\n\n bi_m2m_fields = []\n\n def _get_...
python
new_file
1
5
mit
6a4fb5556a03df7863a8ccf5b91f9b0103c0d9bd
kux/django-admin-extend
admin_extend/form_mixins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add iOS api for storage path" }, { "role": "assistant", "content": "'''\niOS Storage Path\n--------------------\n'''\n\nfrom plyer.facades import StoragePath\nfrom pyobjus import autoclass\nimport os\n\nNSFileManager = autoclass(...
python
new_file
1
1
mit
7101b30622f0b1586e6e8a7b6209b2689568fa0a
KeyWeeUsr/plyer,kivy/plyer,KeyWeeUsr/plyer,KeyWeeUsr/plyer,kivy/plyer,kivy/plyer
plyer/platforms/ios/storagepath.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for v3 auth" }, { "role": "assistant", "content": "import puresnmp.auth as auth\n\n\ndef test_password_to_key():\n from hashlib import md5\n\n hasher = auth.password_to_key(md5, 16)\n result = hasher(b\"foo\", ...
python
new_file
1
1
mit
368980d3286237baaaf811e17c2681496ec00f8a
exhuma/puresnmp,exhuma/puresnmp
tests/v3/test_auth.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 662. Maximum Width of Binary Tree\n\n662. Maximum Width of Binary Tree: https://leetcode.com/problems/maximum-width-of-binary-tree/" }, { "role": "assistant", "content": "# Definition for a binary tree node.\n...
python
new_file
1
5
apache-2.0
2ac066511fb7febe0a0dd2f54845e945c639f810
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/maximum-width-of-binary-tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add prob9, night in 9.18" }, { "role": "assistant", "content": "import math\nclass Solution(object):\n def isPalindrome(self, x):\n \"\"\"\n :type x: int\n :rtype: bool\n \"\"\"\n flag = 0\n ...
python
new_file
1
6
apache-2.0
81778bb866ca54f8a138c1f8493d7f98799f3dad
lzhbrian/Leetcode-Python
9_Palindrome_Number.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Return union of two sorted arrays" }, { "role": "assistant", "content": "'''\nIn this module, we implement a function which gets the union\nof two sorted arrays. \n\n'''\n\ndef union_sorted_arrays(arr_1, arr_2):\n\t'''\n\tReturn ...
python
new_file
1
5
mit
bb543c6f53983d59edbc6a522ca10d64efd9c42e
ueg1990/aids
aids/sorting_and_searching/union_sorted_arrays.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for tagging of parameter cells" }, { "role": "assistant", "content": "import unittest\n\nfrom ..api import read_notebook\nfrom ..execute import _parameterize_notebook\nfrom . import get_notebook_path\n\n\nclass TestNote...
python
new_file
1
1
bsd-3-clause
76d1330c2ebe47e3818139e7eaa2bd1dd906c8f5
nteract/papermill,nteract/papermill
papermill/tests/test_parameterize.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to split the dataset" }, { "role": "assistant", "content": "import os\n\nimport numpy as np\n\ndata_dir = \"data/dataset/\"\njpg_filenames = list(filter(lambda x: x[-3:] == \"jpg\", os.listdir(data_dir)))\n\n# Randomly...
python
new_file
1
0
mit
725ada91ff4b15aa97784a21e6cebd02fa2dd55c
SetaSouto/license-plate-detection
split_dataset.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix paper revisions with same submitted dt" }, { "role": "assistant", "content": "\"\"\"Fix future paper revisions\n\nRevision ID: 2963fba57558\nRevises: 098311458f37\nCreate Date: 2017-04-19 12:02:16.187401\n\"\"\"\n\nfrom colle...
python
new_file
1
6
mit
102846c941f2faa229db841ffe5031fa779923f3
pferreir/indico,DirkHoffmann/indico,OmeGak/indico,indico/indico,indico/indico,indico/indico,DirkHoffmann/indico,ThiefMaster/indico,ThiefMaster/indico,mvidalgarcia/indico,mic4ael/indico,mic4ael/indico,mvidalgarcia/indico,mvidalgarcia/indico,ThiefMaster/indico,pferreir/indico,mic4ael/indico,pferreir/indico,mvidalgarcia/i...
indico/migrations/versions/201704191202_2963fba57558_fix_future_paper_revisions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\nfrom pych.extern import Chapel\n\n@Chapel(sfile=\"users.onlyonce.chpl\")\ndef useTwoModules(x=int, y=int):\n return int\n\nif __name__ == \"__main__\":\n print(useTwoModules(2, 4))\n\nimport test...
python
edit
1
1
apache-2.0
095a04c051f966c74909c4e2d3a5cd4aea2e124f
russel/pychapel,russel/pychapel,chapel-lang/pychapel,chapel-lang/pychapel,russel/pychapel,chapel-lang/pychapel
docs/source/examples/test_no_depends_fails.py
rejected_duplicate
Near-duplicate of sample 7228
true
[ { "role": "user", "content": "Write python code for the following: Test codie to get sound duration right" }, { "role": "assistant", "content": "import math\nimport numpy\nimport pyaudio\n\n\ndef sine(frequency, length, rate):\n length = int(length * rate)\n factor = float(frequency) * (ma...
python
new_file
1
1
mit
a7e96f68ad2c222a360ad51d9826268ba2620c9b
rzzzwilson/morse,rzzzwilson/morse
morse_trainer/test_audio.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add state for salt proxy" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport os\nimport logging\n\nlog = logging.getLogger(__name__)\n\n\ndef _proxy_conf_file(proxyfile):\n changes = []\n success = True...
python
new_file
3
3
apache-2.0
f576fc39cd3083cd0a4d441e48dd2942aead9b1b
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/states/salt_proxy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to run Monte Carlo and bootstrap analyses" }, { "role": "assistant", "content": "\"\"\"Run bootstrap analyses\"\"\"\n\nfrom working_functions import *\nimport multiprocessing\n\n# Datasets not included: Cocoli, Sherman...
python
new_file
11
0
mit
fdf1954e677b6a7b1a76ba7dabe1eb2c79e54744
weecology/mete-energy,weecology/mete-energy
run_analyses_bootstrap.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add example for block bar" }, { "role": "assistant", "content": "\"\"\"\n\nThis example demonstrates how to make colorful bars.\n\n\"\"\"\n\nfrom rich.block_bar import BlockBar\nfrom rich.console import Console\nfrom rich.table i...
python
new_file
1
0
mit
f64ce86d1dcf402b68f55c2d6f54a00dbba8a1f5
willmcgugan/rich
examples/colorbars.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the IATI Registry This adds a 200 response and link checks for the IATI Registry" }, { "role": "assistant", "content": "import pytest\nfrom web_test_base import *\n\nclass TestIATIRegistry(WebTestBase):\n urls_to...
python
new_file
5
1
mit
e641a19f16b99425aa1b15bd8524f2612b0d6bab
IATI/IATI-Website-Tests
tests/test_registry.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for channel ready" }, { "role": "assistant", "content": "# Copyright 2020 The gRPC Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance wi...
python
new_file
4
3
apache-2.0
a5503cc64a1ef44048c8aa10e36344508076201c
jtattermusch/grpc,ctiller/grpc,grpc/grpc,jboeuf/grpc,firebase/grpc,ejona86/grpc,firebase/grpc,jboeuf/grpc,vjpai/grpc,jtattermusch/grpc,jtattermusch/grpc,jboeuf/grpc,firebase/grpc,nicolasnoble/grpc,firebase/grpc,nicolasnoble/grpc,vjpai/grpc,firebase/grpc,vjpai/grpc,ejona86/grpc,grpc/grpc,vjpai/grpc,vjpai/grpc,jtattermus...
src/python/grpcio_tests/tests_aio/unit/channel_ready_test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add English assembled mechanism linking questions" }, { "role": "assistant", "content": "import pickle\nfrom indra.tools.incremental_model import IncrementalModel\nfrom indra.mechlinker import MechLinker\nfrom indra.assemblers im...
python
new_file
2
4
bsd-2-clause
adb2b9d8457756bb4484d06b36b8f5b620d2a34c
jmuhlich/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,bgyori/indra,bgyori/indra,jmuhlich/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,sorgerlab/indra,johnbachman/indra,so...
indra/tools/mechlinker_queries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for haralick_features()" }, { "role": "assistant", "content": "import numpy as np\nimport pytest\n\nfrom microscopium import features\n\n\n@pytest.fixture(scope=\"module\", params=[np.uint8, np.float])\ndef haralick...
python
new_file
1
1
bsd-3-clause
98ae7ef4cdb51252733535d2314664333957eda3
jni/microscopium,jni/microscopium,microscopium/microscopium,microscopium/microscopium
tests/test_features.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for running gui filtering tests." }, { "role": "assistant", "content": " \n\"\"\"\nSlow tests for filtering systems\n \n\"\"\"\nimport os\nimport tempfile\nimport shutil\n\nimport numpy as np\n\nfrom . import base\nfr...
python
new_file
4
5
mit
5d4e8bb02dd78f8ba6eb386478f25a6e60c80240
chrisdjscott/Atoman,chrisdjscott/Atoman,chrisdjscott/Atoman,chrisdjscott/Atoman,chrisdjscott/Atoman
atoman/slowtests/test_filtering.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for dns config parsing" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Copyright 2009 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ...
python
new_file
1
1
apache-2.0
6e6f4b2ae0f085a649c1c4c3ebfe9c4aa6be37b1
catap/namebench,jimmsta/namebench-1
libnamebench/config_test.py
rejected_duplicate
Near-duplicate of sample 9226
true
[ { "role": "user", "content": "Write python code for the following: Test that an int arg to grad is okay" }, { "role": "assistant", "content": "from test_util import *\nfrom funkyyak import grad\n\ndef test_int_case():\n check_equivalent((lambda x:x*x)(2.0), 4.0)\n check_equivalent(...
python
new_file
6
1
mit
b8500132def1f7df0daa9b8abb070ae9d49d1a4e
barak/autograd
tests/test_int_case.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add simple eauth via REST" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\nProvide authentication using a REST call\n\nDjango auth can be defined like any other eauth module:\n\n.. code-block:: yaml\n\n ext...
python
new_file
null
null
apache-2.0
82fa78c397d428742883ec8e1cdc94bcd3491ad3
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/auth/rest.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: 1.3.1dev: Add missing file from r15148\n\nRefs #12496.\n\n\ngit-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@15149 af82e41b-90c4-0310-8c96-b1721e28e2e2" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# Copy...
python
new_file
1
1
bsd-3-clause
6cc0dba8901f97a4cc5103c57fbeba9d46a7a514
rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac
trac/api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Consortia Org as new membership type" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.23 on 2020-01-14 09:21\nfrom __future__ import unicode_literals\n\nfrom django.db import migratio...
python
new_file
1
0
mit
c2d4c53b384a4f621ac69a813cf5d1090d6e61bd
ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members
members/crm/migrations/0028_auto_20200114_0921.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new script that downloads data for a date range\n\nBecause this is a date range, we can no longer use localdate (which is a\nfiltering technique).\nInstead we convert to a timestamp and use timestamps instead.\nWe also query using the ...
python
new_file
2
1
bsd-3-clause
c44eb565d167f3c91350da825005067784428440
shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server
bin/debug/extract_timeline_for_day_range_and_user.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Call the python script which is MUCH faster than php gpio" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# http://www.youtube.com/watch?v=Dc16mKFA7Fo\n\nimport time, sys, exceptions\nimport RPi.GPIO as GPIO\n\n\n...
python
new_file
4
4
mit
b2b40ee243b24a39cf9958736d0b2d18dd78417a
theapi/CctvBlindfoldBundle,theapi/CctvBlindfoldBundle,theapi/CctvBlindfoldBundle,theapi/CctvBlindfoldBundle
python/stepper.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add wrapper script to call tool to bulk abandon Gerrit CLs\n\nMakes it easy to invoke https://skia-review.googlesource.com/c/buildbot/+/275096\nfrom the Skia repo\n\nChange-Id: If94d506d86a2b4319c7e0a7c830d5dab27916c10\nReviewed-on: https://...
python
new_file
6
1
bsd-3-clause
1b7f846d096d1b8c36213666b49f2075d3f5fac1
google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/pl...
tools/abandon_gerrit_cls.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Test for ISO NC creator" }, { "role": "assistant", "content": "from posts.nc import *\r\nimport posts.iso\r\n\r\noutput('POST_TEST.txt')\r\n\r\nprogram_begin(123, 'Test program')\r\nabsolute()\r\nmetric()\r\nset_plane(0)\r\n\r\nf...
python
new_file
16
0
bsd-3-clause
df10bd85bcf94aba9661e397960a1cd3b4dd090d
danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc
POST_TEST.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Write python code for the following: Test scenario written by SeleniumBuilder" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom selenium.webdriver.firefox.webdriver import WebDriver\nfrom selenium.webdriver.common.action_chains import ActionChains...
python
new_file
4
2
apache-2.0
fbdf7e53dba142cf45270e63623aea59a4ffecf6
figharo54/python_training
test_add_group.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add missing blank field migration\n\nI forgot to create this migration when adding blank attributes to Target\nfields." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfro...
python
new_file
1
0
apache-2.0
620db37e867b25af25e6e93b90c78c1bd7ce19c3
transformation/utatuav-interop,justineaster/interop,transformation/utatuav-interop,auvsi-suas/interop,justineaster/interop,transformation/utatuav-interop,auvsi-suas/interop,justineaster/interop,transformation/utatuav-interop,justineaster/interop,auvsi-suas/interop,auvsi-suas/interop,transformation/utatuav-interop,trans...
server/auvsi_suas/migrations/0006_target_blank.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create new FeatureDataset class to be used by experiment" }, { "role": "assistant", "content": "import abc\nimport json\nimport datetime\nimport h5py\nimport numpy as np\nfrom pelops.datasets.chip import ChipDataset\n\nclass Feat...
python
new_file
4
9
apache-2.0
b9609a25c80d3f0c28c173bf31fb7968c0474fbe
dave-lab41/pelops,Lab41/pelops,d-grossman/pelops,dave-lab41/pelops,d-grossman/pelops,Lab41/pelops
pelops/datasets/featuredataset.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add openid fix migration script\n\nUsers who previously had a '%20' in their openstackids currently aren't able\nto access their data on RefStack. This is because a '.' has taken the place of\n'%20' in a recent openstack id update. This migr...
python
new_file
1
2
apache-2.0
2d626519e669563c655b885783f9b02946640d21
openstack/refstack,openstack/refstack,stackforge/refstack,stackforge/refstack,stackforge/refstack,openstack/refstack,openstack/refstack,stackforge/refstack
refstack/db/migrations/alembic/versions/434be17a6ec3_fix_openids_with_space.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for CommandChainDispatcher" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Tests for CommandChainDispatcher.\"\"\"\n\nfrom __future__ import absolute_import\n\n#------------------------------...
python
new_file
1
2
bsd-3-clause
aca86345382a3b8d2fd8822e25d44cde4859cb17
ipython/ipython,ipython/ipython
IPython/core/tests/test_hooks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add usage test. Currently failing because expects sets and gets lists." }, { "role": "assistant", "content": "from ccs.icd9 import ICD9\nfrom clinvoc.icd9 import ICD9CM, ICD9PCS\nfrom nose.tools import assert_equals\n\n\ndef tes...
python
new_file
4
3
mit
b3258a47ef9fa657be12687d6e8892360c27ade1
mattlewissf/ccs
test/test_usage.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test script for switching LEDs with Teensy buttons" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nTest buttons by switching LED colors\n\"\"\"\nimport time\n\nfrom octo import Octo\nfrom listener import...
python
new_file
2
1
mit
92049964c334f9367016ed55bdb94d844fd2425d
anroots/teensy-moonica
python/switch_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for basic search" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\n\"\"\"Test helpers\"\"\"\n\n\nimport imaplib\nimport unittest\n\nfrom imap_cli import config\nfrom imap_cli import list_mail\nfrom imap...
python
new_file
1
2
mit
cf2db79a4f1d93ea6015931cdcf58c9e09cc8bfb
Gentux/imap-cli,Gentux/imap-cli
imap_cli/tests/test_search.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test user authentication against service" }, { "role": "assistant", "content": "\"\"\"\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: Revised BSD (see `LICENSE` file for details)\n\"\"\"\n\nfrom pytest import raises\n\nfr...
python
new_file
3
1
bsd-3-clause
f75ece646685ee5f4e876d3dce962dca4859b33a
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
tests/integration/services/authentication/test_authenticate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class for running CLI commands\n\nThis commit adds a module which contains a class for running commands\nwhich will be invoked by the command-line interface." }, { "role": "assistant", "content": "\"\"\"\nThis module defines ...
python
new_file
1
2
apache-2.0
24456b31fc68bf7d8b90c424951eb092ecb72d66
sagelywizard/dlex
client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add tests for example from OGR docs." }, { "role": "assistant", "content": "import unittest\n\nfrom construct import OptionalGreedyRepeater, UBInt8\n\nclass TestOptionalGreedyRepeater(unittest.TestCase):\n\n def setUp(s...
python
new_file
1
1
mit
5364966528139d4f0b4d51db9c72f168547a19c5
MostAwesomeDude/construct,gkonstantyno/construct,0000-bigtree/construct,mosquito/construct,gkonstantyno/construct,riggs/construct,mosquito/construct,MostAwesomeDude/construct,riggs/construct,0000-bigtree/construct
construct/tests/test_repeaters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights even digits only problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Add Border Problem\n\n\ndef evenDigitsOnly(n):\n return sum(map(lambda d: int(d) % 2, str(n))) == 0\n ...
python
new_file
1
3
mit
1a67e1a5b1e6830df0667689a832dea0b9460656
HKuz/Test_Code
CodeFights/evenDigitsOnly.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial basic test for compression" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\nTest database compression functions\n'''\n# Import sorbic libs\nimport sorbic.db\n\n# Import python libs\nimport os\nimpo...
python
new_file
3
3
apache-2.0
ac0fa1df1569f81b0a469f8439cf7f9e916bb208
s0undt3ch/sorbic,thatch45/sorbic
tests/unit/test_compress.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Add a test for TripWire." }, { "role": "assistant", "content": "\"\"\" Testing tripwire module.\n\"\"\"\n\nfrom ..tripwire import TripWire, is_tripwire, TripWireError\n\nfrom nose import SkipTest\nfrom nose.tools import (ass...
python
new_file
5
2
bsd-3-clause
359726a1085b00936e7e7ee3f876b09f72988921
StongeEtienne/dipy,villalonreina/dipy,villalonreina/dipy,nilgoyyou/dipy,FrancoisRheaultUS/dipy,matthieudumont/dipy,StongeEtienne/dipy,nilgoyyou/dipy,matthieudumont/dipy,FrancoisRheaultUS/dipy
dipy/utils/tests/test_tripwire.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to handle posts from r_slimerancher\n\nBased on various app.py fom other channels\nDon't know if that's correct cause I've never done anything in python before xD" }, { "role": "assistant", "content": "#encoding:utf-8\...
python
new_file
1
5
mit
a45dbf6720292ea5052a1da022aece11b3523c1e
Fillll/reddit2telegram,nsiregar/reddit2telegram,nsiregar/reddit2telegram,Fillll/reddit2telegram
channels/r_slimerancher/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Leetcode 246. Strobogrammatic Number\nEasy\n\nURL: https://leetcode.com/problems/strobogrammatic-number/A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).\n\nWrite a function to ...
python
edit
5
3
bsd-2-clause
1a534acf6038b35c8bba125c277d349ec967d5bd
bowen0701/algorithms_data_structures
lc0246_strobogrammatic_number.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to visualize trajectories images and actions" }, { "role": "assistant", "content": "import argparse\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nfrom gui.grid_image_visualizer import GridIm...
python
new_file
1
6
mit
da66d477986b2ddc6c80f7fb0e59c93b2182c576
alexlee-gk/visual_dynamics
visualize_trajectories.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional tests for volume type list\n\nadd tests for `os volume type list`\n\nChange-Id: Icd874b9cfac9376cc410041806fac64f1ff0c59d" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (...
python
new_file
1
1
apache-2.0
149ce526143265d1d265761a9fb57bb66ee7a75a
dtroyer/python-openstackclient,dtroyer/python-openstackclient,BjoernT/python-openstackclient,openstack/python-openstackclient,openstack/python-openstackclient,redhat-openstack/python-openstackclient,redhat-openstack/python-openstackclient,BjoernT/python-openstackclient
functional/tests/volume/v1/test_volume_type.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial code to open agency.txt" }, { "role": "assistant", "content": "import csv\nimport sys\n\n\ndef clean_agency_file(*agencies):\n with open('agency.txt', 'r') as f:\n reader = csv.reader(f)\n next(f)\n ...
python
new_file
1
3
bsd-2-clause
b4292176e1bed76a24a9d1d83a6781c85adea069
sensiblecodeio/diet-gtfs
diet_gtfs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add view for API v1 Root\n\nThis sends back a JSON response contain sites with ID's as well as\ntitle/tagline." }, { "role": "assistant", "content": "from pyramid.view import view_config\n\n\nfrom ....views.finalisecontext import...
python
new_file
1
2
isc
c395da80c02b6c39514fcc46a7b951c71ae2c12b
usingnamespace/usingnamespace
usingnamespace/api/views/v1/root.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to show agency rankings." }, { "role": "assistant", "content": "from collections import defaultdict\nimport sys\nimport django\ndjango.setup()\n\nfrom busshaming.models import Agency, RouteDate, Feed\n\nFEED_SLUG = 'ns...
python
new_file
3
10
mit
8793c14aee7e2fb482a173a8650e2a961ea6cc46
katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming
scripts/generate_agency_ranking.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple interface to store parameters and patterns across python 2 and 3." }, { "role": "assistant", "content": "# Begin: Python 2/3 compatibility header small\n# Get Python 3 functionality:\nfrom __future__ import\\\n abso...
python
new_file
10
4
mit
bbf34e5fc3f1728f889065c252b32f175d63cbe1
pikinder/nn-patterns
nn_patterns/utils/fileio.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport time\nimport logging\n\nfrom cassandra.cqlengine.query import Token\n\nfrom scrapi.database import _manager\nfrom scrapi.processing.cassandra import DocumentModel\n\n_manager.setup()\nlogger = logging.getLogger(__name__)\n\n\ndef doc...
python
edit
1
6
apache-2.0
da16bec07e245e440acea629ad953e4a56085f7e
CenterForOpenScience/scrapi,ostwald/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,felliott/scrapi,icereval/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,erinspace/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi
scripts/util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add config for fuzzing POX proactive mode" }, { "role": "assistant", "content": "\nfrom config.experiment_config_lib import ControllerConfig\nfrom sts.topology import FatTree\nfrom sts.control_flow import Fuzzer\nfrom sts.input_t...
python
new_file
1
1
apache-2.0
c1bec6e99e04785e102d4de1e1a82d8a78d2b9ff
ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts
config/fuzz_pox_proactive.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add permission to read Document and Meeting resources in the Audit context for Auditor role." }, { "role": "assistant", "content": "\n\"\"\"Auditors have document and meeting permissions in audit context.\n\nRevision ID: 1a22bb20...
python
new_file
3
1
apache-2.0
1293197f86e85d346b65f5fb065ce6099031a5d3
uskudnik/ggrc-core,andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,vladan-m/ggrc-core,vladan-m/ggrc-core,hasanalom/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,hyperNURb/ggrc-core,josthkko/ggrc-core,uskudnik/ggrc-core,vladan-m/ggrc-c...
src/ggrc_basic_permissions/migrations/versions/20131210004352_1a22bb208258_auditors_have_docume.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic unit test coverage for BrokerConnection" }, { "role": "assistant", "content": "# pylint: skip-file\nfrom __future__ import absolute_import\n\nfrom errno import EALREADY, EINPROGRESS, EISCONN, ECONNRESET\nimport socket\n...
python
new_file
2
2
apache-2.0
c7bbec07e9b1bd87a48bdae87071b59c0a575153
mumrah/kafka-python,scrapinghub/kafka-python,Yelp/kafka-python,dpkp/kafka-python,wikimedia/operations-debs-python-kafka,DataDog/kafka-python,scrapinghub/kafka-python,wikimedia/operations-debs-python-kafka,ohmu/kafka-python,Aloomaio/kafka-python,zackdever/kafka-python,mumrah/kafka-python,Yelp/kafka-python,dpkp/kafka-pyt...
test/test_conn.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for SYNC producer\n\nTest one-shot SYNC transmission with and without counter value." }, { "role": "assistant", "content": "import unittest\nimport canopen\n\n\nclass TestSync(unittest.TestCase):\n\n def test_syn...
python
new_file
1
1
mit
8fe3932189d483efc72e0d34a9417ffbb34f5809
christiansandberg/canopen,christiansandberg/canopen
test/test_sync.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migrations for artists app" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport model_utils.fields\nimport django.utils.ti...
python
new_file
1
0
bsd-3-clause
32e66fe95a60becdb3e15152f2cea1bad0ac8460
FreeMusicNinja/api.freemusic.ninja
artists/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to plot CFL - needs to be modified" }, { "role": "assistant", "content": "import numpy as np\nfrom matplotlib.pyplot import *\n\nCFL = []\ninFile = open('./log_0_20','r')\nfor line in inFile:\n\tif ('Courant Number me...
python
new_file
8
0
mit
91c36cd8cccae258dc9dfd51415b328eac9bdbbe
mesnardo/snake
scripts/OpenFOAM/plotCFL.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add test for command output" }, { "role": "assistant", "content": "import os\nimport pytest\n\nTEST_URL = str(os.environ.get('TEST_URL'))\nif TEST_URL != 'None' and TEST_URL.strip():\n pass\nelse:\n TEST_URL=\"https://192.168.1...
python
new_file
1
1
mit
908f61e4cc19f0ee1586480389afe494c900154a
wicksy/vagrant-openshift,wicksy/vagrant-openshift,wicksy/vagrant-openshift
test/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add barebones bql query test cases." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2016, MIT Probabilistic Computing Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"...
python
new_file
14
0
apache-2.0
0ffe004cdb15296db20edc0c5bbebe761cad387a
probcomp/bayeslite,probcomp/bayeslite
tests/test_cmi.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Add module symbolic Fourier FA integration" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport itertools\n\nimport numpy as np\nimport sympy as sp\n\ndef dot(es1, es...
python
new_file
2
3
mit
9008062fc37dcc2f4aefe570daf94018b7e76223
rmoehn/cartpole
hiora_cartpole/fourier_fa_int.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for the event server" }, { "role": "assistant", "content": "import os\nimport select\nimport socket\nimport time\nimport unittest\n\nfrom jobmon.protocol import *\nfrom jobmon import event_server, transport\n\nPORT = 9...
python
new_file
11
4
bsd-2-clause
0958e53a8132b168d0adcfad30b56251fb9e7132
adamnew123456/jobmon
jobmon/test/test_event_server.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Move typepad module into a directory so it can be externals-ed" }, { "role": "assistant", "content": "import httplib2\nimport simplejson\nimport logging\nfrom urlparse import urljoin\nimport types\n\n# TODO configurable?\nBASE_UR...
python
new_file
1
6
bsd-3-clause
facf99d88c09dbc1661bfd9a5151d15756ffb901
typepad/python-typepad-api
__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to write cluster HTML files for GtR." }, { "role": "assistant", "content": "from __future__ import print_function\nimport json, os, sys\n\nif __name__ == '__main__':\n if len(sys.argv) < 3:\n print('Usage: gt...
python
new_file
1
0
apache-2.0
4a5bfa4113a25ba128c0ee8d2a75b12e3f0c3e18
ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim
scripts/gtr-pages.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Split some fastq files into smaller files" }, { "role": "assistant", "content": "\"\"\"\nSplit paired end fastq files into different files\n\"\"\"\n\nimport os\nimport sys\nimport argparse\nfrom roblib import stream_fastq, messag...
python
new_file
3
0
mit
553660f2c67c7d3032b20a937b93262fbbb5e9f5
linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab
fastq/split_fastq_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add insertion sort method to module." }, { "role": "assistant", "content": "def insertion_sort(un_list):\n for idx in range(1, len(un_list)):\n current = un_list[idx]\n position = idx\n\n while position > ...
python
new_file
1
4
mit
06fc94beb1f0e557be11010eaaf9635350940865
jonathanstallings/data-structures
insertion_sort.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for reading k for list of trials" }, { "role": "assistant", "content": "\"\"\"\r\nReads thermal conductivity and statistics for a list of trials and saves results to a yaml file\r\n\"\"\"\r\nimport os\r\nimport yaml\r\...
python
new_file
1
0
mit
3b047ef48ae89d49d98675a0720a856cee829deb
kbsezginel/tee_mof,kbsezginel/tee_mof
scripts/read_kest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new little urllib import test" }, { "role": "assistant", "content": "import unittest\nimport sys\nprint([m for m in sys.modules if m.startswith('urllib')])\n\nclass MyTest(unittest.TestCase):\n def test_urllib(self):\n ...
python
new_file
1
1
mit
e52b58e823e803c0cce47a1e24e41577088a25a0
michaelpacer/python-future,michaelpacer/python-future,QuLogic/python-future,krischer/python-future,krischer/python-future,PythonCharmers/python-future,PythonCharmers/python-future,QuLogic/python-future
future/tests/test_imports_urllib.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 463. Island Perimeter\n\n463. Island Perimeter: https://leetcode.com/problems/island-perimeter/" }, { "role": "assistant", "content": "class Solution(object):\n def islandPerimeter(self, grid):\n \"\...
python
new_file
3
12
apache-2.0
aca1f53bc42915e8994c76607c86f486fb314a7a
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/island-perimeter.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.exceptions import ValidationError\n\nfrom django_auth_policy import settings as dap_settings\n\n\ndef password_min_length(value):\n if dap_settings.PASSWORD_MIN_LENGTH_TEXT is None:\n return\n\n if len(value) <...
python
edit
1
4
bsd-3-clause
09311a99d37c8623a644acb30daf8523a5e7a196
mcella/django-auth-policy,mcella/django-auth-policy,Dreamsolution/django-auth-policy,Dreamsolution/django-auth-policy
django_auth_policy/validators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add baseline convolutional neural network model." }, { "role": "assistant", "content": "from keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout, Flatten\nfrom keras.layers import Convolution2D, Ma...
python
new_file
6
0
mit
b7c6b9b2a5b7e5d7d8ebc78c53f156d4c53c7bbf
johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification
models/cuberun.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add script to grant board access to user" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Grant access to a board to a user.\n\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE ...
python
new_file
1
2
bsd-3-clause
b1128cd47160ce977bc9c6d90e94cb7a4ca873b5
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps
scripts/grant_board_access.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert nodes to dicts and count results of query" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom copy import copy\nfrom datetime import datetime\nfrom eve.utils import config\n\n\ndef node_to_dict(node):\n ...
python
new_file
1
3
mit
3a5a228e25996e2acf39ea1ae5966542f4b27123
Grupo-Abraxas/eve-neo4j,Abraxas-Biosystems/eve-neo4j
eve_neo4j/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate DB NDEx network" }, { "role": "assistant", "content": "import glob\nimport pickle\nfrom indra.db import get_primary_db\nfrom indra.db.util import make_stmts_from_db_list\nfrom indra.assemblers import CxAsse...
python
new_file
3
2
bsd-2-clause
0f43bbb5033e85fdfcd678aba670c1b56582c092
sorgerlab/bioagents,bgyori/bioagents
scripts/make_db_ndex.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add exercise 4 checking code" }, { "role": "assistant", "content": "from learntools.core import *\nimport tensorflow as tf\n\n\nclass Q1(ThoughtExperiment):\n _solution = \"\"\n\n\nclass Q2(ThoughtExperiment):\n _solution =...
python
new_file
12
1
apache-2.0
a245a8861eb35af77bb5387a7945f07af8cef017
Kaggle/learntools,Kaggle/learntools
learntools/computer_vision/ex4.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Write python code for the following: Add a basic EntityDatabase class" }, { "role": "assistant", "content": "from . import utils\nfrom .tl import TLObject\n\n\nclass EntityDatabase:\n def __init__(self, enabled=True):\n self.enabled = enabled\n\n se...
python
new_file
1
5
mit
5be9df0eece36d4f5ea29447edec309991f443c1
LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,expectocode/Telethon,andr-04/Telethon
telethon/entity_database.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add short script to calculate rescaling of marks" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"\nCalculates rescaled mark using hardcoded intervals\n\nUsage example:\n $ ./rescale_mark.py 50\n Your ...
python
new_file
1
0
mit
9fafe695e139e512ec9bd4d181ed0151ab5d7265
liviu-/miniskripts,liviu-/miniskripts
miniskripts/rescale_mark.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom hashlib import md5, sha1\nfrom base64 import urlsafe_b64encode as b64encode\nimport random\nrandom.seed()\n\ndef random_string():\n \"\"\"\n Generate a random string (currently a random...
python
edit
2
2
apache-2.0
11ec7ed43fbd5d6dae786f8320d1540080a55d57
madflow/seahub,madflow/seahub,miurahr/seahub,cloudcopy/seahub,miurahr/seahub,miurahr/seahub,Chilledheart/seahub,Chilledheart/seahub,miurahr/seahub,madflow/seahub,Chilledheart/seahub,cloudcopy/seahub,Chilledheart/seahub,madflow/seahub,cloudcopy/seahub,cloudcopy/seahub,Chilledheart/seahub,madflow/seahub
tools/secret_key_generator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add download page py file." }, { "role": "assistant", "content": "import requests\n\n\ndef download(method='GET', url=None, tries_num=2, user_agent=None):\n print('Download:', url)\n try:\n headers = {'User-Agent': u...
python
new_file
1
6
mit
974efc82d723d18790e7b759e643c2352ad13325
EscapeLife/web_crawler
content/3.introduction-crawler/download_page.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom st2actions.runners.pythonrunner import Action\n\nfrom prettytable import PrettyTable\n\n__all__ = [\n 'St2ChatOpsFormatListResult'\n]\n\n\nclass St2ChatOpsFormatListResult(Action):\n def run(self, result, attributes):\n ta...
python
edit
1
5
apache-2.0
75fcb95c04bc56729a1521177ac0e2cb4462bbba
dennybaa/st2contrib,pearsontechnology/st2contrib,lmEshoo/st2contrib,meirwah/st2contrib,meirwah/st2contrib,tonybaloney/st2contrib,armab/st2contrib,armab/st2contrib,pidah/st2contrib,dennybaa/st2contrib,psychopenguin/st2contrib,digideskio/st2contrib,StackStorm/st2contrib,digideskio/st2contrib,lmEshoo/st2contrib,tonybalone...
packs/st2/actions/chatops_format_list_result.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Hypothesis-based state machine tests." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\ntest_state_machines\n~~~~~~~~~~~~~~~~~~~\n\nThese tests validate the state machines directly. Writing meaningful te...
python
new_file
1
2
mit
d6daa56be204c6ab481756ea49ac97d89bc4ac3d
python-hyper/hyper-h2,vladmunteanu/hyper-h2,Kriechi/hyper-h2,Kriechi/hyper-h2,bhavishyagopesh/hyper-h2,python-hyper/hyper-h2,mhils/hyper-h2,vladmunteanu/hyper-h2
test/test_state_machines.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add find intersection between two sorted lists" }, { "role": "assistant", "content": "\"\"\"\nFind the intersection of two sorted arrays.\n\"\"\"\n\ndef find_intersection(list_a, list_b):\n \"\"\"\n Assumes that both lists ...
python
new_file
11
7
mit
34b78a3bed13613394b8655b51ec46933cc9746e
tdeh/quickies,tdeh/quickies
py/find_intersection.py
rejected_lint
Too many lint violations: 11
true