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 test for repeated permanent keys on a Server class instance" }, { "role": "assistant", "content": "\"\"\"\nThe tests provided in this module make sure that the server\ninstance behaves as expected.\n\"\"\"\n\nimport pytest\n\...
python
new_file
1
1
mit
a04db731db1738b651a2cb9b5dacbe24e02e02ca
saltyrtc/saltyrtc-server-python,saltyrtc/saltyrtc-server-python
tests/test_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a command to populate test data." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\n\nfrom contacts.models import Book, Contact, ContactField\n\nclass Command(BaseCommand):\n\n def ...
python
new_file
1
3
mit
2c41a6cf7c591de5a9e7a990ee9904c3949c3b2e
phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts
contacts/management/commands/populate_test_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove delete permission for Program resources from the ProgramEditor role." }, { "role": "assistant", "content": "\n\"\"\"Remove delete program permission from ProgramEditor.\n\nRevision ID: 1f865f61312\nRevises: eab1d38baee\nCr...
python
new_file
3
1
apache-2.0
a69726510284bbb1b3e53de45024c0920124ecca
j0gurt/ggrc-core,plamut/ggrc-core,vladan-m/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,uskudnik/ggrc-core,josthkko/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,selahssea/ggrc-core,vladan-m/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,kr41/...
src/ggrc_basic_permissions/migrations/versions/20131206192611_1f865f61312_remove_delete_progra.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Complete alg: tower of hanoi" }, { "role": "assistant", "content": "\"\"\"The tower of Hanoi.\"\"\"\nfrom __future__ import print_function\n\ndef move_towers(height, from_pole, to_pole, with_pole):\n move_towers(height - 1, fr...
python
new_file
1
1
bsd-2-clause
ef0d5ba38a8f56cb32a03aa3bacb2fe7e73c4eea
bowen0701/algorithms_data_structures
alg_tower_of_hanoi.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom mongrel2.config import *\n\n\nmain = Server(\n uuid=\"f400bf85-4538-4f7a-8908-67e313d515c2\",\n access_log=\"/logs/access.log\",\n error_log=\"/logs/error.log\",\n chroot=\"./\",\n default_host=\"localhost\",\n name=\...
python
edit
6
0
bsd-3-clause
fcfceb59cbd368ddaee87906d3f53f15bbb30072
solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2
examples/tornado/auth_demo.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add script to fetch licenses" }, { "role": "assistant", "content": "#!/usr/bin/python\nimport requests\nimport json\nimport ast\n\ndef parse_dataset_metadata(dataset):\n if 'rights' in dataset.keys():\n\trights = dataset['righ...
python
new_file
13
2
mit
3d83caa99fd861290ac21729e8ef1af1cb7a17bf
Datafable/gbif-data-licenses,Datafable/gbif-data-licenses,Datafable/gbif-data-licenses
code/get_licenses.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Write python code for the following: Test for adding products to the quote list" }, { "role": "assistant", "content": "import time\nimport unittest\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\n\n\nclass TestAddproduct(unittest.TestCa...
python
new_file
1
1
mit
ee80300bf284972b111e71bf88422e31aaa2e565
remiolsen/status,remiolsen/status,SciLifeLab/genomics-status,SciLifeLab/genomics-status,remiolsen/status,SciLifeLab/genomics-status
tests/test_pricing_integration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add call empty contract python test" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# Copyright (c) 2015-2016 The Bitcoin Core developers\n# Distributed under the MIT software license, see the accompanying\n# file ...
python
new_file
11
1
mit
ab48df1df241a17c01730a368178abfbe4d94bcc
qtumproject/qtum,qtumproject/qtum,qtumproject/qtum,qtumproject/qtum,qtumproject/qtum,qtumproject/qtum,qtumproject/qtum
qa/rpc-tests/qtum-call-empty-contract.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Check if two strings are isomorphic" }, { "role": "assistant", "content": "#!/usr/bin/python\n\ndef check_isomorphic(s1, s2) :\n d = dict()\n if len(s1) != len(s2) :\n return False\n for i in range(0, len(s1)) :\n if s1[i] in d...
python
new_file
3
6
mit
3bd1692772dd40d6321280645491d00d4f53b1ac
diptin/dipti-coding-samples,diptin/dipti-coding-samples
python2.7-src/isomorphic_strings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add custom validator for matching db fields" }, { "role": "assistant", "content": "from wtforms.validators import ValidationError\n\n\ndef db_match(model, message, *args, **kwargs):\n fields = kwargs.pop('match_fields', None)\...
python
new_file
1
6
mit
d0a06aa69bd067c52964ed374c1238fe4f1e9c3f
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
server/forms/db_match.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: chore: Add test file for affect_ai class" }, { "role": "assistant", "content": "import affect_ai\n\n# Test that an affect_AI object gets created correctly\n# Test that an affect_AI object can be trained, and builds vocabulary cor...
python
new_file
3
0
mit
b356cd07fdeb249ff91160a0961b9cc660c7ae01
OmegaHorizonResearch/agile-analyst
app/ml_models/affect_ai_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate wiki command documentation\n\nAdds ddsc/generatedocs.py to generate the wiki command list.\nWhen command line argument changes are made this script will\ngenerate markdown that should be added to the wiki on the\n[All-...
python
new_file
3
3
mit
35c4e42965ee8b4cc6735d03080b0ca69e7974d9
Duke-GCB/DukeDSClient,Duke-GCB/DukeDSClient
ddsc/generatedocs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Patch sympy to return COBRA compatible expressions on str" }, { "role": "assistant", "content": "# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU.\n\n# Licensed under the Apache License, Version 2.0 (the...
python
new_file
1
2
apache-2.0
e8b48ef94fbffea54ba39b6397d283b67d49ced0
biosustain/cameo,biosustain/cameo
cameo/visualization/sympy_ext.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the lexer.\n\nSigned-off-by: Raphaël Barrois <<EMAIL>>" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2010-2012 Raphaël Barrois\n\n\"\"\"Tests for token-relate...
python
new_file
1
2
bsd-2-clause
7930d0b328fff6edef376c8b6401c5bb7c241311
rbarrois/tdparser,rbarrois/tdparser
tests/test_lexer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add publicbody migration for on_delete" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.1 on 2016-11-30 00:28\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\...
python
new_file
1
0
mit
a9d6067704b23170e5c623790410674b13968fc1
fin/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide
froide/publicbody/migrations/0004_auto_20161130_0128.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for dynamic options from server" }, { "role": "assistant", "content": "import dash\nfrom dash.dependencies import Input, Output, State\nfrom dash.exceptions import PreventUpdate\nimport dash.testing.wait as wait\nimport ...
python
new_file
6
4
mit
7980fdf9dbc31072ed2659c4d9b3392a1c31917b
plotly/dash-core-components
tests/integration/dropdown/test_dynamic_options.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: notify: Include migration for notify_by_mail. ...\n\nRequired for commit 651c0f984f7c75 or later to work." }, { "role": "assistant", "content": "from sqlalchemy import *\nfrom migrate import *\nfrom raggregate.guid_recipe import ...
python
new_file
11
1
apache-2.0
50f440f3c7dbfaa328e6cd16e762ec41a9147f54
sjuxax/raggregate
raggregate/rg_migrations/versions/011_Add_notify_by_mail_to_users.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add empty property to property verification folder." }, { "role": "assistant", "content": "\n\nfrom core.himesis import Himesis, HimesisPreConditionPatternLHS\n\nclass HEmpty_IsolatedConnectedLHS(HimesisPreConditionPatternLHS):\n...
python
new_file
3
1
mit
9c60d9e5a2a2f64e9bed0a9a6223bc9c886977fd
levilucio/SyVOLT,levilucio/SyVOLT
PropertyVerification/HEmpty_IsolatedConnectedLHS.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add n9k IP iptables block\n\nChange-Id: Ife7168aebd5de6d017c48d3d7b6b1a0227c25f7c" }, { "role": "assistant", "content": "def start(context, log, args):\n import time\n\n duration = args['duration']\n period = 20\n\n n...
python
new_file
1
4
apache-2.0
45bdbad2aac5aaf78ef12cb0ea87d7e5212939d3
CiscoSystems/os-sqe,CiscoSystems/os-sqe,CiscoSystems/os-sqe
lab/disruptors/n9k_ip_block.py
rejected_duplicate
Near-duplicate of sample 8806
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license. \n# See the NOTICE for more information.\n\nimport os\nimport sys\nimport traceback\n\nfrom gunicorn import util\nfrom gunicorn.app.base import Applic...
python
edit
2
2
mit
2c73a41ab78b41da7b6f2ccbd16140fa701d74f2
WSDC-NITWarangal/gunicorn,wong2/gunicorn,ccl0326/gunicorn,ephes/gunicorn,tempbottle/gunicorn,zhoucen/gunicorn,prezi/gunicorn,urbaniak/gunicorn,wong2/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,alex/gunicorn,keakon/gunicorn,jamesblunt/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,1stvamp/gunicorn,elelianghh/gunico...
gunicorn/app/wsgiapp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Reduce versions to easier requirements.txt style\n\nGiven an `aRchive_output_path/PACKAGE_versions_full.txt` file, this\nreduces it into the component\n`aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which\nlook like:\n\n ...
python
new_file
2
4
mit
fbae1c6af008b8ac48a06f98ee61a8d06bf45736
bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code
reduce_versions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Reset script for incorrectly-extracted PDFs." }, { "role": "assistant", "content": "GEVENT = False\n\nfrom regs_models import Doc\nimport json\nimport itertools\n\ndef split_seq(iterable, size):\n it = iter(iterable)\n item...
python
new_file
2
2
bsd-3-clause
a5d07496162d40e23c966f1cb3f340845f638c07
sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper
one_offs/pdf_repair/fix_pdfs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix watcher audit list command\n\nThis patch set adds data migration version that fills noname audits\nwith name like strategy.name + '-' + audit.created_at.\n\nCloses-Bug: #1738758\nChange-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d" },...
python
new_file
1
2
apache-2.0
95548af426e823687e03fdb3abcd5fb714c96cbe
openstack/watcher,stackforge/watcher,stackforge/watcher,openstack/watcher
watcher/db/sqlalchemy/alembic/versions/a86240e89a29_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to add missing system tags" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Add system tags that weren't added during the Toku->Postgres migration.\nPass a path to a JSON file that has node IDs as ...
python
new_file
1
4
apache-2.0
c269f2e7a161ee0fdcafed2beb0883cabe1a960f
CenterForOpenScience/osf.io,caneruguz/osf.io,pattisdr/osf.io,adlius/osf.io,aaxelb/osf.io,laurenrevere/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,caseyrollins/osf.io,felliott/osf.io,chrisseto/osf.io,adlius/osf.io,Nesiehr/osf.io,HalcyonChimera/osf.io,crcresearch/osf.io,mfraezz/osf.io,mfraezz/osf.io,erinspace/osf.io,casey...
scripts/fix_system_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create test scaffold for command functions" }, { "role": "assistant", "content": "from django.test import TestCase\n\nfrom molo.core.tests.base import MoloTestCaseMixin\nfrom molo.core.management.commands.move_page_links_to_recom...
python
new_file
1
1
bsd-2-clause
d44f3ca6cecab959aeefe20b32df7e47c84f3828
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
molo/core/tests/test_commands.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move code to the root of the main module." }, { "role": "assistant", "content": "class ViewBase(object):\n \"\"\"\n Base class for all views and nodes.\n \"\"\"\n\n # database session\n _session = None\n # the s...
python
new_file
1
7
bsd-3-clause
d0c8c7b61906e65137057406b5b94a01f9c61b84
cr0cK/keepsimple.cms,cr0cK/keepsimple.cms,cr0cK/keepsimple.cms
keepsimplecms/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add calculate AUC value of PR curve by sklearn" }, { "role": "assistant", "content": "#!/usr/local/bin/python3\n# -*- coding: utf-8 -*-\n'''使用real.csv和result.csv表格数据,计算PR曲线的AUC值'''\nimport sys\nimport pandas\nfrom pandas import D...
python
new_file
4
3
mit
e54232b9cdd9c845f2d9386ed58cd3d4d25db701
9468305/script
auc_pr.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: tests: Add test for dict delete. It fails." }, { "role": "assistant", "content": "for i in range(100):\n d = dict()\n for j in range(100):\n d[j] = j\n del d[i]\n for j in range(100):\n if j not in d:\n...
python
new_file
1
0
mit
b6ec51bbf0a6d7ccb17e66d78f041594f5a9030d
tralamazza/micropython,mgyenik/micropython,martinribelotta/micropython,adafruit/micropython,tuc-osg/micropython,jmarcelino/pycom-micropython,MrSurly/micropython,puuu/micropython,heisewangluo/micropython,heisewangluo/micropython,feilongfl/micropython,turbinenreiter/micropython,torwag/micropython,MrSurly/micropython,TDAb...
tests/basics/dict-del.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set up with mongo: working" }, { "role": "assistant", "content": "from flask import Flask\nfrom flask.ext.pymongo import PyMongo\nfrom bson.json_util import dumps\n\napp = Flask('test')\nmongo = PyMongo(app)\n\n@app.route('/')\nd...
python
new_file
1
1
mit
d94398d6ce3c6e40735ae3b3b82a3d31a5718d78
liakhandrii/genetic_cars,liakhandrii/genetic_cars
analytics/app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to check party/speeches data\n\nAdded a quick and dirty script to determine additional corpus statistics,\nsuch as\n- party names\n- number of speeches found\n- number of speeches without party\n- number of speeches per party\n\nb...
python
new_file
6
0
apache-2.0
70d6a5c67730e17d8d766eb1e8e6f21eeeda7c04
NLeSC/cptm,NLeSC/cptm
cptm/folia_party_names.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Test for multithreading with twisted framework" }, { "role": "assistant", "content": "\"\"\"\nThis file implements testing ing langcodes module for multithreaded env\n\nProblem is still there if you try to acccess that module fro...
python
new_file
2
2
mit
864403b982f9a2cb1c4266ebe80ff3ca4d8a572a
darkman66/langcodes
langcodes/test_multithread.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add util to find config options" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n# Small script to find variables that can be declared in config...\nimport os\nimport re\nfrom pprint import...
python
new_file
1
6
bsd-3-clause
a9efa21d153faea171c7e916de91ee787e877a69
aapa/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,EArmour/pyfibot,aapa/pyfibot,huqa/pyfibot
pyfibot/util/find_config_opts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to define how new exceptions module should work" }, { "role": "assistant", "content": "\"\"\"tests/test_exceptions.py.\n\nTests to ensure custom exceptions work and are formatted as expected\n\nCopyright (C) 2015 Timothy...
python
new_file
3
4
mit
d4c432f8652b6884fcd02e3b532036a152f58b84
MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
tests/test_exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function for plotting fit vs step\n\nA simple function to plot the fitness function vs. iteration from the\nlogfile generated by MSIBI.optimize().\nThis may belong in a different location, but putting it here for now." }, { "role...
python
new_file
1
6
mit
b4421d0fa5a4c8dd509513553939958ee616d46a
ctk3b/msibi,mosdef-hub/msibi,mosdef-hub/msibi
msibi/utils/plot_fit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test to check if an optical mouse can be used as a course sensor" }, { "role": "assistant", "content": "from pymouse import PyMouse\nimport time\n# This script demonstrates the possibility to use a mouse as an unbound senso...
python
new_file
2
0
mit
71cdf03644215ec3032605e6772dc897d0d78b05
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Sensors/testMouse.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add export data into apache folder script" }, { "role": "assistant", "content": "#python mk_json_quert.py & excute it in backgroud\n# excute ES query and export it to apache directory for data visulization\nimport datetime\nfrom ...
python
new_file
null
null
mit
612d2e3f749244c00404d97d93982c88538ce8aa
yuecong/tools,yuecong/tools,yuecong/tools,yuecong/tools
mk_json_query.py
rejected_code_smell
Internal duplication: ~60% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Add pirate-enabled version of the hook" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport sys\nimport os\nfrom tasklib.task import Task, TaskWarrior\n\ntime_attributes = ('wait', 'until', 'scheduled')\n\ndef is_ne...
python
new_file
3
4
mit
0899c6516bd9bf8fdd4bd973106eaa1ffcf67667
tbabej/task.shift-recurrence
pirate_add_shift_recurrence.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Insertion Sort for float numbers\n\nI am planning to implement all sorting techniques I learn in this script\nAlso I will try to incoporate time comparison at a later stage.\n\nSigned-off-by: Aditya Prasad <<EMAIL>>" }, { "role":...
python
new_file
11
4
mit
5582e074cc68dc7b97d4b33211b74fb4813e2f17
Aditya8795/Python-Scripts
Sorting.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add script for getting rid of too wide NPs" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport sys\nfrom nltk.tree import Tree\n\ndef sort_nps():\n with open(sys.argv[1]) as np_doc:\n for line in np_...
python
new_file
1
3
mit
fcab7caa8bfd8a7bb3735aa6b61c226a9ad6426e
kornai/4lang,kornai/4lang,kornai/4lang,kornai/4lang
exp/alto/tools/filter_width.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command to run the checks" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.core.management.base import BaseCommand, CommandError\nfrom velkoja.nordeachecker import NordeaOverdueInvoicesHa...
python
new_file
3
3
mit
9ddd96bbe727f61c41f73d786b5beea9a85482a9
HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum
project/velkoja/management/commands/check_nordea_overdue.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Rename pre-pull and move to scripts/." }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport argparse\nimport os\nimport sys\nimport string\nimport subprocess\n\nimport escapism\n\nsafe_chars = set(string.ascii_lowerc...
python
new_file
5
4
bsd-3-clause
8840e38e5d3107564338de4e47bfd65aae5723ee
berkeley-dsep-infra/datahub,gunjanbaid/datahub,ryanlovett/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,gunjanbaid/datahub
scripts/git-pre-cloner.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add missing TestSuite ON DELETE UPDATE constraints" }, { "role": "assistant", "content": "\"\"\"Set ON DELETE CASCADE on TestSuite.*\n\nRevision ID: 4d5d239d53b4\nRevises: 501983249c94\nCreate Date: 2013-12-23 16:14:08.812850\n\n...
python
new_file
1
1
apache-2.0
bcd45f883b6442f7a1205979bdc79c69ccd2a623
wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes
migrations/versions/4d5d239d53b4_set_on_delete_cascad.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test file for COPY client" }, { "role": "assistant", "content": "import os\nimport pytest\nimport time\n\nfrom carto.exceptions import CartoException\nfrom carto.sql import SQLClient, BatchSQLClient, CopySQLClient\n\n\nSETUP_...
python
new_file
7
2
bsd-3-clause
32a9a608a6489528089b68857965afdc4b7c76cc
CartoDB/cartodb-python,CartoDB/carto-python
tests/test_sql_copy.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: PUBDEV-2979: Add extra Python test for mean-per-class error." }, { "role": "assistant", "content": "import sys\nsys.path.insert(1,\"../../\")\nimport h2o\nfrom tests import pyunit_utils\nfrom h2o.estimators.gbm import H2OGradient...
python
new_file
1
1
apache-2.0
27b6b0b62624ccd80345768f664ae2f421f85368
spennihana/h2o-3,spennihana/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,spennihana/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,mathemage/h2o-3,h2oai/h2o-3,h2oai/h2o-3,spennihana/h2o-3,jangorecki/h2o-3...
h2o-py/tests/testdir_misc/pyunit_mean_per_class_error.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create container, build the spurce and run ardurover" }, { "role": "assistant", "content": "import docker\nimport dronekit\n\n# connect to the Docker daemon\nclient = docker.client.from_env()\nprint(\"AAA\")\n\n# provision a cont...
python
new_file
3
0
mit
637b95a59f740314ea82d8dcced67656d150d8a8
squaresLab/Houston,squaresLab/Houston,squaresLab/Houston
concept.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial test for base block elements" }, { "role": "assistant", "content": "\"\"\"tests/test_base.py.\n\nTests the base blox to ensure they provide solid functionality for a Python dom representation\nCopyright (C) 2015 Timot...
python
new_file
4
0
mit
730e8b79a8c5c27751cc429f348932bd3638bd85
timothycrosley/blox,timothycrosley/blox,timothycrosley/blox
tests/test_base.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Complete day 1 part 2" }, { "role": "assistant", "content": "with open('day-1-input.txt', 'r') as f:\n puzzle_input = f.read()\n\n\ncurrent_floor = 0\ncurrent_position = 0\n\nfor paren in puzzle_input:\n current_position +=...
python
new_file
1
0
mit
afc9ac087d4d5e31f25542579e5e0ade4d29a3c2
foxscotch/advent-of-code,foxscotch/advent-of-code
day-1-2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add testing of behavior when syscall fails" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom butter import eventfd, _eventfd\nfrom pytest import raises\nimport pytest\nimport errno\n\n@pytest.mark.parametrize('...
python
new_file
3
1
bsd-3-clause
d2d4e057b3a1de8f2be917aa5b8b3a4c0f5e1dc5
dasSOZO/python-butter,wdv4758h/butter
tests/unit/test_execeptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add two new letter logos" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0225_another_letter_org\nRevises: 0224_returned_letter_status\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '...
python
new_file
1
2
mit
244e91021d87a52dc985eedc8f974653f290c4bd
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0225_another_letter_org.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add per channel K conversion function" }, { "role": "assistant", "content": "\nfrom spectral_cube import SpectralCube, VaryingResolutionSpectralCube\nfrom astropy.io import fits\nimport astropy.units as u\nimport os\n\nfrom .io_u...
python
new_file
3
6
mit
769d8b85ba9591d5640008dd2812c1db96cd3cef
e-koch/CubeAnalysis
cube_analysis/cube_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ADD initial environment unit tests" }, { "role": "assistant", "content": "from src.main.core.database import *\nfrom src.main.core.database.environment.environment import Environment\nfrom src.main.core.database.environment.user_...
python
new_file
11
2
apache-2.0
b63dd66a96b503eb10d2eb49162ed4ed99a9e8f2
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
apps/domain/tests/test_core/test_manager/test_env_manager.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Move clippped_loss into a separate file" }, { "role": "assistant", "content": "from chainer import functions as F\n\ndef clipped_loss(x, t):\n diff = x - t\n abs_loss = abs(diff)\n squared_loss = diff ** 2\n abs_loss ...
python
new_file
1
1
mit
9ea0dcb8a749461770dfeb7a77c6e3d210afa94e
toslunar/chainerrl,toslunar/chainerrl
clipped_loss.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Add User.name column\n\nRevision ID: ad456cec28f4\nRevises: d767d9266a19\nCreate Date: 2016-11-21 03:03:08.967762\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = 'ad456cec28f4'\ndown_revision = 'd767d9266a19'\n\nfrom...
python
edit
1
1
mit
8d6c7623539a7109893c10aca0e116bf41b51634
usgo/online-ratings,usgo/online-ratings,usgo/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings
web/migrations/versions/ad456cec28f4_add_user_name_column.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add outline parent class for defining experiments" }, { "role": "assistant", "content": "class Experiment(object):\n def __init__(self, epochs=1):\n self.epochs = epochs\n\n def get_epochs(self):\n return self...
python
new_file
1
1
apache-2.0
4cc7d842afbb9ca2f324886de1974e7dacb600dd
sagelywizard/dlex
dlexperiment.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial aperture descriptor classes" }, { "role": "assistant", "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nDescriptor class(es) for aperture attribute validation.\n\"\"\"\n\nimport wea...
python
new_file
1
3
bsd-3-clause
a1d2ec80dff63c7e208305207c697e5d3604a8f5
larrybradley/photutils,astropy/photutils
photutils/aperture/attributes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add component for converting between numpy types" }, { "role": "assistant", "content": "import Axon\n\nclass TypeConverter(Axon.Component.component):\n type = None\n def main(self):\n while 1:\n if self.da...
python
new_file
1
5
apache-2.0
b0cafcf2b4ca61f5d2581c833851f9ac24968a98
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/Numpy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [AC-9265] Merge remote-tracking branch 'origin' into AC-9265" }, { "role": "assistant", "content": "# Generated by Django 2.2.24 on 2021-11-29 12:36\n\nfrom django.db import migrations\n\n\ndef update_judging_commitment_view_url(...
python
new_file
1
1
mit
b07fcb6cc416c1b8c2a872e054069de218b7f3a5
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0077_update_sitetree_judging_commitment_view_url.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add pythons script to make charts." }, { "role": "assistant", "content": "#!/usr/bin/python3\n\nimport sys\nimport os\nimport subprocess\n\nif len(sys.argv) < 3:\n\tprint(\"Provide reference image and output file.\")\n\texit(1)\n...
python
new_file
1
3
mit
ac19575d72a78b0c7a6e51a51738209ac7caf26e
ciechowoj/master,ciechowoj/master,ciechowoj/master
extract.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a sinus utilities for the servo module." }, { "role": "assistant", "content": "from __future__ import division\n\nfrom threading import Thread\nfrom time import time, sleep\nfrom math import sin, pi\n\n\nclass Sinus(object):\...
python
new_file
1
2
mit
0a29c11ca7b2769f993a131b6d9df35b33f3538c
pollen/pyrobus
pyrobus/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test that backend actually sends the events" }, { "role": "assistant", "content": "import threading\nimport unittest\n\nfrom pykka.actor import ThreadingActor\nfrom pykka.registry import ActorRegistry\n\nfrom mopidy.backends.dumm...
python
new_file
1
1
apache-2.0
83863814795bf2fc6ddf12c1a45aa531afb1662c
kingosticks/mopidy,diandiankan/mopidy,glogiotatidis/mopidy,vrs01/mopidy,dbrgn/mopidy,liamw9534/mopidy,SuperStarPL/mopidy,quartz55/mopidy,ZenithDK/mopidy,diandiankan/mopidy,ali/mopidy,kingosticks/mopidy,vrs01/mopidy,pacificIT/mopidy,ali/mopidy,diandiankan/mopidy,rawdlite/mopidy,vrs01/mopidy,bencevans/mopidy,tkem/mopidy,...
tests/backends/events_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for basic functionality" }, { "role": "assistant", "content": "import textwrap\nimport sys\nimport subprocess\n\n\ndef test_pkg_imported(tmpdir):\n\t\"\"\"\n\tCreate a script that loads cython and ensure it runs.\n\t\"\"...
python
new_file
1
1
mit
143500bc7064b05d0ce4a132cce1f48ddb1ecee7
jaraco/rwt
rwt/tests/test_scripts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the user interface for string/password obfuscation" }, { "role": "assistant", "content": "\"\"\"\nObfuscates a string/password into a string that can be decrypted later on.\n\nUsage:\npython obfuscate.py\nThen enter the passw...
python
new_file
1
4
mit
95009e638dfa5a20a7277a326607ba7090162fc0
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase
seleniumbase/common/obfuscate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python wrapper around fftpack dct." }, { "role": "assistant", "content": "\"\"\"\nReal spectrum tranforms (DCT, DST, MDCT)\n\"\"\"\n\n__all__ = ['dct1', 'dct2']\n\nimport numpy as np\nfrom scipy.fftpack import _fftpack\n\nimp...
python
new_file
2
7
bsd-3-clause
1ced12173272a670b001cf17aa0beb08bae2eb8a
ilayn/scipy,ortylp/scipy,kalvdans/scipy,perimosocordiae/scipy,surhudm/scipy,witcxc/scipy,befelix/scipy,pbrod/scipy,minhlongdo/scipy,efiring/scipy,sauliusl/scipy,vanpact/scipy,cpaulik/scipy,sriki18/scipy,endolith/scipy,jjhelmus/scipy,giorgiop/scipy,vigna/scipy,apbard/scipy,WarrenWeckesser/scipy,larsmans/scipy,woodscn/sc...
scipy/fftpack/realtransforms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to convert the archives index\n\nThe Archives provided us with an index mapping a place\nto a range of identifier. This needs some work to be useful." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"...
python
new_file
2
2
mit
5cabd890b65102e3a28fa864af45bec19ee0e601
JeanFred/TrutatBis
index_converter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement management command to switch backend server in JIRA Service Desk plugin." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\n\nfrom waldur_mastermind.support import backend as sup...
python
new_file
1
3
mit
d215b6d00d06ffa9917b7bdf8323f33d83e35cf7
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/support/management/commands/switching_backend_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write multithreaded script to get all weather for existing incidents in the database" }, { "role": "assistant", "content": "from mapApp.models import Incident, Weather\nfrom mapApp.utils.weather import get_weather\nimport threadi...
python
new_file
2
4
mit
48c5e7ce3029ab67c755b6fa0c08412525bd0a0a
SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps
mapApp/utils/weather4all.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a small too to update qibuild.cmake inside git repos" }, { "role": "assistant", "content": "## Copyright (C) 2011 Aldebaran Robotics\n\n# Update all the qibuild.cmake files in a git repo\n# (this will be done automatically by...
python
new_file
3
5
bsd-3-clause
6c885eb92d7e150e39297d32c45fc8d69aae099f
dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild
tools/update-qibuild-cmake.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add task to upload a dir to S3" }, { "role": "assistant", "content": "import os\n\nimport boto\nfrom boto.utils import compute_md5\nfrom fabric.decorators import task\nfrom fabric.utils import puts\n\n\ndef upload_file(bucket, ke...
python
new_file
1
5
mit
c5631d19baecb2884d4dbc98ecaa333c615efbab
vmalavolta/fabix
fabix/aws/s3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new patch type that allows for multiple wrappers\n\nPatchSimple allows for exactly one wrapper for input and output functions\nrespectively. For xarray output function save_mfdataset, the default wrapper\nwhich logs argument 0 does not w...
python
new_file
1
5
apache-2.0
7b2c082f117a5481823c806af926b812045933e7
recipy/recipy,recipy/recipy
recipy/PatchMultipleWrappers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..vtask import VTask, TryLater\nimport time\nfrom ..sparts import option, counter, samples, SampleType\nfrom threading import Event\n\n\nclass PeriodicTask(VTask):\n INTERVAL = None\n\n execute_duration = samples(windows=[60, 240...
python
edit
1
5
bsd-3-clause
977fb316f3a27f6516fac2a6323545381fdd7cc0
djipko/sparts,pshuff/sparts,fmoo/sparts,bboozzoo/sparts,djipko/sparts,pshuff/sparts,bboozzoo/sparts,facebook/sparts,facebook/sparts,fmoo/sparts
sparts/tasks/periodic.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tooling to get all of edx's web services." }, { "role": "assistant", "content": "import github\nfrom get_repos import *\n\n\nwebservices = []\n\nfor repo in expanded_repos_list(orgs):\n try:\n metadata = get_remote_...
python
new_file
5
0
apache-2.0
25cf11421fc3f123e4d623f9736867b3800412ba
edx/repo-tools,edx/repo-tools
python3_tools/get_edx_webservices.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Implement simple unit tests for loading data at startup" }, { "role": "assistant", "content": "import unittest\nimport sys\nsys.path.append('soccer')\nimport leagueproperties\nimport leagueids\nimport main\n\nclass TestLoadData(u...
python
new_file
1
2
mit
24478a92ef1218ade7867ba5a2f2d8172aea8c64
Saturn/soccer-cli,architv/soccer-cli
tests/test_load_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for PCA compressing jacobian arrays." }, { "role": "assistant", "content": "import climate\nimport logging\nimport numpy as np\nimport os\n\nfrom sklearn.decomposition import PCA\n\n\ndef compress(source, k='mle', key=...
python
new_file
2
9
mit
953bc05e048cb7e00db540254103ec86664ad1d6
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/11-compress-jacobians.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a sample script for searching subnets in a CIDR\n\nSee request in community:\n\nhttps://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha\nve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430" }, { ...
python
new_file
3
0
mit
4374eb9cf20350f1d5610bfbae358dbb733bb044
infobloxopen/netmri-toolkit,infobloxopen/netmri-toolkit,infobloxopen/netmri-toolkit
python/subnets-in-cidr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add screen rotation script for surface" }, { "role": "assistant", "content": "import sys\nimport os\nimport subprocess\nimport re\n\nstatus = subprocess.check_output([\"xrandr\", \"-q\"])\nprint (status)\n\nlines = status.split(\...
python
new_file
4
0
apache-2.0
8bc64c7e0d461ba51459f927f54822cbacf8404f
NickTGraham/PythonPack,NickTGraham/PythonPack
Surface/rotate.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Refactor factory testing even more" }, { "role": "assistant", "content": "import pytest\n\n\ndef test_factory(factory):\n try:\n factory()\n except Exception as e:\n pytest.fail(\n f\"Failed factory...
python
new_file
1
2
apache-2.0
f72f7252808266b8ee9e3f5f46b3c617a4b1f787
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/tests/model_helpers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for RGW daemon naming\n\nSigned-off-by: Travis Rhoden <<EMAIL>>" }, { "role": "assistant", "content": "import pytest\nimport subprocess\n\nimport ceph_deploy.rgw as rgw\n\n\ndef test_help(tmpdir, cli):\n with cli(\n ...
python
new_file
1
1
mit
46852d7ed9a4e03084cbd2c3d296d10946e5190f
ddiss/ceph-deploy,trhoden/ceph-deploy,shenhequnying/ceph-deploy,ceph/ceph-deploy,imzhulei/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,ceph/ceph-deploy,ghxandsky/ceph-deploy,isyippee/ceph-deploy,isyippee/ceph-deploy,imzhulei/ceph-deploy,ddiss/ceph-deploy,alfredodeza/ceph-deploy,branto1/ceph-deploy,branto1/ceph-deploy,Vic...
ceph_deploy/tests/test_cli_rgw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add failing test for eval'd numeric array keys" }, { "role": "assistant", "content": "if __name__ == \"__main__\":\n import sys\n sys.path.append('../plugin/python/')\nimport unittest2 as unittest\nimport vdebug.dbgp\nimpor...
python
new_file
1
1
mit
96e782563564af0291d8e536a5adc0b20caf1648
paprykarz/vdebug,joonty/vdebug,joonty/vdebug,Taluu/vdebug,paprykarz/vdebug,joonty/vdebug,Taluu/vdebug,Taluu/vdebug,paprykarz/vdebug
tests/test_dbgp_eval_property.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple test that table is readable" }, { "role": "assistant", "content": "from astropy.table import Table\n\nTABLE_NAME = 'feder_object_list.csv'\n\n\ndef test_table_can_be_read():\n objs = Table.read(TABLE_NAME, format='a...
python
new_file
1
2
bsd-2-clause
cfe18ca2fb113379af33f7172c8bb67787c82a1d
mwcraig/feder-object-list
test_valid_object_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to calculate box proto recall." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame\nfrom vdetlib.utils.common im...
python
new_file
2
0
mit
89d6ce60906bf619bea8cb5c8d0d51c9269fc781
myfavouritekk/TPN
tools/stats/box_recall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for an invalid merge" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom opentreetesting import test_http_json_method, config\nimport sys\n\nDOMAIN = config('host', 'apihost')\nSUBMIT_URI = DOMAIN + '/me...
python
new_file
1
0
bsd-2-clause
6b2cb0bfc41a26eb5cb259a66feb937a8564c705
OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api
ws-tests/test_invalid_merge.py
rejected_duplicate
Near-duplicate of sample 8845
true
[ { "role": "user", "content": "Write python code for the following: Add Module for Displaying Flags in Tkinter Window" }, { "role": "assistant", "content": "import Tkinter\nimport flaggen\n\nclass FlagFrame(Tkinter.Frame):\n def __init__(self, master, flag, *args, **kwargs):\n Tkinter.F...
python
new_file
3
1
mit
ff9519261e73a77733e6b4566dd1666d05bacf3d
Eylrid/flaggen
display.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one" }, { "role": "assistant", "content": "import numpy\n\nfrom pysc2.agents import base_agent\nfrom pysc2.lib import actions\nfrom py...
python
new_file
1
7
apache-2.0
1b42dc4d49ccbef9b2ed4bd31e8bb32b597a3575
Xaxetrov/OSCAR,Xaxetrov/OSCAR
oscar/agent/scripted/minigame/nicolas_mineralshard.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix missing contexts for assessment evidence" }, { "role": "assistant", "content": "# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"\nFix Assessment contex...
python
new_file
1
1
apache-2.0
46a0acede9dbbb1e751f5197a22be545e291d042
AleksNeStu/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core
src/ggrc/migrations/versions/20170219221807_4e7fda17abc7_fix_assessment_contexts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add RRClass generation script to git" }, { "role": "assistant", "content": "import enumgen\nfrom pprint import pprint\nimport os\nimport os.path\n\ndata = enumgen.fetch_csv(\n\t\"http://www.iana.org/assignments/dns-parameters/dns...
python
new_file
3
0
bsd-2-clause
e17e436b7671b3c6834d286c91f541ee768fadac
oko/rust-dns
script/gen-iana-rclasses.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic dev config" }, { "role": "assistant", "content": "from pycon.settings import *\n\nDEFAULT_URL_PREFIX='http://localhost:8000'\nDEBUG=True\n\nPAYPAL_TEST = True\n\nTEMPLATES[0]['OPTIONS']['debug'] = True" } ]
python
new_file
3
0
bsd-2-clause
eef6bac6cf333b1df874381b6140c5737d5f8c57
artcz/epcon,EuroPython/epcon,artcz/epcon,artcz/epcon,artcz/epcon,artcz/epcon,artcz/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
pycon/dev-settings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n##############################...
python
new_file
1
0
mit
919f8bb14ae91e37e42ff08192df24b60135596f
zeroonegit/python,QuinceySun/Python,QuinceySun/Python,zeroonegit/python
python_programming/what_is_my_name.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add diff bench test script." }, { "role": "assistant", "content": "\n# use time() instead on unix\nimport sys\nif sys.platform=='win32':\n from time import clock\nelse:\n from time import time as clock\n\nfrom sympycore imp...
python
new_file
5
2
bsd-3-clause
89f6654f921d2a373a3cbb0f521f2dbbb31f3de8
pearu/sympycore,pearu/sympycore
research/test_diff.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a snippet (Python OpenCV)." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)\n\n\"\"\"\nOpenCV - Play video: play videos from fi...
python
new_file
1
3
mit
d9302fab69d16f556adf27248c0fa7f7d12dc2ec
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
python/opencv/opencv_2/videos/play_video_from_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting.\n\nBUG=\n\nReview URL: https://codereview.chromium.org/1166123004\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03e...
python
new_file
5
1
bsd-3-clause
44de127d69cd00dfc636e2f8f2cdf42f0e85b7d4
axinging/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-cross...
remoting/PRESUBMIT.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add new coupon script to generate coupons using a CSV file." }, { "role": "assistant", "content": "\n\"\"\" Create a batch of single use discount coupons from a CSV file.\n\n Parameters: <conference> <csv-file>\n\n Creates ...
python
new_file
3
8
bsd-2-clause
c0ba8348f614f2ef6c14db9335ba3d1a6f3d29af
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
p3/management/commands/create_bulk_coupons.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Node holder for Eve." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom eve_neo4j.utils import node_to_dict, count_selection\n\n\nclass Neo4jResultCollection(object):\n \"\"\"\n Collection of result...
python
new_file
1
2
mit
d4840c794f9d9de252028a7899d470753615d3d5
Grupo-Abraxas/eve-neo4j,Abraxas-Biosystems/eve-neo4j
eve_neo4j/structures.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport mock\n\nfrom sentry import app\nfrom sentry.testutils import TestCase\n\n\nclass AppTest(TestCase):\n def test_buffer_is_a_buffer(self):\n from sentry.buf...
python
edit
1
1
bsd-3-clause
a5c723b589699fdf80c42a4186c2fdc0c8d84bb4
JackDanger/sentry,mvaled/sentry,BuildingLink/sentry,alexm92/sentry,alexm92/sentry,mvaled/sentry,gencer/sentry,JamesMura/sentry,ifduyue/sentry,zenefits/sentry,jean/sentry,fotinakis/sentry,gencer/sentry,zenefits/sentry,gencer/sentry,JamesMura/sentry,zenefits/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,gencer/s...
tests/sentry/app/tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for projecting parameters upward.\n\n\n\ngit-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345" }, { "role": "assistant", "content": "import unittest\nimport numpy\nimport dadi\n\n...
python
new_file
1
1
bsd-3-clause
7794500c352b0a2f536bbac7be07837d8fa0efef
RyanGutenkunst/dadi,niuhuifei/dadi,beni55/dadi,beni55/dadi,yangjl/dadi,cheese1213/dadi,ChenHsiang/dadi,cheese1213/dadi,paulirish/dadi,niuhuifei/dadi,paulirish/dadi,ChenHsiang/dadi,yangjl/dadi,RyanGutenkunst/dadi
tests/test_Projection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple script for benchmark execution" }, { "role": "assistant", "content": "# *****************************************************************************\n# Copyright (c) 2020, Intel Corporation All rights reserved.\n#\n# ...
python
new_file
5
3
bsd-2-clause
934a7d166eb74fcd2ee3eaef79b63fabd61dc45c
IntelLabs/hpat,IntelLabs/hpat,IntelLabs/hpat,IntelLabs/hpat
buildscripts/run_benchmarks.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to print bot id" }, { "role": "assistant", "content": "import os\nfrom slackclient import SlackClient\n\n# Update with your bot's name\nBOT_NAME = 'watsonbot'\n\nslack_client = SlackClient(os.environ.get('SLACK_BOT_TOK...
python
new_file
1
0
apache-2.0
6fc5e78136285370d7606f31816b0fdf3a58606e
kostickm/watsonbot
print_bot_id.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Template class and implement json handler" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport json\nimport logging\nimport pathlib\n\nGITHUB_URL = 'https://github.com/{user}/{repo}'\n\nTEMPLATE_DIR = p...
python
new_file
1
3
bsd-3-clause
5ef92912ca5d4a3bd3469aae7cfd5f4eca1055f7
hackebrot/cibopath
cibopath/templates.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a python script for combining imports" }, { "role": "assistant", "content": "from __future__ import with_statement\nimport os\n\nfile_contents = {}\nfile_imports = {}\n\ndef get_file(file_name):\n if file_name[-2:] != '.v'...
python
new_file
1
6
mit
a3352bb43c0c9b696e09fbb3dfed2c70e9bb5f12
JasonGross/coq-tools,JasonGross/coq-tools
replace_imports.py
rejected_duplicate
Near-duplicate of sample 6556
true
[ { "role": "user", "content": "Write python code for the following: Add example for inverted image comparison.\n\nAn additional example which tests if\na rotation of the testimages along both axis still\nyields the same results after a PIV evaluation.\nPlease note that this works, except for the outlier dete...
python
new_file
2
2
bsd-3-clause
d9bcab7e07ef4d9c44e0dfa0bcf49510b954ae71
jr7/pypiv
examples/test_mirror.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example of listing exposed URLs for services." }, { "role": "assistant", "content": "import openshift3.endpoints as endpoints\nimport openshift3.resources as resources\n\nclient = endpoints.Client()\n\nprojects = client.oapi....
python
new_file
3
3
bsd-2-clause
3ea10a12026341f692e0bb6abfebdb1b96aa41b2
getwarped/powershift
examples/list-public-addresses.py
accepted
null
true