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: Test nc -> covJSON v0.1" }, { "role": "assistant", "content": "import json\nfrom collections import OrderedDict\nimport netCDF4\nimport readNetCDF as rnc\nimport numpy as np\n\nimport util\n\nfrom netCDF4 import Dataset\njson_pat...
python
new_file
6
1
bsd-3-clause
2afdec4acc893628cba7179e52ca0bbb0207c49a
Reading-eScience-Centre/pycovjson
jsontest.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add little tool to help extract yaml names+versions from pip-require files" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom distutils.version import LooseVersion\n\nimport os\nimport re\nimport sys\nimport yam...
python
new_file
3
0
apache-2.0
3fabbc491a106175d61ffb6a2694501972c47141
stackforge/anvil,mc2014/anvil,mc2014/anvil,stackforge/anvil
tools/pip-extract.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add template for lab 10 class A" }, { "role": "assistant", "content": "palindrom (kata) :\n #TODO : implementasi fungsi palindrom untuk menyelesaikan soal palindrom\n\n\ncheckActiveAmoeba (hariKe, amoebaAktif) :\n #TODO : i...
python
new_file
null
null
mit
54c1fe598d4a8d76ae7ec0ce867f45af056c12e6
laymonage/TarungLab,giovanism/TarungLab
Lab/10/Template_10_A.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add new test for exclamation.leonard" }, { "role": "assistant", "content": "\"\"\"Test garner.dates.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nfrom .check import Check\nfrom proselint...
python
new_file
1
1
bsd-3-clause
75b3357617ebd8152ebf25abcb776a252ea7389d
amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint
tests/test_leonard.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial test script for player objects" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom db.player import Player\n\n\ndef test_find_by_id():\n plr = Player.find_by_id(8459469)\n ...
python
new_file
1
1
mit
f7fb296395c4193dc2f2607d3be50cca280e86dc
leaffan/pynhldb
tests/test_player.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add EITI country reports as sources\n\nNB: you need to have pdftotext installed to run this" }, { "role": "assistant", "content": "import logging\nimport urllib2\nimport csv\nimport os\nimport traceback\n\nfrom pdfminer.pdfpage i...
python
new_file
6
6
mit
4754771eb50cb29722b3c7b5f9bca6dc30ef3157
uf6/noodles,uf6/noodles
noodles/sources/eiti.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add user, password, dbname to connect(); suport UNIX sockets" }, { "role": "assistant", "content": "import asyncpg\n\nfrom asyncpg import _testbase as tb\n\n\nclass TestConnect(tb.ConnectedTestCase):\n\n async def test_connect...
python
new_file
1
1
apache-2.0
e1ffb7b75ff4c1b4124b9af5bdd1b00230589129
MagicStack/asyncpg,MagicStack/asyncpg
tests/test_connect.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add testbed file for tempest node\n\nChange-Id: Idabe51a777aa73ff7a3fa94fc0f219ebd80686fc" }, { "role": "assistant", "content": "from fabric.api import env\n\nhost1 = 'root@10.204.216.60'\n\next_routers = [('mx1', '10.204.216.253...
python
new_file
1
0
apache-2.0
9fb10d8d30fbdb08e46bea3996e75098dce904e5
Juniper/contrail-fabric-utils,Juniper/contrail-fabric-utils
fabfile/testbeds/testbed_nodec3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Load in the saved testing data" }, { "role": "assistant", "content": "\n'''\nLoad in the testing data\n'''\n\nimport os\nfrom astropy.io import fits\nfrom astropy.table import Table\n\ndir_path = os.path.dirname(__file__)\n\npath...
python
new_file
1
0
mit
ec28288b924a6378b70de3192f962bf26cf5362b
dcolombo/FilFinder,e-koch/FilFinder,keflavich/fil_finder
fil_finder/tests/_testing_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add TRIPS module for MEA" }, { "role": "assistant", "content": "import sys\nfrom jnius import autoclass, cast\nfrom TripsModule import trips_module\n\nKQMLPerformative = autoclass('TRIPS.KQML.KQMLPerformative')\nKQMLList = autocl...
python
new_file
1
3
bsd-2-clause
0dd70c2e6e991163852e8889e0a4802e702ae68d
bgyori/bioagents,sorgerlab/bioagents
mea_module.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add json to sql conversion script." }, { "role": "assistant", "content": "import os\nimport os.path\nfrom json import loads\n\nimport click\n\nfrom vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB\n\nclass JSONToSQL(object)...
python
new_file
4
3
mit
678ba5e332b7c54cdb39d117dc443bf88da7d111
josetaas/vendcrawler,josetaas/vendcrawler,josetaas/vendcrawler
jsontosql.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# minimal django settings required to run tests\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.sqlite3\",\n \"NAME\": \"test.db\",\n }\n}\n\n# SECRET_KEY = ''\n\n```\n\nApply this change: Add installe...
python
edit
1
0
apache-2.0
845b4fe3bf708d0434cb64d37a212bc0fd6b5ac6
Princeton-CDH/django-pucas,Princeton-CDH/django-pucas
ci/testsettings.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 the bright pixels of other lines, making them look physical; should be additive" }, { "role": "assistant", "content": "from PIL import Image, ImageDraw\n\nimpo...
python
new_file
1
2
mit
97b19e6f3705fc0b320f33b44476f7139833de9e
redpig2/pilhacks
glowing-lines.py
rejected_duplicate
Near-duplicate of sample 5853
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Dismissibles view" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.urls import reverse\n\nfrom wagtail.test.utils import WagtailTestUtils\nfrom wagtail.users.models import UserPro...
python
new_file
1
1
bsd-3-clause
9f30d2dd142116f46dd0257bcf093e8e8dc2c11a
rsalmaso/wagtail,thenewguy/wagtail,rsalmaso/wagtail,thenewguy/wagtail,rsalmaso/wagtail,wagtail/wagtail,wagtail/wagtail,rsalmaso/wagtail,zerolab/wagtail,wagtail/wagtail,zerolab/wagtail,zerolab/wagtail,thenewguy/wagtail,zerolab/wagtail,wagtail/wagtail,rsalmaso/wagtail,wagtail/wagtail,thenewguy/wagtail,zerolab/wagtail,the...
wagtail/admin/tests/test_dismissibles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Copy DesignDocument tests to their own module" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n_design_doc_test_\n\n\"\"\"\nimport mock\nimport unittest\n\nfrom cloudant.design_document import DesignDocument\...
python
new_file
1
2
apache-2.0
254930d317ab61bc85169d8c64e2c6eab2d48f5f
cloudant/python-cloudant
tests/unit/cloudant_t/design_doc_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add receiver dump program, output of firmware" }, { "role": "assistant", "content": "#******************************************************************************\n#\n# receiver-dump.py\n#\n#**********************************...
python
new_file
5
9
unlicense
dfa6d3b3fe148895599360d01195200b06e7583d
laneboysrc/hk310-expansion,laneboysrc/hk310-expansion,laneboysrc/hk310-expansion
receiver-dump.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add first draft of plotting functions" }, { "role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom skimage import img_as_float\nfrom skimage.color import gray2rgb\nfrom .csr import summarise\n\...
python
new_file
1
5
bsd-3-clause
b0db73209cbe29bf070581fd81afc6fbf86af718
jni/skan
skan/draw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic test template for high level CUDS containers" }, { "role": "assistant", "content": "import abc\nfrom functools import partial\n\nfrom simphony.testing.utils import (\n create_data_container, compare_data_containers...
python
new_file
1
1
bsd-2-clause
921d95a432316b2b76aadabcc3fc90fbf90376aa
simphony/simphony-common
simphony/testing/abc_container_check.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add api-reference generation script for TFMD.\n\nOutput listing: https://paste.googleplex.com/4777420088410112\n\nPiperOrigin-RevId: 431509556" }, { "role": "assistant", "content": "# Copyright 2022 The TensorFlow Authors. All Ri...
python
new_file
1
2
apache-2.0
caaabeb103879baf3179955b36e845aa878f15f6
tensorflow/metadata,tensorflow/metadata
tools/build_tfmd_docs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the basis for some functional tests" }, { "role": "assistant", "content": "from locators import SimpleLocator\n\ndef test_latest_source():\n loc = SimpleLocator()\n proj = 'pip'\n latest = max(loc.versions(proj))\n ...
python
new_file
4
3
mit
7cd00a28a0cbb152cd61c3ebbd4b72d3ab31baca
pfmoore/sandbox
locators/tests/functional/test_latest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add Python function to build phylo.xml from MSA with Biopython" }, { "role": "assistant", "content": "\"\"\"Generate a phylo.xml from a MUSCLE MSA.fasta\"\"\"\n\n\nimport argparse\n\n\n##### PARSE ARGUMENTS #####\nargparser = arg...
python
new_file
1
1
bsd-2-clause
37dd523cfb5a26cb33493ba29f99d8a97a8401e4
daniel0128/receptormarker,nsh87/receptormarker,nsh87/receptormarker,daniel0128/receptormarker,daniel0128/receptormarker,nsh87/receptormarker,nsh87/receptormarker,catterbu/receptormarker,daniel0128/receptormarker,daniel0128/receptormarker,catterbu/receptormarker,daniel0128/receptormarker,catterbu/receptormarker,catterbu...
inst/py/phyloxml_from_msa.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create dodgy vis of reads sequenced" }, { "role": "assistant", "content": "from matplotlib import pyplot as plt\n\ns=[\"AATTCGCGCTTACGCTAGGCTAGCTAGGCTCGATTCGAGGCTCGGGATCGATCGGTACGAGGTACGTACTGACTGACT\",\n \"ACTGGGCTATGCGGGATATATA...
python
new_file
1
0
mit
6ee4d6a13a3fb6564e12ef8c8645a96015d39fed
Psy-Fer/seq_spot
seq_spot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test the repr() of object" }, { "role": "assistant", "content": "from butter.eventfd import Eventfd\nfrom butter.fanotify import Fanotify\nfrom butter.inotify import Inotify\nfrom butter.signalfd import Signalfd\nfrom butter.time...
python
new_file
1
1
bsd-3-clause
ee0cda1dea775e58e5416b57fc0d96114f075128
wdv4758h/butter,dasSOZO/python-butter
tests/unit/test_repr.py
rejected_duplicate
Near-duplicate of sample 9584
true
[ { "role": "user", "content": "Write python code for the following: Create Random Forest vectorizer and classifier pickles" }, { "role": "assistant", "content": "from sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.external...
python
new_file
2
0
mit
6e2b09d478d61c2ae66959b87cb58689b57436b0
npentella/CuriousCorpus,npentella/CuriousCorpus,npentella/CuriousCorpus
rf_train.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set2: Add hasing on string input game" }, { "role": "assistant", "content": "# This is a hack to make sure Python 2.x and 3.x behave the same\n# You can ignore this bit\ntry:\n input = raw_input\nexcept NameError:\n pass\n\...
python
new_file
1
2
mit
c123c8ce1094885e3a4d96573f70ebc1130627f6
SingingTree/WarGames
set2/2-2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 398. Random Pick Index\n\n398. Random Pick Index: https://leetcode.com/problems/random-pick-index/" }, { "role": "assistant", "content": "from random import random\nclass Solution(object):\n\n def __init__(...
python
new_file
1
4
apache-2.0
43d5c85a1b91719cabbc4a92bfd65feceb6cedfc
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/random-pick-index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utilities to integrate with Sentry" }, { "role": "assistant", "content": "\"\"\"\nbyceps.util.sentry\n~~~~~~~~~~~~~~~~~~\n\nSentry_ integration\n\n.. _Sentry: https://sentry.io/\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n...
python
new_file
1
1
bsd-3-clause
ae0ee6834feaefb77d8f6776b62c0d1b4621c84b
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/util/sentry.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 598. Range Addition II\n\n598. Range Addition II: https://leetcode.com/problems/range-addition-ii/" }, { "role": "assistant", "content": "from operator import itemgetter\nclass Solution(object):\n def maxCo...
python
new_file
1
2
apache-2.0
fbc96cdd95a007bf0c1f6c7439113e8f41cef876
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/range-addition-ii.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for Profile PATCH method" }, { "role": "assistant", "content": "import requests\nimport json\nimport time\nfrom collections import OrderedDict\nfrom test_framework.test_framework import OpenBazaarTestFramework, TestFailu...
python
new_file
3
10
mit
ef4e5cd5c45735a5a82b849b7191fdb8a2a27a59
cpacia/openbazaar-go,jackkleeman/openbazaar-go,gubatron/openbazaar-go,yurizhykin/openbazaar-go,OpenBazaar/openbazaar-go,JustinDrake/openbazaar-go,jackkleeman/openbazaar-go,cpacia/openbazaar-go,gubatron/openbazaar-go,gubatron/openbazaar-go,duomarket/openbazaar-test-nodes,yurizhykin/openbazaar-go,hoffmabc/openbazaar-go,O...
qa/patch_profile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add start of top blocks" }, { "role": "assistant", "content": "from collections import namedtuple\nimport random\n\nW = 800\nH = 600\nRED = 200, 0, 0\nBLUE = 0, 0, 200\nGREEN = 0, 200, 0\n\nball = Rect((W/2, H/2), (30, 30))\nDire...
python
new_file
8
5
mit
a4ae7acabf37de8ef6142c7c402cd663629c4aa9
tomviner/breakout
bo5.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-simple-history',\n version='1.2.2.post1',\n description='Store model history and view/revert changes from admin site.',\n long_description='\\n'.join((\n ...
python
edit
1
0
bsd-3-clause
7f0c6c94b9cfddd28f2ab124fffdb1850e966930
treyhunner/django-simple-history,emergence/django-simple-history,pombredanne/django-simple-history,pombredanne/django-simple-history,treyhunner/django-simple-history,luzfcb/django-simple-history,luzfcb/django-simple-history,emergence/django-simple-history
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test script with Python Functions" }, { "role": "assistant", "content": "#!/usr/bin/python3\n# some experiments with functions\n\ndef my_values(value1):\n\tprint (\"Value of value1 in function my_values: %s\" % value1)\n\tprint (...
python
new_file
1
1
apache-2.0
b423a34696d8e3ef7587bed3eb61876abc923bbe
petervdb/eLearning,petervdb/eLearning,petervdb/eLearning,petervdb/eLearning,petervdb/eLearning
python/hardway/function_testing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a standalone DDL print/reflection tool." }, { "role": "assistant", "content": "\"\"\"\nutexas/tools/generate_ddl.py\n\nPrint or apply the research data schema.\n\n@author: Bryan Silverthorn <<EMAIL>>\n\"\"\"\n\nif __name__ ==...
python
new_file
2
5
mit
bab5a974c78a2b7042de449c6d3b01f9297809f1
borg-project/borg
src/python/utexas/tools/generate_ddl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for merge sort implementation." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport unittest\n\nfrom helper.read_data_file import read_int_array\nfrom sorting.me...
python
new_file
1
1
mit
ebd42aabb39495f5ba22726073eeca5f9159ac7f
weichen2046/algorithm-study,weichen2046/algorithm-study
test/unit/sorting/test_merge_sort.py
rejected_duplicate
Near-duplicate of sample 6148
true
[ { "role": "user", "content": "Write python code for the following: Add first implementation of pytorch backend\n\nSigned-off-by: Niklas Koep <<EMAIL>>" }, { "role": "assistant", "content": "\"\"\"\nModule containing functions to differentiate functions using pytorch.\n\"\"\"\ntry:\n import to...
python
new_file
1
2
bsd-3-clause
7d60c4af17f59a63a2d861bc20d3eecececea1b1
pymanopt/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,nkoep/pymanopt,nkoep/pymanopt
pymanopt/tools/autodiff/_pytorch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add minimal standalone code to test Cheb weights negativity" }, { "role": "assistant", "content": "import numpy as np\nfrom scipy.interpolate import lagrange\n\ndef chebNodes(N):\n \"Returns N Chebyshev nodes in (-1,1).\"\n ...
python
new_file
1
2
mit
2d2d186002a9b7bcb8f0b5c1e9325c9bc9354f26
adabrow/NumAnEx2014
Ex03/chebNodesWeights.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make an easy thing to enqueue repos." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\n\n\"\"\"\nenqueues respos from stdin or from command line arguments\n\"\"\"\n\nimport argparse\nimport r...
python
new_file
1
2
apache-2.0
f7be1ee85cc3a65c5884773995a20e12037dba4d
eddieantonio/ad-hoc-miner,eddieantonio/ad-hoc-miner,naturalness/sensibility,naturalness/sensibility,naturalness/sensibility,eddieantonio/ad-hoc-miner,naturalness/sensibility,eddieantonio/ad-hoc-miner
enqueue-repo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to find removables from PubChem" }, { "role": "assistant", "content": "\"\"\"This script helps identify entries in PubChem.tsv that systematically\nlead to incorrect groundings and should therefore be removed.\"\"\"\n\...
python
new_file
1
0
apache-2.0
8cbc27c7c3af16c53fe1033530e69c359606d5d6
clulab/bioresources
scripts/find_pubchem_removables.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Event filter and Node" }, { "role": "assistant", "content": "import graphene\nfrom graphene_django import DjangoObjectType\nfrom django_filters import OrderingFilter, FilterSet\n\nfrom app.timetables.models import Event\nfrom...
python
new_file
3
1
mit
a9f11f6c7ba8f9d91e388bb8dd93e600f521a814
teamtaverna/core
app/api/cruds/event_crud.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add template tag for experiment group membership" }, { "role": "assistant", "content": "from django import template\n\nfrom ..base import EXPERIMENTS\n\nregister = template.Library()\n\n@register.filter\ndef experiment(user, expe...
python
new_file
1
1
mit
30a0787e8ec184aa1d274a11234ed37d41807df5
prophile/django_split
django_split/templatetags/django_split.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the data model of Shopcart" }, { "role": "assistant", "content": "class Shopcart(object):\n\n \"\"\"\n This is model for the shop carts\n Assumptions:\n - In memory persistence\n - The fields of a shopc...
python
new_file
1
1
apache-2.0
a9f3a9213268fe41489b58e6ce61bf8d726b9e6f
nyu-devops-echo/shopcarts,nyu-devops-echo/shopcarts,nyu-devops-echo/shopcarts,nyu-devops-echo/shopcarts
shopcart.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make ticker symbols lower case" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nRetrieves current list of ticker symbols that are in portfolio.\nAll symbols are in lower-case.\n\"\"\"\n\n#TODO: Get portfoli...
python
new_file
2
2
mit
0f6913f09b61acef4e464f81558f19982f98697e
SimonJester/portfolio
getPortfolio.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for global minimize wrapper." }, { "role": "assistant", "content": "import downhill\nimport numpy as np\nimport theano\n\n\nclass TestMinimize:\n def test_minimize(self):\n x = theano.shared(-3 + np.zeros((2,...
python
new_file
1
1
mit
a078868a80c8cc48740c8caea0fb6f4906e490a5
lmjohns3/downhill,rodrigob/downhill
test/downhill_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helper script for hand_follow" }, { "role": "assistant", "content": "import poppy_inverse_kinematics.creature as model_creature\nimport numpy as np\nimport poppy_inverse_kinematics.meta_creature as meta_creature\nimport time\...
python
new_file
3
0
apache-2.0
1466e8227b847c5e926eb6b745da5d7192cd31f7
Phylliade/ikpy
scripts/read_fk.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script that prints a histogram of inclinations" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nPrints a histogram of inclinations to show what proportion are high-angle.\n\nusage: compass_high_an...
python
new_file
4
6
mit
484ca8e8e8ab53b0fe62062758a3f74d4194d3c0
riggsd/davies
examples/compass_high_angle_hist.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Create an init file with meta information" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n__author__ = 'Raphael Pierzina'\n__email__ = '<EMAIL>'\n__version__ = '0.1.0'\n\nfrom .parser import parse_string\n\n__al...
python
new_file
1
0
mit
a64b5896b6bd8da36b3e2d2d5bd8b48c4c355935
hackebrot/poyo
poyo/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: :memo: Add migration file for samples app" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-26 20:18\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations...
python
new_file
1
0
mit
a5fea9b538a309422f7503ff689f0dde932585f6
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
samples/migrations/0013_auto_20170526_1718.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for commitlog archiving" }, { "role": "assistant", "content": "from dtest import Tester, debug\nfrom pytools import since, replace_in_file\nimport tempfile, shutil, glob, os, time\nimport distutils.dir_util\n\n\nclass Co...
python
new_file
6
2
apache-2.0
de026ce0b3070c7f17f37c4a1db039b834dc1ac8
pcmanus/cassandra-dtest,spodkowinski/cassandra-dtest,bdeggleston/cassandra-dtest,krummas/cassandra-dtest,yukim/cassandra-dtest,aweisberg/cassandra-dtest,beobal/cassandra-dtest,mambocab/cassandra-dtest,mambocab/cassandra-dtest,blerer/cassandra-dtest,bdeggleston/cassandra-dtest,carlyeks/cassandra-dtest,aweisberg/cassandr...
commitlog_archiving_test.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a command to verify users" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand, CommandError\nfrom api.models import Account\nimport fileinput\nimport sys\n\nclass Command(BaseCommand):\n...
python
new_file
4
7
apache-2.0
141d3f90dd52f89eb5846618b067c22db83a64a1
SchoolIdolTomodachi/SchoolIdolAPI,rdsathene/SchoolIdolAPI,laurenor/SchoolIdolAPI,dburr/SchoolIdolAPI,laurenor/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,dburr/SchoolIdolAPI,rdsathene/SchoolIdolAPI,dburr/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,rdsathene/SchoolIdolAPI,laurenor/SchoolIdolAPI
api/management/commands/verifyuser.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom django.core.management.base import BaseCommand\nfrom django.conf import settings\n\n\nfrom projects import tasks\nfrom projects.models import ImportedFile\nfrom builds.models import Version\n\nlog = logging.getLogger(...
python
edit
1
4
mit
9835b069ea931cbadae92a9e10bcdff513ae425d
singingwolfboy/readthedocs.org,VishvajitP/readthedocs.org,SteveViss/readthedocs.org,GovReady/readthedocs.org,CedarLogic/readthedocs.org,kenshinthebattosai/readthedocs.org,istresearch/readthedocs.org,laplaceliu/readthedocs.org,rtfd/readthedocs.org,kenshinthebattosai/readthedocs.org,fujita-shintaro/readthedocs.org,jerel/...
readthedocs/core/management/commands/build_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic unit tests for Win7 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 \"License\...
python
new_file
1
1
apache-2.0
9f17c05916ed43d40e4fa21e156c8c0a9aac2b19
jjones646/mbed-ls,mazimkhan/mbed-ls,mtmtech/mbed-ls,jupe/mbed-ls,mazimkhan/mbed-ls,mtmtech/mbed-ls,jupe/mbed-ls,jjones646/mbed-ls
test/os_win7.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add WSGI script for API server\n\nInclude a WSGI script for the API server so it can be used with Apache\nor Nginx deployment.\n\nChange-Id: I16166f78b5975dad0480a7ee4ccde47f234f5802\nImplements: blueprint mistral-api-wsgi-script" }, { ...
python
new_file
1
0
apache-2.0
22924945638989ebf620c262ae8de37a8b4508c6
StackStorm/mistral,dennybaa/mistral,dennybaa/mistral,openstack/mistral,StackStorm/mistral,openstack/mistral
mistral/api/wsgi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add reading and plotting of .ans files" }, { "role": "assistant", "content": "import subprocess\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport re\nimport math\nfrom scipy.interpolate import...
python
new_file
4
6
mit
fbca1fe9e8df6cde95c7082bfc465f75ad0380b1
DrLuke/FEMM-bode
main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add script for munging redirects" }, { "role": "assistant", "content": "\"\"\"\nA simple script to filter the output of the redirects spreadsheet we made into\na CSV suitable for loading into the redirects app with\n\n python ...
python
new_file
1
7
mit
9b5dbc51c9d20fdbdaf63aa4cce0ac683c22013c
okfn/website,okfn/foundation,MjAbuz/foundation,okfn/website,okfn/foundation,okfn/foundation,MjAbuz/foundation,okfn/website,MjAbuz/foundation,okfn/website,okfn/foundation,MjAbuz/foundation
contrib/filter_redirects.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate AT bank registry" }, { "role": "assistant", "content": "import json\nimport csv\nimport requests\n\nURL = \"https://www.oenb.at/docroot/downloads_observ/sepa-zv-vz_gesamt.csv\"\n\n\ndef process():\n regi...
python
new_file
3
4
mit
b6d253aac72abcbee53460b56e76aac7f33dd199
figo-connect/schwifty
scripts/get_bank_registry_at.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move api tests to test dir" }, { "role": "assistant", "content": "import os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\nimport django\nfrom django.test import TestCase\nfrom rest_framework.test imp...
python
new_file
1
1
apache-2.0
f115257cfc51b621554ac1d8de984a329f6a1942
CenterForOpenScience/scrapi,mehanig/scrapi,mehanig/scrapi,felliott/scrapi,erinspace/scrapi,fabianvf/scrapi,fabianvf/scrapi,felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi
tests/test_api_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test runner for simExample." }, { "role": "assistant", "content": "from os.path import dirname, realpath, sep, pardir\nimport sys\nsys.path.append(dirname(realpath(__file__)) + sep + pardir + sep +\n \"examples\")\n...
python
new_file
1
1
mit
aa777fd643f2eccebde94188d6179e820e84cc49
Tech-XCorp/ultracold-ions,hosseinsadeghi/ultracold-ions,Tech-XCorp/ultracold-ions,hosseinsadeghi/ultracold-ions
test/test_SimExample.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for basic auth" }, { "role": "assistant", "content": "import aiohttp\nimport asyncio\n\n\n@asyncio.coroutine\ndef go(session):\n print('Query http://httpbin.org/basic-auth/andrew/password')\n resp = yield from s...
python
new_file
1
2
apache-2.0
58fdd69ae5c493e3ae26278528fbff09c95c48cd
arthurdarcet/aiohttp,pathcl/aiohttp,elastic-coders/aiohttp,z2v/aiohttp,morgan-del/aiohttp,elastic-coders/aiohttp,moden-py/aiohttp,mind1master/aiohttp,danielnelson/aiohttp,rutsky/aiohttp,AlexLisovoy/aiohttp,panda73111/aiohttp,pfreixes/aiohttp,mind1master/aiohttp,AlexLisovoy/aiohttp,moden-py/aiohttp,AraHaanOrg/aiohttp,ja...
examples/client_auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib.auth.forms import UserCreationForm\n\nclass SubscriberForm(UserCreationForm):\n email = forms.EmailField(\n required=True, widget=forms.TextInput(attrs={'class':'form-control'})\n )...
python
edit
1
0
mit
2c5fb5a0bcf47e49c9862891730615f6c180462f
tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django
crmapp/subscribers/forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix path where findAndReplaceWorkspacePath doesn't\n\nWhen data has moved to a different workspace AND feature dataset the\nregular\n`findAndReplaceWorkspacePath` does not work. This script rectifies that." }, { "role": "assistant", ...
python
new_file
8
0
mit
6e3d64ca0769732506fe4cb188b53e719645f641
DougFirErickson/arcplus,maphew/arcplus,maphew/arcplus
ArcToolbox/Scripts/change_datasource_paths.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add test case around field type validation" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom polygraph.exceptions import PolygraphSchemaError\nfrom polygraph.types.field import (\n field,\n valida...
python
new_file
3
1
mit
6afb3c7f8efbc8623c8af3c2de763f09ac15536c
polygraph-python/polygraph
polygraph/types/tests/test_field.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print to the screen how many bpm devices are disabled" }, { "role": "assistant", "content": "import pytac.load_csv\nimport pytac.epics\n\n\ndef main():\n lattice = pytac.load_csv.load('VMX', pytac.epics.EpicsControlSystem())\n...
python
new_file
2
4
apache-2.0
e91682aee85d33b859f6f5be29ec6e518bd14544
razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects
pytac/enabled_bpm_x.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add abstract class for step management" }, { "role": "assistant", "content": "\n# -*- coding: utf-8 -*-\n\n# std import\nfrom enum import Enum\nfrom abc import ABCMeta, abstractmethod\n\nclass StepStat(Enum):\n nostat = 1\n ...
python
new_file
1
1
mit
def34fb7055824f57c3b9f93a40d9bc68b72f39d
Fougere87/pysingcells
pysingcells/abcstep.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add edit distance algorithm in python" }, { "role": "assistant", "content": "# Helpful tutorial: https://www.youtube.com/watch?v=We3YDTzNXEk\n# Useful link: https://en.wikipedia.org/wiki/Edit_distance\ndef get_edit_distance(s1, s...
python
new_file
3
6
apache-2.0
795681f19f80eca114c05d1e2c4e73a48529f27a
churrizo/Algorithms_Example,xiroV/Algorithms_Example,churrizo/Algorithms_Example,churrizo/Algorithms_Example,AtoMc/Algorithms_Example,pranjalrai/Algorithms_Example,Anat-Port/Algorithms_Example,pranjalrai/Algorithms_Example,maazsq/Algorithms_Example,alok760/Algorithms_Example,churrizo/Algorithms_Example,churrizo/Algorit...
edit_distance/python/edit_distance.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom setuptools import setup\n\n\ndef read(fname):\n with open(os.path.join(os.path.dirname(__file__), fname)) as fp:\n return fp.read()\n\n\nsetup(\n name='django-decorator-include',\n ...
python
edit
1
1
bsd-2-clause
64fc8cbccd753e0d56157a588902ace934a0a600
jdufresne/django-decorator-include,twidi/django-decorator-include,jdufresne/django-decorator-include,twidi/django-decorator-include
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\ndef fread(fn):\n return open(fn, 'rb').read().decode('utf-8')\n\nsetup(\n name='tox-travis',\n description='Seamless integration of Tox into Travis CI',\n long_description=fread('README.rst') + ...
python
edit
1
1
mit
fe7d96c9182831613f4f44bc6c4f5903c7e02858
rpkilby/tox-travis,ryanhiebert/tox-travis,tox-dev/tox-travis
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for as_pair" }, { "role": "assistant", "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nTests for the parameters module.\n\"\"\"\n\nimport numpy as np\nfrom numpy.testing import ...
python
new_file
1
1
bsd-3-clause
0bea26ee40261f5f7da0f6acb74dce8aabfd5856
astropy/photutils,larrybradley/photutils
photutils/utils/tests/test_parameters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: doc: Add docs for structure of JSON for HTML" }, { "role": "assistant", "content": "\"\"\"Documentation of the JSON representing HTML.\"\"\"\n\n# an html element\nELEMENT = {\n \"type\": \"element\",\n \"name\": \"\", # ...
python
new_file
1
0
apache-2.0
e832f29697dc0308a99b60008a538f21f59a44f5
Lodifice/mfnf-pdf-export,Lodifice/mfnf-pdf-export,Lodifice/mfnf-pdf-export
documentation/html.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some example model - simple network on MNIST.\n\nA basic example from Keras - https://github.com/fchollet/keras/tree/master/examples" }, { "role": "assistant", "content": "'''Trains a simple deep NN on the MNIST dataset.\n\nG...
python
new_file
4
0
mit
fb9df7b3e02d605c3888f1b30cb799f1c95928dc
bzamecnik/sanctuary
examples/keras/mnist_mlp.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add kerberos authentication requester using requests_kerberos" }, { "role": "assistant", "content": "from jenkinsapi.utils.requester import Requester\nfrom requests_kerberos import HTTPKerberosAuth, OPTIONAL\n\n\nclass KrbRequest...
python
new_file
1
3
mit
05c2b5edb0ad2dd96f4146893de1bcaa2b691c64
domenkozar/jenkinsapi,imsardine/jenkinsapi,zaro0508/jenkinsapi,jduan/jenkinsapi,JohnLZeller/jenkinsapi,JohnLZeller/jenkinsapi,mistermocha/jenkinsapi,imsardine/jenkinsapi,aerickson/jenkinsapi,zaro0508/jenkinsapi,mistermocha/jenkinsapi,jduan/jenkinsapi,domenkozar/jenkinsapi,salimfadhley/jenkinsapi,salimfadhley/jenkinsapi...
jenkinsapi/utils/krb_requester.py
rejected_duplicate
Near-duplicate of sample 8683
true
[ { "role": "user", "content": "Write python code for the following: Add test suite for hiro.utils" }, { "role": "assistant", "content": "import datetime\nimport unittest\n\nimport hiro\nfrom hiro.errors import InvalidTypeError\nfrom hiro.utils import timedelta_to_seconds, time_in_seconds, chained...
python
new_file
3
1
mit
1ed276fceba0a4d8a105bc2b60986d815326dcca
alisaifee/hiro,alisaifee/hiro
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add arg parsing for parallel tmhmm script" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n#-*- coding: utf-8 -*-\n\"\"\"\nScript to process tmhmm in parallel\n\"\"\"\n\nfrom Bio import SeqIO\n\nimport argparse\nimp...
python
new_file
4
3
apache-2.0
5e99e33df59ebb40c1c49f66b6b88244292d7d1b
fmaguire/volution,fmaguire/volution,fmaguire/volution
data/tm_prediction/parallel_tmhmm.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add task for rounding of money" }, { "role": "assistant", "content": "def get_price_without_vat(price_to_show, vat_percent):\n raise NotImplementedError()\n\n\ndef get_price_without_vat_from_other_valuta(conversion_rate, origi...
python
new_file
1
1
mit
2ebbb9dcf32ec1bee38f59e6be24c17529402042
coolshop-com/coolshop-application-assignment
money_rounding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create test cases for the cryptotracker plugin" }, { "role": "assistant", "content": "import unittest\nfrom colorama import Fore\nfrom tests import PluginTest\nfrom mock import patch\nfrom plugins import cryptotracker\n\n\nclass ...
python
new_file
1
2
mit
6b81d4f79112347262f0b43965531f300db0ef26
sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis
jarviscli/tests/test_cryptotracker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an RENotFound exception class to be raised when we cannot locate a required resource on RE" }, { "role": "assistant", "content": "import json\n\n\nclass RENotFound(RuntimeError):\n \"\"\"A resource was not found on the rel...
python
new_file
1
1
mit
28b4fa36a7ae022324fb89d69c14ebf9201ad116
kbaseapps/GenomeFileUtil,kbaseapps/GenomeFileUtil,kbaseapps/GenomeFileUtil,kbaseapps/GenomeFileUtil
lib/GenomeFileUtil/core/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create the serializer for the AbstractAccount" }, { "role": "assistant", "content": "from rest_framework import serializers\nfrom .models import AbstractAccount\n\n\nclass WholeAccountSerializer(serializers.ModelSerializer):\n ...
python
new_file
1
1
mit
a4b6d4c7880222901ddcd53485100a8ee3a784f2
slavpetroff/sweetshop,slavpetroff/sweetshop
backend/django/apps/accounts/serializers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement DTDA as TRIPS module" }, { "role": "assistant", "content": "from jnius import autoclass, cast\nfrom TripsModule import trips_module\n\nKQMLPerformative = autoclass('TRIPS.KQML.KQMLPerformative')\nKQMLList = autoclass('T...
python
new_file
1
5
bsd-2-clause
859a13523da2c06dd031451d3d458cc3665ee295
bgyori/bioagents,sorgerlab/bioagents
dtda_module.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for -- terminating option processing.\n\n\ngit-svn-id: 7892167f69f80ee5d3024affce49f20c74bcb41d@48 fdb21ef1-2011-0410-befe-b5e4ea1792b1" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n__revision__ = \"t...
python
new_file
4
0
mit
f4b5ccd3fdacad36cb124245591ea5bfaf4de12e
andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,Distrotech/scons,Distrotech/scons,andrewyoung1991/scons,timj/scons,timj/scons,andrewyoung1991/scons,timj/scons,Distrotech/scons,timj/scons,Distrotech/scons...
test/option--.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport cv2\nimport numpy as np\nimport plantcv as pcv\n\n\ndef white_balance(img, roi=None):\n\n \"\"\"Corrects the exposure of an image based on its histogram.\n Inputs:\n img - A grayscale image on which to perform the correction...
python
edit
3
3
mit
1cd21ad4538cd71e93fec3a7efac29646503bde7
danforthcenter/plantcv-seeds
white_balance.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for `license context` function" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Tests for the `license context` function\n\"\"\"\n\nfrom click.testing import CliRunner\...
python
new_file
1
6
mit
6444674ced35019c3139dfeb7af69dfe985b3fe1
lord63/choosealicense-cli
choosealicense/test/test_context.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to occupy a seat group with a ticket bundle" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Occupy a seat group with a ticket bundle.\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modif...
python
new_file
1
2
bsd-3-clause
282477965c07124f4cba7b647b2f9ab1b54d9903
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps
scripts/occupy_seat_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom typing import Dict, Any\n\nimport attr\n\n\n@attr.s(slots=True)\nclass Rule:\n \"\"\"\n A rule describes how and when to make backups.\n \"\"\"\n\n volume_name = attr.ib()\n namespace = attr.ib()\n\n deltas = attr.ib(...
python
edit
1
2
bsd-2-clause
1d0faecd1f8897e4b9e68cb62cc49125250ff59f
miracle2k/k8s-snapshots,EQTPartners/k8s-snapshots
k8s_snapshots/rule.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Develop here. Belongs in top level Orthologs Project." }, { "role": "assistant", "content": "\nfrom setuptools import setup, find_packages\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = p...
python
new_file
null
null
mit
2cddde6dcee901021d449bf956bf144617ab3705
datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts,datasnakes/Datasnakes-Scripts
setup.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add basic tests for simpleflow.exceptions.TaskFailed" }, { "role": "assistant", "content": "import unittest\n\nfrom sure import expect\n\nfrom simpleflow.exceptions import TaskFailed\n\n\nclass TestTaskFailed(unittest.TestCase):\...
python
new_file
1
1
mit
ab0ecd4defaffc2e342d435ca490dd28e0314316
botify-labs/simpleflow,botify-labs/simpleflow
tests/test_simpleflow/test_exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple functional tests for jenkins: check config-* jobs\n\nChange-Id: I41f880e55fe380273ed614944bc4523278501252" }, { "role": "assistant", "content": "#!/usr/bin/python\n#\n# Copyright (C) 2014 eNovance SAS <<EMAIL>>\n#\n#...
python
new_file
1
1
apache-2.0
9ceb3373b2e812662e402d797207b3cadd74b034
invenfantasy/software-factory,enovance/software-factory,invenfantasy/software-factory,invenfantasy/software-factory,invenfantasy/software-factory,enovance/software-factory,enovance/software-factory,enovance/software-factory,invenfantasy/software-factory,enovance/software-factory
tests/functional/test_06_jenkins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Support for Cached template loader with django adaptive" }, { "role": "assistant", "content": "\"\"\"\nProvide support for Cached loader.\nGenerate key for cached templates based on template names\nand device type (desktop or mob...
python
new_file
1
1
bsd-3-clause
8b80caed94f4bed7e970f6b7c730b71de2133da8
RevSquare/django-adaptive
django_adaptive/cached.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for exceptions" }, { "role": "assistant", "content": "import pytest\n\nfrom .. import exceptions as e\n\n\ndef test_shape_error():\n raise_if(e.ShapeError.dimensions_mismatch(10, 20, 'inside test'))\n\n\ndef rais...
python
new_file
4
2
mit
99b680ee8d610e1c0d02c53e465a510e3c5a50d3
explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc
thinc/tests/unit/test_exceptions.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add file to epsilon 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, TestCase\...
python
new_file
5
0
mit
ab55836a2ff1ab5ec1ee62a5119b2dbadf8944a9
PatrikValkovic/grammpy
tests/rules_tests/isValid_tests/EpsilonTest.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script for reading reldist for multiple trials" }, { "role": "assistant", "content": "import os\nimport yaml\nfrom thermof.parameters import plot_parameters\nfrom thermof.read import read_framework_distance\n\n# -------------...
python
new_file
1
0
mit
31d2686555a93ddadd3713c3c880b75641d98d89
kbsezginel/tee_mof,kbsezginel/tee_mof
scripts/read_reldist.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Send try jobs that touch policy code to the linux_chromeos bot too.\n\n\nReview URL: https://chromiumcodereview.appspot.com/10473015\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@140268 0039d316-1c4b-4281-b951-d872f2087c98" }, ...
python
new_file
1
1
bsd-3-clause
1b310904b641dda7ad74e98a24f62d573bbd81f8
Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,keishi/chromium,dednal/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,keishi/chromium,pozdnyakov/chromium-crossw...
chrome/browser/policy/PRESUBMIT.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Revert change from services to products for G9 lots\n\nJust when I thought I was out, they pull me back in." }, { "role": "assistant", "content": "\"\"\"no lots are products for G-Cloud 9 - they are all services\n\nRevision ID: 8...
python
new_file
1
1
mit
e6a589d9a1a81e32de6f2e50ea7aaee4f5f6a6c3
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/820_untweak_g9_lots.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [NF] Read spectro from excel file with orders as input" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom pandas import ExcelFile, read_excel\nfrom numpy import squeeze, zeros, transpose\n\ndef read_spectro_xls(...
python
new_file
1
2
apache-2.0
deaa7d58271fab03bd403f068ef0e261bc6a6577
Eomys/MoSQITo
mosqito/sound_synthesis/read_spectro_xls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow running the `edb` command as `python -m edb.tools`" }, { "role": "assistant", "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB authors....
python
new_file
1
0
apache-2.0
6cc2a8c748d50799d97ab8096e3fc2a82ebf674c
edgedb/edgedb,edgedb/edgedb,edgedb/edgedb
edb/tools/__main__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add extension attribute table type" }, { "role": "assistant", "content": "from numba.typesystem import *\n\n#------------------------------------------------------------------------\n# Extension Attributes Type\n#----------------...
python
new_file
4
3
bsd-2-clause
8782775bceeb01a1985627e1203359b6d67d5272
numba/numba,stuartarchibald/numba,jriehl/numba,GaZ3ll3/numba,pombredanne/numba,stonebig/numba,stuartarchibald/numba,stefanseefeld/numba,shiquanwang/numba,gdementen/numba,pitrou/numba,GaZ3ll3/numba,stefanseefeld/numba,pitrou/numba,sklam/numba,pombredanne/numba,pitrou/numba,cpcloud/numba,gdementen/numba,IntelLabs/numba,j...
numba/typesystem/exttypes/attributestype.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add django 1.11 user migration to helevents" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.5 on 2017-09-15 12:29\nfrom __future__ import unicode_literals\n\nimport django.contrib.auth.v...
python
new_file
1
0
mit
e583cb2baba822863cda6caf80dd5ebd0ce042c8
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
helevents/migrations/0003_auto_20170915_1529.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom powerline.theme import requires_segment_info\n\n\n@requires_segment_info\ndef last_status(segment_info):\n\t'''Return last exit code.'''\n\treturn str(segment_info.last_exit_code) if segment_info.last_exit_co...
python
edit
1
4
mit
16a5b7897a76c9a53e60d78baf7fb94fcc59b220
bezhermoso/powerline,darac/powerline,magus424/powerline,wfscheper/powerline,dragon788/powerline,prvnkumar/powerline,xxxhycl2010/powerline,QuLogic/powerline,magus424/powerline,russellb/powerline,seanfisk/powerline,cyrixhero/powerline,blindFS/powerline,bezhermoso/powerline,kenrachynski/powerline,prvnkumar/powerline,junix...
powerline/segments/shell.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an unit test for vim.py" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport unittest\n\nfrom code2html.vim import vim_command\n\n\nclass VimCommandTest(unittest.TestCase):\n def test_vim_command(self):...
python
new_file
1
1
mit
07b5e63ba44b76158f7129720616199d6eb8401a
kfei/code2html
code2html/tests/unit/test_vim.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement validate frame range, as optional" }, { "role": "assistant", "content": "import pyblish.api\n\n\nclass ValidateMindbenderFrameRange(pyblish.api.InstancePlugin):\n \"\"\"Animation should normally be published with the...
python
new_file
1
1
mit
f524a951286b4cef5689abe5a76bc88e13e24e22
getavalon/core,mindbender-studio/core,MoonShineVFX/core,MoonShineVFX/core,getavalon/core,mindbender-studio/core
mindbender/maya/plugins/validate_frame_range.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests to validate vendor tornado usage" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Import Python libs\nfrom __future__ import absolute_import, unicode_literals\nimport os\nimport re\nimport logging\n\n\n...
python
new_file
4
4
apache-2.0
7bedccd6f6288c123f8dafb660417b6f7f4bde9c
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/test_vendor_tornado.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: [sql] Add operator module, which contains the base class for an Operator token." }, { "role": "assistant", "content": "\"\"\"\nOperators - stuff like `column = 'value'`, and similar.\n\"\"\"\nimport abc\n\nfrom katagawa.sql impor...
python
new_file
1
6
mit
8bc4471b95884f00d58d1067ad90c6a3220ce61e
SunDwarf/asyncqlio
katagawa/sql/operators.py
accepted
null
true