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 a simple script to help build android." }, { "role": "assistant", "content": "\"\"\"Configuration for the Caffe2 installation.\n\"\"\"\n\nfrom build import Config\nimport sys\n\nConfig.USE_SYSTEM_PROTOBUF = False\nConfig.PROT...
python
new_file
1
0
apache-2.0
af566e0cd0958dadd0de55d51b50ad026a8f2b99
davinwang/caffe2,sf-wind/caffe2,davinwang/caffe2,bwasti/caffe2,pietern/caffe2,xzturn/caffe2,davinwang/caffe2,sf-wind/caffe2,bwasti/caffe2,davinwang/caffe2,bwasti/caffe2,bwasti/caffe2,sf-wind/caffe2,caffe2/caffe2,pietern/caffe2,pietern/caffe2,Yangqing/caffe2,xzturn/caffe2,Yangqing/caffe2,davinwang/caffe2,Yangqing/caffe2...
build_android_prepare.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test process for running on COMPSs" }, { "role": "assistant", "content": "import argparse, time\nfrom pycompss.api.task import task\nfrom pycompss.api.parameter import *\n\n#class process_test:\n# \n# def __init__(self):\n#...
python
new_file
2
1
apache-2.0
600432490f78e1ed74ea334a5a46a30edd384a11
Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq
process_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check in a script to debug usercache processing\n\nCurrently, if there are errors in processing the usercache, we store the\nerroneous values into a separate usercache error database. But then, we want to\nevaluate the errors and fix them if...
python
new_file
8
2
bsd-3-clause
1af9b33c603a266b00274cb6b2e707a62d956242
yw374cornell/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,joshzarrabi/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-ser...
bin/debug/fix_usercache_processing.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add Solution to Problem 7." }, { "role": "assistant", "content": "# 10001st prime\n# Find the 10001st prime number\n# \nimport math\ndef generate_primes(n):\n\tp = 2\n\tprimes = [p]\n\tp += 1\n\tprimes.append(p)\n\n\twhile len(pr...
python
new_file
2
6
unlicense
1ff3735aec0473009c82444d024804fd1579a98f
iheanyi/ProjectEuler
solutions/p7.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add conv to tflite script for conv_actions." }, { "role": "assistant", "content": "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n...
python
new_file
2
1
apache-2.0
153fe45973f2299f14d6c444f93a34ca82ea7aa4
aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow
tensorflow/examples/speech_commands/conv_only.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move plotting out of main" }, { "role": "assistant", "content": "import plotly.graph_objs as go\nimport plotly.plotly as py\nfrom plotly.tools import FigureFactory as FF\nimport matplotlib.pyplot as plt\n\n\ndef plot(x_data, y_da...
python
new_file
5
1
mit
ce7a93bea9aeeaa49bec527b69f2b65efc7c450d
Irvel/JSSP-Genetic-Algorithm
plotter.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights avoid obstacles problem" }, { "role": "assistant", "content": "#!//urs/local/bin/python\n# Code Fights Avoid Obstacles Problem\n\n\ndef avoidObstacles(inputArray):\n for jump in range(2, 40):\n safe = ...
python
new_file
1
5
mit
9d196fff2c1347361e3650363e2c4d718e84ce62
HKuz/Test_Code
CodeFights/avoidObstacles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: CUDA: Add Dispatcher specialization cache tests" }, { "role": "assistant", "content": "from numba import cuda, float32, int32\nfrom numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase\n\n\n@skip_on_cudasim('Dispatch...
python
new_file
1
1
bsd-2-clause
86241da03ecab6b540944004b8bcbb4f3c577bdc
stonebig/numba,stuartarchibald/numba,seibert/numba,seibert/numba,IntelLabs/numba,sklam/numba,gmarkall/numba,gmarkall/numba,cpcloud/numba,sklam/numba,stonebig/numba,numba/numba,IntelLabs/numba,gmarkall/numba,stuartarchibald/numba,numba/numba,seibert/numba,seibert/numba,stuartarchibald/numba,stonebig/numba,gmarkall/numba...
numba/cuda/tests/cudapy/test_dispatcher.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration from the switch to jsonfield" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2016-01-11 02:08\nfrom __future__ import unicode_literals\n\nfrom django.db import ...
python
new_file
1
0
mit
75f36085f81c763016517901084d3181f9f1f108
pinax/pinax-eventlog
pinax/eventlog/migrations/0003_auto_20160111_0208.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add queueing server to handle multiple processes" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n qserver\n \n This module will use a queuing server to execute a number of tasks\n across multiple threads...
python
new_file
1
3
mit
fd850084bd858be9fcc98fa8fbe29bdd481fc066
dalepartridge/seapy,ocefpaf/seapy,powellb/seapy
qserver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for logging models" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.6 on 2017-04-04 20:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, model...
python
new_file
1
0
bsd-3-clause
495a9617cd42b5d88f9391b47d355a93c960c988
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/data_interfaces/migrations/0007_logging_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nif sys.version_info.major < 3:\n import unittest2 as unittest\nelse:\n import unittest\n\n```\n\nApply this change: [PY3] Use six for easy version info." }, { "role": "assistant", "content": "from evelink.third...
python
edit
3
0
mit
0c3c3921897816f0c7c1c74ad0b52a25cef5b742
Morloth1274/EVE-Online-POCO-manager,FashtimeDotCom/evelink,ayust/evelink,zigdon/evelink,bastianh/evelink
tests/compat.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for non-DBS data discovery." }, { "role": "assistant", "content": "# vim: foldmethod=marker\nfrom lobster.cmssw import dataset\nfrom lobster import fs, se\nimport os\nimport shutil\nimport subprocess\nimport tempfile\ni...
python
new_file
2
2
mit
e16054a24c7e8d5325ad4b1fa31a65681febc43c
matz-e/lobster,matz-e/lobster,matz-e/lobster
test/test_se.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests regarding the dyadic and triadic distributions from MDBSI." }, { "role": "assistant", "content": "\"\"\"\nTests for the MDBSI distributions.\n\"\"\"\n\nimport pytest\n\nfrom dit.example_dists.mdbsi import dyadic, triadi...
python
new_file
1
1
bsd-3-clause
f3bce5f47dc75e392a72846d98de467af6892f28
Autoplectic/dit,Autoplectic/dit,dit/dit,Autoplectic/dit,dit/dit,dit/dit,dit/dit,Autoplectic/dit,dit/dit,Autoplectic/dit
dit/example_dists/tests/test_mdbsi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: scripts: Add diffsettings --all for Django<=1.5" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Based on Django 1.5 diffsettings\n# https://github.com/django/django/blob/1.5/django/core/management/commands/diffset...
python
new_file
1
4
bsd-3-clause
ad705bd8993ba522326c64bd9b6232ef5374e65f
fmierlo/django-default-settings,fmierlo/django-default-settings
diffsettings-all.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a snapshot test for Simon Layton\n\nSummary: This is mainly for the OSS side checking.\n\nReviewed By: dzhulgakov\n\nDifferential Revision: D4238349\n\nfbshipit-source-id: 061da3f721341c4a1249e1cc6c8c842fc505860f" }, { "role": "a...
python
new_file
1
3
apache-2.0
0129f699427300feaf61eb4dda122c98dab32328
davinwang/caffe2,bwasti/caffe2,bwasti/caffe2,xzturn/caffe2,pietern/caffe2,davinwang/caffe2,Yangqing/caffe2,davinwang/caffe2,Yangqing/caffe2,xzturn/caffe2,xzturn/caffe2,Yangqing/caffe2,bwasti/caffe2,xzturn/caffe2,caffe2/caffe2,xzturn/caffe2,bwasti/caffe2,Yangqing/caffe2,sf-wind/caffe2,pietern/caffe2,sf-wind/caffe2,piete...
caffe2/python/operator_test/snapshot_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to run tests." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Build the documentation, and run the JavaScript tests.\"\"\"\n\nimport sphinx.cmdline\n\nimport os\nimport sys\n\n# Build the document...
python
new_file
1
0
apache-2.0
af5840c8f223d334997440878d0a7e7eaeb19be4
thewtex/vcwebedit,thewtex/vcwebedit
test/alltests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test file for beeper logic" }, { "role": "assistant", "content": "from unittest import mock\n\nfrom geometry_msgs.msg import PoseStamped\nimport rospy\nfrom beeper import Beeper\n\n\nclass TestBeeper(object):\n def setup(s...
python
new_file
1
1
mit
1ef08f6d940f47033df003dd641e61e718b2ca57
masasin/spirit,masasin/spirit
src/tests/test_beeper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic snapshot export test" }, { "role": "assistant", "content": "# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Tests for snapshot export.\"\"\"\n\nf...
python
new_file
1
1
apache-2.0
9f94ad31c1f94cccf4dbdaef6a7b8faa0199fa46
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core
test/integration/ggrc/converters/test_export_snapshots.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make SOFIA TSV for ontology mapping" }, { "role": "assistant", "content": "import sys\nimport json\n\n\ndef make_file(ont_json_file, fname):\n with open(ont_json_file, 'r') as fh:\n ont_json = json.load(fh)\n rows = ...
python
new_file
1
3
bsd-2-clause
a948006eb02591d56f76b32b98d5bb8ace5c2600
pvtodorov/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra
indra/sources/sofia/make_sofia_tsv.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for last_action_date field change" }, { "role": "assistant", "content": "# Generated by Django 2.2.16 on 2020-09-15 15:27\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n ...
python
new_file
1
0
mit
6e8bade6225d3a7108cc679f1fcbe371f7241278
datamade/django-councilmatic,datamade/django-councilmatic,datamade/django-councilmatic,datamade/django-councilmatic
councilmatic_core/migrations/0052_convert_last_action_date_to_datefield.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Spectra class for plotting data from RealTime objects" }, { "role": "assistant", "content": "import sys\nimport numpy as np\nfrom realtime import *\n\nclass Spectra(object):\n \"\"\"Return a spectra object that can plot th...
python
new_file
7
7
mit
72169b77a1d5cf92aa906b616b93f702b3ce55a1
wavefunction91/gaussian_realtime_parse,jjgoings/gaussian_realtime_parse
spectra.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test for the \"tile init\" command." }, { "role": "assistant", "content": "# tile-generator\n#\n# Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (th...
python
new_file
1
2
apache-2.0
7b4d626e9366ebe6e31d9835ce05f397056d5817
alex-slynko/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,alex-slynko/tile-generator,cf-platform-eng/tile-generator,alex-slynko/tile-generator,cf-platform-eng/tile-generator,alex-slynko/tile-generator
tile_generator/tile_unittest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Store perfectly working parser for one of the subtitle formats." }, { "role": "assistant", "content": "# the words \"subtitles\" and \"captions\" are used interchangeably\n\nimport re\n\ndef getVtt(fname):\n with open(fname) a...
python
new_file
1
7
mit
e08ac069b2bee1afaaf022a884dd098dc7daac07
aktivkohle/youtube-curation,aktivkohle/youtube-curation,aktivkohle/youtube-curation,aktivkohle/youtube-curation
parseSubtitles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use pt-table-checksum to check for galera consistency" }, { "role": "assistant", "content": "import optparse\nimport subprocess\n\n\ndef table_checksum(user, password, host):\n args = ['/usr/bin/pt-table-checksum', '-u', user,...
python
new_file
3
3
apache-2.0
cbd90060410108877d068913a4dfc681b81d6956
jpmontez/rpc-openstack,cfarquhar/rpc-maas,miguelgrinberg/rpc-openstack,xeregin/rpc-openstack,mancdaz/rpc-openstack,nrb/rpc-openstack,stevelle/rpc-openstack,claco/rpc-openstack,BjoernT/rpc-openstack,npawelek/rpc-maas,shannonmitchell/rpc-openstack,rcbops/rpc-openstack,robb-romans/rpc-openstack,mattt416/rpc-openstack,andy...
galera_consistency.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for batchwise GitHub follow." }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom __future__ import absolute_import, print_function\n\nimport getpass\n\nimport requests\nfrom requests.auth import HTTPBasi...
python
new_file
4
7
unlicense
3451b122a7b30c1aa43b56833051c6e1ae9c5874
punchagan/hs-twitter-lists
github_follow.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Write a procedure that converts an American number into the equivalent Mandarin." }, { "role": "assistant", "content": "# Problem 3\n# 10.0 points possible (graded)\n# Numbers in Mandarin follow 3 simple rules:\n\n# There are wor...
python
new_file
1
8
mit
3dd24e35cbc79a07af49c86cc8dcdb2b20d91805
Kunal57/MIT_6.00.1x
final/problem3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create command to calculate recommendation's accuracy" }, { "role": "assistant", "content": "from django.core.management import BaseCommand\n\nfrom crawler.models import *\n\n\nclass Command(BaseCommand):\n help = 'Calculate r...
python
new_file
3
6
apache-2.0
feb8db57d5a73593f066d63f10383e77576c226d
bkosawa/admin-recommendation
crawler/management/commands/recommendation_accuracy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add complimation test for OMF" }, { "role": "assistant", "content": "import unittest\nimport shutil\nimport tempfile\nimport os\nimport numpy as np\n\n# VTK imports:\nfrom vtk.util import numpy_support as nps\n\nfrom .. import _h...
python
new_file
11
1
bsd-3-clause
b0c87f3959b747f5ea12c74434e6361296be0db9
banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics,banesullivan/ParaViewGeophysics
PVGeo/omf/__test__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Write scraper script for Religiousforums forum" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport argparse\nimport os\nimport os.path\n\nfrom bs4 import BeautifulSoup\nimport requests\n\n\ndef post_filter(tag)...
python
new_file
1
4
mit
8ac395498ed6efd8557bf0aac8d9fb75469019a6
kemskems/otdet
bin/religiousforums_scraper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 21" }, { "role": "assistant", "content": "#!/usr/bin/python\n\n\"\"\"\nFirst attempt to resolve was really brute force and slow,\nthis is a better solution, see problem page for explanation\n\"\"\"\n\nfro...
python
new_file
1
5
mit
c32a12ed83ec033462126dfacf3fcf144626cebf
cifvts/PyEuler
euler021.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some mine alias functions" }, { "role": "assistant", "content": "def psf_internal(cidr):\n return __salt__[\"ip_picker.ip_addrs\"](cidr=cidr)\n\n\ndef pypi_internal(cidr):\n return __salt__[\"ip_picker.ip_addrs\"](cidr=...
python
new_file
3
1
mit
a486899294faa18cf8d7c51dc12a2fe87b584804
dstufft/psf-salt,zooba/psf-salt,dstufft/psf-salt,zware/psf-salt,caktus/psf-salt,caktus/psf-salt,python/psf-salt,caktus/psf-salt,zooba/psf-salt,zooba/psf-salt,python/psf-salt,python/psf-salt,zware/psf-salt,zware/psf-salt,zware/psf-salt,dstufft/psf-salt,python/psf-salt
salt/_modules/minealiases.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a MixIn that makes it simpler to instantiate a deform\n\nThis adds a very simple MixIn that makes it easier to instantiate a form\nalong wth providing the right values to the various moving pieces, such\nas the schema, the bindings and t...
python
new_file
1
9
isc
6388ac01b61266ca1cb9a5d0c3eb063c3dff0a6f
usingnamespace/usingnamespace
usingnamespace/forms/schemaform.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 35" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import sqrt, ceil, floor, log10, pow\n\nLIMIT = 1000000\n\ndef decimalShift(x):\n dec = x % 10;\n power = floor(log10(x))\n ...
python
new_file
1
1
mit
c3b531f6c1dcd719adfa69f72ae95e4018debbac
cifvts/PyEuler
euler035.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ability to easily whitelist users." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom django.contrib.auth.models import User\n\nfrom core.models import UserProfile\nfrom projects ...
python
new_file
2
2
mit
43687a8c59c9ceb26073ba9517004426820ec45c
mrshoki/readthedocs.org,davidfischer/readthedocs.org,fujita-shintaro/readthedocs.org,attakei/readthedocs-oauth,VishvajitP/readthedocs.org,nikolas/readthedocs.org,fujita-shintaro/readthedocs.org,VishvajitP/readthedocs.org,wijerasa/readthedocs.org,kenshinthebattosai/readthedocs.org,agjohnson/readthedocs.org,royalwang/rea...
readthedocs/core/management/commands/whitelist_users.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code to send informal emails to the teams." }, { "role": "assistant", "content": "from contextlib import contextmanager\nimport os\nimport smtplib\nimport database as db\n\nfrom email.mime.text import MIMEText\n\nfrom jinja2 ...
python
new_file
4
3
bsd-3-clause
d154a2dbdb45d28e12a1b3d67790653bbf4d17dc
eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
src/teammails/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a script for spotting doubly-minted identifiers" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- encoding: utf-8 -*-\n\"\"\"\nThis scripts looks for duplicate identifiers in the \"Identifiers\" table.\n\nT...
python
new_file
1
6
mit
68769e2bc5bc7a633ef2bcbd2efdc6f69952858d
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
scripts/find_duplicate_identifiers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for MPTT update." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport polymorphic_tree.models\n\n\nclass...
python
new_file
1
0
mit
9771450342d65f4a87f502312f53058e91a1438e
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit
eventkit/migrations/0003_auto_20150607_2314.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first attempt to pull information out of aqhbci" }, { "role": "assistant", "content": "from subprocess import check_output\nimport sys\n\n\ndef list_accounts():\n stdout = check_output(['aqhbci-tool4', 'listaccounts'])\n\n...
python
new_file
1
3
apache-2.0
4fb5d4895ba955e30cb7908921ef7036c904d646
hedderich/aqbanking-cli-wrapper
wrapper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: subdomains: Write some tests for get_subdomain.\n\nThis logic is a bit subtle, and we're about to make changes to it.\nSo let's have some tests." }, { "role": "assistant", "content": "\nimport mock\nfrom typing import Any, List\n...
python
new_file
5
1
apache-2.0
1b19af261261d16c37885bda634f02f9a3abc027
mahim97/zulip,kou/zulip,shubhamdhama/zulip,showell/zulip,punchagan/zulip,dhcrzf/zulip,brainwane/zulip,rht/zulip,tommyip/zulip,brockwhittaker/zulip,kou/zulip,eeshangarg/zulip,rishig/zulip,rishig/zulip,dhcrzf/zulip,eeshangarg/zulip,eeshangarg/zulip,timabbott/zulip,rishig/zulip,rishig/zulip,brockwhittaker/zulip,zulip/zuli...
zerver/tests/test_subdomains.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Read and regex match the log lines" }, { "role": "assistant", "content": "#!/usr/local/bin/python3.6\n\n# read nginx access log\n# parse and get the ip addresses and times\n# match ip addresses to geoip\n# possibly ignore bots\n\...
python
new_file
1
3
mit
25fba421673c1e86d71b42af208fc47996f1c326
mouhtasi/basic_site_analytics
site_analytics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [build-script] Introduce infrastructure for auto-prefixing stage2 options.\n\nThis will let me introduce a stage generic swift implementation that adds a\npostfix '_stage2' to certain stage specific options. This ensures we can have a\nsingl...
python
new_file
1
2
apache-2.0
18f84f266d172e0390eef61250909dc9c0401f4b
benlangmuir/swift,xwu/swift,xwu/swift,JGiola/swift,gregomni/swift,atrick/swift,apple/swift,roambotics/swift,apple/swift,atrick/swift,gregomni/swift,xwu/swift,xwu/swift,hooman/swift,hooman/swift,benlangmuir/swift,ahoppen/swift,glessard/swift,benlangmuir/swift,roambotics/swift,apple/swift,rudkx/swift,roambotics/swift,atr...
utils/swift_build_support/swift_build_support/compiler_stage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 03-task sample test file." }, { "role": "assistant", "content": "import datetime\nimport unittest\n\nimport solution\n\n\nclass TestSocialGraph(unittest.TestCase):\n def setUp(self):\n self.terry = solution.User(\"T...
python
new_file
1
1
mit
e6a90e5926d589e405b3a575de442e2f399e81cf
pepincho/Python-Course-FMI
03_task/sample_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test case to test loading config from an environment variable." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\\\n'''\n unit.config_test\n ~~~~~~~~~~~~~~~~\n\n Configuration related unit testing\n\n ...
python
new_file
1
0
apache-2.0
0faf570db96db22ddbbd8dc81053bcbd36a1aa74
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/config_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for over-riding author info" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom opentreetesting import test_http_json_method, config\nimport datetime\nimport codecs\nimport json\nimport sys\nimport os\n\...
python
new_file
1
0
bsd-2-clause
02832aee17b4cae8dc49a035bc8c6d11a69dd7ac
leto/new_opentree_api,leto/new_opentree_api
ws-tests/test_valid_study_put_override_author.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add flask server for evaluating expressions" }, { "role": "assistant", "content": "from sympy.abc import *\n\nfrom flask import Flask, request\napp = Flask(__name__)\n\n@app.route('/code', methods=['GET', 'POST'])\ndef code():\n ...
python
new_file
2
1
mit
84f17a5443e1268c62f94f104b0a7d4d6a631f22
boppreh/symcalc
symcalc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import url, patterns\n\nfrom ajaximage.views import ajaximage\nfrom ajaximage.forms import FileForm\n\n\nurlpatterns = patterns('',\n url('^upload/(?P<upload_to>.*)/(?P<max_width>\\d+)/(?P<max_height>\\d+)/...
python
edit
1
0
mit
f0d3cf2bfcaa569f47eb888d5553659c5c57f07d
bradleyg/django-ajaximage,bradleyg/django-ajaximage,subhaoi/kioskuser,subhaoi/kioskuser,subhaoi/kioskuser,bradleyg/django-ajaximage
ajaximage/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add primitives for pdf parsing" }, { "role": "assistant", "content": "import inspect\n\nfrom enum import IntEnum\nfrom pdfquery import PDFQuery\n\n\nclass DocFieldType(IntEnum):\n NUMBER = 1\n TEXT = 2\n CUSTOM = 3 # TO...
python
new_file
1
6
mit
b9f2a5816c55334013a8447da705066f783dfda2
loanzen/zen_document_parser
paperwork_parser/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create script to time compass reads and db writes" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nfrom sense_hat import SenseHat\nfrom pymongo import MongoClient\n\nsense = SenseHat()\nclient = MongoClient(\"mong...
python
new_file
1
0
bsd-3-clause
ee1e6587044aa5dc9b47776c648c7da55220306a
gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2
scratchpad/push-compass-values.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add decorator that will catch and retry on StaleElementReferenceException" }, { "role": "assistant", "content": "from selenium.common.exceptions import TimeoutException, StaleElementReferenceException\n\n\ndef retry_on_stale_elem...
python
new_file
3
2
mit
efafb94f6512a00baa13ecc2ab18e80441f41922
alphagov/notifications-functional-tests,alphagov/notifications-functional-tests
tests/decorators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for optional arguments on Event" }, { "role": "assistant", "content": "from conference_scheduler.resources import Event\n\n\ndef test_can_construct_event():\n e = Event(\n name='example',\n duration=60,...
python
new_file
1
1
mit
88a74b351c29c4c6e337c76b105f9bc25591f755
PyconUK/ConferenceScheduler
tests/test_resources.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an openbsd service module." }, { "role": "assistant", "content": "'''\nThe service module for OpenBSD\n'''\n\nimport os\n\n\n# XXX enable/disable support would be nice\n\n\ndef __virtual__():\n '''\n Only work on OpenBS...
python
new_file
6
3
apache-2.0
539b680a6c9bc416d28ba02087db2e46b4037f06
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/openbsdservice.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add data and dataset collection." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom collections import namedtuple\n\n\nData = namedtuple('Data', ['X', 'Y', 'y', ])\n\nDataset = namedtupl...
python
new_file
1
0
mit
21f02e452546cdbe4209bfbb8ec6addecf083ebf
benigls/spam,benigls/spam
spam/common/collections.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Refactor - Moved Printer classes to seperate file" }, { "role": "assistant", "content": "#!/usr/bin/env/python3\n\n\nclass Printer:\n \"\"\"\n Base class for the cheatsheet printers. Takes care of the actuall printing.\n\n ...
python
new_file
1
2
mit
c3a6347357e2ee604db0271cde829e6795794cf9
martialblog/cheatsheet
cheat/printer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport logging\nimport threading\nimport traceback\n\n\nclass Handler(object):\n \"\"\"\n Handlers process metrics that are collected by Collectors.\n \"\"\"\n def __init__(self, config=None):\n \"\"\"\n...
python
edit
1
3
mit
efbf92af38a6bcaa87327b9c5fc44680888a6793
Netuitive/Diamond,codepython/Diamond,Netuitive/netuitive-diamond,Ensighten/Diamond,Nihn/Diamond-1,Clever/Diamond,hamelg/Diamond,Ensighten/Diamond,szibis/Diamond,Precis/Diamond,Slach/Diamond,anandbhoraskar/Diamond,TAKEALOT/Diamond,eMerzh/Diamond-1,CYBERBUGJR/Diamond,jriguera/Diamond,Netuitive/Diamond,sebbrandt87/Diamond...
src/diamond/handler/Handler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple test for a custom finder" }, { "role": "assistant", "content": "import random\nimport time\n\nfrom django.test import TestCase\n\nfrom graphite.intervals import Interval, IntervalSet\nfrom graphite.node import LeafNode...
python
new_file
2
4
apache-2.0
ac7b572b8bf7d690ac70b479814deed2c0a772e4
Squarespace/graphite-web,disqus/graphite-web,dbn/graphite-web,brutasse/graphite-web,AICIDNN/graphite-web,brutasse/graphite-web,esnet/graphite-web,disqus/graphite-web,pu239ppy/graphite-web,nkhuyu/graphite-web,graphite-server/graphite-web,phreakocious/graphite-web,goir/graphite-web,JeanFred/graphite-web,zBMNForks/graphit...
webapp/tests/test_finders.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for the logger" }, { "role": "assistant", "content": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function\nfrom __future__ import unicode_litera...
python
new_file
1
1
mit
bfbf598cb80ad5df0f6032197f173da794311a33
thombashi/SimpleSQLite,thombashi/SimpleSQLite
test/test_logger.py
rejected_duplicate
Near-duplicate of sample 7896
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom evesrp import create_app\nfrom evesrp.killmail import CRESTMail, ShipURLMixin\nimport evesrp.auth.testauth\nfrom os import environ as env\nfrom binascii import unhexlify\n\n\nskel_url = 'https://wiki.eveonline.co...
python
edit
4
0
bsd-2-clause
dcc0d0373b6cb72a62c3279ae753f7cf0663f63b
eskwire/evesrp,paxswill/evesrp,eskwire/evesrp,eskwire/evesrp,paxswill/evesrp,eskwire/evesrp,paxswill/evesrp
heroku.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the pixelset list view" }, { "role": "assistant", "content": "from django.core.urlresolvers import reverse\n\nfrom apps.core.factories import PIXELER_PASSWORD, PixelerFactory\nfrom apps.core.tests import CoreFixture...
python
new_file
1
1
bsd-3-clause
5b3a001af9ff992d061f880d6350292250fd8687
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
apps/explorer/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to set UserProfilesSettings correctly" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\nfrom molo.profiles.models import U...
python
new_file
1
2
bsd-2-clause
4fbcf7b251253062465a286829b97c910b124c06
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
gem/migrations/0027_set_site_settings_correctly.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the classic missing file." }, { "role": "assistant", "content": "def op_cmp(op1, op2):\n \"\"\"\n Compare an operation by active and then opid.\n \"\"\"\n if op1['active'] != op2['active']:\n return -1 if o...
python
new_file
2
3
apache-2.0
1a86f43428e9f05ade880b047a0b194ca776bfad
beaufour/mtop
lib/util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add context manager for temp dir." }, { "role": "assistant", "content": "\"\"\"Helpers for working with paths an similar.\n\"\"\"\n\nimport os\n\n\nclass TempDir(object):\n \"\"\"Switch to a temporary directory and back.\n\n ...
python
new_file
1
1
mit
14c953533b135e014164277a0c33d8115866de6a
slideclick/mochi,pya/mochi,i2y/mochi,slideclick/mochi,pya/mochi,i2y/mochi
mochi/utils/path_helper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create an example script that opens executable in subprocess and evaluates" }, { "role": "assistant", "content": "import argparse\nimport os\nfrom subprocess import PIPE, Popen\n\n# insert your client_token into sigopt_creds.py\n...
python
new_file
1
2
mit
4d50bb1140d8108c642ed89534bad1cb568123bb
sigopt/sigopt-python,sigopt/sigopt-python
examples/subprocess_evaluator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add NewsChooserBlock for choosing news items in StreamFields" }, { "role": "assistant", "content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.utils.functional import cached_property\nfrom wagtail.wag...
python
new_file
1
1
bsd-2-clause
5246ec4a98bca8c087d820b3ad10525ca9d6e1f2
takeflight/wagtailnews,takeflight/wagtailnews,takeflight/wagtailnews,takeflight/wagtailnews
wagtailnews/blocks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add detection of left side of face" }, { "role": "assistant", "content": "#scan through each row\n#when you hit a high intensity pixel store x \n#when you hit a low intensity pixel for more than like 10 pixels set xfinal\n#scan e...
python
new_file
2
4
mit
9c1ae3592c5a376433b4048442837cb40a7af552
anassinator/codejam,anassinator/codejam-2014
Detect_Face_Sides.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add delete all jobs script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n############################################################################\n# ...
python
new_file
3
6
apache-2.0
94e906d938cb860ff8744326ade4d65297805cc2
prelert/engine-python,pemontto/engine-python
deleteAllJobs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for formatter yaml" }, { "role": "assistant", "content": "import unittest, argparse\nfrom echolalia.formatter.yamler import Formatter\n\nclass YamlerTestCase(unittest.TestCase):\n\n def setUp(self):\n self.parser = ...
python
new_file
2
2
mit
ab0492c1c71bf9e77a0327efa2c8eca5be9ae728
eiri/echolalia-prototype
tests/formatter/test_yamler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 23, it's quite fast" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import floor, sqrt\n\nLIMIT = 28134\n\n\ndef isAbundant(n):\n max_t = floor(sqrt(n)) + 1\n sum_d = 1\n fo...
python
new_file
1
4
mit
b07b12b2645e394c5a85a3585512acf7bdfb05b7
cifvts/PyEuler
euler023.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix: Merge migrations file to resolve conflicts" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.20 on 2019-11-22 04:50\nfrom __future__ import unicode_literals\n\nfrom django.db import m...
python
new_file
1
0
bsd-2-clause
161973b337c9574d95b1b4c71c802f6d9a2d6d62
lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry
core/migrations/0005_merge_20191122_0450.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to convert GA timezone to UTC\n\nWe are ignoring the timezone from GA requests so previous data needs to\nbe converted to account for this.\n\nSee https://www.pivotaltracker.com/story/show/62779118 for details." }, { "r...
python
new_file
5
3
mit
e271d355e057f72c85efe3f1a407c55e54faca74
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
migrations/008_convert_ga_buckets_to_utc.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to collect data from the system" }, { "role": "assistant", "content": "import argparse\nimport datetime\nimport time\nfrom os import linesep\n\nimport psutil\n\n\ndef system_stats(duration):\n for _ in range(duratio...
python
new_file
3
4
cc0-1.0
0e86d708c2a1a266f1ba5b5f6a28e2105d291d66
timClicks/make-for-data
generate_stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for KeyAuthMiddleware, Test apikey authentication" }, { "role": "assistant", "content": "import json\n\nfrom rest_framework import status\nfrom rest_framework.test import APITestCase\nfrom django.contrib.auth impor...
python
new_file
1
1
apache-2.0
84fc02af75bec18b1c436741453762c793700ea3
menecio/django-api-bouncer
tests/test_middleware_key_auth.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract the crosswalk between msas and blocks" }, { "role": "assistant", "content": "\"\"\"crosswalk_msa_block.py\n\nExtract the crosswalk between 2000 msa and blocks\n\"\"\"\nimport os\nimport csv\n\n#\n# Import da...
python
new_file
7
0
bsd-2-clause
ab242c4d4fe2aa3bc7ce5a44eb7bd1ffcc5a922e
scities/2000-us-metro-atlas
bin/2000/crosswalk_msa_block.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add integration test for number of detected RSS feeds" }, { "role": "assistant", "content": "import subprocess\nimport unittest\n\nfrom aws_status.status_page import StatusPage\n\nclass TestStatusPage(unittest.TestCase):\n def...
python
new_file
1
1
mit
6f7d8055613c8b0542dca5185cdc46e37a96942a
jbbarth/aws-status,jbbarth/aws-status
tests/test_status_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create in 63 glorious lines" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\n# Import modules\nfrom os import system as do\nfrom time import sleep\n\n# Set Variables\nupCache = \" \"\nupSys = \" \"\nremAuto = \" \"\n\...
python
new_file
1
1
mit
2ef2ebf54e16ba1426dd370c6e3d656e8e2f97dd
hyperdriveguy/pyUpdate,hyperdriveguy/pyUpdate
pyUpdate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nrequests.hooks\n~~~~~~~~~~~~~~\n\nThis module provides the capabilities for the Requests hooks system.\n\nAvailable hooks:\n\n``args``:\n A dictionary of the arguments being sent to Request().\n\n``pre_...
python
edit
1
6
isc
57b4d39749021305a2d5850e642537224d30611f
Bluehorn/requests,revolunet/requests,revolunet/requests,psf/requests
requests/hooks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script for HEAD requests\n\nChange-Id: I3d2421f1fb6e0db02e01789edc78ca432e34975f" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file ...
python
new_file
1
1
apache-2.0
4138baea40ad25635967f7382f082256099da4d2
stackforge/python-openstacksdk,dudymas/python-openstacksdk,dudymas/python-openstacksdk,briancurtin/python-openstacksdk,briancurtin/python-openstacksdk,mtougeron/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,mtougeron/python-openstacksdk,openstack/python-openstacksdk,openstack/python-openst...
examples/head.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to find applications enabled for an add on [skip ci]" }, { "role": "assistant", "content": "from __future__ import absolute_import\nimport csv\n\nfrom django.core.management.base import BaseCommand\nfrom corehq import...
python
new_file
1
6
bsd-3-clause
18275a566f23d4387ffbd1d19e5cd8d6d449dad9
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/app_manager/management/commands/applications_with_add_ons.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fake robot utility tool." }, { "role": "assistant", "content": "import json\n\nfrom time import time\nfrom threading import Timer\n\nfrom tornado.ioloop import IOLoop\nfrom tornado.web import Application\nfrom tornado.websock...
python
new_file
1
2
mit
48b1479a84fcb6d16d8aea8ca256d01e9898eeea
pollen/pyrobus
tools/fake_robot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: BUG: Make sure that joblib does get installed." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\ndef configuration(parent_package='', top_path=None):\n from numpy.distutils.misc_util import Configuration\n c...
python
new_file
1
1
bsd-3-clause
81c2b0abcb5cec457e30c0b0d071212304f3da1d
mayblue9/scikit-learn,terkkila/scikit-learn,fabianp/scikit-learn,ningchi/scikit-learn,amueller/scikit-learn,glemaitre/scikit-learn,aflaxman/scikit-learn,larsmans/scikit-learn,ishanic/scikit-learn,Fireblend/scikit-learn,moutai/scikit-learn,nikitasingh981/scikit-learn,cybernet14/scikit-learn,xwolf12/scikit-learn,tdhopper...
scikits/learn/externals/setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for game parser item" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport requests\nfrom lxml import html\n\nfrom parsers.team_parser import TeamParser\nfrom parsers.game_parse...
python
new_file
1
1
mit
8b7f48d9b077377ebaeed8c57ab02b705e0ba556
leaffan/pynhldb
test_game_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the main package module file\n\nA basic introduction to the utility and philosophy of the package is\nadded to the package docstring." }, { "role": "assistant", "content": "\"\"\"\nSimple and extensible toolkit for theoretic ...
python
new_file
1
0
mit
77e71d20d67af9965ca42c8e187614be1a9c7ffc
tschijnmo/KineticsToolkit
KineticToolkit/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to list projects" }, { "role": "assistant", "content": "from yastlib import *\n\nyast_id = 'id'\nyast_password = 'password'\nyast = Yast()\nyast_hash = yast.login(yast_id, yast_password)\nif yast_hash != False:\n\tprin...
python
new_file
5
0
mit
46600be25ea95a0c823730694a7f79be453477b1
jfitz/hours-reporter
list_projects.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Use a generator with numpy.loadtxt" }, { "role": "assistant", "content": "\"\"\"Use a generator with numpy loadtxt\"\"\"\n\nimport numpy as np\n\n\ndef file_stream(file_name):\n for line in open(file_name):\n yield line...
python
new_file
1
2
apache-2.0
c786ae11e5dfb6166e3d94a64ac5efed5be2de78
chengsoonong/didbits
DataWrangling/stream_csv.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move win32 audio experiment to trunk.\n\n\n\n\n\ngit-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@736 14d46d22-621c-0410-bb3d-6f67920f7d95" }, { "role": "assistant", "content": "#!/usr/bin/python\r\n# $Id:$\r\n\r\n# Play an a...
python
new_file
3
0
bsd-3-clause
d5c7d429be93a2b2de4a1c09bd73f72c02664499
adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet,niklaskorz/pyglet,niklaskorz/pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet
experimental/directshow.py
rejected_duplicate
Near-duplicate of sample 6875
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\n# Enable or disable the use of NMEA.\n\nimport ubx\nimport struct\nimport calendar\nimport os\nimport gobject\nimport logging\nimport sys\nimport socket\nimport time\n\nloop = gobject.MainLoop()\n\ndef callback(ty, pack...
python
edit
8
4
mit
a9af0878b349238f72dda384d3084bc31518b0ab
berkeleyapplied/ubx,aanjhan/ubx,aanjhan/ubx,berkeleyapplied/ubx
set-nmea.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for Jobs()" }, { "role": "assistant", "content": "import unittest\nimport mock\nfrom ..jobs import Jobs\n\n\nclass TestJobs(unittest.TestCase):\n\n @mock.patch('auth0.v2.jobs.RestClient')\n def test_get(self,...
python
new_file
1
1
mit
a0a8e481eaaff042ad43ae3f40110f215b144c26
auth0/auth0-python,auth0/auth0-python
auth0/v2/test/test_jobs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to display normal distribution" }, { "role": "assistant", "content": "\nimport healpy as hp\nimport numpy as np\n\nimport matplotlib.pyplot as plt\n\ndef load_ply(path):\n \n lines = []\n verts = []\n norms...
python
new_file
2
8
apache-2.0
88b2011e0f337f1d91192dc62cb051590914ab8e
amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,amonszpart/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt
globOpt/scripts/normal_distr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unstable embedding in larger network" }, { "role": "assistant", "content": "\"\"\"\nEmbed motif in larger network\n\"\"\"\n\nimport copy\n\nimport numpy as np\nimport networkx as nx\nimport scipy.stats as scis\nimport matplot...
python
new_file
4
4
mit
73b6f640d74f274ad00bfcdedbe9483d67db9936
kpj/SDEMotif,kpj/SDEMotif
larger_embedding.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add eventlet db_pool use for mysql\n\nThis adds the use of eventlet's db_pool module so that we can make mysql\ncalls without blocking the whole process.\n\nNew config options are introduced:\n\nsql_dbpool_enable -- Enables the use of eventl...
python
new_file
1
2
apache-2.0
64bb470bc58d6d467f4bd807f82cc56aa5e674bc
n0ano/gantt,n0ano/gantt
nova/tests/test_sqlalchemy.py
rejected_duplicate
Near-duplicate of sample 6430
true
[ { "role": "user", "content": "Write python code for the following: Add Turing machine class before integer-to-TM conversion." }, { "role": "assistant", "content": "class State():\n def __init__(self, ??):\n self.end_of_tape = ??\n self.write_false = ??\n self.move_false =...
python
new_file
null
null
mit
ba1a80d866748426a06785a2efaa4b6aad3c95a5
alexaltair/solomonoff-induction
turing_machine.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add process memory usage script" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport os\nimport sys\n\ndef show_usage():\n sys.stderr.write('''memio - Simple I/O for /proc/<pid>/mem\nDump /proc/<pid>/maps:\n ...
python
new_file
1
5
mit
8e0c00254997e0223141bf02f599bce3eacca747
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
proc-mem.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add more organisations for letter branding\n\n> The logos are now ready to go on DVLA side- so far we've got:\n> 001 = HM Government\n> 002 = OPG\n> 003 = DWP\n> 004 = GEO" }, { "role": "assistant", "content": "\"\"\"empty messag...
python
new_file
5
1
mit
1bd5e8897991cec7d1c7f5c6a8320415841887e5
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0104_more_letter_orgs.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Make an experiment for reconstructing a function from partial ordering of its values at samples points." }, { "role": "assistant", "content": "# Goal:\n#\n# Given:\n# - a set of samples (S)\n# - an unknown evaluation function f o...
python
new_file
3
2
mit
af1d2e6e3e5df1ad08f977e83208de29d22cd391
bzamecnik/tfr,bzamecnik/tfr
experiments/func_from_partial_order/func_from_partial_order.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add noise image generator script" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"Generates smooth noise images.\"\"\"\n\nimport argparse\n\nimport numpy as np\nfrom PIL import Image\n\nfrom num_utils import...
python
new_file
1
3
mit
fa830a7a8f7a2b34df311b8d85788ccd5531bb30
crowsonkb/style_transfer,crowsonkb/style_transfer,crowsonkb/style_transfer,crowsonkb/style_transfer
gen_noise.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Introduce a single program to rule them all..." }, { "role": "assistant", "content": "#! /usr/bin/env python\n# -*- coding:utf-8 -*- \n\n\n#\n# Application to capture, and calibrate stereo cameras\n#\n\n\n#\n# External dependenci...
python
new_file
1
0
mit
7e7817fc5a90adf7b2fa4b8947dd46a75bc6e818
microy/VisionToolkit,microy/VisionToolkit,microy/StereoVision,microy/PyStereoVisionToolkit,microy/StereoVision,microy/PyStereoVisionToolkit
pystereovisiontoolkit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for simple test of unreachable symbols remove" }, { "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-transforms\n\n\"\"\"...
python
new_file
3
0
mit
95ab6c0c23f756372a3e34e4386c15b4beaf0aa7
PatrikValkovic/grammpy
tests/UnreachableSymbolsRemove/SimpleTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a new test module along with a session scoped env fixture" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom jinja2 import Environment\n\n\n@pytest.fixture(scope='session')\ndef environ...
python
new_file
1
1
mit
68f6f74dd439eabaa80fc107adcd3dc04ebf477d
hackebrot/jinja2-time
tests/test_now.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Revert \"Revert \"Created the model and migration for person_location_history table\"\"\n\nThis reverts commit baf53bd5b1fdcb0c1b39c60a2337d3f3d58cad95.\noops" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom _...
python
new_file
1
0
mit
6e278c7e621b0bf1aa580cac128d6698dece7c93
ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida
vida/vida/migrations/0011_personlocationhistory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add scatter linked-brush selection example" }, { "role": "assistant", "content": "\"\"\"\nFaceted Scatter Plot with Linked Brushing\n-----------------------------------------\nThis is an example of using an interval selection to ...
python
new_file
1
0
bsd-3-clause
1652d1c425ae85a356fe78f71d3942351b983f58
ellisonbg/altair,altair-viz/altair,jakevdp/altair
altair/vegalite/v2/examples/scatter_linked_brush.py
accepted
null
true