messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Write python code for the following: Add base renderer and an index page renderer" }, { "role": "assistant", "content": "from cdf.config import DJANGO_VERSIONS, VERSION\nfrom cdf.jinja_utils import template_env\n\n\nclass BasePageRenderer(object):\n\n def __init_...
python
new_file
1
1
mit
f9733f0fcbf94aabda179e50a4eb694f117c208d
ana-balica/classy-django-forms,ana-balica/classy-django-forms,ana-balica/classy-django-forms
cdf/renderers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Install different deps for Python 3 vs. Python 2." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Installs dependencies appropriate for the Python version.\"\"\"\nimport subprocess\nim...
python
new_file
1
0
mit
32de58c3a36bf9f9f8ec98e904aee989ebe3428e
gthank/pto,gthank/pto
install_deps.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n#\n# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of ...
python
edit
18
0
apache-2.0
df6fba6742e4fddfebd305a1ed624927f26e0f45
cloudendpoints/endpoints-python,inklesspen/endpoints-python,inklesspen/endpoints-python,cloudendpoints/endpoints-python
endpoints/__init__.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Write python code for the following: Add some basic unit tests for functions with no dependencies" }, { "role": "assistant", "content": "\"\"\"Tests for the EcoData Retriever\"\"\"\n\nfrom StringIO import StringIO\nfrom engine import Engine\n\ndef test_escape_single...
python
new_file
3
1
mit
a906d3523bb9d6a1ca233a9d5e0e33c477c96e60
embaldridge/retriever,bendmorris/retriever,goelakash/retriever,embaldridge/retriever,henrykironde/deletedret,davharris/retriever,henrykironde/deletedret,goelakash/retriever,bendmorris/retriever,davharris/retriever,davharris/retriever,bendmorris/retriever,embaldridge/retriever
test/test_retriever.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add small example of sqlite FTS with compression." }, { "role": "assistant", "content": "#\n# Small example demonstrating the use of zlib compression with the Sqlite\n# full-text search extension.\n#\nimport zlib\n\nfrom peewee i...
python
new_file
6
3
mit
e65641c7a2d944a39cf0cf4988d6b03e74a9712b
coleifer/peewee,coleifer/peewee,coleifer/peewee
examples/sqlite_fts_compression.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Solve first problem for Cracking the coding interview" }, { "role": "assistant", "content": "# https://www.hackerrank.com/challenges/ctci-array-left-rotation\n# Python 3\n\ndef array_left_rotation(a, n, k):\n # Convert genera...
python
new_file
1
3
mit
153fd9e9c0b9e251c423b811f3d67522d469d9bc
arvinsim/hackerrank-solutions
all-domains/tutorials/cracking-the-coding-interview/arrays-left-rotation/solution.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic Slackbot script with reporting enabled" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nfrom slackclient import SlackClient\n\nimport json\nimport time\n\nslack_token = \"\"\nchannel = \"\"\nmessage ...
python
new_file
1
2
mit
1394800c7c7bd62e0191cdb85612fa3066789424
jleung51/scripts,jleung51/scripts,jleung51/scripts
weekday_greeting_slackbot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create the top-down longestPath with optimization\n\nhorizontal optimization and vertical optimization" }, { "role": "assistant", "content": "def longestChain(words):\n lendict = {}\n lenlist = []\n\n # build the dictory...
python
new_file
4
9
mit
6eca5cd06da3a195f226d2b864b8af41b62bda45
Chasego/codi,Chasego/cod,Chasego/codirit,Chasego/codirit,Chasego/codirit,Chasego/codirit,cc13ny/algo,Chasego/codi,cc13ny/Allin,cc13ny/algo,cc13ny/algo,Chasego/cod,Chasego/cod,cc13ny/algo,cc13ny/Allin,cc13ny/algo,cc13ny/Allin,Chasego/codi,Chasego/codi,cc13ny/Allin,Chasego/codirit,Chasego/cod,Chasego/codi,Chasego/cod,cc1...
kargtom/twodim/LongestChain/longestChain_002.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a basic avg example" }, { "role": "assistant", "content": "\"\"\"\n>>> from pyspark.context import SparkContext\n>>> sc = SparkContext('local', 'test')\n>>> b = sc.parallelize([1, 2, 3, 4])\n>>> basicAvg(b)\n2.5\n\"\"\"\n\nim...
python
new_file
2
1
mit
56319a8562d10b43189ffa968b5ecc477f50a6c9
kpraveen420/learning-spark,mmirolim/learning-spark,shimizust/learning-spark,jindalcastle/learning-spark,JerryTseng/learning-spark,GatsbyNewton/learning-spark,tengteng/learning-spark,tengteng/learning-spark,feynman0825/learning-spark,SunGuo/learning-spark,bhagatsingh/learning-spark,baokunguo/learning-spark-examples,diog...
src/python/BasicAvg.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a credit card number checker" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"MSC: Credit card number printed.\n\n---\nlayout: post\nerror_code: MSC\nsource: ???\nsource_url: ???\ntitle: cred...
python
new_file
1
0
bsd-3-clause
e966e0774ad1474335a654cbe8f594d61ee97c3d
jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint
proselint/checks/misc/creditcard.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add specific tests for compression." }, { "role": "assistant", "content": "import unittest2\n\nfrom pykafka.utils import compression\n\nclass CompressionTests(unittest2.TestCase):\n \"\"\"Keeping these simple by verifying what...
python
new_file
1
1
apache-2.0
8003a4b4b2aaaaba54570f670c7a5df93fe8434d
vortec/pykafka,benauthor/pykafka,yungchin/pykafka,aeroevan/pykafka,sammerry/pykafka,thedrow/samsa,wikimedia/operations-debs-python-pykafka,tempbottle/pykafka,yungchin/pykafka,thedrow/samsa,wikimedia/operations-debs-python-pykafka,jofusa/pykafka,thedrow/samsa,jofusa/pykafka,appsoma/pykafka,vortec/pykafka,appsoma/pykafka...
tests/pykafka/utils/test_compression.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional test for service name aliases" }, { "role": "assistant", "content": "# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")....
python
new_file
1
2
apache-2.0
6f2f857528d5d1df227f56422222c8de72c2e012
pplu/botocore,boto/botocore
tests/functional/test_service_alias.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to ensure semantic versions work with continuous build.\n\nThis module generates and inserts a patch component of the semantic version\nstamp for Barbican, intended to ensure that a strictly monotonically increasing\nversion is pr...
python
new_file
2
6
apache-2.0
21420f6c730fb7e4063cddd28de3e7580c6efb36
cneill/barbican,cneill/barbican,cloudkeep/barbican,openstack/barbican,jmvrbanac/barbican,cloudkeep/barbican,jmvrbanac/barbican,openstack/barbican,MCDong/barbican,MCDong/barbican
bin/versionbuild.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fix for CVE regex\n\nSigned-off-by: Kirill Gotsman <<EMAIL>>" }, { "role": "assistant", "content": "# Generated by Django 2.2.4 on 2019-11-02 09:56\n\nimport django.core.validators\nfrom django.db import migrations, models\n\...
python
new_file
1
0
bsd-3-clause
d616adf1ec2a2326f15607cbb30fee14c8023af2
rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo
dojo/db_migrations/0021_auto_20191102_0956.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for speed measurement." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom fastcomp import compare\nimport random\nimport string\n\ndef randomstr(minlen=5, maxlen=7):\n charset = '01'\n length ...
python
new_file
4
2
mit
7e97663eb29452769103684fce9166a0db17ab5a
fujimotos/fastcomp
speedtest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for six.moves thread safety" }, { "role": "assistant", "content": "\"\"\"\nRegression test for six issue #98 (https://github.com/benjaminp/six/issues/98)\n\"\"\"\nfrom mock import patch\nimport sys\nimport threading\nimp...
python
new_file
2
4
apache-2.0
e96a8dd7854809e64e27f1b06cd380586a628da0
pplu/botocore,boto/botocore
tests/functional/test_six_threading.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add custom style which imitates the offical coloring" }, { "role": "assistant", "content": "from pygments.style import Style\nfrom pygments.token import Keyword, Name, Comment, String, Error, \\\n Number, Operator, Generic\n\...
python
new_file
6
0
bsd-2-clause
a7d8442482b7862b96adf3c8f40015072221f600
dscorbett/pygments,pygments/pygments,dscorbett/pygments,pygments/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,ds...
pygments/styles/igor.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Move the application version number to a separate file per PEP 396." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nChange Log\n\n1.3.0 Update all packages to current releases.\n Refactor ...
python
new_file
1
0
mit
3fcea684179da92e304e8eb2caafae80311e8507
parallaxinc/Cloud-Session,parallaxinc/Cloud-Session
app/__version__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fixture for disconnected providers" }, { "role": "assistant", "content": "import pytest\n\nfrom web3.web3.ipcprovider import IPCProvider\nfrom web3.web3.rpcprovider import TestRPCProvider, RPCProvider\n\n\n@pytest.fixture(par...
python
new_file
1
4
mit
f2396baa459c61fbbcd3c4889868f813a373d7e8
pipermerriam/web3.py,shravan-shandilya/web3.py
tests/providers/conftest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement an integration test for cibopath info" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport pytest\n\nCOOKIECUTTER_DJANGO_INFO = \"\"\"Name: cookiecutter-django\nAuthor: pydanny\nRepository: https://g...
python
new_file
1
1
bsd-3-clause
0400dce44abca87cc0c0069b062f1f6942640125
hackebrot/cibopath
tests/test_cli_info.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple test of GaussRV class" }, { "role": "assistant", "content": "\"\"\"Tests of randvars module\"\"\"\n\nimport numpy as np\n\nfrom dapper.tools.randvars import GaussRV\n\n\ndef test_gauss_rv():\n M = 4\n nsamples = ...
python
new_file
1
1
mit
a98c80247b5ec978e811cd6444596010d67c6a45
nansencenter/DAPPER,nansencenter/DAPPER
tests/test_randvars.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for test of behaviour when rules are pass" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 15.08.2017 15:31\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unitte...
python
new_file
2
0
mit
ab142f01ec932faaed05441b74c4be760a963374
PatrikValkovic/grammpy
tests/rules_tests/RulesTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial location unit tests" }, { "role": "assistant", "content": "from SUASSystem import *\nimport math\nimport numpy\nimport unittest\nfrom dronekit import LocationGlobalRelative\n\nclass locationTestCase(unittest.TestCase)...
python
new_file
7
1
mit
824c591204c7939a854d1d618cf32358387dbff0
FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition
tests/test_location.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for DictParameter" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this ...
python
new_file
1
1
apache-2.0
1208f86c8c5ba677bd6001442129d49f28c22764
jamesmcm/luigi,samepage-labs/luigi,jw0201/luigi,h3biomed/luigi,humanlongevity/luigi,riga/luigi,Wattpad/luigi,dlstadther/luigi,javrasya/luigi,edx/luigi,Magnetic/luigi,adaitche/luigi,foursquare/luigi,dlstadther/luigi,linsomniac/luigi,samuell/luigi,Houzz/luigi,Houzz/luigi,PeteW/luigi,ContextLogic/luigi,PeteW/luigi,ehdr/lu...
test/dict_parameter_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution 100. Same Tree." }, { "role": "assistant", "content": "/*\n * https://leetcode.com/problems/same-tree/\n *\n * Given two binary trees, write a function to check if they are equal or not.\n * Two binary trees are cons...
python
new_file
null
null
mit
adf7234437c75d1a7c0b121f4b14676356df20e5
wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode
100_Same_Tree.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add py solution for 692. Top K Frequent Words\n\n692. Top K Frequent Words: https://leetcode.com/problems/top-k-frequent-words/\n\nO(nlgk) and O(klgn) approaches" }, { "role": "assistant", "content": "from collections import Coun...
python
new_file
3
4
apache-2.0
cb159032856c4409187154cc0ec3d6ffae1fc4db
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/top-k-frequent-words.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for search saces." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom selenium import webdriver\nfrom selenium.common.exceptions import NoSuchElementException\nfrom selenium.webdriver.common.keys impor...
python
new_file
3
3
bsd-2-clause
8dbce56b1b595a761fdc29c8730ad5e11e40a203
bsamorodov/selenium-py-training-samorodov
php4dvd/test_searchfilm.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial definition of specific event item" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# import uuid\n\nfrom db.common import Base\nfrom db.common import session_scope\n\n\nclass Sp...
python
new_file
1
5
mit
88a673c402b60e3212e2a60477a854b756ae5e9a
leaffan/pynhldb
db/specific_event.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an experimental test for a single referencew" }, { "role": "assistant", "content": "import unittest\n\nfrom jsonasobj import as_json\n\nfrom pyshexc.parser_impl.generate_shexj import parse\n\nshex = \"\"\"<http://a.example/S0...
python
new_file
1
1
mit
b58fc31236e0c2226d31f7c846cc6a6392c98d52
shexSpec/grammar,shexSpec/grammar,shexSpec/grammar
parsers/python/tests/test_single_reference.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to run PBS jobs to create fragment database" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n#==============================================================================\n# author : Pavel Poli...
python
new_file
1
0
bsd-3-clause
9aeebde15b5ad2d6526c9b62ab37cf0d890d167d
DrrDom/crem,DrrDom/crem
pbs/gen.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights simple composition problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Simple Composition Problem\n\nfrom functools import reduce\nimport math\n\n\ndef compose(f, g):\n retur...
python
new_file
1
3
mit
ce929da100303a56ca5d1e4c5ca3982c314d8696
HKuz/Test_Code
CodeFights/simpleComposition.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an utility to assign unique ids to files." }, { "role": "assistant", "content": "#!/bin/python\nfrom __future__ import print_function, division\nimport argparse\nimport os\nimport os.path\nimport random\nimport string\nimport...
python
new_file
1
4
mit
1a75c38f43f0857fcc1c0dfe594f719870ad3553
xanxys/shogi_recognizer,xanxys/shogi_recognizer
issue_id.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add updated migration with vat_conditions" }, { "role": "assistant", "content": "from django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('afip', '0025_receipt__defaul...
python
new_file
1
0
isc
1d4960adcc307504ecd62e45cac21c69c3ac85a1
hobarrera/django-afip,hobarrera/django-afip
django_afip/migrations/0026_vat_conditions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for auto update of a widget using .after()\n\nThanks to @ukBaz and @jezdean an example of the already implemented .after() function being used to update a widget automatically." }, { "role": "assistant", "content": "f...
python
new_file
5
1
bsd-3-clause
46f8389f79ad7aae6c038a2eef853eb0652349c7
lawsie/guizero,lawsie/guizero,lawsie/guizero
examples/auto_update_example.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add file copy utility script" }, { "role": "assistant", "content": "import os\nimport time\nimport shutil\nimport glob\n\ndef reviewAndCopy(copy_from_directory, copy_to_directory):\n review_window_in_hours = 24\n _review_wi...
python
new_file
6
3
mit
0996f1c59dfca9c22d0e3d78598bd3edbce62696
danielharada/fileCopyUtility
dailyFileCopy.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Sort an array of strings so that the anagrams are grouped" }, { "role": "assistant", "content": "'''\nSort an array of strings so that the anagrams \nare next to one another\n\nEx.\n\n'abba', 'foo', 'bar', 'aabb'\n\nbecomes:\n\n'...
python
new_file
1
5
unlicense
7a51f5a4e4effee4891cddbb867f873ec15c5fab
amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning
Python/strings/sort_anagrams.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a client test on the users list view" }, { "role": "assistant", "content": "#! /usr/bin/env python\n\n__author__ = 'Henri Buyse'\n\n\nimport pytest\nimport datetime\n\nfrom django.contrib.auth.handlers.modwsgi import check_pa...
python
new_file
5
1
mit
4424959dd8bef2dfe709319bdf55b860ccc4971e
hbuyse/VBTournaments,hbuyse/VBTournaments,hbuyse/VBTournaments
accounts/tests/tests_vbuserlist_page.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add example for simple table within a flask app" }, { "role": "assistant", "content": "from flask_table import Table, Col, LinkCol\nfrom flask import Flask\n\n\"\"\"A example for creating a simple table within a working Flask app...
python
new_file
1
3
bsd-3-clause
72ca20f34b9ef70cee930271fa698de187f97857
plumdog/flask_table,plumdog/flask_table,plumdog/flask_table
examples/simple_app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to add some ember waffle flags to the db for waffle pages with a default value of False. Can be changed in django app when ready." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django...
python
new_file
3
3
apache-2.0
2da04cccf32e5280e36966b2d9c93a643e7458e7
adlius/osf.io,mfraezz/osf.io,mattclark/osf.io,chennan47/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,caseyrollins/osf.io,sloria/osf.io,HalcyonChimera/osf.io,mattclark/osf.io,adlius/osf.io,brianjgeiger/osf.io,binoculars/osf.io,cslzchen/osf.io,saradbowman/osf.io,Johnetordoff/osf.io,felliott/osf.io,chennan47/osf.io,...
osf/migrations/0083_add_ember_waffle_flags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a custom server example implementation. This is fully compatible with the client example." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nfrom pythinclient.server import ThinServer\n\nclass CustomThinServer(B...
python
new_file
5
1
bsd-3-clause
ee5b38c649b1a5b46ce5b53c179bde57b3a6e6f2
alekratz/pythinclient
examples/customserverexample.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Load and plot python script" }, { "role": "assistant", "content": "import SixChannelReader as SCR\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ndef main():\n\t\"\"\" open previously saved data and plot it. Convert raw 1...
python
new_file
3
2
mit
3bb9be0dd508a33d9063c8919d471ec39255aefb
jameskeaveney/ArduinoDUE-Data-Logger,jameskeaveney/ArduinoDUE-Data-Logger
load_and_plot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Roman To Integer solution" }, { "role": "assistant", "content": "class Solution(object):\n def romanToInt(self, s):\n \"\"\"\n :type s: str\n :rtype: int\n \"\"\"\n if not s:\n ...
python
new_file
5
5
mit
b77b284c1ecbd599fec218d10068e419e0070994
chancyWu/leetcode
src/roman_to_integer.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Test home page as anonymous and logged user" }, { "role": "assistant", "content": "#! /usr/bin/env python\n\n__author__ = \"Henri Buyse\"\n\n\nimport pytest\nfrom django.test import Client\n\ndef test_client_get_home_page():\n ...
python
new_file
1
1
mit
d0aa398a0df17540c7d9160dadd48d3ab60e230e
hbuyse/VBTournaments,hbuyse/VBTournaments,hbuyse/VBTournaments
core/tests/tests_client_home_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for putting color in our text output" }, { "role": "assistant", "content": "BLUE = '\\033[94m'\nGREEN = '\\033[92m'\nYELLOW = '\\033[93m'\nRED = '\\033[91m'\nENDC = '\\033[0m'\nBOLD = '\\033[1m'\nUNDERLINE = '\\033[4m'...
python
new_file
1
1
mit
b5d5f377cf3d3b2b4459c36ba47e2e0f4a3125f4
EliRibble/mothermayi
mothermayi/colors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test suite for demoing pytest markers" }, { "role": "assistant", "content": "\"\"\" These tests demonstrate pytest marker use for finding and running tests.\n\n Usage examples from this file:\n pytest -v -m marker_t...
python
new_file
1
1
mit
b49371bbcb756371296bfe309071f2b9579e5b99
mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
examples/test_markers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add filtering for bogus output" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\"\"\"Filters Pycapsule error\"\"\"\n\nimport fileinput\nimport sys\n\nSTRING = \"RuntimeError: Object of type <class 'NamedArray'>\"\nNUM_...
python
new_file
1
0
apache-2.0
18c40bdc02c5cd27c69edb394e040a3db3d75e05
ScienceStacks/BaseStack,ScienceStacks/BaseStack,ScienceStacks/BaseStack
bin/filter_pycapsule.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for text dictionaries." }, { "role": "assistant", "content": "from featurex.datasets.text import _load_datasets, fetch_dictionary\nfrom unittest import TestCase\nfrom pandas import DataFrame\nimport urllib2\n\n\nclass Te...
python
new_file
7
5
bsd-3-clause
d6d321fa99b9def1d85ff849fc13bbe17fa58510
tyarkoni/featureX,tyarkoni/pliers
featurex/tests/test_datasets.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add a very basic yt plotting example" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 9 12:52:31 2015\n\n@author: stuart\n\"\"\"\nimport os\nimport glob\n\nimport yt\n\nmodel = 'spruit'\...
python
new_file
1
0
bsd-2-clause
fe6d7b11ab87d9ea3a2b99aee17b9a371c55f162
SWAT-Sheffield/pysac,Cadair/pysac
examples/mhs_atmosphere_plot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a necessary migration for email_auth" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport email_auth.models\n\n\nclass Mig...
python
new_file
1
0
bsd-3-clause
8ee65cbf390d5caae04498397f74cd8a64e7903e
divio/django-shop,rfleschenberg/django-shop,jrief/django-shop,khchine5/django-shop,awesto/django-shop,rfleschenberg/django-shop,jrief/django-shop,awesto/django-shop,jrief/django-shop,divio/django-shop,divio/django-shop,nimbis/django-shop,khchine5/django-shop,rfleschenberg/django-shop,khchine5/django-shop,jrief/django-s...
email_auth/migrations/0003_auto_20151209_0746.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add crude script to draw glowing lines; currently the dark part hides other lines, making them look physical; should be additive" }, { "role": "assistant", "content": "from PIL import Image, ImageDraw\n\nimport random\n\nW = 500\...
python
new_file
1
2
mit
97b19e6f3705fc0b320f33b44476f7139833de9e
redpig2/pilhacks
glowing-lines.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nimport logging\nfrom optparse import OptionParser\n\nfrom tests.config import configure\n\nlogging.disable(logging.CRITICAL)\n\n\ndef run_tests(*test_args):\n from django_nose import NoseTestSuiteRunner...
python
edit
1
3
bsd-3-clause
c44448e6e2fa846d4eea8b6d7d907168becdd1ad
faratro/django-oscar,WadeYuChen/django-oscar,django-oscar/django-oscar,jmt4/django-oscar,okfish/django-oscar,manevant/django-oscar,john-parton/django-oscar,jinnykoo/wuyisj,rocopartners/django-oscar,itbabu/django-oscar,makielab/django-oscar,saadatqadri/django-oscar,solarissmoke/django-oscar,sonofatailor/django-oscar,pdo...
runtests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial tests for the rand module" }, { "role": "assistant", "content": "'''\nTest sorbic.utils.rand\n'''\n# import sorbic libs\nimport sorbic.utils.rand\n# Import python libs\nimport unittest\n\n\nclass TestRand(unittest.Tes...
python
new_file
1
5
apache-2.0
f0922bade498bcadf587c4b756060cf062fe68d4
thatch45/sorbic,s0undt3ch/sorbic
tests/unit/test_rand.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add The Learning Experience spider" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport re\n\nfrom locations.items import GeojsonPointItem\n\n\nclass TheLearningExperienceSpider(scrapy.Spider):\n ...
python
new_file
3
2
mit
e06a766e082f168e0b89776355b622b980a0a735
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
locations/spiders/learning_experience.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple mrequests GET example\n\nSigned-off-by: Christopher Arndt <<EMAIL>>" }, { "role": "assistant", "content": "import mrequests as requests\n\n\nhost = 'http://localhost/'\nurl = host + \"get\"\nr = requests.get(url, heade...
python
new_file
1
0
mit
8a9b4de36f35416874d10734ae1c08287ebd5c32
SpotlightKid/micropython-stm-lib
mrequests/examples/get_json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix past migration scripts discrepancies\n\nIt is important that running all migration scripts from first to last\nwill give the expected model.\n\nThis fix is a first step. It fixes all discrepancies from previous\nscripts.\n\nThere are sti...
python
new_file
1
5
apache-2.0
13b835d525f6576bfa047ce3001479d8b81f15b7
StackStorm/mistral,openstack/mistral,StackStorm/mistral,openstack/mistral
mistral/db/sqlalchemy/migration/alembic_migrations/versions/014_fix_past_scripts_discrepancies.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helpers to make Jinja2 more like Angular: PermissiveUndefined, JSDict, and JSList." }, { "role": "assistant", "content": "from __future__ import (division, absolute_import, print_function,\n unicode_lit...
python
new_file
1
5
mit
5ee0f309521320f0cc91c61b112fd94c8415f37c
emosenkis/angular2tmpl
jinja2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove Duplicates from Sorted List II" }, { "role": "assistant", "content": "# Definition for singly-linked list.\nclass ListNode:\n def __init__(self, x):\n self.val = x\n self.next = None\n\nclass Solution:\n ...
python
new_file
3
6
apache-2.0
1475a095620d2c9ef47f8bd9ea4363907ff0067b
don7hao/leetcode_oj,don7hao/leetcode_oj
remove_duplicates_from_sorted_list_ii.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test tool for checking entropy available in a loop" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\nimport os\nimport logging\nimport time\n\nlog = logging.getLogger(__name__)\nlog.setLevel(logging.INFO...
python
new_file
4
3
mit
ee05b846612aa5c978949ff90f38290915983385
infincia/TokenTools
check-entropy.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add basic test for profile.Profile.\n\nAddresses #3." }, { "role": "assistant", "content": "import tempfile\nimport unittest\nimport unittest.mock\n\nfrom . import profile\nfrom . import test_helper\n\n\n@unittest.mock.patch.obje...
python
new_file
3
2
apache-2.0
8a029fb00892c8bf385dae76466ae1e211e27ca6
dseomn/cohydra
cohydra/test_profile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test using bezier going through 4 specific points\n\n\n\ngit-svn-id: 5665c17dde288ce6190d85f4a2d6486351776710@869 f663ce52-ac46-0410-b8de-c1c220b0eb76" }, { "role": "assistant", "content": "from __future__ import division\n\nimpo...
python
new_file
3
2
bsd-3-clause
3ef4e68ae64a46f09103001f391b3d6a3d098e33
eevee/cocos2d-mirror
test/test_bezier_direct.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for helmholtz results" }, { "role": "assistant", "content": "from __future__ import absolute_import, print_function, division\n\nfrom firedrake import *\nfrom helmholtz import MixedHelmholtzProblem\nfrom meshes import ...
python
new_file
6
2
mit
595eaf19c1d3a89970b5ebe148f12a5df11807cc
thomasgibson/firedrake-hybridization
run_helmholtz.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Implement RTPP_LOG_TSTART and RTPP_LOG_TFORM=\"rel\" env parameters to aid debugging." }, { "role": "assistant", "content": "import getopt, sys\n\nif __name__ == '__main__':\n sippy_path = None\n\n try:\n opts, args ...
python
new_file
2
0
bsd-2-clause
7bf60d5ef1e6052044ebfedf1e2bf2dddc0940b8
sippy/rtp_cluster,sippy/rtp_cluster
python/getmonotime.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add azure id creation tests" }, { "role": "assistant", "content": "from urllib.parse import urlparse\n\nimport pytest\n\nfrom django.urls import reverse\n\nfrom tests.utils import BaseViewTest\n\n\n@pytest.mark.sso_mark\nclass Az...
python
new_file
1
1
apache-2.0
c09446f758f42fbf00866360e0760f1a0fae0ab7
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
tests/test_sso/test_azure_id_creation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add pseudo for connected components" }, { "role": "assistant", "content": "def get_connected_components():\n # assume nodes labeled 1 to n\n # connected_components = []\n # for i in 1..n\n # if i not yet explored\...
python
new_file
2
0
mit
05b90dab50281e9b1cb35575d35db5f45d2ba15a
stephtzhang/algorithms
connected_components.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Define an iterable frame buffer." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nh2/frame_buffer\n~~~~~~~~~~~~~~~\n\nA data structure that provides a way to iterate over a byte buffer in terms of\nframes.\...
python
new_file
1
3
mit
62906d37cca8cde2617372f71881dc802f23d6b9
vladmunteanu/hyper-h2,vladmunteanu/hyper-h2,python-hyper/hyper-h2,bhavishyagopesh/hyper-h2,Kriechi/hyper-h2,python-hyper/hyper-h2,Kriechi/hyper-h2,mhils/hyper-h2
h2/frame_buffer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for using Python in JS" }, { "role": "assistant", "content": "# doc-export: UsingPython\n\"\"\"\nThis example demonstrates what things from Python land can be used in JS.\n\nFlexx detects what names are used in the tr...
python
new_file
3
2
bsd-2-clause
a20a1cc4ff34185fa1badf812f292c007f9f3d05
zoofIO/flexx,JohnLunzer/flexx,JohnLunzer/flexx,zoofIO/flexx,jrversteegh/flexx,JohnLunzer/flexx,jrversteegh/flexx
flexx/ui/examples/using_python_in_js.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script attach device rbd" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n__author__ = 'weezhard'\n__license__ = 'GPL'\n__version__ = '1.0.0'\n\nimport sys\nimport argparse\nimport libvirt\nimport subprocess\n...
python
new_file
7
4
apache-2.0
8f97a104bf988a277453bf70043829c45a394919
skylost/heap,skylost/heap,skylost/heap
libvirt/libvirt_attach_device_rbd.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Create script to execute Marcotti ETL" }, { "role": "assistant", "content": "from interface import Marcotti\nfrom models.config.local import LocalConfig\nfrom etl import get_local_handles, ingest_feeds\nfrom etl.csv import CSV_ET...
python
new_file
1
0
mit
76f868137d1ee98f148032269251116887db38d5
soccermetrics/marcotti
loader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for counting all users count" }, { "role": "assistant", "content": "import os\nimport telegram\nfrom leonard import Leonard\n\ntelegram_client = telegram.Bot(os.environ['BOT_TOKEN'])\nbot = Leonard(telegram_client)\nbo...
python
new_file
1
2
mit
b4a932eb8d99f9f4d29d3459c62e0cf81240fbdb
sevazhidkov/leonard
scripts/stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to find malformed rules" }, { "role": "assistant", "content": "# Print list of rules with invalid algs\n\nfrom api import config\nfrom api.dao import APINotFoundException\nfrom api.jobs.gears import get_gear_by_name\n\...
python
new_file
3
0
mit
2eceebdd1eb052b81b6563e7bd58c275c4f74592
scitran/core,scitran/api,scitran/core,scitran/core,scitran/api,scitran/core
bin/check_rule_algs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add one-off script to fix nodes with no creator\n\nOSF-8571" }, { "role": "assistant", "content": "import logging\nimport sys\n\nfrom django.db import transaction\n\nfrom website.app import setup_django\nsetup_django()\nfrom osf....
python
new_file
1
4
apache-2.0
de802c22865e4369cb938be7d7931b7e53374059
brianjgeiger/osf.io,baylee-d/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,icereval/osf.io,chennan47/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,pattisdr/osf.io,leb2dg/osf.io,laurenrevere/osf.io,felliott/osf.io,aaxelb/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,adlius/osf.io,baylee-d/osf.io,leb2dg/osf.io,binoculars/os...
scripts/fix_nodes_with_no_creator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2012 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\nimport cgi\nfrom mod_pywebsocket import msgutil\n\n\ndef web_socket_d...
python
edit
3
3
bsd-3-clause
466b8a8fb2bdf7ca8f74316fac3e483c3ba763b5
TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswal...
net/data/websocket/protocol-test_wsh.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for Rule.rule tests" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, TestCa...
python
new_file
3
0
mit
6b1f487f2ceb64b6b024b9d959a8ed5a0cd4d713
PatrikValkovic/grammpy
tests/rules_tests/FromRuleComputeTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use stack to solve the problem" }, { "role": "assistant", "content": "\"\"\"\nThis is the interface that allows for creating nested lists.\nYou should not implement it, or speculate about its implementation\n\"\"\"\nclass NestedI...
python
new_file
1
4
apache-2.0
bd717b8056a69ee7074a94b3234d840dd431dd1f
zhuxiang/LeetCode-Python
src/341_flatten_nested_list_iterator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom rest_framework import serializers\n\nfrom sentry.utils.http import parse_uri_match\n\n\nclass OriginField(serializers.CharField):\n # Special case origins that don't fit the normal regex pat...
python
edit
1
3
bsd-3-clause
23336c48a1dafcea47dab68b8915add1c7ff9f4f
mvaled/sentry,gencer/sentry,gencer/sentry,ifduyue/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,looker/sentry,beeftornado/sentry,looker/sentry,looker/sentry,beeftornado/sentry,mvaled/sentry,mvaled/sentry,beeftornado/sentry,gencer/sentry,ifduyue/sentry,looker/sentry,mvaled/sentry,mvaled/sentry,gencer/sentry,gencer/...
src/sentry/api/serializers/rest_framework/origin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add one-off script to convert a list of programming languages to JSON" }, { "role": "assistant", "content": "''' One-off junk code to convert a list of programming languages with some extra information in the comments to JSON\n''...
python
new_file
4
0
mit
a715d344b72d598d06d8aaba4f82687e0657bd60
bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile
python/one-offs/list-to-json.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add printing of color codes in matplotlib" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import pr...
python
new_file
1
8
apache-2.0
cd2c0f6111221990c3838a64961d24208c310a1d
nathanielng/code-templates,nathanielng/code-templates,nathanielng/code-templates
snippets/python/matplotlib-colors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a helper script to dump tags to a file" }, { "role": "assistant", "content": "# Copyright 2018 Tomas Machalek <<EMAIL>>\n# Copyright 2018 Charles University, Faculty of Arts,\n# Institute of the Czech National ...
python
new_file
1
0
apache-2.0
512ab87b1786f8c3d003a62337eee75beff9d960
czcorpus/vert-tagextract,czcorpus/vert-tagextract
scripts/postag2file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code for extracting best pivot features from saved neural model." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\n\nimport numpy as np\nimport torch\nfrom learn_pivots_tm import PivotLearnerModel, S...
python
new_file
4
4
apache-2.0
0721d6129da01c693d8a28c12d66e6b55d37f964
tmills/uda,tmills/uda
scripts/extract_pivots_from_model.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add an RGB LED for initial experimentation." }, { "role": "assistant", "content": "'''\n\nDr Who Box: RGB Effects LED\n\n'''\n\nfrom __future__ import print_function\nimport RPi.GPIO as GPIO\nimport time\nfrom multiprocessing imp...
python
new_file
1
7
mit
8921f9a5d991cd6962d3d16f6e72d53d06a1e86f
davidb24v/drwho
rgbLed.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to slice traces bigger than 256MB\n\nSummary:\nThe chrome://tracing viewer doesn't support files larger than 256MB,\nto make it possible to look at traces from larger builds we add this\nsimple script that splits a bigger trace ...
python
new_file
4
2
apache-2.0
a8a85a4bf0185a43b492ab8e81b558128db392aa
k21/buck,robbertvanginkel/buck,rmaz/buck,vschs007/buck,sdwilsh/buck,sdwilsh/buck,clonetwin26/buck,justinmuller/buck,justinmuller/buck,raviagarwal7/buck,SeleniumHQ/buck,robbertvanginkel/buck,k21/buck,k21/buck,SeleniumHQ/buck,kageiit/buck,darkforestzero/buck,robbertvanginkel/buck,SeleniumHQ/buck,LegNeato/buck,rmaz/buck,v...
scripts/slice_trace.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a Python 3 compatibility helper" }, { "role": "assistant", "content": "# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache ...
python
new_file
9
1
apache-2.0
2268cc13d4af71f1fbff4af26631013664fc1d93
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft
pycroft/_compat.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add new file to test kernel efficiency warnings" }, { "role": "assistant", "content": "import numpy as np\nfrom numba import cuda\nfrom numba.cuda.testing import CUDATestCase, skip_on_cudasim\nfrom numba.tests.support import over...
python
new_file
1
3
bsd-2-clause
2a0544bf399dbfbdb8e6d4ef4faf91e19a3c0a15
cpcloud/numba,seibert/numba,seibert/numba,cpcloud/numba,cpcloud/numba,numba/numba,stuartarchibald/numba,seibert/numba,stuartarchibald/numba,cpcloud/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,seibert/numba,stonebig/numba,cpcloud/numba,stuartarchibald/numba,stonebig/numba,stuartarchibald/numba,stonebig/numba,num...
numba/cuda/tests/cudapy/test_warning.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [AIRFLOW-125] Add file to GCS operator\n\nAdds an operator to upload a file to Google Cloud Storage. Used as follows:\n```py\nfrom airflow.contrib.operators.file_to_gcs import FileToGoogleCloudStorageOperator\ngcs = FileToGoogleCloudStorageO...
python
new_file
3
1
apache-2.0
4b25a7d34ea17c86c4b40a09f85898ea4769b22b
dmitry-r/incubator-airflow,r39132/airflow,ledsusop/airflow,spektom/incubator-airflow,yk5/incubator-airflow,wndhydrnt/airflow,dmitry-r/incubator-airflow,subodhchhabra/airflow,juvoinc/airflow,zodiac/incubator-airflow,lyft/incubator-airflow,sdiazb/airflow,zoyahav/incubator-airflow,DEVELByte/incubator-airflow,adrpar/incuba...
airflow/contrib/operators/file_to_gcs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a module that can be called from other scripts\n\n* Let's assume using the program's output as another program's input (e.g. Conky)." }, { "role": "assistant", "content": "#!/usr/bin/env python3\nfrom tas import make_schedule...
python
new_file
4
0
mit
45b3a5924047a841bb01ed079104533c8cc5c0ce
azbshiri/tas
run.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test file added to estimate performance of program between systems." }, { "role": "assistant", "content": "from os import system\r\nfrom time import sleep\r\nfrom msvcrt import getch\r\nfrom threading import Thread\r\n\r\nsystem(...
python
new_file
2
11
mit
655f2ac31df0055c06005311820848cceaea4122
thebongy/Snake
nonclass.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add exercise Stock Exchange Losses" }, { "role": "assistant", "content": "def maxLoss(lst):\n\tup = lst[0]\n\tdown = lst[0]\n\tmini = down - up\n\n\tfor i, val in enumerate(lst[:-1]):\n\t\t# We are decreasing\n\t\tif (lst[i+1] < ...
python
new_file
2
6
mit
f6b22c3c7ff33d074b18cb7344263db65bb0f40f
AntoineAugusti/katas,AntoineAugusti/katas,AntoineAugusti/katas
codingame/medium/stock_exchange_losses.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functionality: photo or 404" }, { "role": "assistant", "content": "import os\n\nfrom flask import Flask, abort, send_file\n\napp = Flask(__name__)\n\n\n@app.route(\"/<path:filename>/\")\ndef get_image(filename):\n if not o...
python
new_file
1
2
mit
70fa99f52436ac860de01eab311215ed1a7e24c4
DictGet/ecce-homo,DictGet/ecce-homo
app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add handle excel script in python" }, { "role": "assistant", "content": "\"\"\"\n使用场景:\n有三个巨大的 Excel 文件(合计约一百三十万行)存放在 src_new 下面,\n这个脚本能读取这三个 Excel 文件,将所有数据按第 5 列的值分别存放到 dst_new 里的不同的文件里去,\ndst 文件以数据第 5 列值命名\ntemplate_new.xlsx 是一...
python
new_file
1
7
mit
fe7e3ca713fa1351facd9821a29cae7838458baf
mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets
Python/handle_excel.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test program for QMessageBox formatting" }, { "role": "assistant", "content": "#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nTest code for controlling QMessageBox format.\n\"\"\"\n\nimport sys\nfrom PyQt5.QtGui import QP...
python
new_file
3
1
mit
cd4879f4793924563bc27f251bd6a7af15c8ba3a
rzzzwilson/morse_trainer,rzzzwilson/morse_trainer
tests/test_msgbox.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 Donald Stufft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.or...
python
edit
1
1
apache-2.0
ae19d2e0bf1c7f808cd102a78bde25548bcb88b8
robhudson/warehouse,mattrobenolt/warehouse,techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse,mattrobenolt/warehouse,techtonik/warehouse
warehouse/cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add little script to test 2 uvfits files for equality" }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nimport argparse\nimport os.path as op\nfrom uvdata.uv import UVData\n\nparser = argparse.ArgumentParser()\npar...
python
new_file
2
0
bsd-2-clause
b588d426ec500db82995fa830298757f7a1afd52
HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata
scripts/test_uvfits_equal.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a country field for available shipping countries" }, { "role": "assistant", "content": "from longclaw.longclawsettings.models import LongclawSettings\nfrom longclaw.longclawshipping.models import ShippingRate\nfrom django_cou...
python
new_file
1
2
mit
0ef0f3528dfd21ff608ea5e59980856e7f673817
JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw
longclaw/longclawshipping/fields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Revert \"removing migration script now that it's done\"\n\nThis reverts commit dd32cbb400fb667d05b215a60fe3682da2c1cf2b." }, { "role": "assistant", "content": "\"\"\"Script for migrating ipythonblocks grid data from SQLite to Pos...
python
new_file
1
3
mit
9f58e46b18775bfa0f4bf23bf6b25a1e2488c6ae
jiffyclub/ipythonblocks.org,jiffyclub/ipythonblocks.org
scripts/migrate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for ipython notebook snippets" }, { "role": "assistant", "content": "\"\"\"ipynb.py -- helper functions for working with the IPython Notebook\n\nThis software is licensed under the terms of the MIT License as\nfollows:\n...
python
new_file
1
2
mit
6b25614cbdec4595cedd772ca5d405cfafec741d
jhamrick/python-snippets
ipynb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic test for build" }, { "role": "assistant", "content": "import contextlib\nimport json\nimport os\n\nfrom nose.tools import istest, assert_equal\n\nfrom whack.tempdir import create_temporary_dir\nfrom whack.files import s...
python
new_file
1
1
bsd-2-clause
02e907a97eb1cb79b5c427e6153caf8ca0009058
mwilliamson/whack
tests/builder_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sync field to Author model" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n ...
python
new_file
1
0
mit
73c676d3ab2c4c668209dc04537561c7a2e3cd49
rebearteta/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,rebearteta/social-ideation,rebearteta/social-ideation,joausaga/social-ideation,joausaga/social-ideation,joausaga/social-ideation
ideascale/migrations/0011_author_sync.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add lower index to tags" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9 on 2017-03-30 14:55\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migrati...
python
new_file
1
0
apache-2.0
b0bedcbd293d21e5a08ecd1acbc11b3fe8c5b7e9
TomBaxter/osf.io,brianjgeiger/osf.io,adlius/osf.io,mfraezz/osf.io,HalcyonChimera/osf.io,sloria/osf.io,adlius/osf.io,baylee-d/osf.io,cwisecarver/osf.io,CenterForOpenScience/osf.io,chennan47/osf.io,caneruguz/osf.io,crcresearch/osf.io,chrisseto/osf.io,CenterForOpenScience/osf.io,chrisseto/osf.io,brianjgeiger/osf.io,icerev...
osf/migrations/0002_add_lower_index_to_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for Invitation.email" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migrat...
python
new_file
1
0
bsd-3-clause
dd9e80cb13d41a6faf0fb1340ea7edc949f0fab7
rapidpro/dash,peterayeni/dash,rapidpro/dash,caktus/dash,caktus/dash,peterayeni/dash
dash/orgs/migrations/0012_auto_20150715_1816.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add constraints for unique together for org and slug in org backend, migrations" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.11 on 2018-03-21 15:20\nfrom __future__ import unicode_lit...
python
new_file
1
0
bsd-3-clause
4a67508786b9c28e930a4d6ce49001f6bb9be39d
rapidpro/dash,rapidpro/dash
dash/orgs/migrations/0025_auto_20180321_1520.py
accepted
null
true