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 py solution for 492. Construct the Rectangle\n\n492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/" }, { "role": "assistant", "content": "class Solution(object):\n def constructRectangle(s...
python
new_file
1
3
apache-2.0
c8df2f29359661c538cf07afe8f639c9c6159d00
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/construct-the-rectangle.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file contains gunicorn configuration setttings, as described at\n# http://docs.gunicorn.org/en/latest/settings.html\n# The file is loaded via the -c ichnaea.gunicorn_config command line option\n\n# Use our own Gevent worker\nworker_c...
python
edit
1
1
apache-2.0
7b48044f19a50e4b84810a5e98d93cd537bea5c9
mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea
ichnaea/gunicorn_config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Clear DAQ if enough copies" }, { "role": "assistant", "content": "f\nimport config\n\ndef copy(f1, f2,\n server,\n username):\n util.log_to_file('ssh.log')\n ssh = SSHClient()\n ssh.load_system_host_keys(...
python
new_file
6
7
isc
e577d53840137d7849b68420553d16a942280ea0
XENON1T/cax,XENON1T/cax
cax/clear.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for time_utils." }, { "role": "assistant", "content": "from datetime import datetime\nimport unittest\n\nfrom pypercube import time_utils\n\n\nclass TestMetric(unittest.TestCase):\n def setUp(self):\n sel...
python
new_file
1
1
bsd-3-clause
cdd238e7fefbe4dc57db89f8362fa7dce7094f92
sbuss/pypercube
tests/test_time_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add tests for untested converters" }, { "role": "assistant", "content": "import pytest\n\nfrom netsgiro.converters import value_or_none, truthy_or_none, to_bool\n\nvalues = [\n (int, None, None, None),\n (int, 1, 1, ...
python
new_file
1
2
apache-2.0
5b8ca7bf4a3383eaddc148caffcf89e73efc743d
otovo/python-netsgiro
tests/test_converters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [Chore] Add shopping list class to" }, { "role": "assistant", "content": "from person import Person\n\nclass ShoppingList:\n \n def create(self,list_name,description):\n with open('shopping_list.txt','a') as sl:\n ...
python
new_file
3
2
mit
616af50809bbc1eb64175a233f08c06426e8b636
AndersonMasese/Myshop,AndersonMasese/Myshop,AndersonMasese/Myshop
Designs/shopping_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script to use supersegger io module" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n supersegger_trials\n ^^^^^^^^^^^^^^^^^^\n\n Example to test/use supersegger...
python
new_file
1
2
mit
75d58ad792380c182a6842c6695f537268932113
LeBarbouze/tunacell
scripts/supersegger_trials.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add patch-file generator for GLEDiator" }, { "role": "assistant", "content": "import sys\nif (len(sys.argv) <= 3):\n\tprint \"Usage: %s <IP> <width> <height>\" % (sys.argv[0])\n\tsys.exit()\nip = sys.argv[1].split(\".\")\nif (len...
python
new_file
18
0
mit
ab23323eb253b732c8f3ed08420be754790d2e76
Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75
utils/glediator_patch.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Write python code for the following: Add tests for tenancy filters" }, { "role": "assistant", "content": "from django.test import TestCase\n\nfrom tenancy.filters import TenantFilter, TenantGroupFilter\nfrom tenancy.models import Tenant, TenantGroup\n\n\nclass Tenan...
python
new_file
1
2
apache-2.0
39d0261d8a325be1c6d50d3a47e0563f3dcdfa8e
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
netbox/tenancy/tests/test_filters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add LBP descriptor example script" }, { "role": "assistant", "content": "import sensor, time, image\nsensor.reset()\n\n# Reset sensor\nsensor.reset()\n\n# Sensor settings\nsensor.set_contrast(1)\nsensor.set_gainceiling(16)\nsenso...
python
new_file
1
0
mit
08f7cb8832ea361888a915c3e9532d8ff2cbd718
iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv
usr/examples/lbp_desc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Lawrence Transit (KS) GTFS provider" }, { "role": "assistant", "content": "from busbus.provider import ProviderBase\nfrom busbus.provider.gtfs import GTFSMixin\n\n\nclass LawrenceTransitProvider(GTFSMixin, ProviderBase):\n ...
python
new_file
1
1
mit
6a9ef33a996b40ca67b5b1d894c90396a8e5b158
spaceboats/busbus
busbus/provider/lawrenceks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make sample python script to run multiple experiments" }, { "role": "assistant", "content": "import fire\n\nfrom datetime import datetime\nfrom itertools import product\nfrom itertools import izip\nimport os\nimport subprocess\n\...
python
new_file
1
3
mit
6288ec2dfff70667c7fcbfa76a25395f2aaed744
yuyu2172/ilv
examples/train_mnist/run_experiments.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights magical well problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Growing Plant Problem\n\n\ndef magicalWell(a, b, n):\n return sum([x * y for (x, y) in zip(range(a, a + n), r...
python
new_file
1
3
mit
61b1410af66bbdbdc3ac2bb222b43a2aebc9beb8
HKuz/Test_Code
CodeFights/magicalWell.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for finding unused files" }, { "role": "assistant", "content": "import os\nfrom re import *\n\ndef read_file(name):\n with open(name, 'r') as f:\n return f.read()\n\nusage_regex = compile(r'Module\\(\\s*new\\...
python
new_file
6
4
mit
e8d5306716cb0d2fbc88e79175098dc17e475e84
martinhath/bnn
src/main/scala/find-unused.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add tags for a blog sidebar" }, { "role": "assistant", "content": "from django import template\n\nfrom elephantblog.models import Category, Entry\n\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef elephantblog_...
python
new_file
1
1
bsd-3-clause
cd3a1b4cb31c30860734df7b16879e5f8ab46214
sbaechler/feincms-elephantblog,michaelkuty/feincms-elephantblog,sbaechler/feincms-elephantblog,feincms/feincms-elephantblog,sbaechler/feincms-elephantblog,matthiask/feincms-elephantblog,feincms/feincms-elephantblog,matthiask/feincms-elephantblog,joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,joshuajona...
elephantblog/templatetags/elephantblog_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write initial code to walk through the MPEG-TS file and find byte offsets." }, { "role": "assistant", "content": "#!/usr/bin/env python3\nimport argparse\nfrom collections import defaultdict\nfrom itertools import count\nfrom ts ...
python
new_file
1
11
bsd-2-clause
129179d17e1ce1f866a57ef73a641abb9caccb03
brendanlong/dash-ts-tools,brendanlong/dash-ts-tools
dash-indexer.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add tests for new CA post api" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Tests for PUT and POST requests for ob...
python
new_file
3
1
apache-2.0
d752c73ec278eb36005dfe5ca62596e111970614
josthkko/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,VinnieJohns...
test/integration/ggrc/services/test_custom_attributes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add subdomain check using crt.sh\n\n* Removes wildcard\n* Gets all ssl certs for possible subdomains" }, { "role": "assistant", "content": "import urllib\nimport requests\nfrom bs4 import BeautifulSoup\n\n\ndef req_crtsh(search_s...
python
new_file
3
8
unlicense
c9b21c0076ee00364a7bc94f44671612402211f0
nethunteros/punter
crt_sh.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup\n\n__about__ = {}\n\nwith open(\"nacl/__about__.py\") as fp:\n exec(fp.read(), None, __about__)\n\n\ntry:\n import nacl.nacl\nexcept ImportError:\n # installing - there is no cffi...
python
edit
1
0
apache-2.0
0cccff9b6a72b61a1b6cdfeb3ed5be525e74b822
dstufft/pynacl,xueyumusic/pynacl,dstufft/pynacl,pyca/pynacl,lmctv/pynacl,scholarly/pynacl,dstufft/pynacl,alex/pynacl,Insoleet/cutecoin,xueyumusic/pynacl,JackWink/pynacl,reaperhulk/pynacl,lmctv/pynacl,scholarly/pynacl,xueyumusic/pynacl,hoffmabc/pynacl,JackWink/pynacl,ucoin-io/cutecoin,lmctv/pynacl,JackWink/pynacl,xueyum...
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: test(CenterOfRotation): Add a test for spherical camera with off center object" }, { "role": "assistant", "content": "from paraview.simple import *\n\nimport tonic\nfrom tonic import paraview as pv\n\ndataset_destination_path = '...
python
new_file
7
0
bsd-3-clause
f98a20977c359189b506f765d6c2493fda7718a9
Kitware/tonic-data-generator,Kitware/tonic-data-generator
scripts/tests/off-center-rotation.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Implement Edit Distance in Python" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\nclass Solution(object):\n def minDistance(self, a, b):\n \"\"\"\n Returns the edit distance between strings a an...
python
new_file
1
9
mit
450a670635d676005e598ae3a3d96eb5d80756af
andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms
leetcode/algorithms/edit-distance/solution.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic python for notes" }, { "role": "assistant", "content": "# Hello world\nprint('Hello, world!')\n\n\n# Indentation is important in Python!\nx = 1\nif x == 1:\n print('x is 1')\n\n\n# Numbers and Strings\nmy_int = 8\npr...
python
new_file
2
1
mit
0ea6f45792a3e1ce321f774a8582171fe4d39ad0
HackBinghamton/club,HackBinghamton/club,HackBinghamton/club
demo/python-overview/intro.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"installer script for pywikibot 2.0 framework\"\"\"\n#\n# (C) Pywikipedia team, 2009-2012\n#\n__version__ = '$Id$'\n#\n# Distributed under the terms of the MIT license.\n#\nimport sys\n\nfrom distribute_setup ...
python
edit
1
0
mit
ae283eb36026dfe092c6f69d310055f8e373d953
smalyshev/pywikibot-core,xZise/pywikibot-core,TridevGuha/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,hasteur/g13bot_tools_new,trishnaguha/pywikibot-core,h4ck3rm1k3/pywikibot-core,npdoty/pywikibot,magul/...
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test file for Lotka-Volterra simulation." }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nfrom nose.tools import assert_equal, assert_almost_equal, assert_true\nfrom numpy.testing import assert_array_equal\n...
python
new_file
14
3
bsd-3-clause
f290736a1b5c8dd4616462d97fdf7809d78604ad
Baaaaam/cyclus,gidden/cyclus,Baaaaam/cyclus,gidden/cyclus,hodger/cyclus,hodger/cyclus,mbmcgarry/cyclus,gidden/cyclus,hodger/cyclus,Baaaaam/cyclus,mbmcgarry/cyclus,gidden/cyclus,mbmcgarry/cyclus,hodger/cyclus,hodger/cyclus,rwcarlsen/cyclus,rwcarlsen/cyclus,mbmcgarry/cyclus,rwcarlsen/cyclus,rwcarlsen/cyclus
tests/test_lotka_volterra.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Add tests to addresses module" }, { "role": "assistant", "content": "import json\nimport random\n\nimport pytest\n\nfrom zephyrus.addresses import Participants\nfrom zephyrus.exceptions import ImproperlyConfigured\n\n\n@pytest.fi...
python
new_file
1
1
mit
b2479b41672b0fafaabd42dc3dde56328f77ab0b
wairton/zephyrus-mas
tests/test_addresses.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic unit tests for Ubuntu specific platform" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nmbed SDK\nCopyright (c) 2011-2015 ARM Limited\n\nLicensed under the Apache License, Version 2.0 (the \"Licens...
python
new_file
1
1
apache-2.0
0241bbc9b370545d7d1270fa391fd9347b9c39a6
mtmtech/mbed-ls,jupe/mbed-ls,mazimkhan/mbed-ls,jjones646/mbed-ls,jupe/mbed-ls,jjones646/mbed-ls,mtmtech/mbed-ls,mazimkhan/mbed-ls
test/os_linux_ubuntu.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for custom object fields\n\nChange-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this f...
python
new_file
1
1
apache-2.0
c0cebba170b8e3ea5e62e335536cf974bbbf08ec
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
zun/tests/unit/objects/test_fields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example test with visual testing asserts" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nu\"\"\"\nCopyright 2015 Telefónica Investigación y Desarrollo, S.A.U.\nThis file is part of Toolium.\n\nLicensed unde...
python
new_file
1
1
apache-2.0
9621789c86743f6f75096760827d7c4458973f1a
Telefonica/toolium-examples
tests/web/test_web_visual_testing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for opening same file multiple times" }, { "role": "assistant", "content": "import nose\nimport angr\nimport os\n\nimport logging\nl = logging.getLogger(\"angr_tests\")\n\ntest_location = str(os.path.dirname(os.path.realpath...
python
new_file
1
2
bsd-2-clause
10dfd1ca4ab8e3bd7956c60a98abb31d3fb58405
f-prettyland/angr,axt/angr,angr/angr,axt/angr,iamahuman/angr,schieb/angr,iamahuman/angr,tyb0807/angr,schieb/angr,schieb/angr,f-prettyland/angr,chubbymaggie/angr,angr/angr,angr/angr,tyb0807/angr,axt/angr,tyb0807/angr,f-prettyland/angr,iamahuman/angr,chubbymaggie/angr,chubbymaggie/angr
tests/test_multi_open_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for the LineReader class" }, { "role": "assistant", "content": "import glob\nfrom mrs.fileformats import LineReader\nimport sys\n\ntry:\n from cStringIO import StringIO as BytesIO\nexcept ImportError:\n from ...
python
new_file
4
3
apache-2.0
cc9f7d0715d104868684d9213c1ca84f7b75aadb
kseppi/mrs-mapreduce,byu-aml-lab/mrs-mapreduce
tests/fileformats/test_linereader.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add implementation of RANSAC algorithm" }, { "role": "assistant", "content": "import numpy as np\n\n\ndef ransac(X, y, estimator_cls, min_samples, residual_threshold,\n is_data_valid=None, is_model_valid=None, max_trial...
python
new_file
3
12
bsd-3-clause
daca76320aa72d03a1372139be234d03ccf8641b
Garrett-R/scikit-learn,nesterione/scikit-learn,procoder317/scikit-learn,rishikksh20/scikit-learn,Myasuka/scikit-learn,evgchz/scikit-learn,mugizico/scikit-learn,AlexanderFabisch/scikit-learn,Windy-Ground/scikit-learn,Barmaley-exe/scikit-learn,kjung/scikit-learn,yanlend/scikit-learn,nhejazi/scikit-learn,treycausey/scikit...
sklearn/utils/ransac.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add import file from Ruben" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue May 10 11:33:13 2016\n@author: ruben\n\"\"\"\n\nfrom gwtsa.imports.dinodata import DinoGrondwaterstand\nfrom gwtsa....
python
new_file
1
5
mit
7bd561d72fc79927ed8960f2528af671b0fc45c8
pastas/pasta,gwtsa/gwtsa,pastas/pastas
gwtsa/imports/import_series.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for Client.clone()." }, { "role": "assistant", "content": "\"\"\"Test :meth:`icat.client.Client.clone`.\n\"\"\"\n\nfrom __future__ import print_function\nimport pytest\nimport icat\nimport icat.config\nfrom conftest im...
python
new_file
3
1
apache-2.0
e869407e1b8c9a7e8d3d1ad1578bb83541dd7ffa
icatproject/python-icat
tests/test_07_client_clone.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add catapult_base folder to tools/telemetry to make the refactor easier.\n\nThis will make some of the refactoring more obvious and easy to review, as\nwell as making the needed reafctoring after moving to the catapult repo easier.\n\nBUG=47...
python
new_file
1
0
bsd-3-clause
a038337824d88a01293711483390e67a2c969df0
catapult-project/catapult,sahiljain/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,sahiljain/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,benschmaus/catapult,catapult-pr...
catapult_base/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a HBase metrics collector.\n\nThis change adds a basic hbase metrics collector that works in the same\nway that the hadoop collector does." }, { "role": "assistant", "content": "# coding=utf-8\n\n\"\"\"\nDiamond collector for...
python
new_file
1
12
mit
aa2b62a19c8a988f2582a5e13475322e6efb4880
thardie/Diamond,python-diamond/Diamond,CYBERBUGJR/Diamond,Ssawa/Diamond,acquia/Diamond,Ormod/Diamond,acquia/Diamond,szibis/Diamond,Ssawa/Diamond,hvnsweeting/Diamond,actmd/Diamond,jumping/Diamond,saucelabs/Diamond,works-mobile/Diamond,signalfx/Diamond,signalfx/Diamond,stuartbfox/Diamond,russss/Diamond,CYBERBUGJR/Diamond...
src/collectors/hbase/hbase.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add tool as per request" }, { "role": "assistant", "content": "#!/mesonet/python/bin/python\n# Generate a shapefile of the WOU outline.\n# 28 Aug 2004 port to iem40\n\nimport shapelib, dbflib, mx.DateTime, zipfile, os, sys, shuti...
python
new_file
4
0
mit
adc1de57f41c6868f997a05a7410d72d523d6036
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
cgi-bin/request/gis/wou_outline.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights find email domain problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Find Email Domain Problem\n\n\ndef findEmailDomain(address):\n index = max([i for i, char in enumerate(a...
python
new_file
1
3
mit
9ed2cbc57ca9cf370edc72cd2dc345a555e0ea96
HKuz/Test_Code
CodeFights/findEmailDomain.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add products for product feed task" }, { "role": "assistant", "content": "products = [\n 'AN4EF3',\n 'AE93CR',\n 'A9Q4MK',\n 'AC97HP',\n 'AK967J',\n 'AB2S93',\n 'AB2JT9',\n 'AN67HP',\n 'AK54VQ',\n 'A...
python
new_file
1
0
mit
a8c97f609f2477ddc59cd0ec0f1eb7e3604468f4
coolshop-com/coolshop-application-assignment
product_feed.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add interactive version of crop script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport click\nfrom PIL import Image\nfrom utils import get_file_list\n\n\n@click.command()\n@click.ar...
python
new_file
1
2
mit
3e785db34bad58aa1300f66f05f4acad8d7b34c3
vladimirgamalian/pictools
interactive_crop.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some simple unit tests." }, { "role": "assistant", "content": "from pyudl.tds import TDSCatalog\n\n\nclass TestCatalog(object):\n baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/'\n\n def test_basic(self):\n ...
python
new_file
3
1
bsd-3-clause
5ded544070c0f6c2a07a11e48e94ded92c79d141
MoonRaker/siphon,Unidata/siphon,dopplershift/siphon,dopplershift/siphon,hyoklee/siphon
pyudl/tds/test/test_catalog.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to generate MIDI note -> frequency tables" }, { "role": "assistant", "content": "def midi_to_freq(note):\n return (2**((note-69)/12)) * 440\n\n\nprint(\"const uint16_t notemappings[] PROGMEM = {\")\nprint(\",...
python
new_file
1
1
mit
82b5fbc30c31fa6c3ba5ec29a4088d539987e12b
ArchimedesPi/synths,ArchimedesPi/synths,ArchimedesPi/synths
dds_playground/generate_midimapping.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for Terminal 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\"\"\"" } ]
python
new_file
1
0
mit
5578d11f45e9c41ab9c4311f2bed48b9c24d9bf5
PatrikValkovic/grammpy
tests/grammar_term-nonterm_test/NonterminalHaveTest.py
rejected_duplicate
Near-duplicate of sample 7653
true
[ { "role": "user", "content": "Write python code for the following: Create basic structure for test data benchmark module" }, { "role": "assistant", "content": "import os\nimport urllib.request\n'''\nChecks to see whether the data is present.\nTo be used to check whether to download OR not.\nInse...
python
new_file
2
0
mit
9f81fa58475a352aa009a5009dd31428f574fdd9
bhaprayan/sagkocana
data/retrieve/retrieve.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to create a \"quick projects\" directory, for fast access without having to dig into repo structure" }, { "role": "assistant", "content": "import os\nrootdir = '/Users/work/development/repositories/pet-projects'\n\nlan...
python
new_file
4
0
mit
de52670eebc4d78aee94cdbabdcb31fcaad31fc3
heliosbryan/pet-projects,heliosbryan/pet-projects
linkprojects.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration to set share_title for PreprintProviders on prod" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.1 on 2017-08-03 15:07\n\"\"\"Sets the share_title field on production Prepr...
python
new_file
1
2
apache-2.0
0bc2a9851f695418ce99d6a7b83fcb7843a28f88
leb2dg/osf.io,mattclark/osf.io,saradbowman/osf.io,cslzchen/osf.io,binoculars/osf.io,caneruguz/osf.io,erinspace/osf.io,sloria/osf.io,caseyrollins/osf.io,baylee-d/osf.io,caseyrollins/osf.io,HalcyonChimera/osf.io,adlius/osf.io,adlius/osf.io,pattisdr/osf.io,leb2dg/osf.io,chennan47/osf.io,aaxelb/osf.io,binoculars/osf.io,bri...
osf/migrations/0043_set_share_title.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add iTunes script for making year playlists" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nfrom collections import defaultdict\nfrom dateutil.parser import parse\nfrom pathlib import Path\nimport xml.etree.Eleme...
python
new_file
1
15
mit
16e27029f32ae0329a7da022efd06625987d1622
mk12/scripts,mk12/scripts,mk12/scripts,mk12/scripts
itunes.py
rejected_complexity
Cyclomatic complexity too high: 15
true
[ { "role": "user", "content": "Write python code for the following: Add solution to lintcode question 187" }, { "role": "assistant", "content": "class Solution:\n # @param gas, a list of integers\n # @param cost, a list of integers\n # @return an integer\n def canCompleteCircuit(self,...
python
new_file
1
5
mit
5c2da7acfa53a179328d1aa2106c298533047af0
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Medium/187_Gas_Station.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool to detect multiple use of a negative unit\n\nThe script tools/detect_multiple_usage.py automatically parses\n'do_sort_neg.txt' and checks whether the same reference channel\noccurs more than once." }, { "role": "assistant", ...
python
new_file
1
6
mit
82fa4a85a1171fd62cab68f90ec7e8ab8fbbc862
jniediek/combinato
tools/detect_multiple_usage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for exceptions on process_spider_input" }, { "role": "assistant", "content": "\nimport logging\n\nfrom testfixtures import LogCapture\nfrom twisted.trial.unittest import TestCase\nfrom twisted.internet import defer\n\nfrom s...
python
new_file
1
1
bsd-3-clause
735de8167d3e6b0085710d406c8c2976913baa43
pablohoffman/scrapy,wujuguang/scrapy,finfish/scrapy,eLRuLL/scrapy,starrify/scrapy,starrify/scrapy,eLRuLL/scrapy,eLRuLL/scrapy,wujuguang/scrapy,pawelmhm/scrapy,pawelmhm/scrapy,wujuguang/scrapy,pablohoffman/scrapy,elacuesta/scrapy,scrapy/scrapy,elacuesta/scrapy,finfish/scrapy,pablohoffman/scrapy,dangra/scrapy,scrapy/scra...
tests/test_spider_mw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: nrf/modules/scripts: Add file system formatting script.\n\nAdd a helper script _mkfs.py which automatically formats the file system if\nnrf.Flash() is located and a VFS file system has been included in the\ncompilation.\n\nThe precedence is:...
python
new_file
4
0
mit
7b6ad0ce2e6c3c623966c5568989ed5042fb9b1d
bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython
ports/nrf/modules/scripts/_mkfs.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add an example test to run" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\n\n\nclass MyTestClass(BaseCase):\n\n def test_basic(self):\n self.open(\"http://xkcd.com/353/\")\n self.wait_fo...
python
new_file
1
1
mit
10f14597a84a25565f5485ae452ae95c361a2b1d
possoumous/Watchers,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,possoumous/Watchers,possoumous/Watchers,ktp420/SeleniumBase,mdmintz/seleniumspot,ktp420/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,possoumous/Watchers,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBa...
integrations/node_js/my_first_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add news app user behavior simulator" }, { "role": "assistant", "content": "import random\nimport gevent\n\nfrom locust import HttpLocust, TaskSet, task\n\n\nHTTP_USER = \"test\"\nHTTP_PASSWORD = \"1\"\n\nclass NewsAppApi(TaskSet...
python
new_file
1
2
apache-2.0
0173086c95719e1ae12a431626f181e402f9e588
drednout/locust_on_meetup
http_simulate_news_app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a migration for the previous commit" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-04 00:04\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, ...
python
new_file
1
0
mit
4dea108334acb98cc11a45cfa362f372bb052c79
DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca
galleries/migrations/0008_auto_20170503_1704.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add docker client options to argparse\n\nAll docker-py client options are handled through argparse, except the\nssl options." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport argparse\nimport atexit\nimport l...
python
new_file
1
2
mit
84494fc4db847523a88b70f8cd1c93c10b689ad1
aleasoluciones/docker-image-cleaner,aebm/docker-image-cleaner
chacha.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add demo w/ context manager and lifetime" }, { "role": "assistant", "content": "import judicious\n\njudicious.seed(\"cc722bf6-e319-cf63-a671-cbae64bfdb0f\")\n\n# 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4\n# 2 (timeout) :...
python
new_file
1
1
mit
1abe318ffc8ece592d07ca9657146a42517a16f2
suchow/judicious,suchow/judicious,suchow/judicious
tests/test52.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an importer for the dataset from OurAirports, usable instead of the FAA’s data." }, { "role": "assistant", "content": "import csv\nimport os\nfrom decimal import Decimal\n\nfrom django.contrib.gis.geos import Point\nfrom djan...
python
new_file
2
9
bsd-3-clause
fcdb3bbc64f7ecb2761ccc00bff5ed8472e4d65d
adamfast/faadata,adamfast/faadata,adamfast/faadata
faadata/airports/management/commands/ourairports_import.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a WSGI application file" }, { "role": "assistant", "content": "import os\n\n\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"config\")\nos.environ.setdefault(\"DJANGO_CONFIGURATION\", \"Local\")\n\nfrom configurations.ws...
python
new_file
1
0
bsd-3-clause
6bab44116eb343b5103b6ed23797a83bc1feedbd
CorbanU/corban-shopify,CorbanU/corban-shopify
shopify/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for SearchQuery meta options" }, { "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
3
0
mit
9b0c0e0ceedde081846a2360c45eb6f14b9cd9f5
yunojuno/elasticsearch-django
elasticsearch_django/migrations/0003_auto_20160926_2021.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for classes in analytics_enums module.\n\nIncludes tests for classes that convert dictionaries into attributed classes." }, { "role": "assistant", "content": "# Copyright 2014 Google Inc. All Rights Reserved.\n\nimport u...
python
new_file
1
1
bsd-3-clause
bd3506c158c9aa03fabcd15d165bd1bc2b0845da
jiayliu/apprtc,webrtc/apprtc,82488059/apprtc,shelsonjava/apprtc,virajs/apprtc,arnauorriols/apprtc,aadebuger/docker-apprtc,webrtc/apprtc,todotobe1/apprtc,aadebuger/docker-apprtc,YouthAndra/apprtc,TheKnarf/apprtc,bpyoung92/apprtc,JiYou/apprtc,mvenkatesh431/apprtc,arnauorriols/apprtc,procandi/apprtc,mvenkatesh431/apprtc,v...
src/app_engine/analytics_enums_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a tool to validate ecs library dependencies.\n\nThe embedded content_shell starting point for applications such as the\nChromeCast shell must not include dependencies that would increase its\nmemory footprint. This script automatically t...
python
new_file
9
9
bsd-3-clause
a31461138d20673f718e0bd9fb4bb7aa9c1ff993
jaruba/chromium.src,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,anirudhSK/chromium,Pluto...
tools/check_ecs_deps/check_ecs_deps.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add dedupe district slug management command" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom django.db.models import Count\n\nfrom scuole.districts.models import District\n\n\nclass...
python
new_file
1
3
mit
26202bffe9f36bb35efed30d4a64e17a56c78cf9
texastribune/scuole,texastribune/scuole,texastribune/scuole,texastribune/scuole
scuole/districts/management/commands/dedupedistrictslugs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example that compares two files with every metric" }, { "role": "assistant", "content": "from skvideo.io import VideoCapture\nfrom skvideo.metrics import ssim, psnr, vifp\nimport sys\nimport json\n\nfilename1, filename2 = sys...
python
new_file
7
1
bsd-3-clause
e98fc8302cb9f8d435b197cd3fc47db23e498929
aizvorski/scikit-video
skvideo/examples/measure.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add argument parsing to main executable" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"Main executable for ShivyC compiler\n\n\"\"\"\n\nimport argparse\n\ndef get_arguments():\n \"\"\"Set up the argumen...
python
new_file
1
1
mit
e8343a21ba302e986a51673b42cda054cfb2e32a
ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC
shivyc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple TSV reader for HUWiki corpus" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport csv\n\n\nclass TSVOpener:\n def __init__(self, opt={}):...
python
new_file
2
1
apache-2.0
2101fd89059f73078bf5cfc8aa1399fda7ea567e
davidpgero/hungarian-nltk
examples/corpus_reader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module with some generic utility functions" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport io\nimport time\nfrom functools import lru_cache\n\n\ndef timing(func):\n \"\"\"Decorator to measure and pri...
python
new_file
1
5
bsd-2-clause
05d04680f3a25a86fa9d8ac3c232d8dfb538d67e
coblo/isccbench
iscc_bench/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add download all year to higher education." }, { "role": "assistant", "content": "import os\nimport commands\nimport time\nimport logging\nimport sys\n\nif len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']):\n print \...
python
new_file
3
0
mit
27810a25f7d11d95fac92138ad8c9af24cb65304
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
scripts/data_download/higher_education/create_all_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to remove an arg" }, { "role": "assistant", "content": "import sys\n\nprogram, first, *rest = sys.argv\nargs = []\nresult = 1\nfor arg in rest:\n if arg == first:\n result = 0\n else:\n quote...
python
new_file
1
0
mit
8f74688fdf73c0a61b30083a616aa5c097854e42
jalanb/jab,jalanb/jab
src/python/site/remove_arg.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility to batch convert tiff files." }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom PIL import Image\nimport rethinkdb as r\nfrom optparse import OptionParser\nimport sys\nimport os\nimport errno\n\n\ndef ...
python
new_file
5
9
mit
7c249b245406198aa1c2bc38012f2ae404b757aa
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/tiffconvert.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to auto-generate a Change Log." }, { "role": "assistant", "content": "#! /usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport subprocess\nfrom collections import defaultdict\n\nim...
python
new_file
1
8
mit
7cea3bbcb844bd29ee14bb490217d990213620d0
csdms/pymt,csdms/coupling,csdms/coupling
scripts/make_changelog.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Include nose tests for hydrotrend" }, { "role": "assistant", "content": "#! /usr/bin/python\n\nfrom build_model_rpm import BuildModelRPM\nfrom nose.tools import *\n\n@raises(TypeError)\ndef test_fail_with_no_parameters():\n Bu...
python
new_file
4
1
mit
f19a982d25e44762298fd6def44b9566b4e0d6e0
csdms/rpm_models
tests/test_build_model_rpm.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Move entity extraction functions to emotools\n\nThe entity extraction functions defined in the generate_liwc_data.py\nscript were moved to the emotools module, because I want to use these\nfunctions in the visualization app. The next step is...
python
new_file
1
5
apache-2.0
f74051f18dc0ee76f8add85978893a1a42324c40
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
emotools/plays.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Python script to dump a \"unity build\" of any test program.\n\nThis script works around the fact that I don't have a conforming C++17\ncompiler on my laptop (yet!). Using this script I can turn a ten-line\ntest program into a standalo...
python
new_file
2
6
mit
44eb353b6efae0f0459b82e0ec7c171fc2ce9ba6
Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch
dependency-graph/unity-dump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport multiprocessing\npreload_app = True\nworkers = multiprocessing.cpu_count() * 2 + 1\nworker_class = 'gevent'\nkeepalive = 60\ntimeout = 900\nmax_requests = 600\n# defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s\ngrac...
python
edit
1
1
bsd-3-clause
017d33a8fdcf55272613550c5360a998f201ad3d
dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,gmimano/commcaretest,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedso...
services/gunicorn_conf.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module/function to set proc name." }, { "role": "assistant", "content": "#!/usr/bin/python\n#\n# Copyright (c) 2013 Mikkel Schubert <<EMAIL>>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\...
python
new_file
2
2
mit
1e6ac739fc7a6ec153d0a4d96d80fb1957c413ae
MikkelSchubert/paleomix,MikkelSchubert/paleomix,MikkelSchubert/paleomix
pypeline/common/system.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights elections winners problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Election Winners Problem\n\n\ndef electionsWinners(votes, k):\n max_v = max(votes)\n count_max = vote...
python
new_file
1
5
mit
e6afac74a504515e0f4151fc96fdc4752cb9b890
HKuz/Test_Code
CodeFights/electionsWinners.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 389. Find the Difference\n\n389. Find the Difference: https://leetcode.com/problems/find-the-difference/" }, { "role": "assistant", "content": "from collections import Counter\nclass Solution(object):\n def...
python
new_file
1
3
apache-2.0
06df8e5729e95f74b974a8b38f6b16044fe2aa8a
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/find-the-difference.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a little config test file (will do more later)" }, { "role": "assistant", "content": "from os import environ\n\n\nclass ConfigMeta(type):\n def __new__(cls, class_name, parents, attrs, app_name=None):\n cls._app_nam...
python
new_file
1
4
mit
086b3a92f8d9390d44d2d25cd236cfa2194a0364
foxscotch/foxrollbot
bleh.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add move emails from inbox script" }, { "role": "assistant", "content": "import logging\n\nfrom csv_email import get_move_folder, type_accepts_message\nfrom settings import get_csv_file_types, get_email_client, LOGGING_KWARGS\n\n...
python
new_file
1
5
mit
54bbc3ea51e1242b7553883e28e3e792b987063a
AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files
move_emails_to_folders.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example that uses voluptuous." }, { "role": "assistant", "content": "\"\"\"Usage: prog.py --count=N OUTDIR FILE\n\nArguments:\n FILE input file\n OUTDIR out directory\n\nOptions:\n --count NUM number of operations ...
python
new_file
1
0
mit
e0c88839c4646e2d619f27399a0e30845e98735d
docopt/docopt,crcsmnky/docopt,snowsnail/docopt,wkentaro/docopt,devonjones/docopt,kenwilcox/docopt,benthomasson/docopt,Zearin/docopt,jagguli/docopt
examples/validation_example.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for executing all tests in both services." }, { "role": "assistant", "content": "import nose\nimport os\nfrom tests.integration import SUBSCRIPTION, ONDEMAND\n\ntestfiles = [file for file in os.listdir('.') if file.sta...
python
new_file
2
0
apache-2.0
ac70be9e200b34a4509b47d0db5ed65f3a8f072a
kemiz/tosca-vcloud-plugin,nmishkin/tosca-vcloud-plugin,denismakogon/tosca-vcloud-plugin,cloudify-cosmo/tosca-vcloud-plugin,vmware/tosca-vcloud-plugin
tests/integration/run_all_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 539. Minimum Time Difference\n\n539. Minimum Time Difference: https://leetcode.com/problems/minimum-time-difference/" }, { "role": "assistant", "content": "class Solution(object):\n def findMinDifference(se...
python
new_file
1
2
apache-2.0
32a02c58a67813417eaa49c80edbdd77f8b2569f
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/minimum-time-difference.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ENH: Add a Python example of creating a tree." }, { "role": "assistant", "content": "from vtk import *\n\ngraph = vtkMutableDirectedGraph()\na = graph.AddVertex()\nb = graph.AddChild(a)\nc = graph.AddChild(a)\nd = graph.AddChild(...
python
new_file
6
0
bsd-3-clause
39940ba7b5cfd2a62f5168a58efbd03eab1b8728
jeffbaumes/jeffbaumes-vtk,candy7393/VTK,candy7393/VTK,naucoin/VTKSlicerWidgets,biddisco/VTK,gram526/VTK,naucoin/VTKSlicerWidgets,sumedhasingla/VTK,sankhesh/VTK,msmolens/VTK,jeffbaumes/jeffbaumes-vtk,biddisco/VTK,johnkit/vtk-dev,SimVascular/VTK,keithroe/vtkoptix,sumedhasingla/VTK,mspark93/VTK,cjh1/VTK,spthaolt/VTK,sptha...
Examples/Infovis/Python/create_tree.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add example for training parser" }, { "role": "assistant", "content": "from __future__ import unicode_literals, print_function\nimport json\nimport pathlib\nimport random\n\nimport spacy\nfrom spacy.pipeline import DependencyPars...
python
new_file
4
10
mit
4574fe87c6efa5b1b9431546f787fcf30ad0d6b6
raphael0202/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,banglakit/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,explosion/spaCy,raphael0202/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,honnibal/spaCy,Gregory-Howard/spaCy,recognai/spaCy,banglakit/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/sp...
examples/training/train_parser.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for gref writing" }, { "role": "assistant", "content": "import store_fixture\nimport groundstation.store\n\nfrom groundstation.gref import Gref\n\n\nclass TestGitGref(store_fixture.StoreTestCase):\n storeClass = groun...
python
new_file
1
1
mit
063d662561264888a53195a677c36e524a5b465b
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_gref.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a kovot stream for Mastodon" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport collections.abc\nfrom mastodon import StreamListener, MastodonError, Mastodon as MastodonAPI\nfrom que...
python
new_file
1
3
mit
0c6f90ded8b7d5a209f648417510aadc0a017425
kenkov/kovot,kenkov/kovot
kovot/stream/mastodon.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Malaysian states and ISO Codes" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# speci...
python
new_file
22
1
mit
d4114f47b36d1ecbcf06f7bda2c0dd6c9a6a1b01
ryanss/holidays.py,dr-prodigy/python-holidays
holidays/countries/malaysia.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n__version__ = \"0.4.2\"\n\nfrom sympy.core import *\nfrom sympy.modules import *\n\n```\n\nApply this change: Use the version 0.5.0 when we merge it." }, { "role": "assistant", "content": "\n__version__ = \"0.5.0\"\n\nfrom sym...
python
edit
3
0
bsd-3-clause
bc693c94fcc7ccd06e283c08012937c5732c0da3
yukoba/sympy,jamesblunt/sympy,garvitr/sympy,abhiii5459/sympy,shikil/sympy,madan96/sympy,amitjamadagni/sympy,VaibhavAgarwalVA/sympy,kaushik94/sympy,hrashk/sympy,asm666/sympy,AkademieOlympia/sympy,Designist/sympy,jaimahajan1997/sympy,sampadsaha5/sympy,jbaayen/sympy,sunny94/temp,garvitr/sympy,AkademieOlympia/sympy,Shaswat...
sympy/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script demonstrating preparing PCA parameters computed by train_pca.py" }, { "role": "assistant", "content": "import cPickle as pkl\nimport base64\nimport numpy as np\nfrom lopq.model import eigenvalue_allocation\n\n\ndef mai...
python
new_file
3
1
apache-2.0
145532e77d2bf10860df3dfb13ce0ef1a4e57772
yahoo/lopq,yahoo/lopq
spark/pca_preparation.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Build the project on AppVeyor.\n\nimport os\nfrom subprocess import check_call\n\nbuild = os.environ['BUILD']\nconfig = os.environ['CONFIG']\ncmake_command = ['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' +...
python
edit
1
0
bsd-2-clause
da547f5533f338cc0c65877b44ca40adf31754f7
cppformat/cppformat,mojoBrendan/fmt,mojoBrendan/fmt,alabuzhev/fmt,nelson4722/cppformat,seungrye/cppformat,lightslife/cppformat,blaquee/cppformat,mojoBrendan/fmt,Jopie64/cppformat,lightslife/cppformat,Jopie64/cppformat,alabuzhev/fmt,wangshijin/cppformat,dean0x7d/cppformat,seungrye/cppformat,cppformat/cppformat,nelson472...
support/appveyor-build.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple bulb example (getting the details of a bulb)" }, { "role": "assistant", "content": "\"\"\"\nCopyright (c) 2017-2018 Fabian Affolter <<EMAIL>>\n\nLicensed under MIT. All rights reserved.\n\"\"\"\nimport pymystrom\n\nbul...
python
new_file
1
0
mit
46fa53acba8b00c5f7e78d1502aab72838cbccb6
fabaff/python-mystrom
example-get-data-bulb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add get_inspection_page method to scrape entire listing." }, { "role": "assistant", "content": "from bs4 import BeautifulSoup\nimport requests\nsoup = BeautifulSoup()\n\n\nINSPECTION_DOMAIN = 'http://info.kingcounty.gov'\nINSPECT...
python
new_file
1
3
mit
efc89a6858782da6e27f1f5abf32b4acc390e2ac
bm5w/souptests,bm5w/souptests
scraper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add configuration for Flask 'hello world' app" }, { "role": "assistant", "content": "from flask import Flask\nfrom flask import Response\nflask_app = Flask('flaskapp')\n\n@flask_app.route('/hello')\ndef hello_world():\n return R...
python
new_file
1
1
apache-2.0
17857a746484dd49bf5805f596e6efcd23035afb
RagBillySandstone/google-python-exercises
my_own_exercises/web_server/flaskapp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: feat: Add code for creating samples" }, { "role": "assistant", "content": "# importing modules/ libraries\nimport pandas as pd\nimport random\n\n# create sample of order products train data\nn = 1384617\ns = round(0.1 * n)\nskip ...
python
new_file
1
0
mit
4a33e88cfa33ce74a870986d6514fce49c58552a
rjegankumar/instacart_prediction_model
create_sample.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command for running VACUUM [ANALYZE]\n\n[skip ci]" }, { "role": "assistant", "content": "from __future__ import unicode_literals\nimport logging\n\nfrom django.core.management.base import BaseCommand\nfrom django.a...
python
new_file
1
8
apache-2.0
ff975c1bea7d0ea1e88e2b0667bc6e31676f66a7
saradbowman/osf.io,caseyrollins/osf.io,Johnetordoff/osf.io,baylee-d/osf.io,aaxelb/osf.io,brianjgeiger/osf.io,pattisdr/osf.io,felliott/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,Johnetordoff/osf.io,caseyrollins/osf.io,mfraezz/osf.io,Johnetordoff/osf.io,adlius/osf.io,sloria/osf.io,mattclark/osf.io,adlius/osf.io,cslzchen/...
osf/management/commands/vacuum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert all the taxonomy IDs to rank so that we are always talking about the same thing" }, { "role": "assistant", "content": "\"\"\"\nConvert all the taxonomy IDs to rank so that we are always talking\nabout the same thing\n\"\"...
python
new_file
1
0
mit
07cdfe31046c717bade6f61b025792478238982c
linsalrob/PhageHosts,linsalrob/PhageHosts,linsalrob/PhageHosts
code/tax2rank.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement the beginning of insertion sort\n\nhttps://www.hackerrank.com/challenges/insertionsort1" }, { "role": "assistant", "content": "# https://www.hackerrank.com/challenges/insertionsort1\n# Python 3\n\n\ndef formatted_print(...
python
new_file
1
3
mit
e0695ca25c4f9f51233ee006c2a3e00bee473203
arvinsim/hackerrank-solutions
all-domains/algorithms/sorting/insertion-sort-part-1/solution.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Kapsi result file converter." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis script is used to convert email address and home directory location of\npyfiscan result files ...
python
new_file
11
3
bsd-3-clause
222830648ff174700a5e40d23afa0c721086f594
cyberintruder/pyfiscan
templates/kapsi-convert-csv.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add tests for fuzzy ranking adjustments." }, { "role": "assistant", "content": "from __future__ import unicode_literals\nimport pytest\nfrom prompt_toolkit.completion import Completion\nfrom prompt_toolkit.document import Documen...
python
new_file
4
2
bsd-3-clause
40149ad648fa84f4597fcb3f3182b83ee62de035
n-someya/pgcli,TamasNo1/pgcli,janusnic/pgcli,w4ngyi/pgcli,j-bennet/pgcli,n-someya/pgcli,lk1ngaa7/pgcli,darikg/pgcli,thedrow/pgcli,dbcli/pgcli,d33tah/pgcli,darikg/pgcli,bitemyapp/pgcli,koljonen/pgcli,MattOates/pgcli,d33tah/pgcli,MattOates/pgcli,zhiyuanshi/pgcli,bitmonk/pgcli,johshoff/pgcli,bitmonk/pgcli,zhiyuanshi/pgcli...
tests/test_fuzzy_completion.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for functions in table.py :construction:" }, { "role": "assistant", "content": "from cycli.table import isnumeric, col_widths\nimport pytest\n\n@pytest.mark.parametrize((\"number\", \"answer\"), [\n (\"12\", True),\n...
python
new_file
1
1
mit
0cf6a1ecf280132f8051c48468eddf2886dfc581
nicolewhite/cycli,nicolewhite/cycli
tests/test_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add venv利用時のsys.prefix, sys.base_prefix, sys.exec_prefix, sys.base_exec_prefix の値の違いについてのサンプル追加" }, { "role": "assistant", "content": "\"\"\"\nsys モジュールについてのサンプルです.\n\nvenv 環境での\n - sys.prefix\n - sys.exec_prefix\n - sys.base_...
python
new_file
1
1
mit
d3fdefb173b0fc3ab6a6479883a77049a4b8af16
devlights/try-python
trypython/stdlib/sys_/sys03.py
accepted
null
true