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 migration to add authtokens for existing users\n\n* NB: Depending on how many users there are, this migration could be pretty RAM\n intensive..." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__...
python
new_file
4
2
apache-2.0
5a7081c5c46a050566477adda19d30844192ceb2
WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed
src/mmw/apps/user/migrations/0002_auth_tokens.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add fields to privatemessage for network invitations." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.9 on 2018-02-26 22:09\nfrom __future__ import unicode_literals\n\nfrom django.db imp...
python
new_file
1
0
mit
ff2c4b68a5eace4451eeef4fd6ca84d37435c556
ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet,ProjectFacet/facet
project/editorial/migrations/0087_auto_20180226_1409.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a few behavior tests for selection" }, { "role": "assistant", "content": "import os\nimport pytest\nimport yaml\n\nfrom photoshell.selection import Selection\n\n\n@pytest.fixture\ndef sidecar(tmpdir):\n tmpdir.join(\"test....
python
new_file
1
1
mit
68e056459dd3818ebb0c5dbdc8b4f1089bec9f07
photoshell/photoshell,SamWhited/photoshell,campaul/photoshell
tests/selection_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add hbase consistency check throw hbase hbck command, easily can be added some checks like backups servers or region servers" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# vim: ts=4:sw=4:et:sts=4:ai:tw=80\nfrom u...
python
new_file
1
4
apache-2.0
00bfd02f921a42d4f288254d1accb7546d8df2c5
keedio/nagios-hadoop,keedio/nagios-hadoop
check_hbase.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create new monthly violence polls" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom django.core.management.base import BaseCommand\nimport traceback\n\nfrom poll.models import Poll\nfrom unre...
python
new_file
8
1
bsd-3-clause
6f00204ae2603063eafbd74a369e9da0864854ca
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
poll/management/commands/create_new_violence_polls.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: [XLA:Python] Make JAX CompiledFunction objects pickle-able.\n\nPiperOrigin-RevId: 388814246" }, { "role": "assistant", "content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")...
python
new_file
1
1
apache-2.0
2af53a39096c0eab9d95c304c802281fe3c580ae
google/jax,google/jax,google/jax,google/jax
tests/pickle_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for converter.Line and converter.Generator.\n\nSigned-off-by: Raphaël Barrois <<EMAIL>>" }, { "role": "assistant", "content": "# coding: utf-8\n# Copyright (c) 2010-2012 Raphaël Barrois\n\nimport unittest\n\nfrom confmg...
python
new_file
1
2
bsd-2-clause
4694f6bf2405d0aae5e6c3fc393f8a839e8aac07
rbarrois/uconf
tests/test_converter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add start of processed package" }, { "role": "assistant", "content": "from ..errors import InconsistentFields, NonUnique\n\n\ndef greedy_set_cover(data, exclude=None):\n \"\"\"Find unique set of attributes that uniquely identi...
python
new_file
3
5
bsd-3-clause
50742b6e629e6f54a9f3784a3c1495eb9d82c238
brightway-lca/brightway
brightway_projects/processing/processed_package.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add stupid CSV export example\n\nFixes #53" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport csv\n\nimport sys\nsys.path.append('../pynipap')\nimport pynipap\n\nclass Export:\n\tdef __init__(self, xmlr...
python
new_file
10
5
mit
7bde47d48f4e80b4449049a8b05767b30eb2c516
SoundGoof/NIPAP,plajjan/NIPAP,SpriteLink/NIPAP,bbaja42/NIPAP,ettrig/NIPAP,bbaja42/NIPAP,fredsod/NIPAP,SoundGoof/NIPAP,fredsod/NIPAP,ettrig/NIPAP,SpriteLink/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,bbaja42/NIPAP,fredsod/NIPAP,fredsod/NIPAP,fredsod/NIPAP,garberg/NIPAP,bbaja42/NIPAP,garberg/NIPAP,SpriteLink/NIPAP,plajjan/NIPAP,...
utilities/export-csv.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add a script to convert from rst style files to markdown" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport re\nimport shutil\nfrom optparse import OptionParser\n\ndef main():\n parser = OptionParser...
python
new_file
1
5
apache-2.0
7b09a44c7df8b2aa28e45c5382626c2f8c4bf61b
kenhys/redpen-doc,kenhys/redpen-doc
bin/run_redpen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nfrom marshmallow.compat import iteritems\nfrom marshmallow import class_registry\n\nfrom smore import swagger\nfrom smore.apispec.core import Path\nfrom smore.apispec.utils ...
python
edit
1
5
mit
e9d87a087a0f0102157d7c718a048c72f655c54a
marshmallow-code/apispec,Nobatek/apispec,marshmallow-code/smore,gorgias/apispec,jmcarp/smore
smore/ext/marshmallow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create solution to swap odd even characters" }, { "role": "assistant", "content": "#Python3\nword = list(input().strip())\n\nfor i in range(0,len(word),2):\n\tif(i+1>=len(word)):\n\t\tbreak\n\tword[i],word[i+1] = word[i+1],word[i...
python
new_file
1
0
mit
bcb6c0780aacf77069a08f8d5b44d295881d9b9d
laxmena/CodeKata,laxmena/CodeKata
swapOddEvenChar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add data for integration testing of basic csv and crosstab formats" }, { "role": "assistant", "content": "\"\"\"Integrations tests for EcoData Retriever\"\"\"\n\nimport os\nimport shutil\nfrom retriever import HOME_DIR\n\nsimple_...
python
new_file
5
0
mit
419ca7099bf47ed00ede73d9de14690a643a3943
henrykironde/deletedret,goelakash/retriever,henrykironde/deletedret,goelakash/retriever
test/test_integration.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Convert blogger to simple xml" }, { "role": "assistant", "content": "from bs4 import BeautifulSoup\nimport io\nimport markdown2\nimport time\nimport codecs\n\nfile = io.open(\"Import/blog-03-03-2013.xml\")\nfile_contents = file.r...
python
new_file
3
1
mit
009df3372804fa946b7e1bd4c0827e887b964b38
progrn/csb
convert.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add evaluation using random forest" }, { "role": "assistant", "content": "import numpy as np\n# import pandas as pd\n# import sys\nfrom scipy.special import expit\nfrom sklearn import ensemble\n\ndef get_activations(exp_data, w, ...
python
new_file
6
2
apache-2.0
23c09555221b3f7500a4c658452c9c0cb223799c
glrs/StackedDAE,glrs/StackedDAE
Train_SDAE/tools/evaluate_model.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Codewars: Delete occurrences of an element if it occurs more than n times" }, { "role": "assistant", "content": "# implemented with list comprehension with side-effects and a global variable\n# there's a simpler way to do it with...
python
new_file
1
4
unlicense
7d5dcaa0a72dbdd78e192f082bbdf261de1d8963
SelvorWhim/competitive,SelvorWhim/competitive,SelvorWhim/competitive,SelvorWhim/competitive
Codewars/DeleteOccurrencesOfElementOverNTimes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for the version string parsing code" }, { "role": "assistant", "content": "\"\"\"\nTests for turning simple version strings into twisted.python.versions.Version\nobjects.\n\n\"\"\"\nfrom epsilon import asTwistedVersion...
python
new_file
1
1
mit
9e4858e652fba57f767a9c6d921853a6487301bd
twisted/epsilon
epsilon/test/test_version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests of table and column pickling" }, { "role": "assistant", "content": "import cPickle as pickle\n\nimport numpy as np\nimport pytest\n\nfrom ...table import Table, Column, MaskedColumn\n\n\n@pytest.fixture(params=[0, 1, -1...
python
new_file
1
3
bsd-3-clause
a12dd320df30404df8c8ec196e21067376cc1e2c
mhvk/astropy,astropy/astropy,astropy/astropy,larrybradley/astropy,funbaker/astropy,joergdietrich/astropy,joergdietrich/astropy,dhomeier/astropy,larrybradley/astropy,pllim/astropy,MSeifert04/astropy,pllim/astropy,dhomeier/astropy,StuartLittlefair/astropy,tbabej/astropy,lpsinger/astropy,saimn/astropy,tbabej/astropy,dhome...
astropy/table/tests/test_pickle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test on update document title" }, { "role": "assistant", "content": "# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Integration tests for Document\"\"...
python
new_file
1
1
apache-2.0
096c8165ec2beacbc4897285b8fed439765d3e01
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core
test/integration/ggrc/models/test_document.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nimport os\nimport warnings\nimport yaml\n\n\nclass Config(object):\n config_fname = \"configuration.yaml\"\n\n def __init__(self, config_fname=None):\n config_fname = config_fname or self.config_fname\...
python
edit
1
2
apache-2.0
8b9fe74976d77df32d73792f74ef4ddea1eb525f
royrapoport/destalinator,TheConnMan/destalinator,royrapoport/destalinator,underarmour/destalinator,randsleadershipslack/destalinator,randsleadershipslack/destalinator,TheConnMan/destalinator
config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initialization functions for database connection" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\nfrom contextlib import contextmanager\n\nfrom sqlalchemy import create_eng...
python
new_file
1
3
mit
864bf2bb3bdb731d0725cc33891145f2a7da17d3
leaffan/pynhldb
db/common.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add live test for session" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\nimport unittest\nimport getpass\nfrom logger import TestLogger\n\nsys.path.insert(0, '.')\nsys.path.insert(0, '../')\nsys.path....
python
new_file
3
1
mit
3fb3662e58e35ccb283074c1078e1c9e7aaf88ed
jgillick/LendingClub,carlosnasillo/LendingClub,jgillick/LendingClub,carlosnasillo/LendingClub
LendingClub/tests/live_session_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cost tracking file to openstack\n\n - saas-951" }, { "role": "assistant", "content": "from . import models\nfrom nodeconductor.cost_tracking import CostTrackingBackend\n\n\nclass OpenStackCostTrackingBackend(CostTrackingBacke...
python
new_file
3
1
mit
9668580633a1a8baaa59030e5a52d2478222cbd2
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/openstack/cost_tracking.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add index to cover testgroup_details (previous runs)" }, { "role": "assistant", "content": "\"\"\"Index Job(project_id, status, date_created) where patch_id IS NULL\n\nRevision ID: 3042d0ca43bf\nRevises: 3a3366fb7822\nCreate Date...
python
new_file
1
1
apache-2.0
989a94c81f74a17707e66f126960b6bb45e9b4d5
dropbox/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes
migrations/versions/3042d0ca43bf_index_job_project_id.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Load the simul module and run a simulation" }, { "role": "assistant", "content": "from simul import *\n\nif __name__ == '__main__':\n # create a new simulation\n s = Simulation(Re=5)\n\n # initial conditions psi(0) = 0, ...
python
new_file
4
0
apache-2.0
0c6becaa179aba9408def1b3cce61d5ec1509942
cphyc/MHD_simulation,cphyc/MHD_simulation
python/main.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add python class for writing out xyz files of trajectory coordinates\n\n\nFormer-commit-id: cecdece306ef516acf87bde03bbd04cb7f0c761b" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport numpy\n\nclass TrajWriter(o...
python
new_file
1
3
mit
42297354f575e2c82346cf033202c5dfad5ddd99
westpa/westpa
lib/examples/nacl_amb/utils.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
c1e801798d3b7e8d4c9ba8a11f79ffa92bf182f5
thombashi/pingparsing,thombashi/pingparsing
test/test_logger.py
rejected_duplicate
Near-duplicate of sample 6033
true
[ { "role": "user", "content": "Write python code for the following: Add example for cluster centroids method" }, { "role": "assistant", "content": "\"\"\"\n=================\nCluster centroids\n=================\n\nAn illustration of the cluster centroids method.\n\n\"\"\"\n\nprint(__doc__)\n\nim...
python
new_file
1
0
mit
74e24debf55b003f1d56d35f4b040d91a0698e0a
dvro/UnbalancedDataset,dvro/imbalanced-learn,fmfn/UnbalancedDataset,scikit-learn-contrib/imbalanced-learn,scikit-learn-contrib/imbalanced-learn,glemaitre/UnbalancedDataset,dvro/UnbalancedDataset,dvro/imbalanced-learn,fmfn/UnbalancedDataset,glemaitre/UnbalancedDataset
example/under-sampling/plot_cluster_centroids.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions to paint game of life to screen" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom curses import wrapper\nfrom time import sleep\n\ndef enumerate_lines(matrix):\n on = '*'\n off = ' '\n for ...
python
new_file
6
4
mit
8fa9a54c9a5ee683fc9e9d361a4eb7affe5e83ed
akud/stem-club-presentation,akud/stem-club-presentation,akud/stem-club-presentation
game_of_life.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a script that scrapes the Socrata catalog, just in case we need that in another format" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\n\"\"\"\nThis is a basic script that downloads the catalog data from the smcgo...
python
new_file
3
12
mit
c98a744f5f436ae2c6266a7bb5d32173cfd0e4a9
opensmc/service-locator,opensmc/service-locator,opensmc/service-locator
scripts/socrata_scraper.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add first basic unittests using py.test" }, { "role": "assistant", "content": "\"\"\"\n test_validators\n ~~~~~~~~~~~~~~\n \n Unittests for bundled validators.\n \n :copyright: 2007-2008 by James Crasta, Thomas ...
python
new_file
1
1
bsd-3-clause
1fafccc7df5179ce89b100537e45307417658512
clones/wtforms
tests/test_validators.py
rejected_duplicate
Near-duplicate of sample 5919
true
[ { "role": "user", "content": "Write python code for the following: Add decoder ida fields name" }, { "role": "assistant", "content": "def decode_name_fields(ida_fields):\n i = -1\n stop = len(ida_fields)\n while True:\n i += 1\n if i == stop:\n break\n\n ...
python
new_file
1
4
mit
c851501cc8149685a9e9c023aa200b92c17a9078
goodwinxp/ATFGenerator,goodwinxp/ATFGenerator,goodwinxp/ATFGenerator
pida_fields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test case for wordaxe bug" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom reportlab.platypus import SimpleDocTemplate\nfrom reportlab.platypus.paragraph import Paragraph\nfrom reportlab.lib.styles import getS...
python
new_file
5
1
mit
2e2ad49c7ada145b5a4a81bd8941cf5e72d2d81b
thomaspurchas/rst2pdf,thomaspurchas/rst2pdf
rst2pdf/tests/input/test_180.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add new command to notify New Relic of deployment" }, { "role": "assistant", "content": "\"\"\"\nManagement command to enable New Relic notification of deployments\n\n.. moduleauthor:: Infoxchange Development Team <<EMAIL>>\n\n\"...
python
new_file
3
2
mit
0c11d2740e561586bb4f9d2b67bda2ccc87e146e
infoxchange/ixdjango
ixdjango/management/commands/newrelic_notify_deploy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a wrapper for ChromeOS to call into telemetry.\n\nR=<EMAIL>, <EMAIL>\nBUG=402172, 388256\n\nReview URL: https://codereview.chromium.org/682953002\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#301557}" }, { "ro...
python
new_file
1
4
bsd-3-clause
4fdba8a1a5a2123843cc9eefd8949fb8996f59b2
SummerLW/Perf-Insight-Report,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult,Su...
telemetry/telemetry/unittest/run_chromeos_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add trivial test for ECO fetching" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"Licen...
python
new_file
1
1
apache-2.0
11efa5583bbeeee7c7823264f6f73715ea81edc0
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tests/ontologies/eco_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add base test for admin endpoints [WAL-883]" }, { "role": "assistant", "content": "from django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.test import TestCase\nfrom django.urls import revers...
python
new_file
1
3
mit
425a8e26d371038f6ebf7c80dd7faea0f1dd906e
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/core/tests/unittests/test_admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing file from last commit" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport os\nfrom .serialize import loads_msgpack, loads_pyarrow, dumps_msgpack, dumps_pyarrow\n\n\"\"\"\nSerialization that has comp...
python
new_file
1
0
apache-2.0
797114781ed4f31c265c58a76e39aa8ff6a16443
ppwwyyxx/tensorpack,eyaler/tensorpack,eyaler/tensorpack,ppwwyyxx/tensorpack
tensorpack/utils/compatible_serialize.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Include self contained method for output to a view\n\nThis uses an enhanced version of the code that is currently in the\noverride_audit command file, making it more general purpose.\n\nThe new method can send output to a view, either reusin...
python
new_file
3
13
mit
8ce2da2ed2e445480ee2e10483a5fae1c7c677a0
OdatNurd/OverrideAudit
lib/output_view.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write python code for the following: Set default branding for all organisations\n\nCurrently when someone creates a service we match them to an\norganisation. Then if the organisation has a default branding set, their\nservice gets that branding.\n\nHowever none of the organisa...
python
new_file
3
2
mit
2ef9618e705bb293641674ca5e7cc1f14daf3483
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0285_default_org_branding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create SQLite database and table and insert data from CSV file" }, { "role": "assistant", "content": "# Create a database\n\nimport sqlite3\nimport csv\nfrom datetime import datetime\nimport sys \nreload(sys) \nsys.setdefaulten...
python
new_file
4
2
mit
50e24b0445f259d975e5dd78dd34a8e760e4ed88
joykuotw/python-endpoints,joykuotw/python-endpoints,joykuotw/python-endpoints
DB.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Build and revision number script" }, { "role": "assistant", "content": "import sys\nfrom time import gmtime\nyear, mon, mday, hour, min, sec, wday, yday, isdst = gmtime()\nbld = ((year - 2000) * 12 + mon - 1) * 100 + mday\nrev = ...
python
new_file
2
0
apache-2.0
874c01374397014e7c99afd67f5680ed32f1c5c6
atifaziz/NCrontab,atifaziz/NCrontab
bn.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\ntest_basic_logic\n~~~~~~~~~~~~~~~~\n\nTest the basic logic of the h2 state machines.\n\"\"\"\nimport h2.connection\n\nfrom hyperframe import frame\n\n\nclass TestBasicConnection(object):\n \"\"\"\n Bas...
python
edit
1
1
mit
780e4eb03420d75c18d0b21b5e616f2952aeda41
python-hyper/hyper-h2,bhavishyagopesh/hyper-h2,Kriechi/hyper-h2,Kriechi/hyper-h2,mhils/hyper-h2,vladmunteanu/hyper-h2,vladmunteanu/hyper-h2,python-hyper/hyper-h2
test/test_basic_logic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals, division\n\nimport sc2reader\nfrom sc2reader.plugins.replay import toJSON\n\n\ndef main():\n import argparse\n p...
python
edit
1
1
mit
3709bcbd421d82f9404ab3b054989546d95c006f
ggtracker/sc2reader,GraylinKim/sc2reader,vlaufer/sc2reader,StoicLoofah/sc2reader,GraylinKim/sc2reader,StoicLoofah/sc2reader,ggtracker/sc2reader,vlaufer/sc2reader
sc2reader/scripts/sc2json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: wsgi: Add nginx+uWSGI for 10% perf improvement over gunicorn\n\nnginx+uWSGI can be a killer performance combination as described here:\n\nhttp://lists.unbit.it/pipermail/uwsgi/2013-September/006431.html" }, { "role": "assistant", ...
python
new_file
1
2
bsd-3-clause
0880d067f478ba6474e433e620a1e48e23ed9c34
hamiltont/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sxend/FrameworkBenchmarks,leafo/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,valyala/FrameworkBenchma...
wsgi/setup_nginxuwsgi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sanity linter to catch future use" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# Copyright 2018 gRPC authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this ...
python
new_file
1
0
apache-2.0
3cf30bac4d20dbebf6185351ba0c10426a489de9
Vizerai/grpc,jboeuf/grpc,vjpai/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,ncteisen/grpc,grpc/grpc,dgquintas/grpc,chrisdunelm/grpc,ctiller/grpc,nicolasnoble/grpc,jtattermusch/grpc,mehrdada/grpc,sreecha/grpc,chrisdunelm/grpc,firebase/grpc,ncteisen/grpc,jboeuf/grpc,jboeuf/grpc,jboeuf/grpc,pszemus/grpc,thinkerou/grpc...
tools/run_tests/sanity/check_channel_arg_usage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for `%tensorflow_version`\n\nIn preparation for changes to this file that will additionally configure\nthe `PATH` and `PYTHONPATH` environment variables, which is required for\nproper TensorBoard support.\n\nPiperOrigin-RevId:...
python
new_file
1
1
apache-2.0
c3c559f893e31e728a429cf446039781cea1f25d
googlecolab/colabtools,googlecolab/colabtools
tests/test_tensorflow_magics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [tests] Add unit tests for disk module" }, { "role": "assistant", "content": "# pylint: disable=C0103,C0111\n\nimport mock\nimport unittest\n\nimport tests.mocks as mocks\n\nfrom bumblebee.input import LEFT_MOUSE\nfrom bumblebee....
python
new_file
1
1
mit
be01980afe4b1dbd5a1d5b07651cd7a54c771d01
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
tests/modules/test_disk.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a gmm, currently wrapping sklearn" }, { "role": "assistant", "content": "import numpy\n# FIXME: copy the functions here\n\nfrom sklearn.mixture.gmm import log_multivariate_normal_density, logsumexp\n\nclass GMM(object):\n ...
python
new_file
null
null
apache-2.0
388bbd915a5e40a2e096eb22ab294ffcbd3db936
bccp/bananaplots,bccp/bananaplots
bananas/model.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add a data migration tool" }, { "role": "assistant", "content": "import argparse, shelve\n\ndef renameDictKeys(storageDict):\n for key in storageDict.iterkeys():\n if isinstance(storageDict[key], dict):\n ren...
python
new_file
2
4
mit
48c844e602eaa182c4efaaa0b977765f4248d0a0
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
tools/network_migration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the quantity-safe allclose from spectral-cube" }, { "role": "assistant", "content": "from __future__ import print_function, absolute_import, division\n\nfrom astropy import units as u\n\nfrom numpy.testing import assert_allcl...
python
new_file
3
5
mit
d72d2e38d177476470b22ded061dd06b2be3ee88
e-koch/TurbuStat,Astroua/TurbuStat
turbustat/tests/helpers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests to product tags" }, { "role": "assistant", "content": "from mock import Mock\nfrom saleor.product.templatetags.product_images import get_thumbnail, product_first_image\n\n\ndef test_get_thumbnail():\n instance = Mock...
python
new_file
1
1
bsd-3-clause
17f71bfb81393241759e38fb9dce01561aeca3d5
car3oon/saleor,itbabu/saleor,UITools/saleor,KenMutemi/saleor,maferelo/saleor,KenMutemi/saleor,jreigel/saleor,mociepka/saleor,mociepka/saleor,itbabu/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,HyperManTT/ECommerceSaleor,jreigel/saleor,UITools/saleor,UITools/saleor,tfroehlich82/saleor,itbabu/sale...
tests/test_product_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function\n\nimport argparse\nimport sys\n\nBLACKLIST = [\n b'BEGIN RSA PRIVATE KEY',\n b'BEGIN DSA PRIVATE KEY',\n b'BEGIN EC PRIVATE KEY',\n b'BEGIN OPENSSH PRIVATE KEY',\n b'BEGIN PRIVATE KEY',\...
python
edit
1
6
mit
b1feed0ced6d1328cc39bc9bba36331ec6da7803
pre-commit/pre-commit-hooks,Harwood/pre-commit-hooks
pre_commit_hooks/detect_private_key.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to check that __all__ in __init__.py is correct" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport sys\nimport re\nimport glob\n\nimport phonenumbers\n\nINTERNAL_FILES = ['phonenumbers/util.py',\n ...
python
new_file
6
0
apache-2.0
e455d459590a4f2b16b9a9360b6e33640f5ec7bf
daviddrysdale/python-phonenumbers,roubert/python-phonenumbers,daodaoliang/python-phonenumbers,titansgroup/python-phonenumbers,dongguangming/python-phonenumbers,daviddrysdale/python-phonenumbers,agentr13/python-phonenumbers,gencer/python-phonenumbers,SergiuMir/python-phonenumbers,shikigit/python-phonenumbers,daviddrysda...
python/allcheck.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add initial unit tests for parameter.py (List)" }, { "role": "assistant", "content": "import unittest\ntry:\n import spotpy\nexcept ImportError:\n import sys\n sys.path.append(\".\")\n import spotpy\nfrom spotpy impor...
python
new_file
6
1
mit
835b5f20061033b6fcf2a8b86203a42c5d4835ee
bees4ever/spotpy,bees4ever/spotpy,thouska/spotpy,thouska/spotpy,thouska/spotpy,bees4ever/spotpy
spotpy/unittests/test_parameter.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add retriever object for player draft information" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\n\nimport requests\nfrom lxml import html\n\nfrom db.team import Team\nfrom db.p...
python
new_file
1
5
mit
4883bd13c6e07a0568c29fd26a141888b52292b7
leaffan/pynhldb
utils/player_draft_retriever.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example that mirrors defconfig and oldconfig.\n\nFrom https://github.com/ulfalizer/Kconfiglib/issues/15. Getting the\noutput to match up exactly requires emulating each step, due to Kconfig\nsubtleties related to which symbols have been ...
python
new_file
1
0
isc
bc34d530f4a21b5f06228d626f446c617b9c8876
ulfalizer/Kconfiglib,ulfalizer/Kconfiglib
examples/defconfig_oldconfig.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add default message for list pages" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.9 on 2018-02-02 19:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mod...
python
new_file
1
0
mit
7e9794dc98a268479f0f57128effc67f88586c8f
nfletton/bvspca,nfletton/bvspca,nfletton/bvspca,nfletton/bvspca
bvspca/core/migrations/0025_auto_20180202_1214.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for dotted circles in sample text" }, { "role": "assistant", "content": "import uharfbuzz as hb\nimport gflanguages\nimport pytest\n\nlangs = gflanguages.LoadLanguages()\n\n\n@pytest.fixture\ndef hb_font():\n # Persua...
python
new_file
1
4
apache-2.0
76468926c1efe4d18477a70d767f91d4c6e38768
googlefonts/lang
tests/test_dottedcircle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an oauth example script." }, { "role": "assistant", "content": "import webbrowser\n\nimport tweepy\n\n\"\"\"\n Query the user for their consumer key/secret\n then attempt to fetch a valid access token.\n\"\"\"\n\nif __n...
python
new_file
4
0
mit
17cdae7f50a7ed15c4e8a84cdb0000a32f824c5f
xrg/tweepy,raymondethan/tweepy,damchilly/tweepy,mlinsey/tweepy,ze-phyr-us/tweepy,obskyr/tweepy,markunsworth/tweepy,edsu/tweepy,kcompher/tweepy,yared-bezum/tweepy,tuxos/tweepy,alexhanna/tweepy,nickmalleson/tweepy,iamjakob/tweepy,cogniteev/tweepy,cinemapub/bright-response,nickmalleson/tweepy,conversocial/tweepy,cinemapub...
examples/outh/getaccesstoken.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration step dua changes in model\n\nThis should fix #5." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass...
python
new_file
1
0
bsd-3-clause
9ce90bc43cfcc5a56be958671f304e7929eb0446
nimbis/cmsplugin-collapse,nimbis/cmsplugin-collapse
cmsplugin_collapse/migrations/0002_auto_20160210_0651.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to remove broken images." }, { "role": "assistant", "content": "from pathlib import Path\nfrom PIL import Image\nfrom concurrent.futures import ProcessPoolExecutor\nimport os\nimport sys\n\ndef verify_or_delete(filenam...
python
new_file
1
2
mit
bc32b2bccc82caecea0cf936e13c3ae70d0e9486
Lodour/Weibo-Album-Crawler
utils/check.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for vendor object creation" }, { "role": "assistant", "content": "from django.test import Client, TestCase\n\nfrom .utils import obtain_api_key, create_admin_account\n\n\nclass VendorApiTest(TestCase):\n \"\"\"Test fo...
python
new_file
1
3
mit
98fbfe6e65c4cb32ea0f4f6ce6cba77f7fadcb7b
teamtaverna/core
app/api/tests/test_vendor_api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a parser for plain text" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <<EMAIL>>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom io import TextIOWrapper\...
python
new_file
2
5
mit
c7fa4500b22104b34b50bbcacc3b64923d6da294
bjoernricks/trex,bjoernricks/trex
trex/parsers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement basic active monitoring algorithm" }, { "role": "assistant", "content": "import sys\nfrom functools import reduce\n\ntempVmId = -1\n\ndef enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts):\n '''\n ...
python
new_file
1
7
mit
e8560c42e3ae73f1753073b8ad6aef7d564e6d65
kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing
Host/original.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add in script to count duplicates." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport rethinkdb as r\n\nconn = r.connect('localhost', 30815, db='materialscommons')\nrql = r.table('datafiles').filter(r.row['use...
python
new_file
2
0
mit
f5d2b17371dbd974820b9b8ab1fcdb11ad8fa646
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/countdups.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Put the test into the correct directory.\n\n--HG--\nrename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py" }, { "role": "assistant", "content": "###################################################################...
python
new_file
2
3
apache-2.0
4535d6c41e17031b943e7016fc7de6f76b890f17
zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara
test/lib/test_inputsource.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool for submitting jobs to AreWeCompressedYet" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport requests\nimport argparse\nimport os\nimport subprocess\nimport sy...
python
new_file
1
0
bsd-2-clause
8488e7c5245758e4651e6d723f93d52f3ff54d73
luctrudeau/daala,kodabb/daala,vr000m/daala,nvoron23/daala,iankronquist/daala,kustom666/daala,kustom666/daala,jmvalin/daala,kbara/daala,xiph/daala,kbara/daala,xiph/daala,jmvalin/daala,ascent12/daala,tribouille/daala,tribouille/daala,xiph/daala,xiphmont/daala,ycho/daala,xiph/daala,HeadhunterXamd/daala,nvoron23/daala,Head...
tools/submit_awcy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function to solve two pair sum" }, { "role": "assistant", "content": "'''\nGiven an integer array, output all pairs that sum up to a specific value k\n\n'''\n\nfrom binary_search import binary_search_iterative\n\ndef pair_sum...
python
new_file
3
5
mit
3693b1aea769af1e0fbe31007a00f3e33bcec622
ueg1990/aids
aids/sorting_and_searching/pair_sum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [manual] Add a manage.py command to import realm filters\n\nThis must be run manually on staging after deployment. Once it has been run,\nit can be deleted. It only needs to be run on staging, not prod.\n\n(imported from commit 79252c23ba8cd...
python
new_file
1
4
apache-2.0
4d30756e722cafa40fa449e48c967eeebc58500a
vabs22/zulip,calvinleenyc/zulip,sup95/zulip,deer-hope/zulip,kokoar/zulip,ryanbackman/zulip,ahmadassaf/zulip,akuseru/zulip,shaunstanislaus/zulip,Gabriel0402/zulip,souravbadami/zulip,JanzTam/zulip,ufosky-server/zulip,noroot/zulip,amallia/zulip,vikas-parashar/zulip,kaiyuanheshang/zulip,synicalsyntax/zulip,ashwinirudrappa/...
zerver/management/commands/import_realm_filters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Permission class.\n\nSigned-off-by: Tyler O'Meara <<EMAIL>>" }, { "role": "assistant", "content": "import unittest\nfrom permission import Permission, PERMISSION_DELIMITER\n\n\nclass BasicPermissionTests(unittest.Te...
python
new_file
1
1
mit
842c796a223ee9cb78c69ccb59416a2afe0fcee0
Acidity/PyPermissions
tests/permissions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Laplace equation solving benchmark (from Numpy)" }, { "role": "assistant", "content": "\"\"\"\nBenchmark Laplace equation solving.\n\nFrom the Numpy benchmark suite, original code at\nhttps://github.com/yarikoptic/numpy-vbe...
python
new_file
3
2
bsd-2-clause
7c33e8c7a386e911d835f81e637515d40dfc4e62
numba/numba-benchmark
benchmarks/bench_laplace.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for pandas dataframe loading" }, { "role": "assistant", "content": "def test_odtreader_dynamics_example():\n from joommf.sim import Sim\n from joommf.mesh import Mesh\n from joommf.energies.exchange import Excha...
python
new_file
1
1
bsd-2-clause
9115628cf10e194f1975e01142d8ae08ab5c4b06
fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python
joommf/test_odtreader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [modules] Add module for displaying RAM usage\n\nShows free RAM, total RAM, free RAM percentage" }, { "role": "assistant", "content": "import bumblebee.module\nimport psutil\n\ndef fmt(num, suffix='B'):\n for unit in [ \"\", \...
python
new_file
4
3
mit
36333c275f4d3a66c8f14383c3ada5a42a197bea
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
bumblebee/modules/memory.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Implement abstract class for csc and csr matrix" }, { "role": "assistant", "content": "from cupy import cusparse\nfrom cupy.sparse import base\nfrom cupy.sparse import data as sparse_data\n\n\nclass _compressed_sparse_matrix(spar...
python
new_file
1
17
mit
5f47cf46c82d9a48a9efe5ad11c6c3a55896da12
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
cupy/sparse/compressed.py
rejected_complexity
Cyclomatic complexity too high: 17
true
[ { "role": "user", "content": "Write python code for the following: Add closure type inference test" }, { "role": "assistant", "content": "import numpy as np\n\nfrom numba import *\nfrom numba.tests.test_support import *\n\n@autojit\ndef test_cellvar_promotion(a):\n \"\"\"\n >>> inner = tes...
python
new_file
2
1
bsd-2-clause
b8acaf64187f5626ef6755ef00d2b2a1471d4914
pombredanne/numba,pombredanne/numba,cpcloud/numba,seibert/numba,numba/numba,gmarkall/numba,gmarkall/numba,numba/numba,jriehl/numba,stefanseefeld/numba,sklam/numba,GaZ3ll3/numba,stefanseefeld/numba,gmarkall/numba,sklam/numba,stuartarchibald/numba,gdementen/numba,ssarangi/numba,GaZ3ll3/numba,GaZ3ll3/numba,sklam/numba,sto...
numba/tests/closures/test_closure_type_inference.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to execute notebooks" }, { "role": "assistant", "content": "import os\nimport glob\nimport contextlib\nimport subprocess\n\nimport pytest\n\nnotebooks = list(glob.glob(\"*.ipynb\", recursive=True))\n\n@contextlib.context...
python
new_file
1
2
mit
47dff2561be481ff067c22ed98d9ea6a9cf8ae10
adicu/AccessibleML,alanhdu/AccessibleML
test/test_notebook.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional test for version negotiation\n\nthe test attempts to make an unauthenticated request to the Heat API\nroot.\n\nChange-Id: Ib14628927efe561744cda683ca4dcf27b0524e20\nStory: 2002531\nTask: 22077" }, { "role": "assistant"...
python
new_file
1
1
apache-2.0
07f8fd56ab366a2d1365278c3310ade4b1d30c57
openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat
heat_integrationtests/functional/test_versionnegotiation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing tests file from previous commit." }, { "role": "assistant", "content": "'''Test case for monads and monoidic functions\n'''\nimport unittest\n\nfrom lighty import monads\n\n\nclass MonadTestCase(unittest.TestCase):\n ...
python
new_file
2
1
bsd-3-clause
4fab31eef9ad80230b36039b66c70d94456e5f9b
GrAndSE/lighty
tests/monad.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement tests for temperature endpoint" }, { "role": "assistant", "content": "import json\nfrom rest_framework import status\nfrom django.test import TestCase, Client\nfrom django.urls import reverse\nfrom ..models import Tempe...
python
new_file
1
1
mit
0b8d5794d2c5a1ae46659e02b65d1c21ffe8881d
BabyOnBoard/BabyOnBoard-API,BabyOnBoard/BabyOnBoard-API
babyonboard/api/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example using new pytorch backend\n\nSigned-off-by: Niklas Koep <<EMAIL>>" }, { "role": "assistant", "content": "import numpy as np\nimport numpy.random as rnd\nimport numpy.linalg as la\nimport torch\n\nfrom pymanopt import ...
python
new_file
1
1
bsd-3-clause
d5b622e9fb855753630cd3a6fae1a315b4be1a08
nkoep/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,pymanopt/pymanopt
examples/dominant_eigenvector_pytorch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to submite jobs again" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport os\nimport sys\nimport subprocess\n\nright_inputs = False\nif len(sys.argv) > 2 :\n tp = sys.argv[1]\n rms = [int(x) f...
python
new_file
1
0
mit
1a7fa8080d19909ccf8e8e89aa19c92c1413f1c1
lnls-fac/job_manager
apps/pyjob_submite_jobs_again.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 436. Find Right Interval\n\n436. Find Right Interval: https://leetcode.com/problems/find-right-interval/" }, { "role": "assistant", "content": "from operator import itemgetter\n# Definition for an interval.\n#...
python
new_file
1
6
apache-2.0
884ae74bb75e5a0c60da74791a2e6fad9e4b83e5
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/find-right-interval.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new module for plugin loading" }, { "role": "assistant", "content": "from maya import cmds\n\n\nclass Commands(object):\n \"\"\" class name must be 'Commands' \"\"\"\n\n commandDict = {}\n\n def _loadObjPlugin(self):...
python
new_file
1
2
mit
aa6837e14e520f5917cf1c452bd0c9a8ce2a27dd
minoue/miExecutor
module/others/plugins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use this enough, might as well add it." }, { "role": "assistant", "content": "# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow\n# Useful for debugging the scenario independent of the server.\n\nfrom ...
python
new_file
3
0
bsd-2-clause
f7f25876d3398cacc822faf2b16cc156e88c7fd3
ehenneken/loris,medusa-project/loris,rlskoeser/loris,medusa-project/loris,rlskoeser/loris,ehenneken/loris
misc/jp2_kakadu_pillow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command for full daily build process" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nUpdate to the latest available CAL-ACCESS snapshot and publish the files to the\nwebsite.\n\"...
python
new_file
1
1
mit
eda3e6c005c1115a039f394d6f00baabebd39fee
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
calaccess_website/management/commands/updatebuildpublish.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test migration removing ref to old company image" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrati...
python
new_file
3
0
mit
d5e67563f23acb11fe0e4641d48b67fe3509822f
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
apps/companyprofile/migrations/0002_auto_20151014_2132.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: test: Add a test case to validate `get_unseen_notes`" }, { "role": "assistant", "content": "import unittest\n\nimport frappe\nfrom frappe.boot import get_unseen_notes\nfrom frappe.desk.doctype.note.note import mark_as_seen\n\n\nc...
python
new_file
1
3
mit
67350e9ac3f2dc0fceb1899c8692adcd9cdd4213
yashodhank/frappe,StrellaGroup/frappe,frappe/frappe,yashodhank/frappe,yashodhank/frappe,yashodhank/frappe,frappe/frappe,frappe/frappe,StrellaGroup/frappe,StrellaGroup/frappe
frappe/tests/test_boot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to help module" }, { "role": "assistant", "content": "from __future__ import print_function\n\nimport builtins\nimport types as pytypes\n\nimport numpy as np\n\nfrom numba import types\nfrom .support import TestCase\nfro...
python
new_file
1
2
bsd-2-clause
9fbde5b8dd4d2555e03bc0b7915fc4e55f8333d9
numba/numba,stonebig/numba,numba/numba,stonebig/numba,seibert/numba,stuartarchibald/numba,cpcloud/numba,sklam/numba,gmarkall/numba,stuartarchibald/numba,IntelLabs/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,gmarkall/numba,seibert/numba,numba/numba,cpcloud/numba,gmarkall/numba,stuartarchibald/numb...
numba/tests/test_help.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for changing CONTACTED_CHOICES" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migr...
python
new_file
1
0
mit
e8607fce01bfe17c08de0702c4041d98504bc159
reunition/reunition,reunition/reunition,reunition/reunition
reunition/apps/alumni/migrations/0006_auto_20150823_2030.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for config usb" }, { "role": "assistant", "content": "from .util import (DestructiveYubikeyTestCase, ykman_cli)\n\n\nclass TestConfigUSB(DestructiveYubikeyTestCase):\n\n def setUp(self):\n ykman_cli('con...
python
new_file
1
1
bsd-2-clause
3367f9d1e394bf686bc6bbd6316265c9feef4f03
Yubico/yubikey-manager,Yubico/yubikey-manager
test/on_yubikey/test_cli_config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Migrate all project contents blocks to activity contents blocks\n\nBB-15606 #resolve" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2019-11-06 09:41\nfrom __future__ import unicod...
python
new_file
1
4
bsd-3-clause
3bd95d8789871246fb90c6eb0487d9746ef5cb27
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/cms/migrations/0056_auto_20191106_1041.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script demonstrating thread deadlock" }, { "role": "assistant", "content": "\n\"\"\"\n Demonstrates deadlock related to attribute iteration.\n\"\"\"\n\nfrom threading import Thread\n\nimport h5py\n\nFNAME = \"deadlock.hdf5...
python
new_file
4
2
bsd-3-clause
3e0ababfeb0e22d33853d4bad68a29a0249e1a60
h5py/h5py,h5py/h5py,h5py/h5py
other/iterate_deadlock.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a Wordpress+MySQL composed instance functional test case\n\nChange-Id: I6a905b186be59c929e530519414e46d222b4ea08\nSigned-off-by: Steven Dake <<EMAIL>>" }, { "role": "assistant", "content": "# vim: tabstop=4 shiftwidth=4 softt...
python
new_file
3
1
apache-2.0
3b27b1d6b1c4739b8d456703542ec8182ce12277
gonzolino/heat,noironetworks/heat,steveb/heat,cwolferh/heat-scratch,noironetworks/heat,gonzolino/heat,maestro-hybrid-cloud/heat,citrix-openstack-build/heat,pshchelo/heat,cryptickp/heat,dragorosson/heat,rh-s/heat,Triv90/Heat,steveb/heat,rh-s/heat,srznew/heat,srznew/heat,openstack/heat,redhat-openstack/heat,rickerc/heat_...
heat/tests/functional/test_WordPress_Composed_Instances.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example: filtered ensemble average." }, { "role": "assistant", "content": "import numpy as np\nimport matplotlib.pyplot as plt\nimport atomic\n\nfrom ensemble_average import time_dependent_power\n\n\nif __name__ == '__main__'...
python
new_file
1
0
mit
06570a926bde2ea10730062b05a2348c3020745c
cfe316/atomic,ezekial4/atomic_neu,ezekial4/atomic_neu
examples/filter_ensemble_average.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate the site documentation containing the sizes of the binary shellcodes." }, { "role": "assistant", "content": "import os, re;\r\n# I got the actual size of the binary code wrong on the site once - this script...
python
new_file
3
0
bsd-3-clause
68a7f9faf1933bb224113d9fa5d0ddd362b2e5ea
computerline1z/win-exec-calc-shellcode,computerline1z/win-exec-calc-shellcode,ohio813/win-exec-calc-shellcode,ohio813/win-exec-calc-shellcode
SizeDocGenerator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add skeleton for parsing commands" }, { "role": "assistant", "content": "\"\"\"lazy\n\n Usage:\n lazy (new|n)\n lazy (show|s) [<id>]\n lazy (delete|d) [<id>]\n lazy (import|i) <path>\n lazy (...
python
new_file
1
14
mit
38b4ec7164f07af7135c41c401c4f403c1061d66
Zillolo/lazy-todo
app/main.py
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Write python code for the following: Add helper script to generate API keys." }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport sqlite3\nimport sys\nimport time\n\nif len(sys.argv) < 3:\n raise ValueError('Usage: %s \"Firstnam Lastname\...
python
new_file
2
0
bsd-3-clause
28b5fef57580640cd78775d6c0544bc633e5958a
ZeitOnline/content-api,ZeitOnline/content-api
generate-key.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittests for the bridgedb.crypto module." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# This file is part of BridgeDB, a Tor bridge distribution system.\n#\n# :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35...
python
new_file
4
1
bsd-3-clause
c834082c59abe6ae6d2e065e1a5afac2d399a612
mmaker/bridgedb,pagea/bridgedb,mmaker/bridgedb,wfn/bridgedb,pagea/bridgedb,wfn/bridgedb
lib/bridgedb/test/test_crypto.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test all sensors at once" }, { "role": "assistant", "content": "import time\nimport grove_i2c_temp_hum_mini # temp + humidity\nimport hp206c # altitude + temp + pressure\nimport grovepi # used by air sensor and dust sensor\nimpo...
python
new_file
4
0
mit
bbc208548f0dd381f3045d24db3c21c4c8ee004e
mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky
grovepi/scan.py
rejected_lint
Too many lint violations: 4
true